/* Owaiken — cinematic HUD aesthetic, after the igloo.inc concept */
:root {
  --bg: #081e28;
  --bg-deep: #04080b;
  --panel: #10151a;
  --card: rgba(16, 21, 26, 0.85);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.32);
  --teal: #4fd8c8;
  --teal-glow: rgba(79, 216, 200, 0.35);
  --amber: #e8a33d;
  --amber-glow: rgba(232, 163, 61, 0.4);
  --wash: #1a1412;
  --btn-bg: #4fd8c8;
  --btn-fg: #051219;
  --section-bg: linear-gradient(180deg, transparent, rgba(4, 8, 11, 0.92));
  --opp-bg: linear-gradient(180deg, transparent 0, #1a1412 120px, #12100d 300px, #0a151a 560px, #04080b 100%);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-deep: #ffffff;
    --panel: #ffffff;
    --card: #ffffff;
    --line: rgba(11, 15, 20, 0.14);
    --line-soft: rgba(11, 15, 20, 0.07);
    --text: #0b0f14;
    --dim: rgba(11, 15, 20, 0.62);
    --faint: rgba(11, 15, 20, 0.42);
    --teal: #0c6f62;
    --teal-glow: rgba(12, 111, 98, 0.22);
    --amber: #a86a14;
    --amber-glow: rgba(168, 106, 20, 0.22);
    --wash: #f4f1ea;
    --btn-bg: #0c6f62;
    --btn-fg: #ffffff;
    --section-bg: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.94));
    --opp-bg: linear-gradient(180deg, transparent 0, #f4f1ea 120px, #faf8f3 320px, #ffffff 560px, #ffffff 100%);
  }
  .stat, .step, .panel {
    box-shadow: 0 14px 34px rgba(11, 15, 20, 0.06);
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- particle layer ---- */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

main, .site-footer { position: relative; z-index: 1; }

/* ---- fixed HUD frame (monochrome, auto-contrast via difference blend) ---- */
.hud {
  position: fixed;
  z-index: 50;
  font-family: var(--mono);
  pointer-events: none;
  mix-blend-mode: difference;
  color: #fff;
}
.hud-tl { top: 18px; left: 20px; }
.hud-tr { top: 20px; right: 20px; text-align: right; }

.hud-status {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  border: 1px solid #fff;
  padding: 9px 16px;
  color: #fff;
}

.logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.35em;
  color: transparent;
  -webkit-text-stroke: 1px #fff;
  text-decoration: none;
  pointer-events: auto;
  display: inline-block;
}
.hud-micro, .hud-line {
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.7;
  color: var(--text);
}
.hud-line.dim, .hud-micro { color: var(--dim); }
.amber { color: var(--amber); }

.blink {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
  margin-right: 6px;
  animation: blink 1.6s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---- chapters (scroll-driven cinema) ---- */
.chapters {
  position: relative;
  height: 520vh;
}
.chapter-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(79, 216, 200, 0.14), transparent 60%),
    radial-gradient(90% 70% at 80% 10%, rgba(232, 163, 61, 0.08), transparent 60%),
    linear-gradient(180deg, #0b2b3a 0%, #081e28 55%, #051219 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  background: #0b2b3a;
}
.chapter-grade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 18, 25, 0.55) 0%, rgba(5, 18, 25, 0.15) 40%, rgba(5, 18, 25, 0.75) 100%);
  pointer-events: none;
}
.chapter {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  margin-top: -100vh;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.chapter:first-of-type { margin-top: 0; }
.chapter.active { opacity: 1; transform: translateY(0); }
.chapter h1, .chapter h2 {
  font-size: clamp(38px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 18px 0 20px;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}
/* video overlay text stays white in both color schemes */
.chapter .chapter-sub { color: rgba(255, 255, 255, 0.72); }
.chapter .hud-tag { color: #4fd8c8; }
.chapter .scroll-cue { color: rgba(255, 255, 255, 0.6); }
.chapter-sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--dim);
  max-width: 560px;
  line-height: 1.6;
}
.hud-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--teal);
}
.scroll-cue {
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 12px;
}
.scroll-line {
  display: inline-block;
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--amber), transparent);
  animation: drop 1.8s infinite;
}
@keyframes drop { 0% { transform: translateY(-8px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }

/* seamless release wash: neutral, scheme-aware */
#opportunity {
  position: relative;
  z-index: 2;
  margin-top: -100vh;
  background: var(--opp-bg);
}

/* ---- content sections ---- */
.section {
  position: relative;
  padding: 110px 0;
  background: var(--section-bg);
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

.section h2 {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 16px 0 22px;
}
.lede {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
  color: var(--dim);
  max-width: 720px;
  margin-bottom: 48px;
}
.fineprint {
  font-size: 13px;
  line-height: 1.7;
  color: var(--faint);
  margin-top: 28px;
  max-width: 720px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat {
  background: var(--card);
  padding: 30px 26px;
  backdrop-filter: blur(4px);
}
.stat-num {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-unit { font-size: 0.45em; font-weight: 600; color: var(--teal); margin-left: 4px; }
.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: var(--dim);
  margin-top: 12px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.steps.five { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.step { background: var(--card); padding: 28px 24px; }
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 14px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 14px; line-height: 1.65; color: var(--dim); }

.panel {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 30px;
}
.panel .hud-tag { margin-bottom: 18px; display: block; }
.ticks { list-style: none; }
.ticks li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
  padding: 10px 0 10px 28px;
  position: relative;
  border-top: 1px solid var(--line-soft);
}
.ticks li:first-child { border-top: none; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 17px;
  width: 8px; height: 8px;
  border: 1px solid var(--teal);
  transform: rotate(45deg);
}
.ticks strong { color: var(--text); font-weight: 700; }

/* ---- budget table ---- */
.scenario-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.scenario-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 12px 20px;
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.25s ease;
}
.scenario-btn:hover { color: var(--text); border-color: var(--teal); }
.scenario-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #051219;
  font-weight: 700;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card);
}
.budget-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-align: left;
  padding: 16px 20px;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
}
.budget-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.55;
}
.budget-table td:nth-child(2) {
  font-family: var(--mono);
  color: var(--amber);
  white-space: nowrap;
}
.budget-table td:nth-child(3) { color: var(--dim); font-size: 13px; }
.budget-table tfoot td {
  border-bottom: none;
  border-top: 1px solid var(--teal);
  font-weight: 700;
}
.budget-table tfoot td:nth-child(2) { color: var(--teal); font-size: 17px; }

/* ---- sources ---- */
.source-list { list-style: none; }
.source-list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.source-list li:first-child { border-top: none; }
.source-list a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--teal);
  align-self: flex-start;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.source-list a:hover { color: var(--teal); }
.source-list span { font-size: 13px; color: var(--dim); }

/* ---- contact + footer ---- */
#contact { text-align: left; }
.btn {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  padding: 16px 34px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--teal-glow);
}
.status-line {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--amber);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 90px;
  background: var(--bg-deep);
}
.site-footer p {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
}
.site-footer .fineprint { margin-top: 12px; max-width: 640px; }

/* ---- mobile ---- */
@media (max-width: 640px) {
  .hud-tr { top: 14px; right: 14px; }
  .hud-tl { top: 14px; left: 14px; }
  .hud-tr { top: 16px; right: 14px; }
  .section { padding: 80px 0; }
  .chapter h1, .chapter h2 { font-size: clamp(32px, 9vw, 44px); }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .chapters { height: auto; }
  .chapter-bg { position: relative; height: 60vh; }
  .chapter {
    position: relative;
    height: auto;
    min-height: 60vh;
    margin-top: 0;
    opacity: 1;
    transform: none;
  }
  #particles { display: none; }
  #opportunity { margin-top: 0; }
  .blink, .scroll-line { animation: none; }
}

/* ---- data graphics ---- */
figure { margin: 0 0 48px; }
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  margin-top: 14px;
}

/* wait-time bars */
.bars { margin-bottom: 48px; }
.bar-row { margin-bottom: 18px; }
.bar-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.bar-label span { color: var(--text); font-weight: 700; }
.bar-track {
  height: 10px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: var(--dim);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.hot { background: var(--amber); }
.bar-fill.teal {
  background: var(--teal);
  box-shadow: 0 0 18px var(--teal-glow);
}
.bars.in .bar-fill { width: var(--w); }

/* skin cross-section */
.skin-fig {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 26px 22px 20px;
}
.skin-fig .scan { animation: scan 7s ease-in-out infinite alternate; }
@keyframes scan {
  from { transform: translateX(-215px); }
  to { transform: translateX(215px); }
}
.svg-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  fill: var(--dim);
}
.svg-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  fill: var(--faint);
}

/* subscriber ramp curve */
.curve-fig {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 26px 22px 20px;
}
.curve-fig .draw {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 2.2s ease 0.2s;
}
.curve-fig.in .draw { stroke-dashoffset: 0; }
.curve-fig .area {
  fill: var(--teal);
  opacity: 0;
  transition: opacity 1.4s ease 1.4s;
}
.curve-fig.in .area { opacity: 0.12; }
.curve-fig .be-line { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 6 5; }
.curve-fig .grid { stroke: var(--line-soft); stroke-width: 1; }
.curve-fig .end-dot { fill: var(--teal); }

/* budget composition bar */
.budget-bar {
  display: flex;
  height: 16px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--line-soft);
}
.bseg { height: 100%; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.bseg.s0 { background: var(--teal); }
.bseg.s1 { background: var(--amber); }
.bseg.s2 { background: color-mix(in srgb, var(--teal) 55%, transparent); }
.bseg.s3 { background: color-mix(in srgb, var(--amber) 55%, transparent); }
.bseg.s4 { background: var(--line); }
.bseg.s5 { background: color-mix(in srgb, var(--text) 24%, transparent); }
.bseg.s6 { background: color-mix(in srgb, var(--text) 12%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .skin-fig .scan { animation: none; }
  .bars .bar-fill { transition: none; }
  .curve-fig .draw { transition: none; stroke-dashoffset: 0; }
  .curve-fig .area { transition: none; }
  .bseg { transition: none; }
}
