:root {
  --bg: #121212;
  --bg-2: #1a1a1a;
  --card: #202020;
  --line: #2e2e2e;
  --text: #ececec;
  --muted: #a3a3a3;
  --accent: #e07a52;
  --accent-soft: rgba(224, 122, 82, 0.16);
  --pad: clamp(20px, 3.2vw, 64px);
  --chrome-h: clamp(44px, 5.4vh, 64px);
  --h1: clamp(48px, 7.4vw, 140px);
  --h2: clamp(28px, 3.1vw, 60px);
  --body: clamp(17px, 1.5vw, 30px);
  --small: clamp(14px, 1.05vw, 20px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

/* Progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; background: rgba(255, 255, 255, 0.06); z-index: 20; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 400ms var(--ease); }

/* Deck */
.deck { position: fixed; inset: 0 0 var(--chrome-h) 0; }
.slide {
  position: absolute; inset: 0;
  padding: var(--pad);
  padding-top: calc(var(--pad) + 4px);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease), visibility 0s linear 420ms;
}
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity 420ms var(--ease), transform 420ms var(--ease), visibility 0s; }

.eyebrow { color: var(--accent); font-size: var(--small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.9em; }
h2 { font-size: var(--h2); line-height: 1.12; font-weight: 650; letter-spacing: -0.01em; }
.lede { font-size: clamp(20px, 2vw, 40px); color: var(--muted); line-height: 1.35; }

/* Title */
.s-title { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: var(--pad); }
.s-title h1 { font-size: var(--h1); line-height: 1; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.3em; }
.s-title .lede { max-width: 18em; color: var(--text); }
.s-title .hint { margin-top: 2.2em; font-size: var(--small); color: var(--muted); }
.title-shot { position: relative; }
.title-shot img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(224, 122, 82, 0.18); transform: perspective(1800px) rotateY(-7deg) scale(0.9); transform-origin: center center; }

/* Text slide */
.s-text { display: flex; align-items: center; }
.text-wrap { max-width: 64em; }
.text-wrap h2 { font-size: clamp(32px, 3.8vw, 72px); margin-bottom: 0.9em; max-width: 20em; }
ul.big { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1em; font-size: clamp(19px, 1.8vw, 36px); line-height: 1.4; max-width: 34em; }
ul.big li { position: relative; padding-left: 1.2em; }
ul.big li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.45em; height: 0.45em; border-radius: 2px; background: var(--accent); }

/* Divider */
.s-divider { display: flex; align-items: center; background: radial-gradient(1200px 600px at 15% 50%, rgba(224, 122, 82, 0.13), transparent 70%); }
.divider-wrap .part { color: var(--accent); font-size: clamp(18px, 1.6vw, 32px); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.6em; }
.divider-wrap h2 { font-size: clamp(44px, 6vw, 116px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 0.4em; max-width: 12em; }

/* Feature */
.s-feature { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 27vw, 560px); grid-template-rows: minmax(0, 1fr); gap: clamp(20px, 2.6vw, 56px); }
.s-feature .copy { align-self: center; }
.s-feature.s-wide { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.s-wide .copy { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); column-gap: clamp(20px, 3vw, 64px); align-items: start; }
.s-wide .copy h2 { margin-bottom: 0; }
.media { position: relative; height: 100%; min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.copy h2 { margin-bottom: 0.7em; }
.copy-body p { font-size: var(--body); line-height: 1.42; color: #d6d6d6; margin-bottom: 0.75em; }
.copy-body p:last-child { margin-bottom: 0; }

.frame { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); flex: none; }
.frame > img, .frame .cf img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Highlights */
.hl {
  position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  border: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(224, 122, 82, 0.18), 0 0 28px rgba(224, 122, 82, 0.35);
  opacity: 0; transform: scale(1.04);
  transition: opacity 500ms var(--ease) 350ms, transform 500ms var(--ease) 350ms;
  pointer-events: none;
}
.hl::after {
  content: attr(data-label);
  position: absolute; left: -3px; top: -3px;
  transform: translateY(-100%);
  background: var(--accent); color: #1b0f0a;
  font-size: clamp(11px, 0.85vw, 17px); font-weight: 700; font-style: normal;
  padding: 0.25em 0.6em; border-radius: 6px 6px 6px 0;
  white-space: nowrap;
}
.hl.below::after { top: auto; bottom: -3px; transform: translateY(100%); border-radius: 0 6px 6px 6px; }
.slide.active .hl, .slide.active .cf.on .hl { opacity: 1; transform: none; }
.slide.active .cf:not(.on) .hl { opacity: 0; transition-delay: 0s; }
.no-hl .hl { display: none; }

/* Clip player */
.clip { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; max-width: 100%; }
.cf { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 700ms ease; }
.cf.on { opacity: 1; z-index: 1; }
.clip-bar { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 34px; }
.clip-cap { flex: 1; font-size: var(--small); color: var(--text); line-height: 1.3; min-width: 0; }
.clip-dots { display: flex; gap: 6px; }
.clip-dot { width: 34px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, 0.18); cursor: pointer; position: relative; overflow: hidden; }
.clip-dot.on { background: rgba(224, 122, 82, 0.35); }
.clip-dot.on::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: fill var(--dur, 3000ms) linear forwards; }
.clip.paused .clip-dot.on::after { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.clip-btn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 0.3em 0.9em; font-size: var(--small); cursor: pointer; min-width: 5.2em; }
.clip-btn:hover, .clip-dot:hover { filter: brightness(1.25); }

/* Closing */
.s-close { display: flex; align-items: center; }
.close-wrap { width: 100%; }
.close-wrap h2 { font-size: clamp(32px, 3.8vw, 72px); margin-bottom: 1em; max-width: 18em; }
.ideas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 32px); }
.idea { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: clamp(16px, 1.7vw, 34px); }
.idea h3 { font-size: clamp(20px, 1.75vw, 34px); line-height: 1.2; margin-bottom: 0.6em; }
.idea p { font-size: clamp(15px, 1.25vw, 24px); color: #cfcfcf; line-height: 1.4; }
.foot { margin-top: 2em; color: var(--muted); font-size: var(--small); }

/* Bottom chrome */
.chrome { position: fixed; left: 0; right: 0; bottom: 0; height: var(--chrome-h); display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 var(--pad); border-top: 1px solid #1f1f1f; background: rgba(18, 18, 18, 0.92); z-index: 15; }
.counter { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--small); min-width: 5em; text-align: center; }
.nav-btn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 0.35em 1em; font-size: var(--small); cursor: pointer; }
.nav-btn:hover { border-color: #444; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Overview grid */
.overview { position: fixed; inset: 0; z-index: 30; background: rgba(12, 12, 12, 0.97); padding: var(--pad); overflow: auto; }
.overview[hidden] { display: none; }
.overview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2em; }
.overview-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 17vw, 320px), 1fr)); gap: 16px; }
.overview-grid button { width: 100%; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; }
.overview-grid button.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.overview-grid .thumb { aspect-ratio: 16 / 9; background: var(--bg-2) center / cover no-repeat; display: flex; align-items: center; justify-content: center; padding: 10px; color: var(--accent); font-weight: 650; font-size: 15px; text-align: center; }
.overview-grid .meta { display: flex; gap: 8px; padding: 9px 11px; font-size: 14px; line-height: 1.3; }
.overview-grid .num { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Shorter screens */
@media (max-height: 820px) {
  .copy-body p { line-height: 1.36; }
  .eyebrow { margin-bottom: 0.6em; }
}
@media (max-aspect-ratio: 4/3) {
  .s-feature { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .s-feature .copy { align-self: start; }
  .s-title { grid-template-columns: minmax(0, 1fr); }
  .title-shot { display: none; }
  .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .hl, .cf, .progress-bar { transition: none !important; }
  .clip-dot.on::after { animation: none; transform: none; }
}
