/* =========================================================
   HAUL × Six Senses Rome — design tokens (mirrored from PDF)
   ========================================================= */
:root {
  --bg-dark:        #0F0F12;
  --bg-dark-2:      #16161B;
  --bg-light:       #FFFFFF;
  --bg-light-2:     #F4F4F2;
  --orange:         #E64C1F;
  --orange-2:       #D54115;
  --ink:            #0A0A0A;
  --ink-soft:       #4B4B4B;
  --rule:           #E5E5E2;
  --rule-dark:      rgba(255,255,255,0.12);
  --paper:          #F8F7F4;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --slide-w: 1440;
  --slide-h: 810;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; height: 100%; width: 100%; background: #0a0a0c; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  user-select: none;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* =========================================================
   Stage — keeps the 16:9 slide proportional to viewport
   ========================================================= */
.stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #050507;
}
.slide-frame {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-dark);
  box-shadow: 0 30px 120px rgba(0,0,0,0.6);
  transition: width 320ms ease, height 320ms ease;
}

/* Fullbleed slides break out of 16:9 — used for the embedded Sonic Territory page */
body[data-fullbleed="true"] .slide-frame {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  box-shadow: none;
}
body[data-fullbleed="true"] .stage { background: var(--paper); }

/* Use container query units so type scales with the slide */
.slide-frame { container-type: size; }

/* =========================================================
   Slide layout primitives
   ========================================================= */
.slide {
  position: absolute; inset: 0;
  padding: 6cqh 6cqw 6cqh 6cqw;
  display: flex; flex-direction: column;
  font-size: 1.6cqh;
}

.slide.dark  { background: var(--bg-dark);  color: #fff; }
.slide.light { background: var(--bg-light); color: var(--ink); }
.slide.orange{ background: var(--orange);   color: #fff; }
.slide.paper { background: var(--paper);    color: var(--ink); }

.topbar {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.4cqh; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500;
  color: #8a8a8a;
}
.slide.dark .topbar  { color: #7d7d83; }
.slide.orange .topbar{ color: #ffffff; opacity: 1; }
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.5cqh;
}
.brand sup { font-size: 0.55em; vertical-align: super; margin-left: 0.1em; }
.slide.dark .brand, .slide.orange .brand { color: #fff; }
.slide.light .brand { color: #000; }

.rule {
  height: 1px; background: var(--rule); margin: 1.6cqh 0 0;
}
.slide.dark .rule  { background: var(--rule-dark); }
.slide.orange .rule{ background: rgba(255,255,255,0.32); }

.headline {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.92;
  margin: 0;
}
.h-xxl { font-size: 14cqh; }
.h-xl  { font-size: 11cqh; }
.h-lg  { font-size: 8.4cqh; }
.h-md  { font-size: 6cqh; }
.h-sm  { font-size: 4.2cqh; }

.body-lg { font-size: 2.2cqh; line-height: 1.4; }
.body-md { font-size: 1.9cqh; line-height: 1.5; }
.body-sm { font-size: 1.6cqh; line-height: 1.55; color: var(--ink-soft); }
.slide.dark .body-sm { color: #a4a4a8; }
.slide.orange .body-sm { color: rgba(255,255,255,0.85); }

.eyebrow {
  font-size: 1.3cqh; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft);
}
.slide.dark .eyebrow  { color: #a4a4a8; }
.slide.orange .eyebrow{ color: rgba(255,255,255,0.85); }

.accent { color: var(--orange); }
.slide.orange .accent { color: #fff; font-weight: 700; }

/* Numbered list (project structure / opportunity benefits) */
.numlist { list-style: none; padding: 0; margin: 0; }
.numlist li {
  display: grid; grid-template-columns: 3.4cqh 1fr; gap: 1.4cqh;
  padding: 1.1cqh 0;
  font-size: 2cqh; line-height: 1.4;
}
.numlist li .n {
  font-feature-settings: "tnum";
  color: var(--orange); font-weight: 600; font-size: 1.5cqh;
  padding-top: 0.35cqh;
}
.numlist li b { font-weight: 700; }

/* Project structure / phase table */
.phase-table { margin-top: 4cqh; }
.phase-row {
  display: grid;
  grid-template-columns: 3.5cqh 2fr 2fr 1fr;
  gap: 2cqw;
  align-items: center;
  padding: 2.4cqh 0;
  border-top: 1px solid var(--rule);
  font-size: 2.1cqh;
  cursor: pointer;
  transition: background-color 180ms ease, padding-left 220ms ease;
}
.phase-row:last-child { border-bottom: 1px solid var(--rule); }
.phase-row:hover {
  background: rgba(230, 76, 31, 0.05);
  padding-left: 1cqw;
}
.phase-row .n { color: var(--orange); font-weight: 600; }
.phase-row .title { font-weight: 500; }
.phase-row .desc { color: var(--ink-soft); font-size: 1.85cqh; }
.phase-row .price { text-align: right; font-feature-settings: "tnum"; }

/* Methodology pillars (orange slide) */
.pillars {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 2cqw; margin-top: 4cqh;
  padding-top: 3cqh; border-top: 1px solid rgba(255,255,255,0.32);
}
.pillar {
  font-family: var(--font-display);
  font-size: 1.7cqh; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  line-height: 1.25;
}

/* Two-column body (opportunity, phase detail) */
.two-col {
  flex: 1; display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 6cqw;
  align-items: start;
  margin-top: 5cqh;
}

/* Definition rows (phase detail key/value) */
.def-list {
  display: grid; grid-template-columns: 12cqw 1fr;
  gap: 1cqh 2cqw;
  font-size: 1.85cqh; line-height: 1.45;
}
.def-list dt {
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: 1.4cqh;
}
.def-list dd {
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 1.4cqh;
  color: var(--ink-soft);
}
.def-list dt:first-of-type, .def-list dd:first-of-type {
  border-top: none; padding-top: 0;
}

/* Moodboard cards */
.moodgrid {
  flex: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr;
  gap: 2cqw;
  margin-top: 3cqh;
}
.moodcard {
  position: relative;
  border-radius: 0.6cqh;
  overflow: hidden;
  background: #1d1d22 center/cover no-repeat;
  cursor: pointer;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms ease;
  isolation: isolate;
}
.moodcard::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}
.moodcard:hover { transform: translateY(-0.6cqh); box-shadow: 0 2cqh 4cqh rgba(0,0,0,0.45); }
.moodcard .tag {
  position: absolute; top: 1.6cqh; right: 1.6cqh; z-index: 2;
  font-size: 1.2cqh; letter-spacing: 0.18em; font-weight: 600;
  text-transform: uppercase; color: #fff;
}
.moodcard .label {
  position: absolute; left: 1.8cqh; bottom: 1.6cqh; z-index: 2;
  color: #fff;
}
.moodcard .label .t {
  font-family: var(--font-display);
  font-size: 3cqh; font-weight: 700; line-height: 1.05;
  letter-spacing: -0.01em;
}
.moodcard .label .s {
  font-size: 1.4cqh; opacity: 0.8; margin-top: 0.6cqh;
}

/* Sonic territories list — sizes match def-list / bullet-list (1.85cqh) for cross-slide consistency */
.territories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4cqh 4cqw; margin-top: 2.4cqh; }
.territory {
  border-top: 1px solid var(--rule);
  padding-top: 1.4cqh;
}
.territory h4 {
  margin: 0 0 0.6cqh; font-family: var(--font-display);
  font-size: 2cqh; letter-spacing: -0.01em; font-weight: 700;
}
.territory p { margin: 0 0 0.6cqh; font-size: 1.85cqh; line-height: 1.45; color: var(--ink-soft); }
.territory ul { margin: 0; padding-left: 1.4cqw; font-size: 1.85cqh; line-height: 1.45; }

/* Energy curve */
.curve-wrap { margin-top: 3cqh; }
.curve {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2cqw; align-items: end; height: 24cqh;
}
.curve .bar {
  background: linear-gradient(180deg, var(--orange) 0%, #f0815a 100%);
  border-radius: 0.4cqh 0.4cqh 0 0;
  position: relative;
  transition: transform 260ms ease, filter 260ms ease;
}
.curve .bar:hover { transform: scaleY(1.04); filter: brightness(1.08); }
.curve .bar .lab {
  position: absolute; left: 0; right: 0; bottom: -4cqh;
  text-align: center; color: var(--ink-soft);
  font-size: 1.5cqh; line-height: 1.2;
}
.curve .bar .lab b { display: block; color: var(--ink); font-weight: 600; font-size: 1.6cqh; }

/* TOC — two columns so every slide can be listed without truncation */
.toc-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 5cqw;
  margin-top: 4cqh;
}
.toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.toc li {
  display: grid; grid-template-columns: 4cqw 1fr 3cqw;
  align-items: center;
  padding: 1.7cqh 0;
  border-top: 1px solid var(--rule-dark);
  cursor: pointer;
  transition: padding-left 220ms ease, color 200ms ease;
}
.toc li:last-child { border-bottom: 1px solid var(--rule-dark); }
.toc li:hover { padding-left: 1cqw; color: var(--orange); }
.toc li:hover .toc-arrow { transform: translateX(0.4cqw); opacity: 1; }
.toc li .num {
  color: var(--orange); font-weight: 600; font-size: 1.4cqh;
  font-feature-settings: "tnum";
}
.toc li .name {
  font-family: var(--font-display);
  font-size: 2.4cqh; font-weight: 700; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.toc li .toc-arrow {
  text-align: right; font-size: 1.8cqh; opacity: 0.4;
  transition: transform 220ms ease, opacity 200ms ease;
}

/* Cover */
.cover {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%;
}
.cover .h {
  font-family: var(--font-display);
  font-size: 16cqh; font-weight: 800;
  line-height: 0.88; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.cover .meta {
  display: flex; justify-content: space-between; align-items: end;
  font-size: 1.5cqh; letter-spacing: 0.16em; text-transform: uppercase;
  color: #b0b0b4;
}

/* Closing */
.closing {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.quote-arrow { color: var(--orange); margin-right: 0.4ch; }

/* =========================================================
   Chrome — progress bar, scene counter, nav
   ========================================================= */
.chrome {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 50;
}
.chrome > * { pointer-events: auto; }

.progress-track {
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px; background: rgba(255,255,255,0.06);
}
.progress-bar {
  height: 100%;
  background: var(--orange);
  transition: width 320ms cubic-bezier(.2,.8,.2,1);
}

.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 4cqh; height: 6cqh;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.0); color: rgba(255,255,255,0.5);
  border: none; outline: none;
  font-size: 2.4cqh;
  transition: color 180ms ease, transform 180ms ease;
}
.slide.light ~ .chrome .nav-arrow { color: rgba(0,0,0,0.4); }
.nav-arrow:hover { color: var(--orange); }
.nav-arrow.left  { left: 1.4cqw; }
.nav-arrow.right { right: 1.4cqw; }

.bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4cqh 2.4cqw;
  font-size: 1.2cqh; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
}
.bottom-bar .dots { display: flex; gap: 0.7cqw; }
.bottom-bar .dot {
  width: 0.7cqh; height: 0.7cqh; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  transition: background 200ms ease, transform 200ms ease;
}
.bottom-bar .dot.active { background: var(--orange); transform: scale(1.3); }
.bottom-bar .dot:hover { background: rgba(255,255,255,0.45); }

.toggle-toc {
  background: none; border: 1px solid rgba(255,255,255,0.2);
  color: inherit; padding: 0.6cqh 1cqw; border-radius: 0.4cqh;
  font-size: 1.1cqh; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 500;
  transition: background 180ms ease, border-color 180ms ease;
}
.toggle-toc:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.35); }

/* On light/orange slides the chrome inverts */
body[data-tone="light"]  .bottom-bar     { color: rgba(0,0,0,0.45); }
body[data-tone="light"]  .bottom-bar .dot{ background: rgba(0,0,0,0.18); }
body[data-tone="light"]  .toggle-toc     { border-color: rgba(0,0,0,0.2); }
body[data-tone="light"]  .toggle-toc:hover{ background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.4); }
body[data-tone="light"]  .progress-track { background: rgba(0,0,0,0.06); }

body[data-tone="orange"] .bottom-bar     { color: rgba(255,255,255,0.75); }
body[data-tone="orange"] .bottom-bar .dot{ background: rgba(255,255,255,0.4); }
body[data-tone="orange"] .bottom-bar .dot.active{ background: #fff; }
body[data-tone="orange"] .toggle-toc     { border-color: rgba(255,255,255,0.4); }
body[data-tone="orange"] .progress-bar   { background: #fff; }
body[data-tone="orange"] .progress-track { background: rgba(255,255,255,0.18); }

/* =========================================================
   Slide-specific decoration
   ========================================================= */
/* Phase 5 list */
.bullet-list {
  list-style: none; padding: 0; margin: 0;
  font-size: 1.85cqh; line-height: 1.5;
}
.bullet-list li {
  position: relative; padding: 0.55cqh 0 0.55cqh 2cqw;
}
.bullet-list li::before {
  content: ""; position: absolute; left: 0; top: 1.4cqh;
  width: 0.7cqw; height: 1px; background: var(--orange);
}

/* Big quote for closing slide */
.big-quote {
  font-family: var(--font-display); font-weight: 700;
  font-size: 6.2cqh; line-height: 1.05; letter-spacing: -0.018em;
  text-transform: none;
}
.big-quote em {
  font-style: normal; color: var(--orange);
  display: block; margin-top: 1cqh;
}

/* Help overlay */
.help-overlay {
  position: absolute; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8cqh;
  backdrop-filter: blur(6px);
}
.help-overlay .panel {
  background: #161618; border: 1px solid rgba(255,255,255,0.08);
  padding: 4cqh 4cqw; border-radius: 0.8cqh; max-width: 50cqw;
}
.help-overlay h3 {
  font-family: var(--font-display); font-size: 2.6cqh;
  margin: 0 0 2cqh; font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.01em;
}
.help-overlay table { width: 100%; border-collapse: collapse; }
.help-overlay td { padding: 0.7cqh 0; }
.help-overlay td.k {
  width: 35%; color: #b0b0b4;
  font-feature-settings: "tnum"; font-family: var(--font-display); font-weight: 600;
}

/* =========================================================
   App-level Navigator — fixed bottom-right pill, present in
   every mode so the user can always jump to Landing / Deck /
   Moodboard.
   ========================================================= */
.app-nav {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: rgba(15, 15, 18, 0.78);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.app-nav .nav-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 14px 7px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 200ms ease, background 200ms ease;
  text-align: left;
}
.app-nav .nav-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  transition: background 200ms ease, transform 200ms ease;
}
.app-nav .nav-pill .lbl { line-height: 1; }
.app-nav .nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.app-nav .nav-pill:hover .dot { background: rgba(255, 255, 255, 0.65); }
.app-nav .nav-pill.active {
  color: #fff;
  background: rgba(230, 76, 31, 0.16);
}
.app-nav .nav-pill.active .dot {
  background: var(--orange);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(230, 76, 31, 0.55);
}

/* =========================================================
   Mobile warning — replaces the whole app < 900 px wide.
   Authored in CSS px (not vw/vh) since this is a small,
   fixed-content screen and shouldn't scale with viewport.
   ========================================================= */
.mobile-warning {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: #fff;
  padding: 32px 28px;
  z-index: 9999;
}
.mobile-warning .mw-inner {
  max-width: 360px;
  text-align: center;
}
.mobile-warning .mw-icon {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto 36px;
  color: var(--orange);
  opacity: 0.95;
}
.mobile-warning .mw-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}
.mobile-warning .mw-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.mobile-warning .mw-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 48px;
}
.mobile-warning .mw-sign {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

/* World stage — full viewport host for the moodboard */
.world-stage {
  position: fixed;
  inset: 0;
  overflow: auto;
  background: var(--paper);
}

/* Body adjustments per top-level mode */
body[data-mode="world"]   { overflow-y: auto; overflow-x: hidden; }
body[data-mode="landing"] { overflow-y: auto; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(1.6cqh); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim > * { animation: fadeUp 600ms cubic-bezier(.2,.8,.2,1) both; }
.anim > *:nth-child(2) { animation-delay: 80ms; }
.anim > *:nth-child(3) { animation-delay: 160ms; }
.anim > *:nth-child(4) { animation-delay: 240ms; }
.anim > *:nth-child(5) { animation-delay: 320ms; }
.anim > *:nth-child(6) { animation-delay: 400ms; }
.anim > *:nth-child(7) { animation-delay: 480ms; }
.anim > *:nth-child(8) { animation-delay: 560ms; }
.anim > *:nth-child(9) { animation-delay: 640ms; }
.anim > *:nth-child(10){ animation-delay: 720ms; }
