:root {
  --ink: #1d1b2f;
  --ink-2: #4a4760;
  --night: #151325;
  --paper: #fbf6ec;
  --paper-2: #f3ead8;
  --white: #fff;

  --red: #e63946;
  --orange: #f77f00;
  --yellow: #f6b92b;
  --green: #2f9e5b;
  --blue: #1f4fd8;
  --purple: #7b3fc4;

  --radius: 22px;
  --shadow: 0 12px 32px rgba(29, 27, 47, .12);
  --font-display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --per-shot: 120vh;
}

.c-red { --c: var(--red); }
.c-orange { --c: var(--orange); }
.c-yellow { --c: var(--yellow); }
.c-green { --c: var(--green); }
.c-blue { --c: var(--blue); }
.c-purple { --c: var(--purple); }

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--yellow); color: var(--ink);
  font: 600 1.05rem/1 var(--font-display); text-decoration: none;
  box-shadow: 0 4px 0 #c48a0e;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #c48a0e; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c48a0e; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover, .btn-ghost:active { box-shadow: inset 0 0 0 2px currentColor; background: rgba(255, 255, 255, .12); }
.btn-sm { padding: 10px 18px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  color: var(--white);
  background: linear-gradient(to bottom, rgba(21, 19, 37, .55), rgba(21, 19, 37, 0));
  transition: background .3s, color .3s, box-shadow .3s;
}
.site-header.is-solid {
  color: var(--ink);
  background: rgba(251, 246, 236, .9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(29, 27, 47, .08);
}
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 500; opacity: .85; }
.site-nav a:hover { opacity: 1; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-mark svg { width: 13px; height: 22px; margin-right: -3px; }
.brand-mark .c-red { color: var(--red); transform: rotate(-10deg); }
.brand-mark .c-yellow { color: var(--yellow); transform: translateY(-2px); }
.brand-mark .c-blue { color: var(--blue); transform: rotate(10deg); }
.brand-name { font: 700 1.4rem/1 var(--font-display); letter-spacing: -.01em; }
.brand-name span { color: var(--yellow); }
.is-solid .brand-name span, .site-footer .brand-name span { color: var(--orange); }

/* ---------- Scroll tour ---------- */
.tour { position: relative; height: calc(var(--tour-shots, 8) * var(--per-shot) + 100vh); background: var(--night); }

.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--white); }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--night) url("../assets/img/poster.jpg") center / cover; }
.stage-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(21, 19, 37, .6), rgba(21, 19, 37, 0) 45%),
    linear-gradient(to bottom, rgba(21, 19, 37, .35), rgba(21, 19, 37, 0) 22%);
}

.chapter {
  position: absolute; z-index: 2;
  opacity: 0; pointer-events: none;
  transform: translate3d(var(--tx, 0), calc(var(--ty, 0px) + var(--shift, 24px)), 0);
  will-change: opacity, transform;
}
.chapter.is-active { pointer-events: auto; }

.chapter-left, .chapter-right {
  bottom: clamp(88px, 14vh, 150px);
  width: min(460px, calc(100% - 40px));
  padding: 28px 30px 26px;
  border-radius: 26px;
  background: rgba(21, 19, 37, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.chapter-left { left: clamp(20px, 6vw, 96px); }
.chapter-right { right: clamp(72px, 8vw, 128px); }
.chapter h2 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); }
.chapter p { color: rgba(255, 255, 255, .86); }
.chapter p:last-child { margin-bottom: 0; }

.chapter-hero, .chapter-final {
  left: 50%; top: 50%; --tx: -50%; --ty: -50%;
  width: min(920px, calc(100% - 40px));
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}
.chapter-final { top: 44%; }
.chapter-hero::before, .chapter-final::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(21, 19, 37, .55), rgba(21, 19, 37, .25) 60%, rgba(21, 19, 37, 0));
}
.chapter .btn-ghost { background: rgba(21, 19, 37, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chapter .btn-ghost:hover { background: rgba(21, 19, 37, .5); }
.chapter-hero h1 { font-size: clamp(2.8rem, 7.5vw, 6.2rem); font-weight: 700; line-height: .98; margin-bottom: .3em; }
.chapter-final h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 700; }
.chapter .lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--white); max-width: 36ch; margin-inline: auto; }
.hl em { font-style: normal; color: var(--yellow); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; text-shadow: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 14px; opacity: .9;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.dot-red { --c: var(--red); } .dot-orange { --c: var(--orange); } .dot-yellow { --c: var(--yellow); }
.dot-green { --c: var(--green); } .dot-blue { --c: #5b8cff; } .dot-purple { --c: #b27cff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.chips li { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .85rem; font-weight: 500; }

/* Chapter rail */
.rail {
  position: absolute; z-index: 3; right: clamp(16px, 2.5vw, 32px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 18px; padding: 4px 0;
}
.rail::before, .rail::after {
  content: ""; position: absolute; left: 50%; width: 2px; margin-left: -1px; top: 0; border-radius: 2px;
}
.rail::before { bottom: 0; background: rgba(255, 255, 255, .22); }
.rail::after { height: calc(var(--progress, 0) * 100%); background: var(--yellow); }
.rail button {
  position: relative; z-index: 1; width: 14px; height: 14px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .8); background: var(--night);
  transition: transform .2s, background .2s;
}
.rail button.is-past { background: var(--yellow); border-color: var(--yellow); }
.rail button.is-current { transform: scale(1.35); background: var(--yellow); border-color: var(--white); }
.rail-label {
  position: absolute; right: 24px; top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; padding: 5px 11px; border-radius: 999px;
  background: rgba(21, 19, 37, .75); color: var(--white); font: 500 .8rem/1.2 var(--font-body);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.rail button:hover .rail-label, .rail button:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }

.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
}
.scroll-hint span { width: 24px; height: 38px; border: 2px solid currentColor; border-radius: 14px; position: relative; }
.scroll-hint span::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: currentColor; animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.loader {
  position: absolute; z-index: 3; left: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: rgba(21, 19, 37, .7); font-size: .82rem; transition: opacity .4s;
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader-bar { width: 80px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .2s; }

/* ---------- Content sections ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-paper {
  background:
    radial-gradient(rgba(29, 27, 47, .05) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--paper-2);
}
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head .eyebrow { color: var(--orange); opacity: 1; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.lede { font-size: 1.2rem; color: var(--ink-2); }

.scribble-under { position: relative; display: inline-block; z-index: 0; }
.scribble-under svg { position: absolute; left: -2%; bottom: -.08em; width: 104%; height: .4em; color: var(--yellow); z-index: -1; }

.card {
  --c: var(--ink);
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border-top: 6px solid var(--c);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(29, 27, 47, .16); }
.card img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.card-body { padding: 22px 24px 24px; }
.card-body h3 { font-size: 1.4rem; }
.card-body p:last-child { margin-bottom: 0; color: var(--ink-2); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.mini { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.mini svg { flex: none; width: 22px; height: 38px; color: var(--c); }
.mini h3 { font-size: 1.15rem; margin-bottom: .3em; }
.mini p { margin: 0; color: var(--ink-2); font-size: .98rem; }

.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.work { border-top: 0; }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
  background: var(--c); color: var(--white); font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}

.process {
  list-style: none; padding: 0; margin: 0; position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
}
.process::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 23px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue));
  opacity: .35;
}
.process li { position: relative; text-align: center; }
.process .num {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--c); color: var(--white); font: 700 1.35rem/1 var(--font-display);
  box-shadow: 0 0 0 6px var(--paper);
}
.process h3 { font-size: 1.25rem; margin-bottom: .35em; }
.process p { color: var(--ink-2); font-size: .98rem; margin: 0; }

.contact { position: relative; overflow: hidden; color: var(--white); background: var(--night); }
.contact-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.contact::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21, 19, 37, .92), rgba(21, 19, 37, .55)); z-index: 1; }
.contact-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.contact .lede { color: rgba(255, 255, 255, .82); }
.contact .eyebrow { color: var(--yellow); }

.contact-form {
  display: grid; gap: 16px; padding: 28px; border-radius: 26px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.contact-form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 2px solid transparent;
  background: var(--white); color: var(--ink); font: inherit; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--yellow); }
.contact-form .btn { justify-self: start; }

.site-footer { background: var(--night); color: rgba(255, 255, 255, .75); padding: 36px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-inner .brand { color: var(--white); }
.footer-inner p { margin: 0; }
.footer-inner .muted { margin-left: auto; opacity: .7; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .service-grid, .mini-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { left: 25px; right: auto; top: 10px; bottom: 10px; width: 6px; height: auto; background: linear-gradient(var(--red), var(--orange), var(--yellow), var(--green), var(--blue)); }
  .process li { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; text-align: left; }
  .process .num { grid-row: span 2; margin: 0; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --per-shot: 95vh; }
  .site-nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .brand-name { font-size: 1.2rem; }

  .chapter-left, .chapter-right { left: 16px; right: 16px; width: auto; bottom: 64px; padding: 20px 22px; }
  .chapter h2 { font-size: 1.5rem; }
  .chapter-final h2 { font-size: 2.3rem; }
  .chapter p { font-size: .98rem; }
  .chips li { font-size: .78rem; }

  .rail { top: auto; bottom: 22px; right: 50%; transform: translateX(50%); flex-direction: row; gap: 14px; padding: 0 4px; }
  .rail::before, .rail::after { top: 50%; left: 0; height: 2px; width: auto; margin: -1px 0 0; }
  .rail::before { right: 0; }
  .rail::after { width: calc(var(--progress, 0) * 100%); height: 2px; }
  .rail-label { display: none; }
  .scroll-hint { bottom: 60px; }
  .loader { left: 50%; bottom: auto; top: 76px; transform: translateX(-50%); }
  .footer-inner .muted { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .btn, .rail button { transition: none; }
  .card:hover, .btn:hover { transform: none; }
  .scroll-hint span::after { animation: none; }
}
