/* Fako — vitrine. Dark only, like the app. One typeface (Space Grotesk) + Ubuntu Mono for figures.
   Spacing: 2 4 8 12 16 24 32 40 48 64 80 96. Type: Tailwind scale. Radii: Tailwind. */

@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/space-grotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ubuntu-mono-400.woff2") format("woff2"); }

:root {
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --line: #272727;
  --line-strong: #313131;
  --text: #f4f3ed;
  --muted: #9b9b9b;
  --rx: #5b9aff;
  --tx: #4bdd7f;
  --warn: #ef8f4a;
  --alert: #f4415e;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* dot grid of the app, drawn as an SVG pattern (no gradient) */
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='1' fill='%23ffffff' fill-opacity='0.07'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--dots);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.icon { width: 24px; height: 24px; flex: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px;
  font-weight: 700; text-decoration: none; transition: top 0.4s var(--ease);
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 768px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9999px;
  font: 700 16px/24px var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.7s var(--ease), background-color 0.7s var(--ease), border-color 0.7s var(--ease), color 0.7s var(--ease);
}
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #ffffff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; transform: none; }

/* ── island nav ──────────────────────────────────────────── */
.nav-shell { position: sticky; top: 0; z-index: 40; padding-top: calc(env(safe-area-inset-top, 0px) + 24px); pointer-events: none; }
.nav {
  pointer-events: auto;
  margin: 0 auto; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 16px; border-radius: 9999px;
  background: rgba(24, 24, 24, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 20px; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color 0.7s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.burger { display: none; position: relative; width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 9999px; }
.burger span { position: absolute; left: 11px; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.7s var(--ease), top 0.7s var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 23px; }
.menu-open .burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.overlay {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
  padding: 96px max(32px, env(safe-area-inset-left, 0px)) 48px;
  opacity: 0; visibility: hidden; transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.overlay a { font-size: 36px; line-height: 40px; font-weight: 700; text-decoration: none; transform: translateY(48px); opacity: 0; transition: transform 0.7s var(--ease), opacity 0.7s var(--ease); }
.menu-open .overlay { opacity: 1; visibility: visible; }
.menu-open .overlay a { transform: translateY(0); opacity: 1; }
.menu-open .overlay a:nth-child(1) { transition-delay: 100ms; }
.menu-open .overlay a:nth-child(2) { transition-delay: 150ms; }
.menu-open .overlay a:nth-child(3) { transition-delay: 200ms; }
.menu-open .overlay a:nth-child(4) { transition-delay: 250ms; }

@media (max-width: 767px) {
  .nav-links, .nav .btn { display: none; }
  .burger { display: inline-block; }
  .nav { gap: 16px; padding: 4px 4px 4px 16px; }
}

/* ── hero ────────────────────────────────────────────────── */
.hero { padding-top: 80px; padding-bottom: 64px; text-align: center; }
.hero h1 {
  max-width: 680px; margin: 0 auto;
  font-size: 36px; line-height: 40px; letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ffffff, #9b9b9b); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (min-width: 768px) { .hero h1 { font-size: 60px; line-height: 1; } }
.hero .sub { max-width: 680px; margin: 24px auto 0; font-size: 18px; line-height: 28px; color: var(--muted); }
.hero .cta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: 14px; line-height: 20px; color: var(--muted); }
.proof span { display: inline-flex; align-items: center; gap: 8px; }
.proof .icon { width: 16px; height: 16px; color: var(--tx); }

.shot {
  margin-top: 64px; padding: 8px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
}
.shot img { border-radius: 16px; width: 100%; }
.shot-sm { margin-top: 0; }

.facts { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.fact strong { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; }
.fact span { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ── sections ────────────────────────────────────────────── */
section { padding-top: 96px; padding-bottom: 96px; }
.eyebrow { font-family: var(--mono); font-size: 14px; line-height: 20px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.section-head { max-width: 680px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }
h2 { font-size: 30px; line-height: 36px; }
@media (min-width: 768px) { h2 { font-size: 48px; line-height: 1; } }
.lead { font-size: 18px; line-height: 28px; color: var(--muted); }

/* problem */
.problem { display: grid; gap: 32px; }
@media (min-width: 900px) { .problem { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; } }
.causes { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.causes li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.causes .icon { color: var(--rx); margin-top: 2px; }
.causes p { color: var(--muted); }
.causes b { color: var(--text); font-weight: 500; }

/* tagline reveal */
.tagline { padding-top: 96px; padding-bottom: 96px; }
.tagline p {
  max-width: 880px; margin: 0 auto; text-align: center;
  font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.03em;
}
@media (min-width: 768px) { .tagline p { font-size: 60px; line-height: 1; } }
.tagline .w { color: rgba(244, 243, 237, 0.3); transition: color 0.9s var(--ease); }
.tagline .w.on { color: var(--text); }
.tagline .w.rx.on { color: var(--rx); }
.no-js .tagline .w, .reduce .tagline .w { color: var(--text); }

/* features */
.features { display: flex; flex-direction: column; gap: 96px; }
.feature { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .feature.flip > :first-child { order: 2; }
}
.feature-text { display: flex; flex-direction: column; gap: 16px; }
.feature-text .badge { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--rx); }
.feature-text h3 { font-size: 30px; line-height: 36px; }
.feature-text ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.feature-text li { display: flex; gap: 8px; }
.feature-text li .icon { width: 20px; height: 20px; color: var(--tx); margin-top: 2px; }

.duo { display: grid; gap: 24px; margin-top: 96px; }
@media (min-width: 900px) { .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card h3 { font-size: 24px; line-height: 32px; }
.card p { color: var(--muted); }
.card .badge { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--rx); }
.card .media { margin-top: 8px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }

/* desktop notification mock */
.toasts { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.toast {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-strong);
}
.toast .app { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
.toast b { display: block; font-weight: 500; }
.toast span { display: block; color: var(--muted); font-size: 14px; line-height: 20px; }
.toast time { font-family: var(--mono); color: var(--muted); font-size: 12px; line-height: 16px; }
.toast.dim { opacity: 0.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; padding: 4px 12px; border-radius: 9999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.chip i { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; }

/* steps */
.steps { display: grid; gap: 24px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; }
.steps .card::before { content: counter(step); font-family: var(--mono); font-size: 14px; line-height: 20px; color: var(--muted); }

/* privacy */
.privacy { display: grid; gap: 32px; }
@media (min-width: 900px) { .privacy { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; } }
.checks { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checks li { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.checks .icon { color: var(--tx); }
.checks b { font-weight: 500; }
.checks span { color: var(--muted); font-size: 14px; line-height: 20px; }
.note { margin-top: 24px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* faq */
.faq { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.7s var(--ease); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 24px; display: flex; justify-content: space-between; gap: 16px; font-size: 18px; line-height: 28px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); transition: transform 0.7s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 24px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; }
.faq code, .legal code { font-family: var(--mono); font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 8px; color: var(--text); overflow-wrap: anywhere; }

/* download */
.download { text-align: center; }
.platforms { display: grid; gap: 24px; margin-top: 48px; text-align: left; }
@media (min-width: 900px) { .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.platform { position: relative; }
.platform .os { display: flex; align-items: center; gap: 12px; }
.platform .os .icon { width: 32px; height: 32px; }
.platform .formats { font-family: var(--mono); font-size: 14px; line-height: 20px; color: var(--muted); }
.platform .btn { align-self: flex-start; margin-top: auto; }
.platform.current { border-color: var(--rx); }
.platform .tag { position: absolute; top: 24px; right: 24px; font-size: 12px; line-height: 16px; padding: 2px 8px; border-radius: 9999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.platform.current .tag.here { display: inline-block; }
.tag.here { display: none; color: var(--rx); border-color: var(--rx); }

/* footer */
footer { border-top: 1px solid var(--line); padding-top: 48px; padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; line-height: 20px; }
.foot { display: grid; gap: 32px; }
@media (min-width: 900px) { .foot { grid-template-columns: minmax(0, 1fr) auto; } }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.credits { margin-top: 24px; max-width: 680px; }

/* legal pages & 404 */
.legal { max-width: 720px; margin: 0 auto; padding-top: 64px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 24px; }
.legal h1 { font-size: 36px; line-height: 40px; }
@media (min-width: 768px) { .legal h1 { font-size: 48px; line-height: 1; } }
.legal h2 { font-size: 24px; line-height: 32px; margin-top: 24px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.legal a { color: var(--rx); }
.lost { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; padding-top: 64px; padding-bottom: 96px; }
.lost .code { font-family: var(--mono); font-size: 96px; line-height: 1; color: var(--surface-2); -webkit-text-stroke: 1px var(--line-strong); }

/* scroll reveal (only when JS runs and motion is allowed) */
.js:not(.reduce) .reveal { opacity: 0; transform: translateY(64px); filter: blur(12px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.js:not(.reduce) .reveal.in { opacity: 1; transform: none; filter: none; }
