/* ============ EnviroMento ============ */

:root {
  --bg: #000;
  --fg: #f3f6f7;
  --muted: #8a959a;
  --dim: #545e63;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.07);
  --accent: #f1eff4;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* hidden always hides, whatever display a class gives the element (a .field's grid showed the sign-in form's
   authenticator code box before it was asked for) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.page-open { overflow: hidden; }

a { color: inherit; }
::selection { background: rgba(241, 239, 244, 0.3); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.hero-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 1.1s var(--ease), filter 0.8s ease;
}
body.flying .hero-title {
  opacity: 0;
  transform: scale(1.12);
  filter: blur(6px);
}

.wordmark {
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.45rem, 5vw, 4.6rem);
  letter-spacing: 0.24em;
  padding-left: 0.24em; /* balance the trailing tracking so it centers optically */
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 14px rgba(225, 245, 255, 0.22);
  animation: rise 1.8s 0.2s var(--ease-out) both;
}

.tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(0.62rem, 0.95vw, 0.78rem);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 1.8s 0.55s var(--ease-out) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); letter-spacing: 0.5em; filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
  animation: fade 1.5s 1.6s both;
  transition: opacity 0.5s;
}
body.flying .hint { opacity: 0; }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-desktop { display: none; } }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Keyboard / fallback nav */
.fallback-nav {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.fallback-nav:focus-within,
body.no-webgl .fallback-nav {
  opacity: 1;
  pointer-events: auto;
}
.fallback-nav a {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.fallback-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Without the 3D (motion off, or no WebGL) the title and the menu are one group, centred together, and the hero
   grows rather than clipping: pinning the menu at 62% of the height put it off the bottom of a phone's screen
   (with the browser's own bars showing), and its left: 50% box gave it half the width, one button a row. */
body.no-webgl .hero, body.calm .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vh, 52px);
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 76px 16px 48px;
}
body.no-webgl .hero-title, body.calm .hero-title { position: static; }
body.no-webgl .fallback-nav, body.calm .fallback-nav {
  position: static;
  transform: none;
  max-width: 680px;           /* one row on a computer, two or three on a phone */
  gap: 10px;
}

/* ---------- Shared type ---------- */

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  margin: 0 0 28px;
  font-weight: 200;
  font-size: clamp(2.1rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
  outline: none;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 300;
  line-height: 1.55;
  color: #d5dcdf;
  max-width: 46ch;
  margin: 0 0 24px;
}

p { color: #b9c2c6; }
em { font-style: normal; color: var(--fg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg);
  font: 500 0.82rem/1 var(--font);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.btn:hover { background: var(--glass-hi); border-color: rgba(255, 255, 255, 0.2); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: #fff; color: #000; border-color: #fff; }
.btn-primary:hover { background: #dffcf3; border-color: #dffcf3; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* ---------- About ---------- */

.about {
  position: relative;
  padding: clamp(90px, 14vw, 170px) 0 clamp(70px, 10vw, 120px);
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(241, 239, 244, 0.06), transparent 70%),
    #000;
  border-top: 1px solid var(--line);
}

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-cols p:not(.lede) { margin-top: 6px; }

.steps {
  list-style: none;
  margin: 80px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.steps li {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.step-n {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.steps h3 { margin: 10px 0 8px; font-weight: 400; font-size: 1.3rem; }
.steps p { margin: 0; font-size: 0.95rem; }

.about-roots {
  margin-top: 80px;
  max-width: 640px;
}
.about-roots p:last-child { font-size: 1.1rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 56px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.85rem;
  color: var(--dim);
}
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Page layer (cube transition target) ---------- */

.page-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #000;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 1s var(--ease);
}
.page-layer.open { clip-path: circle(150% at 50% 50%); }
.page-layer.open.settled { clip-path: none; }
.page-layer[hidden] { display: none; }

.page-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.82);
  color: var(--fg);
  font: 500 0.78rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s 0.5s, transform 0.5s 0.5s, background 0.2s;
}
.page-layer.open .page-close { opacity: 1; transform: none; }
.page-close:hover { background: rgba(255, 255, 255, 0.08); }
.page-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page {
  max-width: 1100px;
  margin: 0 auto;
  background: radial-gradient(70% 520px at 50% 0%, rgba(241, 239, 244, 0.07), transparent 100%);
  padding: clamp(96px, 12vw, 140px) 24px 100px;
}
.page[hidden] { display: none; }
.page-narrow { max-width: 560px; }

/* Content rises in after the circle opens */
.page > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.page-layer.open .page > * { opacity: 1; transform: none; }
.page-layer.open .page > *:nth-child(1) { transition-delay: 0.35s; }
.page-layer.open .page > *:nth-child(2) { transition-delay: 0.42s; }
.page-layer.open .page > *:nth-child(3) { transition-delay: 0.5s; }
.page-layer.open .page > *:nth-child(4) { transition-delay: 0.58s; }
.page-layer.open .page > *:nth-child(5) { transition-delay: 0.66s; }
.page-layer.open .page > *:nth-child(n+6) { transition-delay: 0.74s; }

.section-title {
  margin: 72px 0 18px;
  font-weight: 300;
  font-size: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.section-title + .card-grid { margin-top: 0; }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.card:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.card h3, .card h4 { margin: 0 0 10px; font-weight: 400; font-size: 1.2rem; color: var(--fg); }
.card p { margin: 0; font-size: 0.95rem; }
.card ul { margin: 16px 0 0; padding-left: 18px; color: #b9c2c6; font-size: 0.92rem; }
.card li { margin: 4px 0; }
.card li::marker { color: var(--accent); }

.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 80px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.page-foot p { margin: 0 12px 0 0; font-size: 1.1rem; color: var(--fg); font-weight: 300; }

/* Scenes */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.scene-card {
  display: block;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.4s var(--ease-out), border-color 0.3s;
}
.scene-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2); }
.scene-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 50% 55%, rgba(241, 239, 244, 0.22), transparent 55%),
    radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1.4px) 0 0 / 9px 9px,
    #030607;
  -webkit-mask-image: linear-gradient(#000 70%, rgba(0, 0, 0, 0.75));
  mask-image: linear-gradient(#000 70%, rgba(0, 0, 0, 0.75));
}
.scene-thumb.t2 { background-position: center, 3px 2px, 0 0; filter: hue-rotate(40deg); }
.scene-thumb.t3 { background-position: center, 5px 6px, 0 0; filter: hue-rotate(160deg); }
.scene-thumb.t4 { background-position: center, 1px 4px, 0 0; filter: hue-rotate(260deg); }
.scene-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scene-meta { padding: 18px 20px 20px; }
.scene-meta h3 { margin: 0; font-weight: 400; font-size: 1.05rem; }
.scene-meta p { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); }

/* Forms */
.quote-form,
.login-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-top: 40px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.login-form { grid-template-columns: 1fr; }
.field { display: grid; gap: 8px; }
.field.full, .form-foot.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.5);
  color: var(--fg);
  font: 400 1rem/1.4 var(--font);
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
/* The open list is drawn by the browser; give its options solid dark colours to match. */
select option,
select optgroup { background: #0d1110; color: #e9efed; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(241, 239, 244, 0.04);
}
.field input[aria-invalid="true"] { border-color: #ff7b7b; }
.field input:disabled { opacity: 0.5; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 6px; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.form-note a { color: var(--fg); }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .about-cols { grid-template-columns: 1fr; gap: 8px; }
  .steps { grid-template-columns: 1fr; margin-top: 48px; }
  .quote-form { grid-template-columns: 1fr; }
  .page-foot p { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  /* No zooming circle or sliding text: a gentle cross-fade instead of an abrupt cut. */
  body:not(.force-motion) .page-layer { clip-path: none; opacity: 0; transition: opacity 0.45s ease; }
  body:not(.force-motion) .page-layer.open { opacity: 1; }
  body:not(.force-motion) .page > * { transform: none; transition: opacity 0.4s ease 0.15s; }
  body:not(.force-motion) :is(.wordmark, .tagline, .hint) { animation: none; }
}

body.no-webgl .hint { display: none; }
.login-form[hidden], .quote-form[hidden] { display: none; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.scene-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-thumb.has-img { background: #050708; -webkit-mask-image: none; mask-image: none; }

/* ---------- Scene viewer (view-only embed) ---------- */
.scene-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* The visible screen height: on iPhones 100vh reaches behind the browser's toolbar and
     hides the viewer's bottom controls; dvh is what's actually visible. */
  height: 100vh;
  height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(0, 1fr);  /* (a long scene name is cut short, not the screen widened) */
  background: #000;
  animation: fade 0.35s ease both;
}
.scene-viewer[hidden] { display: none; }
.scene-viewer-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid var(--line);
}
.scene-viewer-bar h2 { min-width: 0; margin: 0; font-weight: 300; font-size: 1.05rem; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scene-viewer-bar .btn { padding: 9px 16px; font-size: 0.75rem; }
/* Back to the scenes: the same pill as the pages' own Back button. */
.scene-viewer-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.82);
  color: var(--fg);
  font: 500 0.78rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.scene-viewer-back:hover { background: rgba(255, 255, 255, 0.08); }
.scene-viewer-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.scene-viewer iframe { width: 100%; height: 100%; border: 0; background: #000; }

/* Spam trap: off-screen, never seen by people. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Phones draw a translucent highlight over whatever is tapped; on the full-screen 3D canvas
   that flashes the whole screen. Switch it off (buttons still show their own pressed state). */
html { -webkit-tap-highlight-color: transparent; }

/* ============ Display toggles (top right of the hero): motion and day/night ============ */

.prefs {
  position: absolute;
  z-index: 5;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  display: flex;
  gap: 8px;
  animation: fade 1.2s 1.2s both;
  transition: opacity 0.5s;
}
body.flying .prefs { opacity: 0; pointer-events: none; }

.pref {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font: 500 0.66rem/1 var(--font);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.pref:hover { color: var(--fg); border-color: var(--accent-line); }
.pref:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pref-icon { position: relative; display: grid; width: 15px; height: 15px; }
.pref-icon svg {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.pref[aria-pressed="true"] .pref-icon svg { color: var(--accent); }
#pref-motion .pref-icon svg { fill: currentColor; stroke: none; }
#pref-motion[aria-pressed="true"] .pref-icon svg { filter: drop-shadow(0 0 4px var(--accent-glow)); animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(0.82) rotate(18deg); opacity: 0.75; } }

/* the sky: a moon by night, a sun by day, swapping with a turn */
.pref-sky .sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
.pref-sky .moon { opacity: 1; transform: none; color: #cfe3ff; }
#pref-theme[aria-pressed="true"] .pref-sky .sun { opacity: 1; transform: none; color: #e0a400; }
#pref-theme[aria-pressed="true"] .pref-sky .moon { opacity: 0; transform: rotate(90deg) scale(0.4); }

/* the switch itself */
.pref-track {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: 999px;
  background: var(--track);
  transition: background 0.35s;
}
.pref-track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--knob);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-out), background 0.35s;
}
.pref[aria-pressed="true"] .pref-track { background: var(--accent); }
.pref[aria-pressed="true"] .pref-track i { transform: translateX(11px); background: var(--on-accent); }

@media (max-width: 560px) {
  .prefs { right: 12px; top: max(12px, env(safe-area-inset-top)); gap: 6px; }
  .pref { padding: 7px; gap: 7px; }
  .pref-label { display: none; }
}

/* ============ Motion off: the plain view (as without 3D) ============ */

body.calm #stage { opacity: 0; pointer-events: none; }
body.calm .fallback-nav { opacity: 1; pointer-events: auto; }
body.calm .hint { display: none; }
body.calm .page-layer { clip-path: none; opacity: 0; transition: opacity 0.45s ease; }
body.calm .page-layer.open { opacity: 1; }
body.calm .page > * { transform: none; transition: opacity 0.4s ease 0.15s; }
/* (the title's and toggles' own gentle fade-in is kept: dropping it here would replay it when motion comes back) */
#stage { transition: opacity 0.6s ease; }

/* ============ Day ============ */

:root {
  --track: rgba(255, 255, 255, 0.14);
  --knob: #cfd8db;
  --on-accent: #0b0a0d;
  --accent-line: rgba(241, 239, 244, 0.45);
  --accent-glow: rgba(241, 239, 244, 0.7);
  --hero-bg: #000;
}

html[data-theme="light"] {
  --bg: #eef2f1;
  --fg: #0d1719;
  --muted: #56636a;
  --dim: #8a969c;
  --line: rgba(20, 19, 24, 0.12);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-hi: rgba(255, 255, 255, 0.85);
  --accent: #1d1c21;
  --track: rgba(20, 19, 24, 0.14);
  --knob: #ffffff;
  --on-accent: #ffffff;
  --accent-line: rgba(29, 28, 33, 0.45);
  --accent-glow: rgba(29, 28, 33, 0.45);
  --hero-bg: #eef2f1;
  color-scheme: light;
}
html[data-theme="light"] .hero { background: var(--hero-bg); }
html[data-theme="light"] .wordmark { color: #0b1517; text-shadow: 0 0 18px rgba(29, 28, 33, 0.18); }
html[data-theme="light"] .lede { color: #2c383d; }
html[data-theme="light"] p { color: #3e4a50; }
html[data-theme="light"] ::selection { background: rgba(29, 28, 33, 0.25); }
html[data-theme="light"] .btn:hover { border-color: rgba(20, 19, 24, 0.25); }
html[data-theme="light"] .btn-primary { background: #0d1719; color: #fff; border-color: #0d1719; }
html[data-theme="light"] .btn-primary:hover { background: #1d1c21; border-color: #1d1c21; }
html[data-theme="light"] .about {
  background: radial-gradient(60% 40% at 50% 0%, rgba(29, 28, 33, 0.08), transparent 70%), var(--bg);
}
html[data-theme="light"] .steps li,
html[data-theme="light"] .card { background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.45)); }
html[data-theme="light"] .card ul { color: #3e4a50; }
html[data-theme="light"] .card:hover,
html[data-theme="light"] .scene-card:hover { border-color: rgba(20, 19, 24, 0.22); }
html[data-theme="light"] .page-layer { background: var(--bg); }
html[data-theme="light"] .page { background: radial-gradient(70% 520px at 50% 0%, rgba(29, 28, 33, 0.08), transparent 100%); }
html[data-theme="light"] .page-close,
html[data-theme="light"] .scene-viewer-back { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] .page-close:hover,
html[data-theme="light"] .scene-viewer-back:hover { background: #fff; }
html[data-theme="light"] .scene-card { background: rgba(255, 255, 255, 0.6); }
html[data-theme="light"] .scene-thumb {
  background:
    radial-gradient(circle at 50% 55%, rgba(29, 28, 33, 0.22), transparent 55%),
    radial-gradient(rgba(20, 19, 24, 0.35) 1px, transparent 1.4px) 0 0 / 9px 9px,
    #e3e9e8;
}
html[data-theme="light"] .scene-thumb.has-img { background: #dfe5e4; }
html[data-theme="light"] select optgroup { background: #fff; color: #0d1719; }
html[data-theme="light"] .field input[aria-invalid="true"] { border-color: #d43c3c; }
html[data-theme="light"] .fallback-nav a { background: rgba(255, 255, 255, 0.7); }

/* Night falling or day breaking: the new look spreads out from the toggle (where the browser can). */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: sky-sweep 0.9s var(--ease) both; }
@keyframes sky-sweep {
  from { clip-path: circle(0 at var(--sweep-x, 100%) var(--sweep-y, 0)); }
  to { clip-path: circle(150vmax at var(--sweep-x, 100%) var(--sweep-y, 0)); }
}
/* Without view transitions: a gentle cross-fade of the colours. */
body, .about, .page-layer, .hero { transition: background-color 0.6s ease, color 0.6s ease; }
html[data-theme="light"] .field :is(input, select, textarea) { background: rgba(255, 255, 255, 0.75); }
html[data-theme="light"] .field :is(input, select, textarea):focus { background: #fff; }
html[data-theme="light"] .scene-viewer { background: var(--bg); }
html[data-theme="light"] select option { background: #fff; color: #0d1719; }

/* The quote form's note about accounts (js/main.js: signed in, or not) */
.quote-account { margin: -6px 0 22px; font-size: 0.92rem; color: var(--muted); }
.quote-account a { color: var(--fg); }
