/* ============================================================
   WiFi Card — website stylesheet (minimal, professional)
   Dark-first · one accent · system type · no decoration
   ============================================================ */

:root {
  --bg: #101312;
  --surface: #171b19;
  --surface-2: #1d2320;
  --border: #262d29;
  --text: #e8ebe9;
  --muted: #9aa4a0;
  --accent: #34b898;
  --accent-strong: #6fd6bd;
  --accent-dim: rgba(52, 184, 152, 0.12);
  --good: #6fcf97;
  --radius: 12px;
  --maxw: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfcfb;
    --surface: #ffffff;
    --surface-2: #f2f5f3;
    --border: #e3e8e5;
    --text: #17201c;
    --muted: #5d6a64;
    --accent: #0e7c6b;
    --accent-strong: #0a5f52;
    --accent-dim: rgba(14, 124, 107, 0.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 0 0 0.5em; }
h3 { font-size: 1.02rem; margin: 0 0 0.3em; }
p { margin: 0 0 1em; }

.lead { font-size: 1.08rem; color: var(--muted); max-width: 42rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
section { padding: 52px 0; }
section + section { border-top: 1px solid var(--border); }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  margin-bottom: 10px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; border-radius: 6px; }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--muted); font-weight: 550; font-size: 0.92rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; display: block; }

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 58px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 22px; border-top: 1px solid var(--border); }
  .nav-links a:first-child { border-top: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
}
.btn {
  transition:
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.18s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn-primary { background: var(--accent); color: #ffffff; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0b1512; } }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-tonal { background: var(--surface-2); color: var(--text); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn-row + .store-row { margin-top: 16px; }

/* ---------- hero ---------- */

.hero { padding: 68px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.hero-grid > * { min-width: 0; } /* grid auto-min: keep wide children from blowing out the track */
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 44px 0; } }

.hero-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 16px;
}

.phone-shot {
  border-radius: 18px;
  border: 1px solid var(--border);
  margin: 0 auto;
  max-width: 320px;
}

/* ---------- features ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
  box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.45);
}
.card p { color: var(--muted); margin: 0; font-size: 0.94rem; }

/* ---------- screenshots ---------- */

.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 18px;
}
.shots figure { margin: 0; scroll-snap-align: center; text-align: center; }
.shots img {
  height: 360px;
  width: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.shots figure:hover img { transform: translateY(-5px); }
.shots figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 9px; }

/* ---------- pricing ---------- */

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; margin: 0 auto; }
@media (max-width: 680px) { .price-grid { grid-template-columns: 1fr; } }

.price-card { display: flex; flex-direction: column; }
.price-card .tier { font-weight: 650; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.76rem; color: var(--muted); }
.price-card .amount { font-size: 1.9rem; font-weight: 700; margin: 4px 0 0; }
.price-card .per { color: var(--muted); font-size: 0.88rem; }
.price-card ul { list-style: none; padding: 0; margin: 14px 0 20px; }
.price-card li { padding: 6px 0 6px 26px; position: relative; color: var(--muted); font-size: 0.94rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.price-card.pro { border-color: var(--accent); }
.price-card .btn { text-align: center; margin-top: auto; }

/* ---------- FAQ ---------- */

details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 15px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color 0.18s ease;
}
details.faq summary:hover { color: var(--accent-strong); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--accent-strong); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 0 16px; color: var(--muted); font-size: 0.95rem; }
details.faq .faq-body :last-child { margin-bottom: 0; }

/* ---------- doc pages ---------- */

.doc { max-width: 720px; margin: 0 auto; }
.doc h2 { margin-top: 1.8em; }
.doc h2:first-of-type { margin-top: 1em; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.8em; }
.doc ul { color: var(--muted); }
.doc li { margin-bottom: 6px; }

/* ---------- steps / redeem page ---------- */

.steps { counter-reset: step; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 18px 66px;
  margin-bottom: 12px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (prefers-color-scheme: dark) { .step::before { color: #0b1512; } }
.step h3 { margin-bottom: 3px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.pay-block {
  background: var(--surface);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 12px 0;
}
.pay-block .todo {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: #f0c36c;
  color: #4a3300;
  border-radius: 5px;
  padding: 2px 8px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
}
.pay-block p { margin: 0; }

.callout {
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 16px 0;
}
.callout :last-child { margin-bottom: 0; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 96px 0; }

/* ============================================================
   Motion — "the scan"
   One authored moment (hero arrives blur-to-sharp, then a single
   scan beam sweeps the phone: the product's core interaction).
   Everything else is quiet: one-shot scroll reveals with capped
   stagger, a capability marquee, small hover feedback. All
   compositor-only, gated behind html.js, with a reduced-motion path.
   ============================================================ */

/* ----- scroll reveals (one-shot) ----- */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }

/* staggered children of a [data-stagger] container */
html.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js [data-stagger].in > * { opacity: 1; transform: none; }
html.js [data-stagger].in > :nth-child(2) { transition-delay: 70ms; }
html.js [data-stagger].in > :nth-child(3) { transition-delay: 140ms; }
html.js [data-stagger].in > :nth-child(4) { transition-delay: 210ms; }
html.js [data-stagger].in > :nth-child(5) { transition-delay: 280ms; }
html.js [data-stagger].in > :nth-child(n+6) { transition-delay: 350ms; }

/* ----- hero entrance (the authored moment) ----- */

html.js .h-anim {
  animation: wfc-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes wfc-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-shot { position: relative; margin: 0; } /* UA figure margin would inflate the grid track */
html.js .hero-shot {
  animation: wfc-phone 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
@keyframes wfc-phone {
  from { opacity: 0; transform: translateY(34px) scale(0.98); filter: blur(12px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* one scan beam, top to bottom, then gone */
html.js .scan-region {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 4%;
  bottom: 4%;
  overflow: hidden;
  pointer-events: none;
}
html.js .scan-region::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      transparent calc(50% - 26px),
      rgba(0, 0, 0, 0.1) 50%,
      transparent calc(50% + 26px)),
    linear-gradient(180deg,
      transparent calc(50% - 13px),
      color-mix(in srgb, var(--accent) 32%, transparent) 50%,
      transparent calc(50% + 13px)),
    linear-gradient(180deg,
      transparent calc(50% - 2px),
      var(--accent-strong) 50%,
      transparent calc(50% + 2px));
  animation: wfc-scan 1.7s cubic-bezier(0.45, 0, 0.4, 1) 1.15s 1 both;
}
@keyframes wfc-scan {
  from { transform: translateY(-102%); }
  to { transform: translateY(102%); }
}

/* ----- capability marquee ----- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee + section { border-top: 0; }

.marquee-track {
  display: flex;
  width: max-content;
  animation: wfc-marquee 42s linear infinite;
  animation-play-state: paused; /* paused until JS proves it is onscreen */
}
.marquee-track.in { animation-play-state: running; }
.marquee-track.paused { animation-play-state: paused; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group { display: flex; align-items: center; white-space: nowrap; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
}
.marquee-item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.45;
  margin: 0 20px;
}
@keyframes wfc-marquee { to { transform: translateX(-50%); } }

/* ----- FAQ open feedback ----- */

html.js details.faq[open] .faq-body {
  animation: wfc-faq 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes wfc-faq {
  from { opacity: 0; transform: translateY(-5px); }
}

/* ----- store badges + closing CTA band ----- */

.store-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.store-badge {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease;
}
.store-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.store-badge img { height: 42px; width: auto; display: block; }
.store-badge.small img { height: 34px; }

.cta-band { text-align: center; }
.cta-band .lead { margin-left: auto; margin-right: auto; }
.cta-band .store-row { justify-content: center; margin-top: 24px; }
.cta-band .store-row .btn { align-self: center; }

/* ----- reduced motion: keep meaning, drop movement ----- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal,
  html.js [data-stagger] > * { opacity: 1; transform: none; transition: none; }
  html.js .h-anim,
  html.js .hero-shot,
  html.js .scan-region::before { animation: none; }
  html.js .scan-region { display: none; }
  .marquee-track,
  .marquee-track.in,
  .marquee-track.paused,
  .marquee:hover .marquee-track { animation: none; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee-group[aria-hidden="true"] { display: none; }
  html.js details.faq[open] .faq-body { animation: none; }
  .btn, .card, .shots img, .store-badge { transition: none; }
  .btn:hover, .card:hover, .shots figure:hover img, .store-badge:hover { transform: none; }
}
