:root {
  color-scheme: dark;
  /* ============ Ground + surfaces (deep midnight navy) ============ */
  --bg: oklch(13% 0.035 258);
  --bg-deep: oklch(10.5% 0.027 258);
  --surface: oklch(18% 0.045 258);
  --surface-soft: oklch(23% 0.045 246);
  --line: oklch(31% 0.052 252);
  --line-strong: oklch(42% 0.06 250);

  /* ============ Foreground ============ */
  --fg: oklch(97% 0.012 255);
  --fg-soft: oklch(84% 0.035 252);
  --muted: oklch(70% 0.04 252);

  /* ============ Accent roles (deck palette) ============ */
  --accent: oklch(94% 0.23 119);        /* electric yellow — primary pop */
  --mint: oklch(90% 0.13 158);          /* secondary */
  --orange: oklch(72% 0.17 47);         /* warm role */
  --gold: oklch(88% 0.155 92);          /* tertiary */
  --ink-on-accent: oklch(13% 0.035 258);

  /* ============ Type stacks ============ */
  --display: "owners-narrow", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "sofia-pro-soft", "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  --max: 1180px;
  --pad: clamp(20px, 4vw, 56px);
  --nav-height: 74px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/* ============ Ambient background (ported from the launch deck) ============ */
.bg-base {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60vw 80vh at 18% 12%, oklch(94% 0.23 119 / 0.05), transparent 60%),
    radial-gradient(ellipse 55vw 70vh at 86% 64%, oklch(90% 0.13 158 / 0.045), transparent 65%),
    radial-gradient(ellipse 90vw 60vh at 50% 108%, oklch(72% 0.17 47 / 0.04), transparent 70%),
    linear-gradient(180deg, oklch(14% 0.038 258) 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}

/* keep all real content above the ambient layers */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--ink-on-accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ Header / magazine chrome nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid oklch(84% 0.035 252 / 0.12);
  background: oklch(13% 0.035 258 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  position: relative;
  display: flex;
  min-height: var(--nav-height);
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: auto;
  flex: 0 0 auto;
}

.brand span {
  overflow: hidden;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  color: var(--fg-soft);
}

.nav-links a,
.mobile-menu-panel a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.mobile-menu-panel a:hover,
.mobile-menu-panel a:focus-visible {
  color: var(--accent);
}

.mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}

.mobile-menu summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--fg);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.menu-lines {
  display: grid;
  width: 18px;
  gap: 4px;
}

.menu-lines span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(78vw, 282px);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
  background: var(--bg-deep);
  box-shadow: 0 24px 48px oklch(3% 0.02 258 / 0.4);
}

.mobile-menu-panel a {
  border-radius: 12px;
  padding: 14px;
  color: var(--fg-soft);
}

/* ============ Buttons ============ */
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 24px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 180ms var(--ease-out);
}

.button.primary {
  background: var(--accent);
  color: var(--ink-on-accent);
  box-shadow: 0 0 0 oklch(94% 0.23 119 / 0);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--fg);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 14px 34px oklch(94% 0.23 119 / 0.22);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============ Mono label system (kicker / eyebrow / meta) ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.eyebrow.mint {
  color: var(--mint);
}

.eyebrow.orange {
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.accent-rule {
  width: 64px;
  height: 2px;
  margin: 0 0 26px;
  background: var(--accent);
  opacity: 0.9;
  border: 0;
}

/* ============ Pills / chips ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pill.accent {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.mint {
  border-color: var(--mint);
  color: var(--mint);
}

.pill.solid {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink-on-accent);
  font-weight: 500;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

/* ============ Headings ============ */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.012em;
}

h1 {
  margin: 0;
  font-size: clamp(68px, 12vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.9;
}

h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
  color: var(--fg-soft);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.58;
}

.accent {
  color: var(--accent);
}
.mint {
  color: var(--mint);
}
.orange {
  color: var(--orange);
}
.gold {
  color: var(--gold);
}

/* ============ Hero ============ */
.hero {
  display: grid;
  align-items: end;
  padding: clamp(48px, 7vw, 92px) 0 clamp(46px, 6vw, 78px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(310px, 0.66fr);
  align-items: end;
  gap: clamp(34px, 7vw, 92px);
}

.hero-copy {
  max-width: 780px;
}

.hero-copy .lead {
  max-width: 600px;
  margin-top: clamp(24px, 4vw, 42px);
  color: var(--fg);
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.34;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ============ App preview ============ */
.app-preview {
  justify-self: end;
  width: min(100%, 430px);
}

.app-preview-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ============ Sections ============ */
.section {
  position: relative;
  border-top: 1px solid oklch(84% 0.035 252 / 0.14);
  padding: clamp(72px, 10vw, 126px) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.58fr) minmax(0, 1fr);
  gap: clamp(30px, 8vw, 104px);
}

/* four-habit list, deck-style ledger rows */
.habit-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.habit-item {
  display: grid;
  grid-template-columns: minmax(82px, 0.22fr) 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: clamp(22px, 3vw, 34px) clamp(4px, 1vw, 14px);
  transition: background 200ms var(--ease-out);
}

.habit-item:hover {
  background: oklch(100% 0 0 / 0.018);
}

.habit-item .num {
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 900;
  line-height: 0.8;
}

.habit-item h3 {
  margin-bottom: 8px;
}

.habit-item p {
  max-width: 640px;
}

/* "why it exists" block */
.built {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(28px, 7vw, 84px);
  align-items: center;
}

.built-copy {
  max-width: 670px;
  margin-top: 24px;
}

.built-mark {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 28px 28px;
  background:
    linear-gradient(180deg, oklch(100% 0 0 / 0.03), transparent 55%),
    var(--surface);
}

.built-mark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 56px;
  height: 3px;
  background: var(--accent);
}

.built-mark img {
  display: block;
  width: 88px;
  margin-bottom: 30px;
}

.built-mark p {
  color: var(--mint);
  font-size: 16px;
}

/* ============ Legal / support shared layout ============ */
.legal-hero {
  padding: clamp(48px, 7vw, 92px) 0 clamp(30px, 5vw, 56px);
}

.legal-hero h1 {
  max-width: 980px;
  font-size: clamp(54px, 9vw, 112px);
}

.legal-hero .kicker {
  max-width: 760px;
  margin-top: 24px;
  color: var(--fg-soft);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.5;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 86px);
  border-top: 1px solid var(--line);
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(84px, 10vw, 132px);
}

.legal-meta,
.legal-meta p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.legal-meta strong {
  color: var(--fg-soft);
}

.legal-meta p + p {
  margin-top: 18px;
}

.legal-meta a {
  color: var(--mint);
}

.legal-content {
  max-width: 780px;
}

.legal-content h2 {
  margin-top: 48px;
  font-size: clamp(32px, 4.2vw, 54px);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.68;
}

.legal-content p {
  margin-top: 14px;
}

.legal-content ul,
.legal-content ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 22px;
}

.legal-content strong {
  color: var(--fg);
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}

.contact-slab {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 36px);
  background:
    linear-gradient(180deg, oklch(100% 0 0 / 0.03), transparent 55%),
    var(--surface);
}

.contact-slab::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(24px, 4vw, 36px);
  width: 56px;
  height: 3px;
  background: var(--accent);
}

.contact-slab a {
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 0.95;
  text-decoration: none;
  word-break: break-word;
}

/* ============ Footer / chrome ============ */
.site-footer {
  border-top: 1px solid oklch(84% 0.035 252 / 0.14);
  padding: 40px 0;
  background: var(--bg-deep);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-preview {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  :root {
    --nav-height: 64px;
    --pad: clamp(18px, 5vw, 32px);
  }

  .nav {
    min-height: var(--nav-height);
    gap: 14px;
  }

  .brand img {
    width: 34px;
  }

  .brand span {
    font-size: 27px;
  }

  .nav-links-desktop {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding: 48px 0 42px;
  }

  .section-grid,
  .built,
  .legal-layout,
  .support-panel {
    grid-template-columns: 1fr;
  }

  .legal-hero {
    padding: 34px 0 30px;
  }

  .legal-layout {
    gap: 32px;
    padding-top: 34px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(58px, 17vw, 82px);
  }

  h2 {
    font-size: clamp(43px, 13vw, 62px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .app-preview {
    display: none;
  }

  .habit-item {
    grid-template-columns: 1fr;
  }

  .legal-hero {
    padding: 26px 0 24px;
  }

  .legal-hero h1 {
    font-size: clamp(50px, 15vw, 72px);
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}
