:root {
  color-scheme: dark;
  --ink: #020304;
  --ink-raised: #080a0c;
  --glass: rgba(19, 22, 24, 0.78);
  --glass-strong: rgba(26, 29, 31, 0.94);
  --ice: #f4f8f6;
  --silver: #c9d0cd;
  --muted: #939c98;
  --quiet: #68716e;
  --line: rgba(228, 235, 232, 0.16);
  --line-strong: rgba(228, 235, 232, 0.36);
  --cyan: #48d8c6;
  --green: #54dd8a;
  --gold: #e7bd54;
  --red: #ff6f68;
  --max: 1180px;
  --header: 76px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #020304 0%, #080a0c 46%, #020304 100%);
  color: var(--ice);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(280deg, rgba(112, 122, 120, 0.06), transparent 28%);
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
h1, h2, h3, p { margin-top: 0; }

.legal-page {
  min-height: calc(100vh - var(--header));
  padding: clamp(48px, 8vw, 92px) 0 80px;
}

.legal-hero {
  max-width: 840px;
  margin-bottom: 34px;
}

.legal-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.98;
  font-weight: 680;
}

.legal-hero > p:not(.eyebrow):not(.policy-date) {
  max-width: 760px;
  color: var(--silver);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.policy-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legal-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 20, 0.82);
}

.legal-card h2,
.legal-contact h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.legal-card p,
.legal-card li,
.legal-contact p {
  color: var(--silver);
}

.legal-card ul,
.legal-card ol {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-card li + li { margin-top: 8px; }
.text-link { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

.legal-contact {
  margin-top: 18px;
  padding: 28px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-page { padding-top: 42px; }
}

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 3, 4, 0.78);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.nav {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ice);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-left: auto;
  color: var(--silver);
  font-size: 14px;
  font-weight: 550;
}

.nav-links a { transition: color 160ms ease; }
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] { color: var(--ice); }

.nav-cta,
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ice);
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button.primary,
.nav-cta {
  border-color: rgba(255, 255, 255, 0.82);
  background: var(--ice);
  color: #070909;
  box-shadow: 0 8px 26px rgba(255, 255, 255, 0.09);
}

.button:hover,
.button:focus-visible,
.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.76);
}

.button:focus-visible,
.nav-cta:focus-visible,
.tab:focus-visible,
.brand:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 4px;
}

.mobile-nav { display: none; }

.hero {
  position: relative;
  min-height: min(780px, calc(100svh - var(--header) + 74px));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #020304 0%, rgba(2, 3, 4, 0.95) 42%, rgba(2, 3, 4, 0.30) 72%, #020304 100%),
    linear-gradient(180deg, transparent 58%, #020304 100%);
}

.hero-screen {
  position: absolute;
  z-index: -2;
  top: 44px;
  right: max(-80px, calc((100vw - var(--max)) / 2 - 120px));
  width: min(550px, 50vw);
  height: 900px;
  object-fit: cover;
  object-position: top center;
  opacity: 0.82;
  filter: saturate(0.74) contrast(1.06);
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 98%);
}

.hero-grid {
  min-height: inherit;
  display: flex;
  align-items: center;
  padding: 86px 0 118px;
}

.hero-copy { width: min(700px, 64%); }

.eyebrow,
.section-kicker {
  margin-bottom: 17px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 20px;
  color: var(--ice);
  font-size: clamp(58px, 9vw, 104px);
  font-weight: 390;
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-statement {
  max-width: 650px;
  margin-bottom: 18px;
  color: var(--ice);
  font-size: clamp(24px, 3.2vw, 39px);
  font-weight: 560;
  line-height: 1.16;
}

.hero-copy > p:not(.eyebrow):not(.hero-statement) {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--silver);
  font-size: clamp(17px, 2vw, 20px);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.proof-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 7, 0.78);
  backdrop-filter: blur(18px);
}

.proof-strip-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

.proof-item {
  min-width: 0;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  color: var(--silver);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { padding-right: 0; border-right: 0; }

.section {
  padding: 104px 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.65fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: end;
  margin-bottom: 56px;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ice);
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 500;
  line-height: 1.05;
}

.section-header > p,
.section-copy {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.workflow-step {
  min-height: 220px;
  padding: 26px 24px 30px;
  border-right: 1px solid var(--line);
}
.workflow-step:last-child { border-right: 0; }
.workflow-step .index { color: var(--quiet); font-size: 13px; font-weight: 700; }
.workflow-step h3 { margin: 54px 0 10px; font-size: 22px; font-weight: 620; }
.workflow-step p { margin-bottom: 0; color: var(--muted); font-size: 15px; }

.product-stage {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: calc(var(--header) + 24px);
}

.tab {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ice);
}

.tab span:last-child { color: var(--quiet); font-size: 12px; }

.screen-panel[hidden] { display: none; }

.screen-panel {
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(250px, 0.48fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

.screen-shot {
  max-height: 720px;
  width: 100%;
  object-fit: contain;
  object-position: top center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-raised);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
}

.screen-description h3 { margin-bottom: 14px; font-size: 30px; font-weight: 560; }
.screen-description p { color: var(--muted); }
.screen-description ul { margin: 24px 0 0; padding: 0; list-style: none; }
.screen-description li { padding: 11px 0; border-top: 1px solid var(--line); color: var(--silver); }

.capability-list { border-top: 1px solid var(--line-strong); }
.capability {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.capability h3 { margin: 0; font-size: 20px; font-weight: 620; }
.capability p { max-width: 720px; margin: 0; color: var(--muted); }

.truth-band {
  background: #f0f3f1;
  color: #090b0b;
}
.truth-band .section-kicker { color: #58615e; }
.truth-band h2 { color: #090b0b; }
.truth-band .section-header > p { color: #4c5552; }
.truth-states {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(9, 11, 11, 0.18);
}
.truth-state { min-height: 150px; padding: 24px; border-right: 1px solid rgba(9, 11, 11, 0.14); }
.truth-state:last-child { border-right: 0; }
.truth-state strong { display: block; margin-bottom: 12px; font-size: 20px; }
.truth-state span { color: #555e5b; font-size: 14px; }

.infrastructure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.infrastructure-item {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background: #07090a;
}
.infrastructure-label { color: var(--quiet); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.infrastructure-item h3 { margin: 48px 0 12px; font-size: 25px; font-weight: 550; }
.infrastructure-item p { margin: 0; color: var(--muted); font-size: 14px; }
.cloudflare-badge { width: 196px; height: auto; margin-top: 24px; border-radius: 6px; }

.disclosure {
  max-width: 880px;
  margin: 24px 0 0;
  color: var(--quiet);
  font-size: 13px;
}

.download {
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 50%),
    #030405;
}
.download h2, .download .section-copy { margin-inline: auto; }
.download .section-copy { max-width: 680px; margin-top: 20px; }

.download-options {
  max-width: 850px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 46px auto 0;
}

.download-option {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--glass);
}
.download-option h3 { margin-bottom: 8px; font-size: 24px; font-weight: 600; }
.download-option p { margin-bottom: 24px; color: var(--muted); }
.store-badge { display: block; width: 202px; min-height: 60px; object-fit: contain; }
.testflight-button { min-width: 220px; min-height: 60px; }
.download-note { margin: 24px 0 0; color: var(--quiet); font-size: 13px; }

.page-hero {
  padding: 112px 0 84px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 900px; font-size: clamp(52px, 8vw, 94px); }
.page-hero p { max-width: 760px; color: var(--silver); font-size: 20px; }

.timeline { border-top: 1px solid var(--line-strong); }
.timeline-row {
  display: grid;
  grid-template-columns: 64px minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-row .number { color: var(--quiet); font-size: 13px; font-weight: 700; }
.timeline-row h3 { margin: 0; font-size: 22px; font-weight: 620; }
.timeline-row p { margin: 0; color: var(--muted); }

.boundary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.boundary-column { padding: 30px; background: #07090a; }
.boundary-column h3 { margin-bottom: 20px; font-size: 22px; }
.boundary-column ul { margin: 0; padding-left: 20px; color: var(--muted); }
.boundary-column li + li { margin-top: 10px; }

.site-footer {
  padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
  color: var(--quiet);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
}
.footer-brand { color: var(--ice); font-size: 20px; font-weight: 450; }
.footer-copy { max-width: 560px; margin: 10px 0 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; font-size: 13px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .mobile-nav summary {
    min-width: 46px;
    min-height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
  }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav {
    position: absolute;
    top: calc(var(--header) - 4px);
    left: 20px;
    right: 20px;
    display: grid;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #090b0c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62);
  }
  .mobile-nav nav a { min-height: 46px; display: flex; align-items: center; padding: 0 14px; border-radius: 6px; }
  .mobile-nav nav a:hover { background: rgba(255, 255, 255, 0.06); }
  .nav-cta { display: none; }
  .hero-copy { width: min(720px, 78%); }
  .hero-screen { right: -150px; width: 570px; opacity: 0.56; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .workflow-step:nth-child(2) { border-right: 0; }
  .workflow-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .product-stage { grid-template-columns: 1fr; }
  .tabs { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tab { flex: 0 0 auto; width: auto; min-width: 170px; }
  .screen-panel { min-height: auto; }
  .infrastructure-grid { grid-template-columns: 1fr; }
  .infrastructure-item { min-height: 220px; }
}

@media (max-width: 680px) {
  :root { --header: 68px; }
  .shell { width: min(calc(100% - 30px), var(--max)); }
  .brand { font-size: 22px; }
  .hero { min-height: 720px; }
  .hero-grid { align-items: flex-start; padding-top: 80px; }
  .hero-copy { width: 100%; }
  .hero-screen { top: 330px; right: -90px; width: 430px; height: 620px; opacity: 0.34; }
  .hero::after { background: linear-gradient(180deg, #020304 0%, rgba(2, 3, 4, 0.94) 44%, rgba(2, 3, 4, 0.46) 75%, #020304 100%); }
  h1 { font-size: clamp(54px, 19vw, 78px); }
  .hero-statement { font-size: 26px; }
  .actions { flex-direction: column; }
  .button { width: 100%; }
  .proof-strip { position: static; }
  .proof-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .proof-item { min-height: 54px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
  .proof-item:nth-child(2) { border-right: 0; }
  .proof-item:nth-child(n+3) { border-bottom: 0; }
  .section { padding: 76px 0; }
  .section-header { grid-template-columns: 1fr; gap: 22px; margin-bottom: 38px; }
  h2 { font-size: clamp(34px, 11vw, 48px); }
  .workflow { grid-template-columns: 1fr; }
  .workflow-step { min-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-step:last-child { border-bottom: 0; }
  .workflow-step h3 { margin-top: 34px; }
  .screen-panel { grid-template-columns: 1fr; }
  .screen-shot { max-height: 620px; }
  .capability { grid-template-columns: 1fr; gap: 12px; }
  .truth-states { grid-template-columns: repeat(2, 1fr); }
  .truth-state:nth-child(2) { border-right: 0; }
  .truth-state:nth-child(-n+2) { border-bottom: 1px solid rgba(9, 11, 11, 0.14); }
  .download-options { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 42px 1fr; gap: 12px; }
  .timeline-row p { grid-column: 2; }
  .boundary { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
