/* =========================================================
   Deck — scroll-driven presentation deck
   Hybrid: most sections smooth-reveal on enter, two pinned
   cinematic moments (Phase 2 horizontal pillars, Phase 3
   scrubbed Energy Curve), one clip-path fill (Optional),
   word-by-word composition (Closing).

   Coherent with landing.css + world.css: same tokens, same
   typography, mix-blend-mode cursor + left rail, gsap-driven
   reveals.
   ========================================================= */

.deck {
  position: relative;
  width: 100%;
  background: var(--bg-light);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}
.deck a, .deck button, .deck .clickable { cursor: none; }

/* =========================================================
   Section primitives — apply via .deck-<id>
   ========================================================= */
.deck-section {
  position: relative;
  min-height: 100vh;
  padding: 16vh 11vw 12vh;
  z-index: 1;
}
.deck-section.tone-dark   { background: var(--bg-dark);   color: #fff; }
.deck-section.tone-paper  { background: var(--paper);     color: var(--ink); }
.deck-section.tone-light  { background: var(--bg-light);  color: var(--ink); }
.deck-section.tone-orange { background: var(--orange);    color: #fff; }

.deck-section .eyebrow {
  font-size: 1.3vh;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 3vh;
}
.deck-section.tone-dark .eyebrow,
.deck-section.tone-orange .eyebrow { color: rgba(255, 255, 255, 0.7); }

.deck-section h2 {
  margin: 0 0 5vh;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 11vh, 200px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.deck-section h2 .line       { display: block; overflow: hidden; }
.deck-section h2 .line > span{ display: inline-block; will-change: transform; }

.deck-section .intro {
  font-size: clamp(18px, 2.4vh, 32px);
  font-weight: 400;
  line-height: 1.4;
  max-width: 56ch;
  margin: 0 0 3vh;
  color: inherit;
}
.deck-section.tone-light .intro,
.deck-section.tone-paper .intro { color: var(--ink-soft); }

.deck-section .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3.6vh, 52px);
  letter-spacing: -0.01em;
  margin: 0 0 6vh;
  display: inline-block;
}

.deck-section .two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6vw;
  align-items: start;
  margin-top: 4vh;
}

/* =========================================================
   Project Structure — list of phases with growing accent bar
   ========================================================= */
.deck-structure .phase-list {
  list-style: none;
  padding: 0;
  margin: 4vh 0 0;
}
.deck-structure .phase-row {
  position: relative;
  display: grid;
  grid-template-columns: 5vw 1.4fr 1.6fr;
  align-items: baseline;
  gap: 3vw;
  padding: 3.4vh 1vw;
  border-top: 1px solid var(--rule);
  transition: padding-left 360ms cubic-bezier(.2,.8,.2,1);
}
.deck-structure .phase-row:last-child { border-bottom: 1px solid var(--rule); }
.deck-structure .phase-row:hover { padding-left: 2.4vw; }
.deck-structure .phase-row:hover .title { color: var(--orange); }
.deck-structure .phase-row .n {
  color: var(--orange);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4vh;
  letter-spacing: 0.18em;
  font-feature-settings: "tnum";
}
.deck-structure .phase-row .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vh, 44px);
  letter-spacing: -0.01em;
  transition: color 240ms ease;
}
.deck-structure .phase-row .desc {
  color: var(--ink-soft);
  font-size: clamp(13px, 1.65vh, 20px);
  line-height: 1.45;
}
.deck-structure .phase-row .accent-bar {
  position: absolute;
  bottom: -1px; left: 0;
  width: 28vw;
  height: 2px;
  background: var(--orange);
  transform-origin: left center;
}

/* =========================================================
   Phase 1 / 4 / 5 — definition rows (key/value list)
   Each row has a thin animated rule that grows from left.
   ========================================================= */
.deck-defs {
  list-style: none;
  padding: 0;
  margin: 0;
}
.deck-def {
  position: relative;
  display: grid;
  grid-template-columns: 14vw 1fr;
  gap: 3vw;
  padding: 3.2vh 0 2.4vh;
}
.deck-def .rule {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}
.deck-def .k {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.85vh, 22px);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.deck-def .v {
  margin: 0;
  font-size: clamp(15px, 1.95vh, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 60ch;
}
.deck-section.tone-dark .deck-def .rule { background: rgba(255,255,255,0.18); }
.deck-section.tone-dark .deck-def .v    { color: rgba(255,255,255,0.78); }

/* ---- rich .v variants used by Phase 1 ---- */
.deck-def .v-desc {
  display: block;
  color: inherit;
}
.deck-def .v-list {
  list-style: none;
  padding: 0;
  margin: 1.6vh 0 0;
  font-size: clamp(14px, 1.75vh, 22px);
  line-height: 1.5;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.4vh;
}
.deck-def .v-list li { position: relative; }
/* Stacked list — used for items containing internal commas (e.g. Daily
   Energy Curve), where joining with ", " would be ambiguous. */
.deck-def .v-list-stacked {
  list-style: none;
  padding: 0;
  margin: 1.4vh 0 0;
  font-size: clamp(14px, 1.7vh, 21px);
  line-height: 1.5;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.5vh;
}
.deck-def .v-list-stacked li { position: relative; }
/* Footnote-like closing remark inside a block (Platform Recommendation) */
.deck-def .v-note {
  display: block;
  margin-top: 1.6vh;
  font-style: italic;
  font-size: clamp(13px, 1.55vh, 19px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
}
/* Hover-revealed examples (Sonic Audit + Strategic Workshop only) */
.deck-def .v-examples {
  display: block;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: clamp(13px, 1.55vh, 19px);
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  transition: max-height 360ms cubic-bezier(.2,.8,.2,1),
              opacity   300ms ease,
              margin-top 360ms ease;
}
.deck-def[data-has-hover="true"] { cursor: pointer; }
.deck-def[data-has-hover="true"]:hover .k { color: var(--orange); transition: color 240ms ease; }
.deck-def[data-has-hover="true"]:hover .v-examples {
  max-height: 220px;
  margin-top: 1.4vh;
  opacity: 1;
}

/* Small "+" hint at the right end of hoverable rows */
.deck-def .hover-hint {
  position: absolute;
  top: 3.6vh;
  right: 0;
  font-family: var(--font-display);
  font-size: 1.6vh;
  font-weight: 600;
  color: var(--orange);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
  line-height: 1;
}
.deck-def[data-has-hover="true"]:hover .hover-hint { transform: rotate(45deg); }

/* =========================================================
   Phase 2 — pinned horizontal territories track
   ========================================================= */
.deck-phase2 { padding: 0; min-height: auto; }
.deck-phase2 .phase2-intro {
  padding: 16vh 11vw 8vh;
  background: var(--bg-light);
}
.deck-phase2 .phase2-outro {
  padding: 8vh 11vw 16vh;
  background: var(--bg-light);
}
.territories-pin {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--paper);
}
.territories-disclaimer {
  position: absolute;
  top: 6vh;
  left: 11vw;
  margin: 0;
  max-width: 56ch;
  text-align: left;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(18px, 2.4vh, 32px);
  line-height: 1.4;
  color: var(--ink-soft);
  z-index: 1;
  pointer-events: none;
}
.territories-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 3vw;
  padding: 0 8vw;
  width: max-content;
  will-change: transform;
}
.territory-card {
  flex: 0 0 auto;
  width: 28vw;
  min-width: 340px;
  height: 56vh;
  padding: 3.4vh 2.2vw;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2.2vh;
  transition: border-color 280ms ease, transform 280ms ease;
}
.territory-card:hover { border-color: var(--orange); transform: translateY(-0.6vh); }
.territory-card .num {
  font-family: var(--font-display);
  font-size: 1.25vh;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.8vh;
}

/* Each labelled chunk inside the card */
.territory-card .card-section {
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
}
/* Music Genre / Key Feelings is always the last block — pin to the
   bottom of the card so every territory card has a consistent layout
   (label + bullets always anchored to the bottom edge) */
.territory-card .card-section:last-of-type {
  margin-top: auto;
}
.territory-card .card-label {
  font-size: 1.05vh;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
}

.territory-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 4.4vh, 60px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.territory-card .ctx {
  margin: 0;
  font-style: italic;
  color: var(--ink);
  font-size: clamp(13px, 1.65vh, 20px);
  line-height: 1.35;
}
.territory-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: clamp(12px, 1.5vh, 18px);
  line-height: 1.55;
  color: var(--ink);
}
.territory-card ul li {
  position: relative;
  padding-left: 1.4vw;
}
.territory-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--orange);
}

/* =========================================================
   Phase 3 — Property Sound System Design
   Intro (title page) + outro (5 content blocks via deck-defs).
   ========================================================= */
.deck-phase3 { padding: 0; min-height: auto; }
.deck-phase3 .phase3-intro {
  padding: 16vh 11vw 6vh;
  background: var(--bg-light);
}
.deck-phase3 .phase3-outro {
  padding: 8vh 11vw 16vh;
  background: var(--bg-light);
}

/* =========================================================
   Scroll-driven orange clip-path fill — used on h2 lines
   across every deck section.
   ========================================================= */
.deck .accent-fill {
  position: relative;
  display: inline-block;
  color: rgba(15, 15, 18, 0.18);
}
.deck-closing .accent-fill { color: rgba(245, 244, 240, 0.22); }
.deck .accent-fill .fill {
  position: absolute;
  inset: 0;
  color: var(--orange);
  clip-path: inset(0 100% 0 0);
  white-space: pre-wrap;
  will-change: clip-path;
}
.deck-optional .scope-list {
  list-style: none;
  padding: 0;
  margin: 4vh 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2vh 4vw;
}
.deck-optional .scope-list li {
  position: relative;
  padding: 2.2vh 0 2.2vh 3vw;
  border-top: 1px solid var(--rule);
  font-size: clamp(16px, 2.2vh, 30px);
  font-weight: 500;
  font-family: var(--font-display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.deck-optional .scope-list li:nth-child(-n+2) { border-top: 1px solid var(--rule); }
.deck-optional .scope-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 3.2vh;
  width: 1.6vw; height: 1px;
  background: var(--orange);
}

/* =========================================================
   Closing — dark, word-composed final lines
   ========================================================= */
.deck-closing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 11vw;
}
.deck-closing .label {
  font-size: 1.3vh;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6vh;
}
.deck-closing .final-block {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 9vh, 160px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 26ch;
}
.deck-closing .final-block .line { display: block; overflow: hidden; }
.deck-closing .final-block .line > span {
  display: inline-block;
  will-change: transform;
}
.deck-closing .arrow {
  color: var(--orange);
  margin-right: 0.3ch;
}

/* =========================================================
   Custom cursor + left rail (scope = .deck)
   Same mechanics as landing + world; mix-blend-mode: difference
   keeps both visible across all section tones.
   ========================================================= */
.deck .dv-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border: 1px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  mix-blend-mode: difference;
  background: transparent;
  transition: width 280ms cubic-bezier(.2,.8,.2,1),
              height 280ms cubic-bezier(.2,.8,.2,1),
              background 200ms ease,
              border-color 200ms ease;
}
.deck .dv-cursor.hover {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.90);
}
@media (hover: none) {
  .deck .dv-cursor { display: none; }
  .deck,
  .deck a,
  .deck button,
  .deck .clickable { cursor: auto !important; }
}

.deck .rail {
  position: fixed;
  top: 0; bottom: 0; left: 28px;
  width: 32px;
  z-index: 60;
  pointer-events: none;
  mix-blend-mode: difference;
}
.deck .rail .line {
  position: absolute;
  left: 13px; top: 8vh; bottom: 8vh;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}
.deck .rail .ticker {
  position: absolute;
  left: 11px;
  top: 8vh;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.deck .rail .tick {
  position: absolute;
  left: 0;
  width: 32px;
  display: flex; align-items: center; gap: 14px;
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  transition: color 240ms ease;
  pointer-events: auto;
  cursor: pointer;
}
.deck .rail .tick[data-i="0"] { top: calc(8vh + 0%);  }
.deck .rail .tick[data-i="1"] { top: calc(8vh + 12%); }
.deck .rail .tick[data-i="2"] { top: calc(8vh + 24%); }
.deck .rail .tick[data-i="3"] { top: calc(8vh + 36%); }
.deck .rail .tick[data-i="4"] { top: calc(8vh + 48%); }
.deck .rail .tick[data-i="5"] { top: calc(8vh + 60%); }
.deck .rail .tick[data-i="6"] { top: calc(8vh + 72%); }
.deck .rail .tick[data-i="7"] { top: calc(8vh + 84%); }
.deck .rail .tick .tick-mark {
  width: 11px; height: 1px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 280ms ease, background 240ms ease;
  display: inline-block;
  margin-left: 8px;
}
.deck .rail .tick .tick-num         { font-feature-settings: "tnum"; }
.deck .rail .tick:hover             { color: #fff; }
.deck .rail .tick:hover .tick-mark  { width: 18px; background: #fff; }
.deck .rail .tick.on                { color: #fff; }
.deck .rail .tick.on .tick-mark     { background: #fff; width: 18px; }

/* Body must scroll while deck mode is active */
body[data-mode="deck"] { overflow-y: auto; overflow-x: hidden; }
