@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #FF6B00;
  --pad-x: max(1.25rem, env(safe-area-inset-left));
  --pad-r: max(1.25rem, env(safe-area-inset-right));
  --pad-y: max(1.5rem, env(safe-area-inset-top));
  --pad-b: max(1.5rem, env(safe-area-inset-bottom));
  --measure: 38rem;
  --cta-h: 2.75rem;
  --chrome-pad-y: 0.4rem;
  --chrome-row: 2.75rem;
  --chrome-h: calc(env(safe-area-inset-top, 0px) + var(--chrome-pad-y) * 2 + var(--chrome-row));
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", "Times New Roman", Times, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font: var(--font-sans);
}

/* Dark (default) */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F5F5F5;
  --muted: #A8A8A8;
  --bg: #0A0A0A;
  --bg-mid: #0A0A0A;
  --glow-1: rgba(255, 107, 0, 0.55);
  --glow-2: rgba(255, 92, 16, 0.38);
  --glow-3: rgba(255, 158, 64, 0.28);
  --footer: #666666;
  --toggle-bg: rgba(255, 255, 255, 0.08);
  --toggle-border: rgba(255, 255, 255, 0.14);
  --toggle-ink: #F5F5F5;
  --toggle-hover: rgba(255, 255, 255, 0.14);
  --theme-meta: #0A0A0A;
  --chrome-fill: rgba(10, 10, 10, 0.16);
  --chrome-line: rgba(255, 255, 255, 0.1);
  --chrome-glow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --nav-chip: rgba(255, 107, 0, 0.22);
}

/* Light — stronger orange atmosphere so it matches dark mode energy */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #1A1410;
  --muted: #5C4E44;
  --bg: #FFF8F3;
  --bg-mid: #FFEFE4;
  --glow-1: rgba(255, 107, 0, 0.48);
  --glow-2: rgba(255, 120, 40, 0.32);
  --glow-3: rgba(255, 168, 96, 0.22);
  --footer: #8A7468;
  --toggle-bg: rgba(255, 107, 0, 0.1);
  --toggle-border: rgba(255, 107, 0, 0.28);
  --toggle-ink: #C44E00;
  --toggle-hover: rgba(255, 107, 0, 0.18);
  --theme-meta: #FFF8F3;
  --chrome-fill: rgba(255, 248, 243, 0.26);
  --chrome-line: rgba(26, 20, 16, 0.1);
  --chrome-glow: inset 0 -1px 0 rgba(26, 20, 16, 0.06);
  --nav-chip: rgba(255, 176, 120, 0.42);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, body { min-height: 100%; min-height: 100dvh; }
body {
  position: relative;
  isolation: isolate;
  z-index: 1;
  font-family: var(--font-sans);
  font-synthesis: none;
  color: var(--ink);
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-mid) 42%, var(--bg) 100%);
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -28%;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}
body::before {
  background:
    radial-gradient(ellipse 42% 36% at 86% 6%, var(--glow-1) 0%, rgba(255, 107, 0, 0.18) 32%, transparent 72%),
    radial-gradient(ellipse 38% 34% at 6% 94%, var(--glow-2) 0%, rgba(255, 107, 0, 0.1) 36%, transparent 74%),
    radial-gradient(ellipse 30% 28% at 52% 24%, var(--glow-3) 0%, transparent 70%);
  filter: blur(72px) saturate(1.2);
  animation: glow-drift-a 32s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(ellipse 34% 40% at 18% 18%, var(--glow-3) 0%, transparent 68%),
    radial-gradient(ellipse 46% 32% at 78% 78%, var(--glow-2) 0%, transparent 72%);
  filter: blur(96px) saturate(1.1);
  opacity: 0.85;
  animation: glow-drift-b 44s ease-in-out infinite alternate;
}
html[data-theme="dark"] body::before,
html[data-theme="dark"] body::after {
  mix-blend-mode: screen;
}
html[data-theme="light"] body::before,
html[data-theme="light"] body::after {
  mix-blend-mode: multiply;
  opacity: 0.55;
}
@keyframes glow-drift-a {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  50% { transform: translate3d(4%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-1%, 4%, 0) scale(0.96); }
}
@keyframes glow-drift-b {
  0% { transform: translate3d(3%, 4%, 0) scale(1.06); }
  100% { transform: translate3d(-4%, -3%, 0) scale(0.94); }
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--ink);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease-expo), transform 1.4s var(--ease-expo);
}
html.is-ready .backdrop {
  opacity: 0.055;
  transform: none;
}
.backdrop-word {
  position: absolute;
  font-family: var(--font-serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(7rem, 28vw, 18rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.backdrop-word-1 {
  top: -0.12em;
  left: -0.08em;
}
.backdrop-word-2 {
  bottom: -0.18em;
  right: -0.1em;
}

/* Flush top chrome — transparent, device-aware.
   Phones: hamburger + brand + actions; links in a side drawer.
   Tablets/desktops: one row with centered tabs. */
.site-chrome {
  position: fixed;
  z-index: 22;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "toggle brand actions";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0;
  min-height: var(--chrome-h);
  padding:
    calc(var(--chrome-pad-y) + env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    var(--chrome-pad-y)
    max(1rem, env(safe-area-inset-left, 0px));
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.nav-toggle {
  grid-area: toggle;
  position: relative;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--ink);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 1.2rem;
  height: 0.85rem;
  pointer-events: none;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  pointer-events: none;
  transition:
    transform 0.35s var(--ease-expo),
    opacity 0.25s ease,
    top 0.35s var(--ease-expo);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 50%; margin-top: -0.75px; }
.nav-toggle-bars span:nth-child(3) { bottom: 0; top: auto; }
.nav-toggle.is-close .nav-toggle-bars span:nth-child(1),
body.nav-open #nav-toggle .nav-toggle-bars span:nth-child(1) {
  top: 50%;
  margin-top: -0.75px;
  transform: rotate(45deg);
}
.nav-toggle.is-close .nav-toggle-bars span:nth-child(2),
body.nav-open #nav-toggle .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-close .nav-toggle-bars span:nth-child(3),
body.nav-open #nav-toggle .nav-toggle-bars span:nth-child(3) {
  top: 50%;
  bottom: auto;
  margin-top: -0.75px;
  transform: rotate(-45deg);
}
.site-chrome-brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: var(--chrome-row);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.site-chrome-brand:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.35rem;
}
.site-chrome-logo {
  display: block;
  height: clamp(1.08rem, 1.6vw + 0.7rem, 1.42rem);
  width: auto;
  max-width: 9.5rem;
}
.site-chrome-actions {
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-height: var(--chrome-row);
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--chrome-line);
  background: var(--chrome-fill);
  box-shadow: var(--chrome-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-chrome-actions .theme-toggle {
  width: calc(var(--chrome-row) - 0.4rem);
  height: calc(var(--chrome-row) - 0.4rem);
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.site-chrome-actions .theme-toggle:hover {
  background: var(--toggle-hover);
  border-color: transparent;
}
.site-chrome-actions .auth-bar {
  margin-left: 0.1rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--chrome-line);
}
.site-chrome-actions .auth-bar.is-on {
  display: inline-flex;
}
.site-chrome-actions .auth-btn {
  min-height: calc(var(--chrome-row) - 0.4rem);
  border: 0;
}

.auth-bar {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
.auth-bar.is-on {
  display: inline-flex;
}
.auth-btn,
.auth-status {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
}
.auth-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 1rem;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.45s var(--ease-expo),
    border-color 0.45s var(--ease-expo),
    color 0.45s var(--ease-expo),
    transform 0.35s var(--ease-expo);
}
.auth-btn-fill {
  position: absolute;
  inset: -55%;
  z-index: -1;
  background: var(--brand);
  transform: translateY(200%) rotate(15deg);
  transition: transform 0.8s var(--ease-expo);
  pointer-events: none;
}
.auth-btn-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.45s var(--ease-expo);
}
.auth-btn:hover .auth-btn-fill,
.auth-btn:focus-visible .auth-btn-fill {
  transform: translateY(0) rotate(8deg);
}
.auth-btn:hover .auth-btn-label,
.auth-btn:focus-visible .auth-btn-label {
  transform: translateY(-1px);
}
.auth-btn:active { transform: scale(0.96); }
.auth-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.auth-status {
  display: none;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.2rem 0 0.75rem;
  gap: 0.25rem;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  color: var(--toggle-ink);
}
.auth-status.is-on { display: inline-flex; }
.auth-status span {
  color: var(--muted);
  font-weight: 600;
}
.auth-status .auth-btn {
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 0;
  background: transparent;
  color: var(--toggle-ink);
}
.auth-status .auth-btn .auth-btn-fill { background: var(--ink); }
.auth-status .auth-btn:hover,
.auth-status .auth-btn:focus-visible {
  color: var(--bg);
}
.auth-notice {
  position: fixed;
  z-index: 23;
  top: calc(var(--chrome-h) + 0.35rem);
  right: max(0.75rem, env(safe-area-inset-right));
  display: none;
  margin: 0;
  max-width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.55rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--toggle-ink);
  background: var(--chrome-fill);
  border: 1px solid var(--chrome-line);
  border-radius: 0.85rem;
  box-shadow: var(--chrome-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.35s ease;
}
.auth-notice.is-on { display: block; }
.auth-notice.is-leaving { opacity: 0; }

.theme-toggle {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.45s var(--ease-expo),
    border-color 0.45s var(--ease-expo),
    color 0.45s var(--ease-expo),
    transform 0.35s var(--ease-expo);
}
.theme-toggle:hover {
  background: var(--toggle-hover);
  border-color: var(--toggle-border);
}
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: none;
}
/* Dark mode → show sun (switch to light). Light mode → show moon (switch to dark). */
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.site-nav--desktop {
  display: none;
  grid-area: nav;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--chrome-row);
  gap: 0.08rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.25rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  text-shadow: 0 1px 14px var(--bg);
  padding: 0 0.85rem;
  border-radius: 0.7rem;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.45s var(--ease-expo),
    color 0.45s var(--ease-expo);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav--desktop a:hover { background: var(--nav-chip); }
}
.site-nav a[aria-current="page"] {
  background: var(--nav-chip);
  color: var(--ink);
}
.site-nav a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Mobile side drawer — same UI language as the site chrome */
.site-drawer-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  background: rgba(8, 6, 5, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-expo);
}
.site-drawer-backdrop:not([hidden]) {
  pointer-events: auto;
}
body.nav-open .site-drawer-backdrop {
  opacity: 1;
}
.site-drawer {
  position: fixed;
  z-index: 31;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(20.5rem, 88vw);
  display: flex;
  flex-direction: column;
  padding:
    calc(0.95rem + env(safe-area-inset-top, 0px))
    1.35rem
    max(1.5rem, env(safe-area-inset-bottom, 0px))
    max(1.35rem, env(safe-area-inset-left, 0px));
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 42% at 0% 0%, var(--glow-1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 36% at 100% 100%, var(--glow-3) 0%, transparent 58%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-mid) 48%, var(--bg) 100%);
  border-right: 1px solid var(--chrome-line);
  box-shadow: 24px 0 64px rgba(0, 0, 0, 0.28);
  transform: translateX(-105%);
  visibility: hidden;
  transition:
    transform 0.45s var(--ease-expo),
    visibility 0.45s;
}
body.nav-open .site-drawer {
  transform: translateX(0);
  visibility: visible;
}
.site-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 2.35rem;
}
.site-drawer-brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.site-drawer-brand:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.35rem;
}
.site-drawer-logo {
  display: block;
  height: 1.2rem;
  width: auto;
  max-width: 9.5rem;
}
.site-drawer-top .nav-toggle {
  grid-area: unset;
  flex: 0 0 auto;
  margin-left: auto;
}
/* Drawer nav tree — flat today, nested-ready for submenu hierarchy. */
.site-nav--drawer {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.drawer-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.drawer-item {
  margin: 0;
  padding: 0;
}
.site-nav--drawer .drawer-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 3rem;
  margin: 0;
  padding: 0.7rem 0.35rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  text-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.3s var(--ease-expo),
    background 0.3s var(--ease-expo);
}
.site-nav--drawer .drawer-link:hover,
.site-nav--drawer .drawer-link:focus-visible {
  background: var(--nav-chip);
  color: var(--ink);
  outline: none;
}
.site-nav--drawer .drawer-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.site-nav--drawer .drawer-link[aria-current="page"] {
  background: var(--nav-chip);
  color: var(--brand);
}
/* Nested levels: indent + left rail so the tree reads clearly. */
.drawer-tree--nested {
  margin: 0.1rem 0 0.45rem;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 1px solid var(--chrome-line);
  margin-left: 0.55rem;
}
.drawer-tree--nested .drawer-link {
  min-height: 2.65rem;
  padding: 0.45rem 0.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.drawer-tree--nested .drawer-link:hover,
.drawer-tree--nested .drawer-link:focus-visible,
.drawer-tree--nested .drawer-link[aria-current="page"] {
  color: var(--ink);
}
.drawer-tree--nested .drawer-tree--nested {
  margin-left: 0.45rem;
  padding-left: 0.75rem;
}
/* Branch toggle (unused until submenus ship; keeps hierarchy affordance ready). */
.site-nav--drawer .drawer-link--toggle {
  justify-content: space-between;
  gap: 0.75rem;
}
.site-nav--drawer .drawer-link--toggle::after {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.2rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.3s var(--ease-expo);
}
.site-nav--drawer .drawer-link--toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  opacity: 0.8;
}
.drawer-item--branch > .drawer-tree--nested[hidden] {
  display: none;
}
.site-drawer-tagline {
  margin: auto 0 0;
  padding: 1.5rem 0.15rem 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--muted);
}
body.nav-open {
  overflow: hidden;
}

/* Touch: Apple/Android 44px targets without shrinking type. */
@media (pointer: coarse) {
  .theme-toggle,
  .nav-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }
  .site-nav a,
  .auth-btn,
  .auth-status {
    min-height: 2.75rem;
  }
}

/* Narrow phones */
@media (max-width: 720px) {
  :root {
    --cta-h: 2.5rem;
    --chrome-pad-y: 0.28rem;
    --chrome-row: 2.5rem;
    --chrome-h: calc(env(safe-area-inset-top, 0px) + var(--chrome-pad-y) * 2 + var(--chrome-row));
  }
  .auth-status span { display: none; }
  .theme-toggle svg {
    width: 1.08rem;
    height: 1.08rem;
  }
  .auth-btn,
  .auth-status {
    padding: 0 0.8rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .site-chrome-logo { max-width: 7.25rem; height: 1rem; }
  .auth-btn,
  .auth-status {
    padding: 0 0.65rem;
    font-size: 0.68rem;
  }
}

/* Tablets / iPad portrait — inline tabs, no drawer */
@media (min-width: 768px) {
  :root {
    --chrome-pad-y: 0.45rem;
    --chrome-row: 2.85rem;
    --chrome-h: calc(env(safe-area-inset-top, 0px) + var(--chrome-pad-y) * 2 + var(--chrome-row));
  }
  .site-chrome {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav actions";
    padding-left: max(2.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(2.5rem, env(safe-area-inset-right, 0px));
    column-gap: 1rem;
  }
  .nav-toggle { display: none; }
  .site-nav--desktop {
    display: flex;
  }
  .site-drawer,
  .site-drawer-backdrop {
    display: none !important;
  }
  .site-nav--desktop a {
    font-size: 0.8rem;
    padding: 0 0.9rem;
  }
}

/* iPad landscape, MacBook, desktop */
@media (min-width: 1024px) {
  :root {
    --chrome-pad-y: 0.55rem;
    --chrome-row: 3rem;
    --chrome-h: calc(env(safe-area-inset-top, 0px) + var(--chrome-pad-y) * 2 + var(--chrome-row));
  }
  .site-chrome {
    padding-left: max(4.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(3.5rem, env(safe-area-inset-right, 0px));
    column-gap: 1.35rem;
  }
  .site-nav--desktop { justify-content: center; }
  .site-nav--desktop a {
    font-size: 0.84rem;
    padding: 0 1.05rem;
  }
}

.site-toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(0.6rem);
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-ink);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease-expo),
    transform 0.4s var(--ease-expo);
}
.site-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.site-toast.is-leaving { opacity: 0; }

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    calc(var(--chrome-h) + 1.15rem)
    calc(var(--pad-r) + 0.5rem)
    calc(var(--pad-b) + 0.75rem)
    calc(var(--pad-x) + 0.5rem);
  width: 100%;
  margin: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  width: 100%;
}
.hero-grid-single {
  grid-template-columns: minmax(0, 1fr);
}
.copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 38rem;
}
.page {
  justify-content: flex-start;
  max-width: var(--measure);
  padding-top: calc(var(--chrome-h) + 1.75rem);
}
.page .copy { justify-content: flex-start; flex: 0 1 auto; }
.page h1 { font-size: clamp(2.1rem, 7vw, 3.8rem); line-height: 1.08; }
.policy-h {
  margin: 1.75rem 0 0.7rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}
.body .policy-label {
  color: var(--ink);
  font-weight: 600;
}
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
}
.store-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
}
.contact-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}
.contact-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
.wordmark {
  margin-bottom: 1.15rem;
  width: fit-content;
  max-width: 100%;
}
.wordmark-img {
  display: block;
  width: min(17.5rem, 88%);
  height: auto;
}
.wordmark a {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
.kicker {
  overflow: hidden;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin-bottom: 1.15rem;
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 8.4vw, 4.35rem);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.reveal {
  display: block;
  overflow: hidden;
  margin-bottom: -0.02em;
  padding-bottom: 0.22em;
}
.reveal > span {
  display: block;
  transform: translateY(115%);
  transition: transform 1s var(--ease-expo);
  transition-delay: var(--d, 0ms);
}
html.is-ready .reveal > span { transform: translateY(0); }
.rise-fade {
  opacity: 0;
  transform: translateY(1.15rem);
  transition:
    opacity 1s var(--ease-expo),
    transform 1s var(--ease-expo);
  transition-delay: var(--d, 0ms);
}
html.is-ready .rise-fade {
  opacity: 1;
  transform: none;
}
.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;
}
.marquee {
  --gap: 1.75rem;
  position: relative;
  width: min(100%, 34rem);
  margin: 0 0 1.35rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: var(--gap);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  animation: marquee 28s linear infinite;
}
.marquee-track span { white-space: nowrap; }
.marquee-track span::after {
  content: "·";
  margin-left: var(--gap);
  opacity: 0.45;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.body {
  font-size: 1.0625rem; /* ≥16px; avoids iOS input zoom quirks on focus */
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.45rem;
  max-width: 34rem;
  text-wrap: pretty;
}
.tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.wait-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.7rem 1.05rem 0.7rem 0.9rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.wait-dot {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.55);
  animation: wait-pulse 1.8s var(--ease-expo) infinite;
}
.wait-copy {
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--ink);
}
.waitlist-card {
  justify-self: end;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  min-width: 0;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 1.35rem;
  border: 1px solid var(--toggle-border);
  background: var(--toggle-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.waitlist-kicker {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.waitlist-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.waitlist-copy {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}
#waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
#waitlist-email {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
}
#waitlist-email:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.waitlist-turnstile {
  width: 100%;
  min-height: 0;
  margin: 0.35rem 0 0.1rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0.65rem;
  overflow: hidden;
  line-height: 0;
  color-scheme: dark;
}
html[data-theme="light"] .waitlist-turnstile {
  color-scheme: light;
}
.waitlist-turnstile:empty {
  display: none;
  min-height: 0;
  margin: 0;
}
/* Turnstile injects a wrapper div + iframe; clip its 1px chrome so it sits flush in the card */
.waitlist-turnstile > div {
  width: calc(100% + 2px) !important;
  margin: -1px;
  line-height: 0;
  overflow: hidden;
  border-radius: 0.65rem;
}
.waitlist-turnstile iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  vertical-align: top;
}
html[data-theme="dark"] .waitlist-turnstile {
  clip-path: inset(1px round 0.65rem);
}
html[data-theme="light"] .waitlist-turnstile {
  clip-path: inset(1px round 0.65rem);
}
.waitlist-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}
.waitlist-consent input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}
.waitlist-consent label { cursor: pointer; }
.waitlist-consent a { color: var(--ink); }
.waitlist-submit {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: #C75300;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.waitlist-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.waitlist-status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink);
}
footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--footer) 50%, transparent);
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .waitlist-card {
    justify-self: start;
    max-width: 400px;
  }
}
@keyframes wait-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.5); opacity: 1; }
  70% { box-shadow: 0 0 0 0.7rem rgba(255, 107, 0, 0); opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); opacity: 1; }
}
footer {
  flex-shrink: 0;
  padding-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--footer);
}

/* Mobile scroll perf: no live blur/anim, no overflow glow strip under the footer. */
@media (max-width: 767px), ((hover: none) and (pointer: coarse)) {
  html { scroll-behavior: auto; }
  body {
    overflow-x: clip;
    background:
      radial-gradient(ellipse 80% 48% at 100% 0%, var(--glow-1) 0%, transparent 58%),
      radial-gradient(ellipse 70% 40% at 0% 100%, var(--glow-2) 0%, transparent 62%),
      radial-gradient(ellipse 55% 32% at 48% 28%, var(--glow-3) 0%, transparent 60%),
      linear-gradient(165deg, var(--bg) 0%, var(--bg-mid) 42%, var(--bg) 100%);
  }
  /* Drop extra layers: negative inset + overflow-x:hidden was painting a
     clipped glow strip under the footer. Atmosphere lives on body now. */
  body::before,
  body::after {
    content: none;
    display: none;
    filter: none;
    animation: none;
    will-change: auto;
  }
  .backdrop {
    position: fixed;
    inset: 0;
    height: auto;
    overflow: hidden;
    contain: none;
    transform: none;
  }
  .backdrop-word {
    font-size: clamp(4.5rem, 20vw, 9rem);
  }
  .marquee-track {
    animation: none;
  }
  .wait-dot {
    animation: none;
    box-shadow: none;
  }
  .wait-line,
  .waitlist-card,
  .auth-notice,
  .site-toast {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: calc(var(--chrome-h) + 1.15rem);
    padding-left: max(1.35rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.35rem, env(safe-area-inset-right, 0px));
  }
  .page { padding-top: calc(var(--chrome-h) + 1.5rem); }
  .wordmark-img { width: min(15.75rem, 84%); }
  h1 { font-size: clamp(2.35rem, 11.2vw, 3.2rem); }
  .tagline { font-size: clamp(1.35rem, 6.2vw, 1.85rem); }
  .wait-copy { font-size: clamp(0.78rem, 3.5vw, 0.92rem); }
}

/* Phones in landscape / short screens: top-align so copy isn't clipped */
@media (max-height: 520px) {
  .hero {
    justify-content: flex-start;
    min-height: auto;
    padding-top: calc(var(--chrome-h) + 0.85rem);
    padding-bottom: calc(var(--pad-b) + 1.25rem);
  }
  .copy { justify-content: flex-start; }
  .wordmark { margin-bottom: 0.85rem; }
  h1 { margin-bottom: 0.75rem; font-size: clamp(1.85rem, 7vw, 2.6rem); }
  .marquee, .body { margin-bottom: 0.85rem; }
  .tagline { margin-bottom: 1rem; }
  footer { padding-top: 1.75rem; }
}

/* Large phones / phablets — same composition as desktop, scaled */
@media (min-width: 430px) and (max-width: 767px) {
  :root { --measure: 34rem; }
  .hero {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
  h1 { font-size: clamp(2.55rem, 9.2vw, 3.35rem); }
  .body { font-size: 1.05rem; }
}

/* iPad portrait & small tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --measure: 42rem;
    --pad-x: max(2.5rem, env(safe-area-inset-left));
    --pad-r: max(2.5rem, env(safe-area-inset-right));
  }
  .hero { margin: 0; }
  .wordmark { margin-bottom: 1.5rem; }
  .wordmark-img { width: min(20rem, 88%); }
  h1 {
    font-size: clamp(3.1rem, 7vw, 4.5rem);
    margin-bottom: 1.35rem;
  }
  .body {
    font-size: 1.175rem;
    line-height: 1.65;
    margin-bottom: 1.6rem;
  }
  .tagline { margin-bottom: 1.75rem; }
  footer { padding-top: 3rem; }
}

/* iPad landscape / large tablets / desktop */
@media (min-width: 1024px) {
  :root { --measure: 52rem; }
  .hero {
    margin: 0;
    padding-left: max(4.5rem, env(safe-area-inset-left));
    padding-right: max(3.5rem, env(safe-area-inset-right));
  }
  h1 { font-size: clamp(3.6rem, 6vw, 5.1rem); }
  .body { font-size: 1.2rem; max-width: 36rem; }
  .tagline { font-size: 2.35rem; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body,
  body::before,
  body::after,
  .site-chrome,
  .theme-toggle,
  .nav-toggle,
  .nav-toggle-bars span,
  .site-drawer,
  .site-drawer-backdrop,
  .site-nav a,
  .site-toast,
  .auth-btn,
  .auth-btn-fill,
  .auth-btn-label,
  .reveal > span,
  .rise-fade,
  .backdrop,
  .marquee-track,
  .wait-dot {
    animation: none !important;
    transition: none !important;
  }
  .site-toast.is-on {
    transform: translateX(-50%) translateY(0) !important;
  }
}
