:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --ink: #0b0c0f;
  --ink-2: #3a3d45;
  --muted: #6b707a;
  --line: #e7e9ee;
  --card: #ffffff;
  --sky-1: #1f6fe8;
  --sky-2: #4d93f5;
  --sky-3: #a9d0ff;
  --ok: #138a4b;
  --bad: #c2410c;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(10, 20, 40, .04), 0 8px 24px rgba(10, 20, 40, .06);
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.section { padding: 96px 32px 0; }
.section h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.sub { color: var(--muted); margin-top: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 500; font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 18px rgba(11,12,15,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 24px rgba(11,12,15,.24); }
.btn-sm { padding: 9px 18px; font-size: 15px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 32px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 20px; }
.gh { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); }
.gh:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; padding-top: 56px; padding-bottom: 40px; align-items: start; }
.hero h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.08; }
.globe-key {
  display: inline-grid; place-items: center;
  width: 1.15em; height: 1.15em; font-size: .78em; vertical-align: .08em;
  border: 1px solid var(--line); border-radius: .22em;
  background: linear-gradient(#fff, #f1f3f6);
  box-shadow: 0 2px 0 #d9dce3, 0 3px 8px rgba(0,0,0,.06);
}
.trust { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trust li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--ink-2); background: var(--bg-soft);
}
.trust-ico { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero-right { padding-top: 6px; }
.lede { font-size: 19px; color: var(--ink-2); line-height: 1.5; margin-bottom: 28px; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Sky panel */
.sky {
  position: relative; overflow: hidden;
  border-radius: 32px;
  padding: 56px 24px 40px;
  background:
    radial-gradient(1200px 500px at 70% 110%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(900px 400px at 10% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  min-height: 640px;
}
.cloud { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(28px); }
.c1 { width: 520px; height: 140px; left: -80px; bottom: 40px; animation: drift 38s linear infinite; }
.c2 { width: 640px; height: 160px; right: -120px; bottom: -20px; background: rgba(255,255,255,.75); animation: drift 46s linear infinite reverse; }
.c3 { width: 380px; height: 90px; right: 12%; top: 18%; opacity: .5; animation: drift 52s linear infinite; }
@keyframes drift { 0% { transform: translateX(0); } 50% { transform: translateX(60px); } 100% { transform: translateX(0); } }

.floaters .fl {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px; font-size: 24px;
  background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: bob 6s ease-in-out infinite;
}
.f1 { left: 6%; top: 24%; }
.f2 { left: 11%; bottom: 18%; animation-delay: -2s !important; }
.f3 { right: 7%; top: 30%; animation-delay: -4s !important; }
.f4 { right: 12%; bottom: 14%; animation-delay: -1s !important; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.tabs {
  position: relative; z-index: 2;
  display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 28px;
  padding: 5px; border-radius: 999px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tabs button {
  border: 0; background: transparent; color: #fff;
  padding: 10px 22px; border-radius: 999px; font-size: 16px; white-space: nowrap;
  transition: background .2s, color .2s;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.device {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto;
  padding: 12px; border-radius: 26px;
  background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 30px 60px rgba(10,40,100,.25);
}
.window { background: #fff; border-radius: 16px; overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-title { margin-left: 10px; font-size: 13px; color: var(--muted); }
.win-body { padding: 22px 24px 26px; }
.row-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pill { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.pill-raw { background: #fff4e5; color: #9a5b00; }
.pill-clean { background: #e8f6ee; color: var(--ok); }
.raw { min-height: 78px; font-family: var(--mono); font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 22px; }
.raw .filler { color: #b9bcc4; text-decoration: line-through; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-height: 96px; background: var(--bg-soft); }
.clean { font-size: 17px; line-height: 1.5; white-space: pre-line; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.15em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hud {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%) translateY(8px);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(16,17,20,.92); color: #fff; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .25s, transform .25s;
}
.hud.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.hud-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 0 4px rgba(255,69,58,.2); }
.hud.working .hud-dot { background: #64d2ff; box-shadow: 0 0 0 4px rgba(100,210,255,.2); }
.wave { display: flex; align-items: center; gap: 3px; height: 18px; }
.wave i { width: 3px; height: 30%; border-radius: 2px; background: #fff; animation: wave 0.9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -.7s; } .wave i:nth-child(3) { animation-delay: -.2s; }
.wave i:nth-child(4) { animation-delay: -.5s; } .wave i:nth-child(5) { animation-delay: -.1s; }
.wave i:nth-child(6) { animation-delay: -.6s; } .wave i:nth-child(7) { animation-delay: -.3s; }
.hud.working .wave i { animation-play-state: paused; height: 20%; }
@keyframes wave { 0%,100% { height: 25%; } 50% { height: 100%; } }

.keycap-row { position: relative; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 54px; }
.keycap {
  display: grid; place-items: center; text-align: center;
  width: 64px; height: 60px; border-radius: 12px;
  font-size: 12px; line-height: 1.15; color: var(--ink-2);
  background: linear-gradient(#fff, #eef0f4); border: 1px solid #fff;
  box-shadow: 0 4px 0 #c9d4e6, 0 10px 20px rgba(10,40,100,.2);
  transition: transform .12s, box-shadow .12s;
}
.keycap b { font-size: 18px; font-weight: 400; }
.keycap.down { transform: translateY(3px); box-shadow: 0 1px 0 #c9d4e6, 0 4px 10px rgba(10,40,100,.2); }
.keyhint { font-family: var(--mono); font-size: 13px; color: var(--ink); background: rgba(255,255,255,.7); padding: 4px 10px; border-radius: 8px; min-width: 120px; text-align: center; }

/* Privacy cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; margin-top: 40px; }
.pcard { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; padding: 8px 0; }
.pcard h3 { font-size: 19px; margin-bottom: 6px; }
.pcard p { color: var(--muted); font-size: 15px; }
.pviz {
  height: 128px; border-radius: 16px; display: grid; place-items: center; align-content: center; gap: 8px;
  background: linear-gradient(160deg, #f3f7ff, #eaf1fd); border: 1px solid #e3ebf8;
  color: var(--muted);
}
.pviz small { font-size: 12px; }
.mini-mac { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); font-size: 20px; color: var(--ink); }
.mini-mac .arrow { color: var(--sky-1); font-size: 16px; }
.viz-big b { font-size: 48px; font-weight: 500; color: var(--sky-1); line-height: 1; }
.keychain { display: grid; place-items: center; gap: 6px; padding: 12px 20px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); font-size: 22px; }
.repo { display: grid; gap: 4px; padding: 12px 16px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); min-width: 160px; }
.repo-name { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.repo-tag { width: max-content; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); overflow: hidden;
}
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card > p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.span-2 { grid-column: span 2; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.engine-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.engine-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 11px 14px; border-radius: 10px; font-size: 15px; }
.engine-list li.on { background: #eef4ff; }
.engine-list .tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); }
.engine-list .meta { font-size: 13px; color: var(--muted); min-width: 170px; text-align: right; }

.said, .got { border-radius: 12px; padding: 12px 14px; }
.said { background: var(--bg-soft); font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.said s { color: #b9bcc4; }
.got { background: #eef4ff; font-size: 16px; }
.said small, .got small { display: block; font-family: var(--font); font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-input { flex-basis: 100%; display: flex; justify-content: space-between; padding: 9px 12px; border: 1px dashed #cfd4dd; border-radius: 10px; color: var(--muted); font-size: 14px; }
.chip-input b { color: var(--sky-1); font-weight: 500; }
.chip { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: #eef4ff; color: #1b4fa8; }

.taps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tap { display: grid; place-items: center; width: 44px; height: 42px; border-radius: 10px; background: linear-gradient(#fff, #eef0f4); border: 1px solid var(--line); box-shadow: 0 3px 0 #d9dce3; animation: tap 2.4s ease-in-out infinite; }
.t2 { animation-delay: .25s; }
@keyframes tap { 0%, 30%, 100% { transform: translateY(0); box-shadow: 0 3px 0 #d9dce3; } 10% { transform: translateY(2px); box-shadow: 0 1px 0 #d9dce3; } }
.latch { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: #10111a; color: #fff; }

.locales { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.locales span { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.locales .on { background: #eef4ff; outline: 1.5px solid var(--sky-1); }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 10px; width: max-content; animation: scroll 30s linear infinite; }
.track span { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); font-size: 15px; white-space: nowrap; }
@keyframes scroll { to { transform: translateX(-50%); } }

.fallback { display: grid; justify-items: start; gap: 6px; }
.fb-step { font-size: 13px; padding: 7px 12px; border-radius: 10px; }
.fb-step.bad { background: #fff1ea; color: var(--bad); }
.fb-step.ok { background: #e8f6ee; color: var(--ok); }
.fb-arrow { color: var(--muted); padding-left: 14px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 28px; border-radius: var(--radius); background: var(--bg-soft); }
.steps .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 15px; margin-bottom: 18px; }
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 4px; font-size: 17px; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 22px; color: var(--muted); max-width: 780px; }

/* CTA */
.cta {
  display: grid; justify-items: center; text-align: center; gap: 16px;
  padding: 72px 24px; border-radius: 32px;
  background: radial-gradient(800px 300px at 50% 0%, #e3eeff, transparent 70%), linear-gradient(180deg, #f5f8ff, #eef3fb);
  border: 1px solid #e3ebf8;
}
.cta img { border-radius: 14px; box-shadow: var(--shadow); }
.cta p { color: var(--muted); }
.code {
  position: relative; margin: 8px 0 12px; text-align: left;
  width: min(560px, 100%); padding: 20px 22px; border-radius: 14px;
  background: #0f1116; color: #e6e8ee; font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  overflow-x: auto;
}
.code .c { color: #7d8597; }
.copy { position: absolute; top: 10px; right: 10px; border: 1px solid #2a2e38; background: #191c23; color: #c9cdd6; font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.copy:hover { background: #222631; }

/* Footer */
.footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 48px 0 32px; }
.foot-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.foot-cols { display: flex; gap: 72px; }
.foot-cols h4 { font-size: 15px; margin-bottom: 12px; }
.foot-cols a { display: block; color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.foot-cols a:hover { color: var(--ink); }
.foot-legal { margin-top: 40px; color: var(--muted); font-size: 13px; }

:focus-visible { outline: 2px solid var(--sky-1); outline-offset: 3px; border-radius: 6px; }

/* Responsive */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .floaters { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .section { padding: 72px 16px 0; }
  .nav-links, .gh span { display: none; }
  .nav-cta { gap: 12px; }
  .hero { padding-top: 32px; }
  .sky { padding: 28px 12px 32px; border-radius: 24px; min-height: 0; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { padding: 9px 14px; font-size: 14px; }
  .device { padding: 8px; }
  .win-body { padding: 16px; }
  .bento, .steps { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .pcard { grid-template-columns: 1fr; }
  .engine-list .meta { display: none; }
  .engine-list li { grid-template-columns: 1fr auto; }
  .foot-cols { gap: 40px; }
}

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

[hidden] { display: none !important; }

/* Display face: Astoria (signature script) for headlines and the wordmark only.
   Body copy stays in Space Grotesk; script at paragraph size is unreadable. */
@font-face {
  font-family: "Astoria";
  src: url("fonts/Astoria.otf?v=3") format("opentype");
  font-display: swap;
}
:root { --display: "Astoria", "Space Grotesk", cursive; }
h1, h2, .brand span {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
}
.hero h1 { font-size: clamp(40px, 4.4vw, 64px); line-height: 1.02; }
.hero h1 .globe-key { font-size: .6em; vertical-align: .2em; }
.section h2 { font-size: clamp(42px, 5.4vw, 64px); line-height: 1.2; }
.cta h2 { font-size: clamp(40px, 5vw, 60px); line-height: 1.2; }
.brand { font-size: 30px; }
