/* HeyLabs — cream, red, black */

@font-face {
  font-family: "Montserrat var";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/montserrat-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* White page. The cream names are kept so every existing reference keeps
     working — only the values moved to a neutral scale. */
  --cream:      #FFFFFF;
  --cream-dark: #F1F1F1;
  --bg:         #FFFFFF;
  --bg-soft:    #FAFAFA;
  --surface:    #FFFFFF;
  --surface-2:  #F4F4F4;
  --glass:      rgba(255, 255, 255, .82);
  --ink:        #141414;
  --ink-dim:    #3D3D3D;
  --ink-faint:  #8A8A8A;
  --hair:       #E3E3E3;
  --hair-soft:  #EFEFEF;
  --brand:      #141414;
  --red:        #C41E3A;
  --red-dark:   #9E1830;
  --black:      #141414;
  --accent:     var(--red);

  --display: "Montserrat var", "Avenir Next", Futura, system-ui, sans-serif;
  --sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --pad:  clamp(20px, 5vw, 56px);
  --maxw: 1180px;
  --radius: 20px;
  --radius-lg: 32px;

  --shadow-sm: 0 1px 3px rgba(20, 20, 20, .05), 0 1px 2px rgba(20, 20, 20, .03);
  --shadow-md: 0 8px 30px rgba(20, 20, 20, .07), 0 2px 8px rgba(20, 20, 20, .04);
  --shadow-lg: 0 24px 64px rgba(20, 20, 20, .08), 0 8px 24px rgba(20, 20, 20, .06);
  --shadow-glow: 0 0 48px rgba(196, 30, 58, .08);

  --spring: cubic-bezier(.16, 1.08, .32, 1.28);
  --ease:   cubic-bezier(.22, .61, .36, 1);
  --smooth: cubic-bezier(.45, 0, .15, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

img, svg, video, canvas { max-width: 100%; height: auto; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

body {
  position: relative;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

::selection { background: rgba(196, 30, 58, .15); color: var(--ink); }

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--hair);
  border: 2px solid var(--bg);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

.skip {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { left: var(--pad); }








/* ── 3D backdrop ──────────────────────────────────────── */

.space-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}




















/* ── Nav ──────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--cream);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--smooth), border-color .4s var(--smooth),
              box-shadow .4s var(--smooth);
}

.nav.stuck {
  background: var(--cream);
  border-bottom-color: var(--hair);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--pad);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.progress {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: var(--red);
  opacity: 0;
  transition: opacity .4s var(--smooth);
}

.nav.stuck .progress { opacity: 1; }

.mark-glyph {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.mark-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 4px; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover { background: var(--surface-2); }

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink-dim);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  top: 62px;
  left: 0; right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--pad) 20px;
  background: var(--cream);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair);
  box-shadow: var(--shadow-md);
}

.nav-drawer[hidden] { display: none; }

.nav-drawer a {
  padding: 14px 16px;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-drawer a:hover,
.nav-drawer a:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
}

body.nav-open { overflow: hidden; }

.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.here  { color: var(--ink); background: var(--surface-2); }

.nav-links a.here::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}





/* ── Shell ────────────────────────────────────────────── */

main { position: relative; z-index: 2; }

.hero, .contact {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 62px);
  padding-top: clamp(24px, 5vh, 48px);
  padding-bottom: clamp(56px, 10vh, 88px);
  text-align: center;
}

/* ── Neural scene ─────────────────────────────────────────
   No card: the scene sits directly on the page, no panel, no border,
   no shadow, nothing boxing it in. */

.scene-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 880px);
  margin-bottom: clamp(24px, 4vh, 40px);
  background: transparent;
}

.scene-wrap {
  position: relative;
  width: 100%;
  height: min(82vw, 580px);
  background: transparent;
  isolation: isolate;
  transform:
    translate3d(calc(var(--nx, 0) * 1px), calc(var(--ny, 0) * 1px), 0);
  transition: transform .2s var(--smooth);
}

.trace-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  z-index: 1;
}




@keyframes glow-pulse {
  to { transform: scale(1.1); opacity: .7; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  /* Padding only for rhythm — no surface, border, radius or shadow. */
  padding: clamp(20px, 3vw, 32px) clamp(16px, 3vw, 28px);
  background: transparent;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 22px;
  opacity: .85;
}

.display { margin-bottom: 0; }

.display-lg,
.display-sm {
  display: block;
  font-family: var(--display);
  line-height: 1;
  text-transform: uppercase;
}

.display-lg {
  font-weight: 200;
  font-size: clamp(56px, 13vw, 128px);
  letter-spacing: .18em;
  margin-right: -.18em;
  color: var(--ink);
}

.shimmer {
  color: var(--ink);
  animation: title-pulse 6s var(--smooth) infinite;
}

@keyframes title-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .82; }
}

.divider {
  display: block;
  width: 56px;
  height: 2px;
  margin: 28px auto 28px;
  background: var(--red);
  opacity: .5;
}

.whisper {
  margin-bottom: 20px;
  font-size: clamp(15px, 1.8vw, 17px);
  font-weight: 300;
  color: var(--ink-dim);
  letter-spacing: .06em;
  line-height: 1.6;
}

.mind-pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.mind-pillars li {
  padding: 6px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--surface);
}

.platforms {
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.waitlist-count {
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.waitlist-count #waitlist-n {
  color: var(--red);
  font-weight: 600;
}

.hero-content .pill { margin-bottom: 0; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pill-share {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hair);
  box-shadow: none;
  cursor: pointer;
  font-family: var(--display);
}

.pill-share:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pill-share.copied {
  border-color: var(--red);
  color: var(--red);
}

/* ── Pills ────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  color: var(--ink);
  background: var(--surface);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .3s var(--spring), background .2s var(--ease),
              border-color .2s var(--ease), box-shadow .3s var(--ease);
}

.pill:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--hair);
  box-shadow: var(--shadow-sm);
}

.pill:active { transform: scale(.97); }

.pill-premium {
  position: relative;
  padding: 16px 44px;
  border: none;
  color: var(--cream);
  background: var(--red);
  box-shadow:
    0 1px 2px rgba(20, 20, 20, .06),
    0 8px 28px rgba(196, 30, 58, .28);
  overflow: hidden;
  transition: transform .35s var(--spring), box-shadow .35s var(--smooth), background .2s var(--ease);
}

.pill-premium:hover {
  transform: translateY(-3px);
  background: var(--red-dark);
  box-shadow:
    0 2px 4px rgba(20, 20, 20, .06),
    0 14px 40px rgba(196, 30, 58, .35);
}

.pill-premium:active { transform: scale(.98) translateY(-1px); }

.pill-premium:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pill-lg { padding: 17px 44px; font-size: 12.5px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-hint-dot {
  width: 24px; height: 38px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  position: relative;
  background: var(--surface);
}

.scroll-hint-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--red);
  animation: hint 2.4s var(--smooth) infinite;
}

@keyframes hint {
  0%, 100% { transform: translateY(0);    opacity: 1; }
  60%      { transform: translateY(13px); opacity: 0; }
}

/* ── Contact ──────────────────────────────────────────── */

.contact {
  padding-top: clamp(56px, 9vh, 104px);
  padding-bottom: clamp(56px, 9vh, 104px);
}

/* No panel — the section sits on the page. The short red rule stays as a
   divider; it marks the section rather than boxing it. */
.contact-panel {
  position: relative;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 40px);
  text-align: center;
  background: transparent;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 88px; height: 1px;
  margin-left: -44px;
  background: var(--red);
  opacity: .45;
}

.contact h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.06;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--ink);
}

.contact-lead {
  margin-bottom: 32px;
  font-size: 15px;
  color: var(--ink-dim);
  letter-spacing: .04em;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  max-width: 26rem;
  margin: 0 auto 16px;
}

.input {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 14px;
  outline: none;
  transition: border-color .25s var(--smooth), box-shadow .25s var(--smooth), background .25s var(--smooth);
}

.input::placeholder { color: var(--ink-faint); }

.input:focus {
  border-color: rgba(196, 30, 58, .45);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(196, 30, 58, .08);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-msg {
  font-size: 14px;
  color: var(--ink-dim);
  min-height: 1.25rem;
  margin-bottom: 12px;
}

.form-msg-ok { color: var(--red); }
.form-msg-err { color: var(--red-dark); }
.form-msg-loading { color: var(--ink-dim); font-style: italic; }

.contact-alt {
  font-size: 14px;
  color: var(--ink-dim);
}

.contact-alt a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Footer ───────────────────────────────────────────── */

.foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hair);
  background: var(--surface);
  isolation: isolate;
}

.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px var(--pad) 46px;
  font-size: 13px;
  color: var(--ink-faint);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.foot-links a {
  color: var(--ink-faint);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s var(--ease);
}

.foot-links a:hover { color: var(--ink); }

.foot-note { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }

/* ── Legal pages ──────────────────────────────────────── */

.legal {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) var(--pad) clamp(64px, 10vh, 96px);
}

.legal h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(32px, 6vw, 48px);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.legal-updated {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 40px;
}

.legal h2 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 32px 0 12px;
  color: var(--ink);
}

.legal p {
  color: var(--ink-dim);
  margin-bottom: 16px;
  line-height: 1.65;
}

.legal a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.legal-back {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 12px;
}

/* ── Accents (solid fills) ────────────────────────────── */

.ac-red      { --accent: #C41E3A; }
.ac-black    { --accent: #141414; }
.ac-cream    { --accent: #EDE6DA; }

/* ── Reveal ───────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .8s var(--spring);
  transition-delay: var(--d, 0ms);
}

.reveal.in { opacity: 1; transform: none; }

/* ── Reduced motion ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-hint-dot::after { animation: none; }
}

body.calm { scroll-behavior: auto; }

body.calm *, body.calm *::before, body.calm *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

body.calm .reveal { opacity: 1; transform: none; }
body.calm .scroll-hint { display: none; }
body.calm .scene-wrap { transform: none; }
body.calm .shimmer { animation: none; }
body.calm .scene-card { transform: none; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 1100px) {
  .nav-links a {
    padding: 8px 10px;
    font-size: 10.5px;
    letter-spacing: .1em;
  }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 680px) {
  :root { --pad: clamp(16px, 4.5vw, 24px); }

  .hero {
    min-height: auto;
    padding-top: clamp(24px, 5vh, 48px);
    padding-bottom: clamp(64px, 12vh, 96px);
  }


  .scene-wrap {
    height: min(85vw, 420px);
  }

  .scene-card {
    width: min(96vw, 100%);
  }

  .display-lg {
    font-size: clamp(40px, 12vw, 72px);
    letter-spacing: .12em;
    margin-right: -.12em;
  }


  .hero-content .pill,
  .waitlist-form .pill-premium,
  .hero-actions .pill {
    width: 100%;
    padding: 14px 20px;
    letter-spacing: .12em;
    font-size: 11px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .scroll-hint { bottom: 16px; }

  .contact-panel {
    padding: clamp(32px, 6vw, 48px) clamp(16px, 4vw, 24px);
  }

  .contact h2 { font-size: clamp(24px, 7vw, 36px); }

}

@media (max-width: 380px) {
  .mark-word { font-size: 13px; letter-spacing: .1em; }

  .display-lg {
    font-size: clamp(28px, 10vw, 40px);
    letter-spacing: .06em;
    margin-right: -.06em;
  }

  .foot-inner {
    flex-direction: column;
    text-align: center;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 56px;
  }
  .scroll-hint { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-drawer { top: calc(54px + env(safe-area-inset-top, 0px)); }
}

/* ── Dark theme ───────────────────────────────────────── */

[data-theme="dark"] {
  --cream:      #141414;
  --cream-dark: #1C1C1C;
  --bg:         #141414;
  --bg-soft:    #1A1A1A;
  --surface:    #1C1C1C;
  --surface-2:  #242424;
  --glass:      rgba(20, 20, 20, .88);
  --ink:        #F4F4F4;
  --ink-dim:    #B8B8B8;
  --ink-faint:  #7A7A7A;
  --hair:       #333333;
  --hair-soft:  #2A2A2A;
  color-scheme: dark;
}

[data-theme="dark"] .space-canvas { opacity: .35; }
[data-theme="dark"] .nav.stuck { background: var(--glass); }

/* ── Sections (demo, steps, faq) ──────────────────────── */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vh, 104px) var(--pad);
}

.section-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-lead {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 32px;
  line-height: 1.6;
}

.section-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.section-cta-note {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ── Demo card ────────────────────────────────────────── */

.demo-card {
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 18px;
}

.app-hint {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.app-hint kbd,
.app-panel kbd,
.steps kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--hair);
  border-radius: 5px;
}

.app-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
  transition: border-color .25s var(--smooth), box-shadow .25s var(--smooth);
}

.app-textarea:focus {
  border-color: rgba(196, 30, 58, .45);
  box-shadow: 0 0 0 4px rgba(196, 30, 58, .08);
}

.app-btn { width: 100%; margin-bottom: 8px; }

.app-status {
  font-size: 13px;
  color: var(--ink-dim);
  font-style: italic;
  margin: 8px 0;
}

/* ── AI buckets ───────────────────────────────────────── */

.buckets {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 520px) {
  .buckets { grid-template-columns: repeat(3, 1fr); }
}

.bucket {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  background: var(--bg-soft);
}

.bucket h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.bucket-now h3   { color: var(--red); }
.bucket-later h3 { color: var(--ink-dim); }
.bucket-letgo h3 { color: var(--ink-faint); }

.bucket ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bucket li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--hair-soft);
}

.bucket li:last-child { border-bottom: none; }

/* ── How it works steps ───────────────────────────────── */

.step-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .step-list { grid-template-columns: repeat(3, 1fr); text-align: left; }
}

.step-card {
  position: relative;
  padding: 28px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 16px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  border: 1px solid var(--hair);
  border-radius: 50%;
}

.step-card h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--ink);
}

.step-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
}

/* ── FAQ accordion ──────────────────────────────────────── */

.faq-list {
  margin: 32px 0 0;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--hair);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-q:hover { color: var(--red); }

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 16px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: var(--ink-dim);
  transform: translate(-50%, -50%);
  transition: transform .2s var(--smooth);
}

.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-q[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-a {
  margin: 0 0 18px;
  padding-right: 36px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.faq-a a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Platform checkboxes ──────────────────────────────── */

.platform-field {
  border: none;
  margin: 0;
  padding: 0;
}

.platform-legend {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 10px;
  text-align: center;
}

.platform-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.platform-chip {
  cursor: pointer;
}

.platform-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.platform-chip span {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 999px;
  transition: border-color .2s, color .2s, background .2s;
}

.platform-chip input:checked + span {
  color: var(--red);
  border-color: var(--red);
  background: rgba(196, 30, 58, .06);
}

.platform-chip input:focus-visible + span {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ── Nav icon buttons ─────────────────────────────────── */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 10px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
  background: var(--surface-2);
}

.nav-actions .icon-btn { display: inline-flex; }

@media (max-width: 900px) {
  .nav-actions .icon-btn { display: none; }
}

/* ── App widget (/app) ────────────────────────────────── */

.app-body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.app-widget {
  flex: 1;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 16px var(--pad) 32px;
}

.app-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 12px;
}

.app-tab {
  flex: 1;
  padding: 10px 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.app-tab:hover { color: var(--ink); }

.app-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.app-panel { text-align: left; }

.app-panel[hidden] { display: none; }

.app-input { margin-bottom: 12px; }

.app-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.focus-timer {
  font-family: var(--display);
  font-size: clamp(48px, 14vw, 72px);
  font-weight: 200;
  letter-spacing: .06em;
  text-align: center;
  color: var(--ink);
  margin: 24px 0;
}

.focus-controls {
  display: flex;
  gap: 10px;
}

.focus-controls .app-btn { flex: 1; }

.app-note {
  font-size: 13px;
  color: var(--red);
  text-align: center;
  margin-top: 12px;
  min-height: 1.25rem;
}

.reset-result {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 12px;
}

.reset-plan {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.app-empty {
  font-size: 14px;
  color: var(--ink-faint);
  text-align: center;
  padding: 24px 0;
}

.app-empty[hidden] { display: none; }

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--hair-soft);
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.history-meta time { margin-left: auto; }

.history-pending {
  color: var(--red);
  font-size: 9px;
}

.history-item p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-dim);
}

.offline-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--red);
  padding: 6px 10px;
  border: 1px solid rgba(196, 30, 58, .3);
  border-radius: 8px;
}

.app-footer-note {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}

.app-footer-note a {
  color: var(--ink-dim);
  text-decoration: none;
}

.app-footer-note a:hover { color: var(--red); }

/* ── Updates page ─────────────────────────────────────── */

.updates {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 80px) var(--pad) clamp(56px, 9vh, 96px);
}

.updates h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 7vw, 52px);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.updates-lead {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 40px;
}

.update-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--hair);
}

.update-card time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-faint);
}

.update-card h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .06em;
  margin: 8px 0 10px;
  color: var(--ink);
}

.update-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 12px;
}

.update-card a {
  font-size: 14px;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
}

.update-card a:hover { text-decoration: underline; }

.updates-back {
  margin-top: 32px;
  font-size: 14px;
}

.updates-back a {
  color: var(--ink-dim);
  text-decoration: none;
}

.updates-back a:hover { color: var(--red); }

/* ── Simplified homepage blocks ───────────────────────── */

.simple-block {
  padding-top: clamp(32px, 5vh, 56px);
  padding-bottom: clamp(32px, 5vh, 56px);
}

.simple-steps {
  font-size: 15px;
  color: var(--ink-dim);
  letter-spacing: .02em;
}

.simple-faq {
  text-align: left;
  max-width: 480px;
}

.simple-faq p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
  padding: 12px 0;
  border-bottom: 1px solid var(--hair-soft);
}

.simple-faq p:last-child { border-bottom: none; }

.simple-faq strong {
  color: var(--ink);
  font-weight: 500;
}

/* Stacked buckets in app (easier on mobile) */

.buckets-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.buckets-stack .bucket h3 {
  font-size: 11px;
  margin-bottom: 6px;
}

.buckets-stack .bucket li {
  font-size: 14px;
  padding: 4px 0;
}

/* ── Labs grid (homepage mini apps) ───────────────────── */

.labs-section {
  padding-top: clamp(48px, 8vh, 88px);
  padding-bottom: clamp(48px, 8vh, 88px);
}

.labs-section .section-inner {
  max-width: 960px;
  text-align: center;
}

.labs-section .section-lead {
  margin-bottom: 40px;
}

.labs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: center;
}

@media (min-width: 560px) {
  .labs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .labs-grid { grid-template-columns: repeat(3, 1fr); }
}

.lab-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 18px;
  transition: border-color .2s, box-shadow .2s;
}

.lab-card:hover {
  border-color: rgba(196, 30, 58, .25);
  box-shadow: var(--shadow-sm);
}

.lab-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
  opacity: .85;
}

.lab-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}

.lab-tag {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.lab-widget {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.lab-lead {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dim);
}

.lab-stat {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(36px, 10vw, 48px);
  line-height: 1;
  color: var(--red);
}

.lab-stat-of {
  font-size: 0.45em;
  color: var(--ink-faint);
}

.lab-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lab-meta {
  font-size: 12px;
  color: var(--ink-dim);
}

.lab-done {
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}

.lab-quote {
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-dim);
  max-width: 100%;
  word-break: break-word;
}

.lab-list-item {
  font-size: 13px;
  color: var(--ink-dim);
  text-align: left;
  width: 100%;
}

.lab-habit-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.lab-btn {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FFF;
  background: var(--red);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .12s;
}

.lab-btn:hover { background: var(--red-dark); }
.lab-btn:active { transform: scale(.97); }

.lab-btn-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(196, 30, 58, .35);
}

.lab-btn-outline:hover {
  background: rgba(196, 30, 58, .06);
}

.lab-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.lab-btn-sm {
  flex: 1;
  padding: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.lab-btn-sm:hover { border-color: var(--ink-faint); }

.lab-btn-sm-primary {
  color: #FFF;
  background: var(--red);
  border-color: var(--red);
}

.lab-btn-sm-primary:hover { background: var(--red-dark); }

.lab-input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 12px;
  outline: none;
}

.lab-input:focus {
  border-color: rgba(196, 30, 58, .4);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, .08);
}

.lab-input::placeholder { color: var(--ink-faint); }

.lab-emojis {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.lab-emoji {
  width: 44px;
  height: 44px;
  font-size: 22px;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, transform .12s;
}

.lab-emoji:hover { border-color: var(--red); }

.lab-emoji.is-picked {
  border-color: var(--red);
  background: rgba(196, 30, 58, .06);
  transform: scale(1.08);
}

.lab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.lab-pill {
  padding: 8px 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

.lab-pill:hover { border-color: var(--red); color: var(--ink); }

.lab-pill.is-picked {
  color: var(--red);
  border-color: var(--red);
  background: rgba(196, 30, 58, .06);
}

.lab-link {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
}

.lab-link:hover { text-decoration: underline; }

/* Overlay (breathe / timer) */

.lab-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, .88);
  backdrop-filter: blur(8px);
}

.lab-overlay[hidden] { display: none; }

.lab-overlay-card {
  text-align: center;
  max-width: 320px;
  width: 100%;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 20px;
  color: var(--ink);
}

.lab-overlay-title {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
}

.lab-overlay-ring {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid var(--red);
  animation: lab-breathe 8s ease-in-out infinite;
}

@keyframes lab-breathe {
  0%, 100% { transform: scale(.85); opacity: .75; }
  40%, 60% { transform: scale(1.1); opacity: 1; }
}

.lab-overlay-phase {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.lab-overlay-time {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 24px;
}

.lab-overlay-card .lab-btn { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .lab-overlay-ring { animation: none; }
}
