/* Life OS · design system v2
   Pulled directly from the app's own Theme.swift tokens rather than
   invented for the web — the site should look like the app, not like a
   marketing team's idea of the app. Dark-first (the app itself defaults to
   dark), with a real light variant, not an afterthought. */

:root {
  /* Grounds — Theme.ink / .slate / .track */
  --ground: #0e0e0d;
  --ground-2: #0b0d0c;
  --card: #1c211f;
  --card-raised: #232a27;
  --track: #27302c;

  /* Text — Theme.bone family */
  --text: #edece9;
  --text-2: rgba(237, 236, 233, 0.68);
  --text-3: rgba(237, 236, 233, 0.52);
  --hairline: rgba(224, 224, 220, 0.10);

  /* Identity colours — straight from RingConfig.swift / Space.tint */
  --accent: #e0dfda;         /* Theme.accent, dark mode: near-white */
  --sage: #53cb75;           /* verdict green */
  --amber: #d99e61;          /* Home identity */
  --coral: #de7368;          /* Move */
  --blue: #669dde;           /* Water */
  --rose: #db85a0;           /* Protein */
  --lavender: #ad99d6;       /* Fat / Flights */
  --gold: #deb061;           /* Carbs */
  --olive: #94ad76;          /* Fiber */
  --umber: #b78f66;          /* Caffeine */
  --wine: #cc6b76;           /* Cholesterol */

  --radius-l: 34px;
  --radius-m: 24px;
  --radius-s: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --container: 1120px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f7f6f3;
    --ground-2: #ffffff;
    --card: #ffffff;
    --card-raised: #f1f0ec;
    --track: #e3e1db;
    --text: #17181a;
    --text-2: rgba(23, 24, 26, 0.66);
    --text-3: rgba(23, 24, 26, 0.48);
    --hairline: rgba(23, 24, 26, 0.10);
  }
}

:root[data-theme="light"] {
  --ground: #f7f6f3;
  --ground-2: #ffffff;
  --card: #ffffff;
  --card-raised: #f1f0ec;
  --track: #e3e1db;
  --text: #17181a;
  --text-2: rgba(23, 24, 26, 0.66);
  --text-3: rgba(23, 24, 26, 0.48);
  --hairline: rgba(23, 24, 26, 0.10);
}

* , *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Type */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage); margin-bottom: 14px;
}
.lede { font-size: 19px; color: var(--text-2); max-width: 60ch; }
.small { font-size: 13px; color: var(--text-3); }

/* Card — Theme's EstateCard: a flat panel, one hairline, no shadow */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-m);
  padding: 28px;
}

/* Buttons — the app's pill-shaped, rounded-toward-capsule direction */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--sage); color: #0a1a0f; font-weight: 600; font-size: 16px;
  border: none; cursor: pointer; transition: transform .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .92; text-decoration: none; }
.btn--ghost {
  background: transparent; color: var(--text); border: 1px solid var(--hairline);
}

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

.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--ground-2); }

/* 3D hero canvas */
.hero-3d { position: relative; height: min(78vh, 760px); overflow: hidden; }
.hero-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-3d-copy {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
  justify-content: center; pointer-events: none;
}
.hero-3d-copy .btn-row { pointer-events: auto; }
/* A real scrim, not just hope — the rings sit BEHIND the text at every
   viewport width, but "behind" alone isn't enough when a bright stroke
   crosses directly over a word; this guarantees the text wins regardless
   of exactly where a ring lands. */
.hero-3d-copy h1, .hero-3d-copy .lede, .hero-3d-copy .small {
  text-shadow: 0 2px 20px var(--ground), 0 1px 2px var(--ground), 0 0 40px var(--ground);
}
@media (max-width: 720px) {
  .hero-3d canvas { opacity: 0.28; }
}
.hero-3d-fade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,14,13,0) 0%, rgba(14,14,13,0.2) 60%, var(--ground) 100%);
  pointer-events: none;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Reveal-on-scroll, used everywhere instead of everything animating at once */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav a:hover { color: var(--text); }
@media (max-width: 860px) { .nav { display: none; } }

/* Compatibility layer — the inner pages (features/pricing/faq/how-it-connects)
   keep their existing markup and copy verbatim (asked for directly: redesign
   AROUND the copy, not a rewrite), so these classes exist to give that
   markup the new look without touching a single sentence of the content. */
.wrap--narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.page-head { padding: 72px 0 40px; }
.h-page { font-family: var(--font-serif); font-size: clamp(32px, 5vw, 52px); margin: 14px 0 0; text-wrap: balance; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--card); color: var(--text);
  padding: 10px 16px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

.icon { width: 26px; height: 26px; color: var(--sage); margin-bottom: 10px; }

.feature {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 32px 0;
  border-top: 1px solid var(--hairline);
}
.feature:first-child { border-top: none; }
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature p { color: var(--text-2); margin: 0 0 12px; }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; gap: 10px; } }

.qa { padding: 24px 0; border-top: 1px solid var(--hairline); }
.qa:first-child { border-top: none; }
.qa h3 { font-size: 18px; margin-bottom: 8px; }
.qa p { color: var(--text-2); margin: 0; }

.plan {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-m);
  padding: 32px; display: flex; flex-direction: column; gap: 6px;
}
.plan--lead { border-color: var(--sage); box-shadow: 0 0 0 1px var(--sage); }
.plan .tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sage); background: color-mix(in srgb, var(--sage) 16%, transparent); padding: 4px 10px; border-radius: 999px;
}
.plan .price { font-family: var(--font-serif); font-size: 40px; margin: 10px 0 0; }
.plan .per { font-size: 14px; color: var(--text-3); font-family: var(--font); }
.plan .weights, .plan .note { color: var(--text-2); font-size: 14px; }

.measure { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text-3); }
.measure .from, .measure .to { color: var(--text); font-weight: 600; }
.measure .via { font-style: italic; }

.link-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.footer-note { color: var(--text-3); font-size: 12px; margin-top: 32px; max-width: 70ch; }
.body-2 { color: var(--text-2); }

.menu { display: none; }
@media (max-width: 860px) {
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; color: var(--text); }
  .menu summary::-webkit-details-marker { display: none; }
  .menu .ic-close { display: none; }
  .menu[open] .ic-open { display: none; }
  .menu[open] .ic-close { display: block; }
  .menu-panel {
    position: absolute; right: 0; top: calc(100% + 10px); background: var(--card);
    border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 10px;
    display: flex; flex-direction: column; gap: 4px; min-width: 200px;
  }
  .menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--text); }
  .menu-panel a:hover { background: var(--card-raised); }
}

/* Legal pages (privacy/terms) — a long single-column read, so the emphasis
   is on rhythm and a table that doesn't fall back to bare browser chrome. */
.legal { padding: 8px 0 96px; }
.legal h2 { font-size: 24px; margin: 52px 0 16px; }
.legal h2:first-of-type { margin-top: 8px; }
.legal h3 { font-size: 18px; margin: 32px 0 12px; }
.legal p, .legal li { color: var(--text-2); font-size: 16px; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal li { padding-left: 4px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
.legal a:hover { text-decoration-color: var(--sage); }
.stamp { color: var(--text-3); font-size: 13px; margin-top: 14px; }
.note {
  background: var(--card); border: 1px solid var(--hairline); border-left: 3px solid var(--sage);
  border-radius: var(--radius-s); padding: 20px 22px; margin: 28px 0; color: var(--text-2) !important;
}
.note strong { color: var(--text); }
table {
  width: 100%; border-collapse: collapse; margin: 20px 0 32px; font-size: 15px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-s); overflow: hidden;
}
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--hairline); vertical-align: top; }
thead th { border-top: none; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
td:first-child, th:first-child { width: 34%; color: var(--text); font-weight: 600; }
tbody td { color: var(--text-2); }
@media (max-width: 700px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { border-top: 1px solid var(--hairline); padding: 14px 0; }
  tr:first-child { border-top: none; }
  td { padding: 4px 0; border-top: none; }
  td:first-child { width: auto; margin-bottom: 2px; }
}

.site-footer { padding: 64px 0 40px; border-top: 1px solid var(--hairline); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-family: var(--font); font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--text-2); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
