/*
 * Wayloom website. Colours follow the app (teal brand, amber accent, slate-teal neutrals).
 * Light tokens on :root; dark tokens for the system preference (unless the visitor chose light) and for an explicit
 * dark choice. Components only use tokens.
 */
:root {
  --ground: #f3f6f5;
  --surface: #ffffff;
  --surface-sunk: #e8eeed;
  --ink: #0b1a1a;
  --ink-muted: #475a5b;
  --line: #d9e3e1;
  --brand: #0f766e;
  --brand-strong: #0b5c56;
  --brand-soft: #d5f5ef;
  --on-brand: #ffffff;
  --amber: #f59e0b;
  --amber-ink: #92400e;
  --phone-edge: #0b1a1a;
  --shadow: 0 24px 60px -24px rgb(11 42 40 / 0.35);

  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.875rem, 1.3rem + 2.2vw, 2.625rem);
  --step-4: clamp(2.375rem, 1.5rem + 3.6vw, 3.75rem);

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #061413;
    --surface: #0c201f;
    --surface-sunk: #0a1b1a;
    --ink: #eaf4f2;
    --ink-muted: #9fb5b2;
    --line: #1b3533;
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #0f3b37;
    --on-brand: #042f2e;
    --amber: #fbbf24;
    --amber-ink: #fbbf24;
    --phone-edge: #24403d;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #061413;
  --surface: #0c201f;
  --surface-sunk: #0a1b1a;
  --ink: #eaf4f2;
  --ink-muted: #9fb5b2;
  --line: #1b3533;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --brand-soft: #0f3b37;
  --on-brand: #042f2e;
  --amber: #fbbf24;
  --amber-ink: #fbbf24;
  --phone-edge: #24403d;
  --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

/* Screenshots exist per theme; show the one that matches. */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-quiet { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-muted); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: var(--step--1); }

/* Top bar */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-1);
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { border-radius: 8px; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--ink-muted); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.theme-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.theme-switch button {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted); cursor: pointer;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-checked="true"] { background: var(--brand-soft); color: var(--brand); }
.theme-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar-inner { gap: 12px; }
}
@media (max-width: 400px) {
  .brand span { display: none; }
}

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: var(--step-4); font-weight: 700; }
.hero h1 .accent { color: var(--brand); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.fineprint { font-size: var(--step--1); color: var(--ink-muted); }

/* Boarding-pass stub: the one detail only a travel app has. */
.stub {
  margin-top: 12px;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.stub-route {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 18px 20px 16px;
}
.stub-route > div { display: flex; flex-direction: column; gap: 2px; }
.stub-end { text-align: right; align-items: flex-end; }
.stub .code { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.stub .when { font-size: 0.75rem; color: var(--ink-muted); white-space: nowrap; }
.stub .when abbr { text-decoration: none; }
.stub .when em { font-style: normal; color: var(--amber-ink); }
.stub-thread { width: 100%; height: 24px; min-width: 40px; }
.stub-thread path { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 5 6; }
.stub-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  padding: 12px 20px; font-size: 0.75rem; color: var(--ink-muted);
  border-top: 2px dashed var(--line);
}
.stub-offline { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); }
.stub-offline svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 400px) {
  .stub .code { font-size: 1.6rem; }
  .stub-route { gap: 8px; padding-inline: 16px; }
}

.hero-phone { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone {
  width: min(320px, 78vw);
  aspect-ratio: 600 / 1298;
  max-width: 100%;
  padding: 10px;
  border-radius: 44px;
  background: var(--phone-edge);
  box-shadow: var(--shadow);
}
.phone video, .phone img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 34px;
  background: var(--surface-sunk);
}
.hero-phone figcaption {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  font-size: var(--step--1); color: var(--ink-muted);
}
.play-toggle {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.play-toggle:hover { border-color: var(--ink-muted); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-phone { order: 2; }
}

/* Features */
.features { padding-block: clamp(56px, 8vw, 104px); background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 40rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: var(--step-3); }

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(20px, 3vw, 36px);
}
.spotlight.flip .shot { order: 2; }
.shot {
  justify-self: center;
  width: min(300px, 72vw);
  padding: 8px;
  border-radius: 40px;
  background: var(--phone-edge);
  box-shadow: var(--shadow);
}
.shot img { width: 100%; height: auto; border-radius: 32px; }
.spotlight-copy { display: flex; flex-direction: column; gap: 16px; max-width: 34rem; }
.spotlight-copy h3 { font-size: var(--step-2); }
.spotlight-copy p { color: var(--ink-muted); }

.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px;
  background: var(--brand);
  -webkit-mask: var(--tick) center / 18px no-repeat;
  mask: var(--tick) center / 18px no-repeat;
}
.ticks { --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 6'/%3E%3C/svg%3E"); }

@media (max-width: 760px) {
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .spotlight.flip .shot { order: 0; }
  .spotlight-copy { max-width: none; }
}

.gallery-head { margin-top: clamp(56px, 8vw, 96px); display: flex; flex-direction: column; gap: 8px; }
.gallery-head h3 { font-size: var(--step-2); }
.gallery-head p { color: var(--ink-muted); }
.gallery {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px);
}
.gallery li { display: flex; flex-direction: column; gap: 12px; }
.gallery img {
  width: 100%; height: auto;
  border-radius: 22px; border: 6px solid var(--phone-edge);
  box-shadow: var(--shadow);
}
.gallery span { font-size: var(--step--1); color: var(--ink-muted); line-height: 1.45; }
@media (max-width: 880px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.facts {
  list-style: none; margin: clamp(56px, 8vw, 88px) 0 0; padding: 28px 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
}
.facts li { display: flex; flex-direction: column; gap: 6px; }
.facts strong { font-family: var(--font-display); font-size: var(--step-1); }
.facts span { color: var(--ink-muted); font-size: var(--step--1); line-height: 1.55; }
@media (max-width: 880px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* Install */
.install { padding-block: clamp(56px, 8vw, 104px); }
.install-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.install-head { display: flex; flex-direction: column; gap: 14px; }
.install-head h2 { font-size: var(--step-3); }
.install-head p { color: var(--ink-muted); max-width: 32rem; }
.install-head .install-first { color: var(--ink); }
@media (max-width: 880px) { .install-grid { grid-template-columns: minmax(0, 1fr); } }

.install-panel { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  flex: 1 0 auto; min-height: 52px; padding: 0 18px;
  border: 0; border-bottom: 3px solid transparent; background: transparent;
  font: inherit; font-weight: 600; color: var(--ink-muted); cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 20px; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 50px; min-height: 32px; padding-top: 3px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-family: var(--font-mono); font-size: 0.875rem;
}
.inline-icon {
  display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em;
  fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tip { font-size: var(--step--1); color: var(--ink-muted); padding-top: 16px; border-top: 1px solid var(--line); }

/* FAQ */
.faq { padding-block: 0 clamp(56px, 8vw, 104px); }
.faq-inner { max-width: 800px; }
.faq h2 { font-size: var(--step-3); margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; min-height: 56px; padding: 14px 40px 14px 0; position: relative;
  font-weight: 600; font-size: var(--step-1); display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-muted); max-width: 40rem; }

/* Closing */
.closing { padding-block: clamp(56px, 8vw, 96px); background: var(--brand-soft); }
.closing-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.closing h2 { font-size: var(--step-3); }
.closing p { color: var(--ink-muted); font-size: var(--step-1); margin-bottom: 8px; }

/* Footer */
.footer { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: var(--step--1); color: var(--ink-muted); }
.footer-inner p:last-child { margin-left: auto; }
.brand-small { font-size: var(--step-0); gap: 8px; }
.brand-small img { border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
