/* ============================================================
   Opuz — Dark Orchestration  (clone of opuz.darkroom.engineering)
   Design tokens sourced from opuz-help-tools/opuz-design.css
   ============================================================ */

:root {
  --amber: #f38a00;
  --amber-tint: #ffe4c2;
  --black: #000000;
  --near-black: #0b0b0a;
  --white: #ffffff;
  --gray-light: #b3b0ab;
  --gray-mid: #7d7b78;
  --charcoal: #363533;

  /* Semantic accent journey: warm amber = the problem (acts 1–2);
     blue→green = money management done right (act 3 → onward) */
  --accent-warm: var(--amber);
  --accent-cool: #17c56c;
  --mm-gradient: linear-gradient(90deg, #2f6fe6 0%, #17c56c 100%);

  /* Brand typefaces — main: Martel, sub: Sura (both serif) */
  --font-display: "Martel", Georgia, "Times New Roman", serif;
  --font-sans: "Sura", Georgia, "Times New Roman", serif;
}

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

html {
  background: var(--black);
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--amber);
  color: var(--black);
}

/* ---------- fixed cinematic overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* subtle film grain */
.grain {
  opacity: 0.05;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* darkened frame edges */
.edge-vignette {
  z-index: 49;
  background: radial-gradient(
    130% 130% at 50% 50%,
    transparent 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ============================================================
   Scroll acts — each is a tall section with a pinned stage
   ============================================================ */
.act {
  position: relative;
  height: 250vh; /* shorter → less dead scroll between acts */
}
#act2 {
  height: 320vh; /* room for two sequential messages, each holding a while */
}
#act3 {
  height: 300vh; /* swoop + play + ring wipe */
}

/* persistent ring backdrop sits behind the scrolling content */
.rings-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
#scroll-root {
  position: relative;
  z-index: 1;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* full-bleed animated background canvas */
.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* video texture fills the stage; no-op for the canvas */
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

/* the texture clip is mostly true black with sparse amber chart lines;
   push brightness/contrast/saturation so the moving lines themselves read
   clearly without washing the black background into gray */
#hero-video {
  filter: brightness(1.8) contrast(1.15) saturate(1);
}

/* soft spotlight mask over the background */
.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    56% 56% at 50% 50%,
    transparent 0%,
    transparent 22%,
    rgba(0, 0, 0, 0.85) 58%,
    var(--black) 80%
  );
}
.spotlight--wide {
  background: radial-gradient(
    72% 72% at 50% 50%,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.6) 74%,
    var(--black) 92%
  );
}

/* ---------- act 2/3: spinning ring backdrops ---------- */
.rings {
  position: absolute;
  top: 50%;
  left: 50%;
  /* square, same size for the orange + blue-green twins. On a black page a
     rotating corner just shows page-black (= the image's own black), so this
     no longer has to exceed the diagonal — it's sized for a "less zoomed" look */
  width: var(--rings-size, 100vmax);
  height: var(--rings-size, 100vmax);
  object-fit: cover;
  opacity: 0; /* driven by scroll in JS, capped at ~0.3 */
  transform: translate(-50%, -50%); /* rotation set in JS (scroll-affected) */
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 0;
}

/* the blue-green twin sits in a viewport-clipped wrapper so it can be wiped in
   from the two side edges toward the centre (--reveal goes 0% -> 50%) */
.rings-reveal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  --reveal: 0%;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 var(--reveal),
    transparent var(--reveal),
    transparent calc(100% - var(--reveal)),
    #000 calc(100% - var(--reveal))
  );
  mask-image: linear-gradient(
    to right,
    #000 var(--reveal),
    transparent var(--reveal),
    transparent calc(100% - var(--reveal)),
    #000 calc(100% - var(--reveal))
  );
}

/* ---------- centered text content ---------- */
.content {
  position: relative;
  z-index: 10;
  width: min(92vw, 760px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* act 2: two messages that occupy the same spot and appear one after the other */
.content--stack {
  position: absolute;
  inset: 0;
  width: auto;
  display: grid;
  place-items: center;
}
.content--stack .msg {
  grid-area: 1 / 1; /* stack both messages in the same cell → overlap */
  margin: 0;
  width: min(92vw, 760px);
  opacity: 0; /* JS drives the appear / disappear */
}

.headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 3.75vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--white);
  will-change: transform, opacity;
}

.headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

/* "Money Management" — left→right blue→green gradient, brightened for a neon feel */
.headline em.mm-gradient {
  background: var(--mm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(40, 150, 190, 0.35));
}

.subcopy {
  margin-top: clamp(28px, 6vh, 74px);
  max-width: 720px;
}

.lead {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  letter-spacing: 0.005em;
  color: var(--white);
  margin-bottom: 20px;
}

.body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  color: var(--gray-light);
}

/* individual words start fully hidden; JS drives opacity on scroll */
.word {
  opacity: 0;
  transition: opacity 0.12s linear;
}

/* ============================================================
   Act 3 — two equity-curve clips swooping in side by side
   ============================================================ */
.clips {
  position: relative;
  z-index: 1; /* above the ring backdrops */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(10px, 1.6vw, 24px);
  width: min(96vw, 1780px);
}

/* each column is a label sitting above its clip; the whole column swoops in */
.clip-col {
  flex: 1 1 0;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.5vw, 22px);
  opacity: 0;
  will-change: transform, opacity;
}

.clip {
  position: relative;
  margin: 0;
  width: 100%;
  /* cropped to the (now taller 2x2) panel content and enlarged to fill */
  aspect-ratio: 1280 / 728;
  overflow: hidden;
  /* no wrapper background/border: the clip document is transparent except
     for its own panels, so the page shows through around and between them */
}

/* ---- labels above each clip ---- */
.clip-label {
  min-height: clamp(84px, 8.5vw, 132px); /* big header band above each graph */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* left: plain text label — large + bright so it's really noticeable */
.clip-label:not(.clip-label--logo) {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(1.15rem, 2.2vw, 2rem);
  font-weight: 500;
  color: var(--white);
}

/* right: the Traders Rebound logo image (white text, transparent) — way bigger */
.logo-img {
  height: clamp(74px, 8vw, 124px);
  width: auto;
  display: block;
}

/* each clip renders at a fixed 1280x720 (its desktop layout) and is
   scaled to the slot width by JS — avoids the clip's mobile reflow */
.clip iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 1000px;
  border: 0;
  background: transparent;
  transform-origin: top left;
}

.headline--stack {
  font-size: clamp(1.9rem, 3.2vw, 3.1rem);
  line-height: 1.16;
  will-change: transform, opacity;
}

/* ============================================================
   How-it-works — horizontal scroll (pinned; track slides right → left)
   ============================================================ */
.hsection {
  position: relative;
  /* taller than before: it now also carries the intro panel (former act 4),
     so it holds 5 panels (intro + 4 steps) of horizontal travel */
  height: 500vh;
}
.h-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.h-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.step-panel {
  position: relative;
  flex: 0 0 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 4vw, 56px);
}

/* panel 0 — the closing line ("Same trades…") that hands straight into the
   horizontal step sequence; centered like the acts, no card frame */
.step-panel--intro {
  text-align: center;
  will-change: transform, opacity;
}

/* steps 01–04 — each a framed card: placeholder image left, copy right */
.step-card {
  display: flex;
  align-items: stretch;
  width: min(88vw, 1080px);
  height: min(64vh, 560px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(16px, 2vw, 26px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

/* left half: neutral placeholder (blue→green tint) until a real image lands */
.step-media {
  position: relative;
  flex: 0 0 42%;
  align-self: stretch;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(
      120% 120% at 28% 18%,
      rgba(47, 111, 230, 0.18),
      transparent 60%
    ),
    radial-gradient(
      120% 120% at 82% 88%,
      rgba(23, 197, 108, 0.18),
      transparent 60%
    ),
    #0b0e0d;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 1;
  color: rgba(150, 230, 190, 0.22); /* cool-tinted watermark number */
  pointer-events: none;
}
.step-media-tag {
  position: absolute;
  bottom: clamp(14px, 2vw, 22px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: 100px;
}

/* right half: the step copy, left-aligned */
.step-body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  padding: clamp(26px, 4.2vw, 68px);
}
.step-eyebrow {
  display: block;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  color: var(--accent-cool);
  margin-bottom: clamp(14px, 2.4vh, 28px);
}
.step-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}
.step-text em {
  font-style: italic;
  color: var(--accent-cool);
}

/* step 2's lead-capture form */
.lead-form {
  margin-top: clamp(20px, 3vh, 32px);
  max-width: 420px;
}
.lead-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lead-form-row input {
  flex: 1 1 160px;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px 14px;
}
.lead-form-row input::placeholder {
  color: var(--gray-mid);
}
.lead-form-row input:focus {
  outline: none;
  border-color: var(--accent-cool);
  background: rgba(255, 255, 255, 0.06);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lead-form-submit {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  border: 0;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 1000px;
  background: var(--mm-gradient);
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}
.lead-form-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.lead-form-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.lead-form-status {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--gray-mid);
  min-height: 1.2em;
}
.lead-form-status[data-state="ok"] {
  color: var(--accent-cool);
}
.lead-form-status[data-state="error"] {
  color: #ff6b6b;
}

/* narrow screens: stack the card — image on top, copy below */
@media (max-width: 820px) {
  .step-card {
    flex-direction: column;
    width: 86vw;
    height: min(78vh, 640px);
  }
  .step-media {
    flex: 0 0 40%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

.h-progress {
  position: absolute;
  left: 8vw;
  right: 8vw;
  bottom: clamp(40px, 8vh, 80px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 2;
}
.h-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--mm-gradient);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ============================================================
   Final CTA + footer
   ============================================================ */
/* CTA + footer share ONE viewport: CTA grows to fill, footer sits at the base */
.endframe {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.cta-act {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* content sits near the top of this block (not vertically centered) so it
     lands right where the pinned steps section hands off, instead of
     leaving a big empty gap above it; slack falls below, before the footer */
  padding: clamp(56px, 8vh, 96px) 6vw clamp(24px, 4vh, 48px);
}
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(30px, 5.5vh, 60px);
}
.cta-logo {
  height: clamp(96px, 12vw, 190px);
  width: auto;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: clamp(1.02rem, 1.2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  padding: clamp(17px, 1.5vw, 21px) clamp(46px, 4.6vw, 72px);
  border-radius: 1000px;
  background: var(--mm-gradient);
  box-shadow: 0 14px 46px rgba(23, 150, 108, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.cta-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 56px rgba(23, 150, 108, 0.42);
}

.site-footer {
  position: relative;
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(22px, 3.2vh, 38px) 6vw clamp(16px, 2vh, 24px);
  background: #050505;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 6vw, 80px);
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand {
  max-width: 340px;
}
.footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 12px;
}
.footer-tag {
  font-family: var(--font-sans);
  color: var(--gray-mid);
  font-size: 0.88rem;
  line-height: 1.45;
}
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-col h4 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gray-light);
  margin-bottom: 3px;
}
.footer-col a {
  font-family: var(--font-sans);
  color: var(--gray-mid);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-base {
  max-width: 1200px;
  margin: clamp(16px, 2.4vh, 28px) auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--gray-mid);
}

@media (max-width: 720px) {
  .footer-inner {
    flex-direction: column;
  }
}

/* respect reduced motion — still readable, just no smoothing drama */
@media (prefers-reduced-motion: reduce) {
  .word {
    transition: none;
  }
}
