:root {
  color-scheme: dark;
  --ink: #040810;
  --ink-deep: #070d18;
  --paper: #f3efe6;
  --muted: #b5c1c7;
  --secondary: #98a8b2;
  --gold: #e6c37a;
  --gold-soft: rgba(230, 195, 122, 0.24);
  --line: rgba(230, 195, 122, 0.18);
  --line-subtle: rgba(243, 239, 230, 0.11);
  --accent: #8ce7c8;
  --surface: rgba(9, 15, 26, 0.62);
  --surface-strong: rgba(9, 15, 26, 0.80);
  --gutter: clamp(20px, 5vw, 84px);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.embed-mode,
html.embed-mode body {
  overflow: hidden;
  height: 100%;
}

/* ==========================================================================
   Fixed 3D Planetary Cosmos Stage
   ========================================================================== */
#experience {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
}

.cosmos-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 72% 44%, #0b1826 0%, #040810 68%);
}

#world,
.veil,
.nebula-photo,
#galaxy-detail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nebula-photo {
  pointer-events: none;
  background: url('./media/webb-tarantula.webp') 58% 46% / cover no-repeat;
  opacity: var(--nebula-opacity, 0.42);
  filter: brightness(0.56) saturate(0.68) contrast(1.04);
  transition: opacity 0.6s ease;
}

#world {
  display: block;
  touch-action: pan-y;
  cursor: grab;
  z-index: 1;
}

html.embed-mode #world {
  touch-action: none;
}

#world.grabbing {
  cursor: grabbing;
}

#galaxy-detail {
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 68% 46%, transparent 9%, #0004 28%, #000 54%);
}

.constellation {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: clamp(44px, 5.6vw, 86px);
  text-align: center;
}

.constellation svg { display: block; width: 100%; overflow: visible; }
.constellation polyline { fill: none; stroke: #c9d8ec; stroke-width: 0.56; stroke-opacity: 0.36; stroke-linejoin: round; }
.constellation circle { fill: #f6e7c4; fill-opacity: 0.78; filter: drop-shadow(0 0 2.5px rgba(230, 195, 122, 0.65)); }

.distant-light {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--length);
  height: 2px;
  opacity: 0;
  transform-origin: left center;
  transform: rotate(var(--angle)) translateX(var(--offset, 0));
  background: linear-gradient(90deg, transparent 2%, rgba(230, 195, 122, 0.14) 40%, rgba(186, 224, 245, 0.62) 84%, rgba(255, 244, 218, 0.85) 98%, transparent);
  box-shadow: 0 0 10px -1px rgba(230, 195, 122, 0.42);
}

.distant-light::after {
  content: "";
  position: absolute;
  right: 1%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(50%, -50%);
  background: radial-gradient(circle, rgba(255, 245, 216, 0.82) 0%, rgba(230, 195, 122, 0.48) 12%, transparent 70%);
}

.veil {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 8, 16, 0.90) 0%, rgba(4, 8, 16, 0.54) 36%, rgba(4, 8, 16, 0.08) 64%, transparent 100%),
    linear-gradient(0deg, rgba(4, 8, 16, 0.76) 0%, transparent 24%, transparent 82%, rgba(4, 8, 16, 0.68) 100%);
}

/* ==========================================================================
   Top Navigation Header
   ========================================================================== */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}

.top.scrolled {
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(230, 195, 122, 0.22);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--paper);
  flex-shrink: 0;
}

.brand-wordmark strong {
  display: block;
  font: 600 18px/1 var(--font-display);
  letter-spacing: 0.26em;
  color: var(--paper);
}

.brand-wordmark small {
  display: block;
  color: var(--muted);
  font: 400 10.5px/1.2 var(--font-sans);
  letter-spacing: 0.22em;
  margin-top: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: color 0.22s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--paper);
}

.site-nav .nav-cta {
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(230, 195, 122, 0.08);
  transition: border-color 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  border-color: var(--gold);
  background: rgba(230, 195, 122, 0.18);
  color: var(--paper);
}

.playback {
  cursor: pointer;
  color: var(--paper);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.15em;
  min-height: 36px;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 11, 20, 0.56);
  padding: 0 13px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.playback:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.playback:hover,
.playback:focus-visible {
  border-color: var(--accent);
  background: rgba(12, 22, 36, 0.8);
}

.playback:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 3px;
}

.playback b { font-weight: 400; }
.playback span { display: block; width: 7px; height: 10px; border-inline: 2px solid currentColor; }
.playback[data-paused] span { width: 0; height: 0; border: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }

/* ==========================================================================
   Main & Hero Interactive Planetary Stage
   ========================================================================== */
main {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  pointer-events: none;
}

html.embed-mode .hero-stage {
  min-height: 300px;
}

.story {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-48%);
  inline-size: min(43vw, 520px);
  max-inline-size: calc(100% - 2 * var(--gutter));
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  font: 500 11px/1.4 var(--font-display);
  letter-spacing: 0.34em;
  color: var(--gold);
  text-transform: uppercase;
}

h1 {
  font: 700 clamp(38px, 4.8vw, 72px) / 1.15 var(--font-serif);
  letter-spacing: 0.10em;
  margin: 0 0 12px;
  color: var(--paper);
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.72);
}

.hero-lead {
  margin: 0 0 20px;
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: #e6dfd0;
  font-weight: 400;
}

.prose-window {
  block-size: clamp(108px, 24svh, 210px);
  overflow: auto;
  pointer-events: auto;
  scrollbar-color: var(--line) transparent;
}

.prose-window:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.prose-track { padding: 0 8px 1px 0; }

.prose-track p {
  font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: 0.065em;
  line-height: 1.9;
  margin: 0;
  color: #cfd9dc;
  overflow-wrap: anywhere;
}

.prose-track p + p { margin-block-start: 0.7em; }
.prose-track strong { color: var(--paper); font-weight: 600; }

.story[data-crawl] .prose-window {
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
}

.story[data-crawl] .prose-track {
  transform: translateY(var(--crawl-y, 100%));
  will-change: transform;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  pointer-events: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font: 500 13.5px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, #e8c77f 0%, #c89d54 100%);
  color: #0b0e14;
  font-weight: 600;
  box-shadow: 0 8px 26px rgba(230, 195, 122, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #f3d796 0%, #d8ae64 100%);
  box-shadow: 0 10px 30px rgba(230, 195, 122, 0.34);
}

.btn-ghost {
  background: rgba(8, 14, 24, 0.54);
  color: var(--paper);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: #fff;
  background: rgba(14, 24, 40, 0.78);
}

.btn-full { width: 100%; }

.story .notice {
  font-size: 12px;
  color: var(--gold);
  margin: 10px 0 0;
}

/* Hero Bottom Bar & Clickable Chapter Switcher */
.bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  pointer-events: none;
}

.chapters {
  display: flex;
  pointer-events: auto;
}

.chapter {
  position: relative;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  padding: 0 clamp(14px, 2vw, 28px);
  font-family: var(--font-sans);
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--secondary);
  transition: color 0.25s ease;
}

.chapter em {
  font: 500 11px/1 var(--font-display);
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.7;
}

.chapter:first-child { padding-left: 0; }
.chapter + .chapter { border-left: 1px solid var(--line); }
.chapter:hover,
.chapter:focus-visible { color: var(--paper); }

.chapter[aria-current] { color: var(--paper); }
.chapter[aria-current] em { opacity: 1; }
.chapter[aria-current]::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

.instructions {
  color: var(--secondary);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.touch-tip { display: none; }
.embed-only { display: none; }

.scroll-cue {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  padding: 8px 0;
  transition: color 0.22s ease;
}

.scroll-cue:hover { color: var(--paper); }

.scroll-cue i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(-2px, -2px); }
  50% { transform: rotate(45deg) translate(2px, 2px); }
}

.image-credit {
  position: absolute;
  z-index: 4;
  right: var(--gutter);
  bottom: max(5px, env(safe-area-inset-bottom));
  color: #9bb0c9;
  font-size: 9px;
  text-decoration: none;
  letter-spacing: 0.08em;
  pointer-events: auto;
}

.embed-credit { display: none; }

/* Embed mode (?embed=1) keeps the exact pure 16:9 interactive stage */
html.embed-mode .site-nav,
html.embed-mode .hero-actions,
html.embed-mode .scroll-cue,
html.embed-mode .site-sections,
html.embed-mode .full-only {
  display: none !important;
}

html.embed-mode .embed-only,
html.embed-mode .embed-credit {
  display: inline;
}

html.embed-mode .top {
  position: absolute;
}

/* Fallback static planet appearance if JS/Canvas unavailable */
.unavailable #world {
  background:
    radial-gradient(circle at 67% 44%, #1f4e52 0%, #102a36 11%, #050a12 18%, transparent 19%),
    radial-gradient(ellipse at 67% 44%, transparent 17%, rgba(230, 195, 122, 0.45) 23%, rgba(66, 217, 194, 0.18) 28%, #040810 58%);
}
.unavailable .playback { display: none; }

/* ==========================================================================
   Full Brand Website Sections (Below the Fold)
   ========================================================================== */
.site-sections {
  position: relative;
  pointer-events: auto;
  background: linear-gradient(
    180deg,
    rgba(4, 8, 16, 0) 0%,
    rgba(4, 8, 16, 0.68) 7%,
    rgba(4, 8, 16, 0.80) 35%,
    rgba(4, 8, 16, 0.88) 100%
  );
}

.band {
  padding: clamp(72px, 9.5vw, 128px) 0;
  border-top: 1px solid var(--line-subtle);
  scroll-margin-top: 76px;
}

.container {
  width: min(1180px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section-head {
  max-width: 820px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.kicker {
  display: inline-block;
  font: 500 11.5px/1.3 var(--font-display);
  letter-spacing: 0.30em;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-head h2,
.contact-intro h2 {
  margin: 0 0 14px;
  font: 700 clamp(26px, 2.85vw, 38px) / 1.3 var(--font-serif);
  letter-spacing: 0.06em;
  color: var(--paper);
  text-wrap: balance;
}

.section-head p,
.contact-intro > p {
  margin: 0;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.85;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Section 2: Interactive Orbital Philosophy Cards */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.phase-card {
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 28px 26px;
  border-radius: 16px;
  border: 1px solid var(--line-subtle);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.28s ease, transform 0.28s ease, background-color 0.28s ease, box-shadow 0.28s ease;
}

.phase-card:hover,
.phase-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  background: var(--surface-strong);
}

.phase-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(140, 231, 200, 0.16), 0 18px 42px rgba(0, 0, 0, 0.42);
}

.phase-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.phase-num {
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.22em;
  color: var(--gold);
}

.phase-tag {
  color: var(--accent);
  letter-spacing: 0.10em;
}

.phase-card h3 {
  margin: 2px 0 0;
  font: 700 21px/1.35 var(--font-serif);
  letter-spacing: 0.06em;
  color: var(--paper);
}

.phase-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  flex: 1;
}

.phase-action {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* Section 3: Core Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  position: relative;
  padding: 32px 28px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(12, 20, 34, 0.78) 0%, rgba(6, 11, 20, 0.72) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--paper);
  margin-bottom: 18px;
}

.service-en {
  font: 500 11px/1 var(--font-display);
  letter-spacing: 0.24em;
  color: var(--gold);
}

.service-card h3 {
  margin: 10px 0 12px;
  font: 700 22px/1.3 var(--font-serif);
  letter-spacing: 0.06em;
}

.service-card > p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.service-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line-subtle);
  display: grid;
  gap: 9px;
  flex: 1;
}

.service-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #dde5e8;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.service-fit {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}

/* Section 4: Target Client Personas */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.persona-card {
  padding: 30px 26px;
  border-radius: 16px;
  border: 1px solid var(--line-subtle);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.persona-badge {
  align-self: flex-start;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: rgba(230, 195, 122, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
}

.persona-card h3 {
  margin: 0;
  font: 700 20px/1.4 var(--font-serif);
  letter-spacing: 0.04em;
  color: var(--paper);
}

.persona-pain {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #dfd4be;
  padding-left: 14px;
  border-left: 2px solid var(--gold-soft);
}

.persona-solve {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

/* Section 5: Collaboration Process */
.process-track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.process-track::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 23px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-soft), var(--accent), var(--gold-soft));
  opacity: 0.55;
}

.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-orb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 15px/1 var(--font-display);
  letter-spacing: 0.12em;
  color: var(--gold);
  background: #08111f;
  border: 1px solid var(--gold);
  box-shadow: 0 0 22px rgba(230, 195, 122, 0.18);
  position: relative;
  z-index: 1;
}

.process-step h3 {
  margin: 4px 0 0;
  font: 700 19px/1.3 var(--font-serif);
  letter-spacing: 0.08em;
}

.process-step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* Section 6: Consultation Shell */
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.5vw, 56px);
  padding: clamp(26px, 4vw, 48px);
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(10, 17, 30, 0.84), rgba(5, 9, 17, 0.88));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.contact-highlights {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-subtle);
  display: grid;
  gap: 16px;
}

.contact-highlights strong {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 4px;
}

.contact-highlights span {
  font-size: 14px;
  color: #e4eaec;
  line-height: 1.6;
}

.consult-form {
  display: grid;
  gap: 18px;
}

.choice-group {
  border: 0;
  margin: 0;
  padding: 0;
}

.choice-group legend,
.field span {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.10em;
  color: #d9e1e5;
  margin-bottom: 8px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  position: relative;
  cursor: pointer;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pill input:checked + span {
  border-color: var(--gold);
  background: rgba(230, 195, 122, 0.16);
  color: var(--paper);
}

.pill input:focus-visible + span {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-subtle);
  border-radius: 10px;
  background: rgba(4, 8, 16, 0.72);
  color: var(--paper);
  font: 400 14px/1.6 var(--font-sans);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 195, 122, 0.14);
}

.field textarea { resize: vertical; min-height: 82px; }

.consult-result {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--gold-soft);
  background: rgba(4, 10, 18, 0.85);
}

.result-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--accent);
}

.consult-result pre {
  margin: 0 0 14px;
  white-space: pre-wrap;
  font: 400 13px/1.7 var(--font-sans);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  border-radius: 8px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--line-subtle);
  padding: 32px 0 max(36px, env(safe-area-inset-bottom));
  background: rgba(3, 6, 12, 0.92);
}

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

.footer-brand strong {
  display: block;
  font: 600 15px/1.3 var(--font-display);
  letter-spacing: 0.22em;
  color: var(--paper);
}

.footer-brand span {
  display: block;
  font-size: 12px;
  color: var(--secondary);
  margin-top: 4px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  color: var(--secondary);
}

.footer-credit {
  color: #a9bed8;
  text-decoration: none;
}

.footer-credit:hover {
  color: var(--paper);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (pointer: coarse) {
  .desktop-tip { display: none; }
  .touch-tip { display: inline; }
}

@media (max-width: 1024px) {
  .site-nav { display: none; }
  .phase-grid,
  .service-grid,
  .persona-grid {
    grid-template-columns: 1fr;
  }
  .process-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process-track::before { display: none; }
  .contact-shell {
    grid-template-columns: 1fr;
  }
}

@media (orientation: portrait) {
  .top {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: 12px;
  }
  .story {
    top: auto;
    bottom: clamp(86px, 12svh, 124px);
    right: var(--gutter);
    inline-size: auto;
    transform: none;
  }
  h1 { font-size: clamp(32px, 8.6vw, 52px); }
  .hero-lead { font-size: 14px; margin-bottom: 12px; }
  .prose-window { block-size: clamp(92px, 18svh, 165px); }
  .hero-actions { margin-top: 14px; }
  .veil {
    background: linear-gradient(0deg, rgba(4, 8, 16, 0.94) 0%, rgba(4, 8, 16, 0.78) 28%, transparent 58%, transparent 84%, rgba(4, 8, 16, 0.76) 100%);
  }
  .bottom {
    bottom: max(14px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .chapters { width: 100%; }
  .chapter { flex: 1; min-width: 0; min-height: 42px; padding: 0 8px; font-size: 12px; }
  .chapter:first-child { padding-left: 8px; }
  .instructions { width: 100%; text-align: center; font-size: 10.5px; }
  .scroll-cue { display: none; }
  #galaxy-detail { mask-image: radial-gradient(ellipse at 50% 34%, transparent 6%, #0005 28%, #000 58%); }
  .constellation { width: clamp(32px, 10vw, 70px); }
  .nebula-photo { background-position: 46% center; }
}

@media (max-width: 600px) {
  .process-track,
  .field-grid {
    grid-template-columns: 1fr;
  }
  .btn { width: 100%; }
  .hero-actions .btn { flex: 1; min-width: 130px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .top { padding-top: 10px; padding-bottom: 8px; }
  .story { transform: translateY(-46%); }
  h1 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 6px; }
  .hero-lead { margin-bottom: 10px; font-size: 13px; }
  .prose-window { block-size: 92px; }
  .hero-actions { margin-top: 12px; }
  .btn { min-height: 36px; padding: 0 16px; font-size: 12px; }
  .bottom { bottom: 8px; }
  .chapter { min-height: 36px; }
  .embed-credit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue i { animation: none; }
}
