/* Beep marketing site. Plain CSS, no build step. */

:root {
  --paper: #eef1ec;
  --paper-raised: #f8f9f6;
  --ink: #15191c;
  --muted: #56606a;
  --line: #d2d8d0;
  --plastic: #2a2e33;
  --plastic-edge: #3a3f45;
  --lcd: #bfcb9b;
  --lcd-ink: #26301b;
  --alarm: #d93a24;
  --alarm-ink: #ffffff;
  --focus: #1f6feb;

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --dot: 'DotGothic16', ui-monospace, monospace;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */

.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em;
  font-variation-settings: 'wdth' 125;
  text-decoration: none;
}
.wordmark svg { width: 28px; height: 28px; }

.site-nav { display: flex; gap: 22px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Hero ---------- */

.hero { padding: clamp(32px, 7vw, 88px) 0 clamp(56px, 9vw, 120px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}

.hero h1 {
  margin: 0 0 24px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 0.98; letter-spacing: -0.035em;
  font-variation-settings: 'wdth' 112;
}
.hero h1 span { display: block; color: var(--muted); font-weight: 500; }

.lede { margin: 0 0 32px; max-width: 34ch; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.45; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none;
}
.button:hover { background: #000; text-decoration: none; }
.hero-note { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- The pager ---------- */

.pager-stage { display: flex; justify-content: center; }

.pager {
  position: relative;
  width: min(360px, 100%);
  padding: 30px 24px 24px;
  border-radius: 30px 30px 44px 44px;
  background: linear-gradient(180deg, var(--plastic-edge), var(--plastic) 22%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 40px 70px -30px rgba(21, 25, 28, 0.55);
  transform: rotate(-3deg);
}
.pager::before { /* belt clip */
  content: ''; position: absolute; left: 50%; top: -14px; width: 88px; height: 18px;
  transform: translateX(-50%); border-radius: 8px 8px 0 0; background: var(--plastic);
}

.pager-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pager-brand {
  font-family: var(--display); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
  font-variation-settings: 'wdth' 125; color: #8a9097;
}
.led { width: 10px; height: 10px; border-radius: 50%; background: #5a2a24; }

.lcd {
  min-height: 168px; padding: 16px 16px 14px;
  border-radius: 10px; border: 3px solid #1d2024;
  background: var(--lcd); color: var(--lcd-ink);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.22);
  font-family: var(--dot); font-size: 1.05rem; line-height: 1.35;
}
.lcd p { margin: 0; }
.lcd-status { display: flex; justify-content: space-between; opacity: 0.8; margin-bottom: 8px !important; }
.lcd-from { margin-bottom: 6px !important; }
.lcd-acked { display: none; }
.pager.is-acked .lcd-page { display: none; }
.pager.is-acked .lcd-acked { display: block; }

.pager-keys { display: flex; gap: 12px; margin-top: 18px; }
.ack {
  flex: 1; padding: 14px 16px; border: 0; border-radius: 14px;
  background: var(--alarm); color: var(--alarm-ink);
  font: 700 1rem/1 var(--body); cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.ack:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
.pager.is-acked .ack { background: #4a5058; }
.key-dot { width: 46px; border-radius: 14px; background: #353a40; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3); }

/* The one orchestrated moment: the page arrives and the pager buzzes. */
@media (prefers-reduced-motion: no-preference) {
  .lcd-page p { opacity: 0; animation: lcd-in 0.01s steps(1) forwards; }
  .lcd-page p:nth-child(1) { animation-delay: 0.5s; }
  .lcd-page p:nth-child(2) { animation-delay: 0.9s; }
  .lcd-page p:nth-child(3) { animation-delay: 1.3s; }
  .lcd-page p:nth-child(4) { animation-delay: 1.5s; }
  .pager:not(.is-acked) { animation: buzz 0.5s ease-in-out 0.5s 3; }
  .pager:not(.is-acked) .led { animation: blink 1s steps(1) 0.5s infinite; }
}
@keyframes lcd-in { to { opacity: 1; } }
@keyframes buzz {
  0%, 100% { transform: rotate(-3deg) translateX(0); }
  20% { transform: rotate(-4deg) translateX(-3px); }
  40% { transform: rotate(-2deg) translateX(3px); }
  60% { transform: rotate(-4deg) translateX(-2px); }
  80% { transform: rotate(-2deg) translateX(2px); }
}
@keyframes blink { 0% { background: var(--alarm); } 50% { background: #5a2a24; } }
@media (prefers-reduced-motion: reduce) {
  .pager:not(.is-acked) .led { background: var(--alarm); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section h2 {
  margin: 0 0 16px;
  font-family: var(--display); font-weight: 750;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -0.025em;
  font-variation-settings: 'wdth' 108;
}
.section-intro { margin: 0 0 48px; max-width: 52ch; color: var(--muted); font-size: 1.15rem; }

/* Ways to reach you */
.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.channel h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; color: var(--muted); }
.channel-address {
  margin: 0 0 18px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.1;
  font-variation-settings: 'wdth' 100;
  overflow-wrap: anywhere;
}
.channel p { margin: 0 0 12px; max-width: 42ch; }
.bubble {
  display: inline-block; margin: 4px 0 14px; padding: 10px 14px;
  border-radius: 18px 18px 18px 4px; background: var(--paper-raised); border: 1px solid var(--line);
}
.bubble code { font-family: var(--body); font-weight: 700; }

/* Alert timeline: a real sequence, so it gets marks and times. */
.timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
}
.timeline::before {
  content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line);
}
.timeline li { position: relative; padding-top: 40px; padding-right: 12px; }
.timeline li::before {
  content: ''; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.timeline time { display: block; font-family: var(--dot); font-size: 1.1rem; }
.timeline span { color: var(--muted); font-size: 0.98rem; }
.timeline .rang::before { background: var(--alarm); border-color: var(--alarm); }
.timeline .acked::before { background: var(--ink); }
.timeline .acked span { color: var(--ink); font-weight: 600; }
.timeline .skipped { opacity: 0.45; }
.timeline .skipped::before { border-style: dashed; }
.timeline-note { margin: 36px 0 0; max-width: 56ch; color: var(--muted); }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.controls div { padding: 22px 28px 0 0; }
.controls div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.controls h3 { margin: 0 0 8px; font-size: 1.15rem; }
.controls p { margin: 0; color: var(--muted); }

/* SMS disclosure: also the opt-in reference for carrier registration */
.sms-terms {
  max-width: 720px; padding: clamp(24px, 4vw, 36px);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 18px;
}
.sms-terms h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.sms-terms p { margin: 0 0 14px; }
.sms-terms p:last-child { margin-bottom: 0; }
.sms-terms .number { font-weight: 700; white-space: nowrap; }

/* Beta */
.beta .wrap { display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.beta h2 { margin-bottom: 8px; }
.beta p { margin: 0; color: var(--muted); max-width: 46ch; }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Legal pages ---------- */

.legal { padding: clamp(32px, 6vw, 72px) 0 96px; }
.legal article { max-width: var(--measure); }
.legal h1 {
  margin: 0 0 8px;
  font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em; line-height: 1.02; font-variation-settings: 'wdth' 110;
}
.legal .updated { margin: 0 0 40px; color: var(--muted); }
.legal h2 { margin: 44px 0 10px; font-size: 1.35rem; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.legal h3 { margin: 24px 0 6px; font-size: 1.05rem; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.callout { padding: 16px 20px; border-left: 4px solid var(--alarm); background: var(--paper-raised); }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .pager-stage { order: -1; }
  .pager { width: min(320px, 100%); }
  .channels { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .controls div, .controls div + div { padding: 20px 0; border-left: 0; }
  .controls div + div { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .site-nav .optional { display: none; }
  .timeline { grid-template-columns: 1fr; gap: 18px; }
  .timeline::before { left: 11px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline li { padding: 0 0 0 40px; }
  .timeline time { display: inline; margin-right: 10px; }
}
