/* ═══════════════════════════════════════════
   Megawatt one-pager prototype (standalone)
   Dark only. Does not depend on styles.css.
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #161c19;
  --ink: #f0efeb;
  --ink-dim: #8f9a94;
  --ink-faint: #4e5854;
  --green: #42e7aa;
  --green-dim: rgba(66, 231, 170, 0.35);
  --line: rgba(240, 239, 235, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

html {
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
}

::selection {
  background: rgba(66, 231, 170, 0.3);
}

/* ── Canvas + vignette ── */
#field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  background: radial-gradient(ellipse 120% 100% at 50% 30%, #1f2722 0%, #181f1b 50%, #131916 100%);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 60%, rgba(10, 14, 12, 0.4) 100%),
    linear-gradient(to bottom, rgba(10, 14, 12, 0.35), transparent 18%, transparent 82%, rgba(10, 14, 12, 0.35));
}

/* ── Scroll length ── */
.scroll-space {
  height: 650vh;
}

/* ── Nav ── */
.op-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 1980px;
  margin: 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-wordmark {
  height: 22px;
  width: auto;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--ink-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.nav-link:hover {
  color: var(--ink);
}

/* ── Site labels (team scene) ── */
.site-labels {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
}

.site-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(5, 8, 6, 0.9);
}

.site-code {
  color: var(--green);
}

.site-cap {
  color: var(--ink-dim);
}

@media (max-width: 768px) {
  .site-label {
    font-size: 8.5px;
  }
}

/* ── Chapters ── */
.stage {
  position: fixed;
  inset: 0;
  max-width: 1980px;
  margin: 0 auto;
  z-index: 10;
  pointer-events: none;
}

.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px;
  opacity: 0;
  will-change: opacity, transform;
}

.chapter-copy {
  max-width: 420px;
}

.tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.chapter h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.chapter-copy p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
}

.chapter-stat {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(66, 231, 170, 0.25);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

/* Hero chapter */
.chapter-hero h1 {
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 60vw;
}

.accent {
  color: var(--green);
}

.hero-side {
  position: absolute;
  right: 28px;
  top: 52%;
  max-width: 260px;
  font-size: 14px;
  line-height: 1.7;
  color: #e8ece9;
}

/* Final chapter */
.chapter-final {
  align-items: center;
  text-align: center;
}

.chapter-final h2 {
  font-size: clamp(34px, 4.4vw, 60px);
  margin-bottom: 34px;
}

.chapter.is-active {
  pointer-events: auto;
}

.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid var(--green);
  transition: all 0.25s;
  cursor: pointer;
}

/* ── Email capture ── */
.capture {
  margin-top: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.capture-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(400px, 100%);
}

.capture-form[hidden] {
  display: none;
}

.capture-input {
  background: rgba(10, 14, 12, 0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  padding: 13px 14px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.25s;
}

.capture-input:focus {
  border-color: var(--green-dim);
}

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

.capture-select {
  color: var(--ink-dim);
}

.capture-submit {
  margin-top: 4px;
}

.capture-error .capture-input:invalid {
  border-color: rgba(255, 120, 120, 0.55);
}

.capture-success {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.btn-solid {
  background: var(--green);
  color: #0a0e0c;
}

.btn-solid:hover {
  background: transparent;
  color: var(--green);
}

/* ── Footer strip ── */
.op-foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 1980px;
  margin: 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.counter {
  color: var(--ink-dim);
}

/* Battery-style scroll progress */
.battery {
  position: relative;
  width: 34px;
  height: 14px;
  border: 1px solid var(--ink-faint);
  border-radius: 3px;
  display: inline-block;
}

.battery::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 4px;
  width: 3px;
  height: 6px;
  background: var(--ink-faint);
  border-radius: 0 2px 2px 0;
}

.battery-fill {
  position: absolute;
  inset: 2px;
  width: 0%;
  background: var(--green);
  border-radius: 1px;
  transition: width 0.2s linear;
}

/* ── Scroll hint ── */
.scroll-hint {
  position: fixed;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: hint 2.6s ease-in-out infinite;
  transition: opacity 0.5s;
}

.scroll-hint.is-hidden {
  opacity: 0;
}

@keyframes hint {

  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 6px);
  }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .op-nav,
  .op-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .proof {
    display: none;
  }

  .chapter-hero h1 {
    max-width: 100%;
  }

  .hero-side {
    position: static;
    max-width: 100%;
    margin-top: 18px;
  }

  /* Graphics sit in the upper third on mobile; copy takes the lower
     part of the screen below them */
  .chapter {
    padding: 0 24px;
    justify-content: flex-end;
    padding-bottom: 13vh;
  }

  .chapter-final {
    padding-bottom: 9vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    animation: none;
  }
}
