:root {
  --ink: #1d1b1e;
  --ink-2: #29262a;
  --cream: #f4efe9;
  --card: #ece4da;
  --line: #ddd3c7;
  --accent: #b04a32;
  --accent-soft: #c96a50;
  --text: #2a2628;
  --muted: #6f6763;
  --on-dark: #efe8df;
  --on-dark-muted: #b9b0a8;
  --serif: "Crimson Pro", "Crimson Text", Georgia, serif;
  --sans: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 5vw, 56px); }
section { padding-block: clamp(56px, 8vw, 104px); }
section + section.light { border-top: 1px solid var(--line); }
.dark { background: var(--ink); color: var(--on-dark); }

/* ── Nav ─────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(29, 27, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--on-dark);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-family: var(--serif); font-size: 21px; font-weight: 600; text-decoration: none; }
.brand span { color: var(--accent-soft); }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 12px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
  text-decoration: none; color: var(--on-dark-muted); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.cta { color: var(--accent-soft); }
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; margin-right: -4px; cursor: pointer; }
.nav-toggle svg { display: block; }

/* ── Shared type ─────────────────────── */
.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.dark .eyebrow { color: var(--accent-soft); }
.title { font-size: clamp(30px, 4.2vw, 46px); }
.lede { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 16.5px; }
.dark .lede { color: var(--on-dark-muted); }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 28px 0 12px; }
.bullets li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 15px; }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span {
  font-size: 12.5px; font-weight: 500; padding: 4px 12px; border-radius: 999px;
  border: 1px solid #cdbfb1; background: rgba(255, 255, 255, 0.35);
}
.link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
}
.dark .link, .panel.dark .link { color: var(--accent-soft); }
.link::after { content: "→"; transition: transform 0.2s; }
.link:hover::after { transform: translateX(4px); }
.links { display: flex; flex-direction: column; align-items: flex-start; }
.links .link { margin-top: 14px; }

/* ── Stats ───────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: start; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--card); border-radius: var(--radius); padding: 20px 20px 22px; }
.stat b {
  display: block; font-family: var(--serif); font-weight: 600; color: var(--accent);
  font-size: clamp(26px, 3vw, 36px); line-height: 1.1; margin-bottom: 8px;
}
.stat span { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; }
.dark .stat { background: var(--ink-2); }
.dark .stat b { color: var(--accent-soft); }
.dark .stat span { color: var(--on-dark-muted); }

/* ── Hero ────────────────────────────── */
.hero { padding: 60px 0 0; overflow: hidden; }
.hero .wrap { position: relative; min-height: min(86vh, 760px); display: flex; align-items: center; }
.hero-text { position: relative; z-index: 2; padding-block: 64px; max-width: 760px; }
.hero-word {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(84px, 17vw, 236px); line-height: 0.86; letter-spacing: 0.01em;
  color: transparent; -webkit-text-stroke: 1.5px var(--on-dark);
  margin: 0 0 clamp(20px, 3vw, 36px) -4px; user-select: none;
}
.hero h1 { font-size: clamp(40px, 5.4vw, 64px); display: inline-block; padding-bottom: 8px; border-bottom: 4px solid var(--accent); }
.hero-role { font-size: clamp(18px, 2vw, 23px); font-weight: 600; margin-top: clamp(28px, 4vw, 48px); }
.hero-skills { display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 56px; margin-top: 20px; font-weight: 500; font-size: 15.5px; color: var(--on-dark-muted); }
.hero-photo {
  position: absolute; right: clamp(-40px, -2vw, 0px); bottom: 0; z-index: 1;
  height: 100%; max-height: 760px; width: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%);
  mask-image: linear-gradient(to right, transparent 0, #000 16%);
}

/* ── About ───────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); margin-top: 32px; align-items: start; }
.about-grid p + p { margin-top: 16px; }
.pull { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.45; color: #4a4340; margin-top: 28px !important; }
.brands { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.brands ul { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 4px; }
.brands li { font-size: 14px; font-weight: 500; padding: 5px 14px; border-radius: 999px; background: var(--card); }

/* ── Capabilities ────────────────────── */
.caps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 40px; }
.cap { background: var(--card); border-radius: var(--radius); padding: 24px 20px 26px; }
.cap .num { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1; }
.cap h3 { font-size: 21px; margin: 12px 0 18px; min-height: 2.3em; }
.cap .bullets li { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ── Chapter dividers ────────────────── */
.chapter { padding-block: clamp(72px, 11vw, 150px); }
.chapter .num { font-family: var(--serif); font-weight: 600; font-size: clamp(88px, 13vw, 150px); line-height: 0.85; color: var(--accent); }
.chapter h2 { font-size: clamp(36px, 5.4vw, 60px); margin-top: 18px; }
.chapter p { margin-top: 16px; color: var(--on-dark); font-size: 16.5px; }
.chapter p.note { color: var(--accent-soft); font-size: 14px; margin-top: 10px; }

/* ── Case studies ────────────────────── */
.case-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.gallery img, .gallery button img { height: clamp(150px, 24vw, 290px); width: auto; border-radius: 8px; }
.zoom { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; display: block; }
.zoom img { transition: transform 0.35s ease; }
.zoom:hover img { transform: scale(1.03); }
.zoom:focus-visible, .tile:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); margin-top: 40px; }
.duo h3 { font-size: 30px; }
.duo .eyebrow { margin: 6px 0 16px; }
.duo .gallery { margin-top: 24px; flex-wrap: nowrap; }
.duo .gallery .zoom { flex: 1 1 0; min-width: 0; }
.duo .gallery img { height: clamp(110px, 13vw, 170px); width: 100%; object-fit: cover; }
.duo .stats { margin-top: 20px; }

.roas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.roas .stat { padding: 26px 24px; }
.roas .stat b { font-size: clamp(36px, 4.4vw, 52px); margin-bottom: 22px; }
.roas .stat strong { display: block; font-size: 16px; font-weight: 600; color: var(--on-dark); }
.roas .stat span { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

/* ── Video tiles ─────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.tiles.five { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile {
  display: block; border-radius: 12px; overflow: hidden; position: relative;
  box-shadow: 0 6px 22px rgba(29, 27, 30, 0.14); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(29, 27, 30, 0.24); }
.dark .tile { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.split-tiles { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); margin-top: 36px; align-items: start; }
.split-tiles h4 { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; margin-bottom: 18px; }
.split-tiles h4::after { content: ""; display: block; width: 28px; height: 2px; background: var(--accent); margin: 8px auto 0; }
.split-tiles .tiles { margin-top: 0; }
.split-tiles .tiles.two { grid-template-columns: repeat(2, 1fr); }
.split-tiles .tiles.stack { grid-template-columns: 1fr; }

/* ── Feature (text + image) ──────────── */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature.wide-img { grid-template-columns: 0.8fr 1.2fr; }
.feature .media img { border-radius: var(--radius); width: 100%; }
.feature .media .zoom { width: 100%; }
.grid-imgs { display: grid; gap: 12px; }
.grid-imgs .zoom, .grid-imgs img { width: 100%; height: 100%; }
.grid-imgs img { object-fit: cover; }
.bop-grid { grid-template-columns: repeat(4, 1fr); }
.events-grid { grid-template-columns: repeat(4, 1fr); margin-top: 36px; }
.events-grid .zoom { aspect-ratio: 4 / 3; }
.retail-grid { grid-template-columns: repeat(6, 1fr); }
.retail-grid .zoom { grid-column: span 2; aspect-ratio: 1; }
.retail-grid .zoom:nth-child(5) { grid-column: span 4; aspect-ratio: auto; }
.hapdel-grid { grid-template-columns: repeat(6, 1fr); align-items: start; }
.hapdel-grid .zoom { grid-column: span 3; }
.hapdel-grid .zoom:nth-child(3) { grid-column: span 4; }
.hapdel-grid .zoom:nth-child(4) { grid-column: span 2; }
.hapdel-grid img { height: auto; }
.bop-hero { max-width: 300px; margin-top: 26px; }
.bop-hero img { border-radius: var(--radius); }

.identities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.identity a.img { display: block; border-radius: var(--radius); overflow: hidden; }
.identity a.img img { width: 100%; transition: transform 0.35s ease; }
.identity a.img:hover img { transform: scale(1.03); }
.identity h3 { font-size: 26px; margin-top: 18px; }
.identity .eyebrow { margin: 4px 0 10px; font-size: 11px; }
.identity p { font-size: 14.5px; color: var(--muted); }

/* ── Comms ───────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin: 40px 0; }
.pillar { border-top: 2px solid var(--accent); padding-top: 20px; }
.pillar h3 { font-size: 24px; margin-bottom: 16px; }
.pillar .bullets li { color: var(--muted); font-size: 14.5px; }

.doc { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.panel { border-radius: var(--radius); padding: 30px 28px; }
.panel.white { background: #fff; border: 1px solid var(--line); }
.panel.tan { background: var(--card); }
.panel.dark { background: var(--ink); color: var(--on-dark); }
.panel .kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.panel .kicker.red, .panel.dark .kicker { color: var(--accent-soft); }
.panel.white .kicker.red { color: var(--accent); }
.panel h3 { font-size: 25px; line-height: 1.2; margin: 14px 0 18px; }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.panel.dark hr { border-color: rgba(255, 255, 255, 0.12); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; align-items: baseline; }
.facts dt { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent); }
.facts dd { margin: 0; font-size: 13.5px; color: var(--muted); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 13.5px; margin: 0; }
.meta dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.panel.dark .meta dt { color: var(--accent-soft); }
.meta dd { margin: 0; }
.steps { counter-reset: step; margin-top: 20px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 38px; font-weight: 500; font-size: 15px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid #d4c7b9; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; z-index: 1;
}
.steps li:first-child::before, .steps li:last-child::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li::after { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 1px; background: #cdbfb1; }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.numbered li { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding: 11px 0; font-weight: 500; font-size: 15px; }
.numbered li b { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--accent-soft); }
.pill { display: inline-block; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.09em; padding: 3px 14px; border-radius: 999px; margin-right: 10px; }
.excerpt { font-family: var(--serif); font-style: italic; font-size: 16.5px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 14px; }
.quote-mark { font-family: var(--serif); font-size: 64px; line-height: 0.6; color: var(--accent-soft); display: block; margin-top: 14px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 25px; line-height: 1.35; margin: 14px 0 28px; }

/* ── Teaching ────────────────────────── */
.teach { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: 48px; }
.bignums { display: grid; grid-template-columns: repeat(2, max-content); gap: 36px 80px; }
.bignums b { display: block; font-family: var(--serif); font-size: clamp(44px, 6vw, 64px); font-weight: 600; color: var(--accent-soft); line-height: 1; }
.bignums span { font-size: 14.5px; color: var(--on-dark-muted); }
.teach blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.4; }

/* ── Contact ─────────────────────────── */
.contact { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-block: clamp(80px, 12vw, 150px) 40px; }
.contact h2 { font-size: clamp(60px, 10vw, 112px); }
.contact .lede { font-size: 18px; }
.contact dl { display: grid; grid-template-columns: 110px 1fr; gap: 16px 0; margin: 48px 0 0; align-items: baseline; }
.contact dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-soft); }
.contact dd { margin: 0; font-size: clamp(17px, 2.2vw, 21px); font-weight: 500; overflow-wrap: anywhere; }
.contact dd a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.contact dd a:hover { border-color: var(--accent-soft); }
.foot { margin-top: clamp(64px, 9vw, 110px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; gap: 16px; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--on-dark-muted); }
.foot a { text-decoration: none; }

/* ── Lightbox ────────────────────────── */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(20, 18, 21, 0.9); }
dialog.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px; cursor: zoom-out; }

/* ── Reveal ──────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Responsive ──────────────────────── */
@media (max-width: 1100px) {
  .caps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .caps { grid-template-columns: repeat(2, 1fr); }
  .cap h3 { min-height: 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 8px clamp(16px, 5vw, 56px) 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 13px; }
  .tiles.five { grid-template-columns: repeat(3, 1fr); }
  .stats.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .about-grid, .case-grid, .duo, .feature, .feature.wide-img, .doc, .teach, .split-tiles { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .identities { grid-template-columns: 1fr; }
  .roas { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-text { padding-block: 40px 28px; }
  .hero-photo { position: static; height: auto; width: min(100%, 420px); margin: 0 auto; -webkit-mask-image: none; mask-image: none; }
  .duo .gallery img { height: 130px; }
}
@media (max-width: 520px) {
  .caps { grid-template-columns: 1fr; }
  .hero-skills { grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 14px; }
  .tiles.five { grid-template-columns: repeat(2, 1fr); }
  .bop-grid { grid-template-columns: repeat(2, 1fr); }
  .stats.three { grid-template-columns: 1fr; }
  .stat { padding: 16px; }
  .bignums { gap: 28px 40px; }
  .contact dl { grid-template-columns: 1fr; gap: 4px 0; }
  .contact dd { margin-bottom: 14px; }
  .foot { flex-direction: column; }
  .duo .gallery { flex-wrap: wrap; }
  .duo .gallery .zoom { flex: 1 1 40%; }
}

/* ── Role-specific page ──────────────── */
.prepared {
  display: inline-block; margin-bottom: clamp(18px, 3vw, 30px); padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22); font-size: 12px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--on-dark-muted);
}
.prepared b { color: var(--on-dark); font-weight: 600; }
.hero.role .hero-word { font-size: clamp(64px, 12vw, 168px); }
.hero.role .hero-text { max-width: 700px; }
.headline-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.fit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
.fit article { background: var(--card); border-radius: var(--radius); padding: 24px 24px 22px; }
.fit .need { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.fit h3 { font-size: 23px; margin: 8px 0 14px; }
.fit .bullets li { font-size: 14.5px; color: #4a4340; line-height: 1.5; }
.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.doc-cards article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.doc-cards .kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.doc-cards h3 { font-size: 22px; line-height: 1.2; margin: 10px 0 10px; }
.doc-cards p { font-size: 14.5px; color: var(--muted); flex: 1; }
.doc-cards .link { margin-top: 18px; }
.subhead { font-size: 28px; margin-top: 56px; }
.subhead + .lede { margin-top: 10px; }
@media (max-width: 1020px) {
  .headline-stats { grid-template-columns: repeat(2, 1fr); }
  .doc-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .fit, .doc-cards { grid-template-columns: 1fr; }
}

/* ══ Motion, parallax & material layer ══════════════════════ */
:root {
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --e1: 0 1px 2px rgba(29, 27, 30, 0.10), 0 1px 3px 1px rgba(29, 27, 30, 0.06);
  --e2: 0 1px 2px rgba(29, 27, 30, 0.12), 0 2px 6px 2px rgba(29, 27, 30, 0.08);
  --e3: 0 4px 8px 3px rgba(29, 27, 30, 0.10), 0 1px 3px rgba(29, 27, 30, 0.14);
  --e4: 0 8px 16px 6px rgba(29, 27, 30, 0.12), 0 2px 4px rgba(29, 27, 30, 0.14);
}

/* Scroll progress + nav elevation */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent-soft); transform: scaleX(0); transform-origin: 0 50%; }
.nav { transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease); }
.nav.raised { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); background: rgba(29, 27, 30, 0.96); }
.nav-links a { position: relative; overflow: hidden; padding: 6px 2px; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent-soft); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Elevated surfaces */
.stat, .cap, .fit article, .doc-cards article, .panel, .brands li {
  box-shadow: var(--e1);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.stat:hover, .cap:hover, .fit article:hover, .doc-cards article:hover, .panel:hover { box-shadow: var(--e3); transform: translateY(-4px); }
.dark .stat { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 2px 8px rgba(0, 0, 0, 0.35); }
.dark .stat:hover { background: #322e33; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 10px 24px rgba(0, 0, 0, 0.5); }
.zoom, .identity a.img { box-shadow: var(--e2); transition: box-shadow 0.3s var(--ease); position: relative; }
.zoom:hover, .identity a.img:hover { box-shadow: var(--e4); }
.tile { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s var(--ease);
  background: rgba(29, 27, 30, 0.28) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23b04a32'/%3E%3Cpath d='M26 20l20 12-20 12z' fill='%23fff'/%3E%3C/svg%3E") center / 64px no-repeat;
}
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tags span { transition: background 0.25s var(--ease), border-color 0.25s var(--ease); }
.tags span:hover { background: #fff; border-color: var(--accent); }
.fit article { border-top: 3px solid transparent; }
.fit article:hover { border-top-color: var(--accent); }

/* Ripple */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: 0.22;
  transform: scale(0); animation: ripple 0.6s var(--ease) forwards;
}
.tile .ripple, .zoom .ripple, .identity a.img .ripple { background: #fff; opacity: 0.35; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* Floating action button */
.fab {
  position: fixed; z-index: 40;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border-radius: 16px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: 0.04em;
  box-shadow: 0 6px 10px 4px rgba(29, 27, 30, 0.18), 0 2px 3px rgba(29, 27, 30, 0.3);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.fab:hover { background: #bd543a; box-shadow: 0 10px 18px 6px rgba(29, 27, 30, 0.22), 0 3px 5px rgba(29, 27, 30, 0.3); transform: translateY(-2px); }
.fab.away { transform: translateY(24px) scale(0.85); opacity: 0; pointer-events: none; }
.fab svg { flex: none; }

/* Parallax scenery */
.hero, .chapter, .contact { position: relative; overflow: hidden; }
.hero .wrap, .chapter .wrap, .contact .wrap { position: relative; z-index: 1; }
.orb { position: absolute; border-radius: 50%; pointer-events: none; will-change: translate; }
.orb.glow { background: radial-gradient(circle, rgba(176, 74, 50, 0.38), rgba(176, 74, 50, 0) 68%); }
.orb.ring { border: 1px solid rgba(239, 232, 223, 0.13); }
.orb.dot { background: var(--accent); opacity: 0.85; }
.orb.grid {
  border-radius: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(239, 232, 223, 0.28) 1.2px, transparent 1.6px); background-size: 18px 18px;
}
[data-px] { will-change: translate; }

/* Chapter flourishes */
.chapter h2 { position: relative; display: inline-block; padding-bottom: 14px; }
.chapter h2::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.9s var(--ease) 0.35s; }
.chapter .in h2::after, html:not(.js) .chapter h2::after { transform: scaleX(1); }
.js .chapter .reveal .num { transform: translateX(-40px); opacity: 0; transition: transform 0.9s var(--ease), opacity 0.9s var(--ease); }
.js .chapter .reveal.in .num { transform: none; opacity: 1; }

/* Staggered entrances */
.js .reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transform: translateY(26px); }
.js .rise { opacity: 0; transform: translateY(30px) scale(0.97); transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }

/* Hero entrance */
@keyframes heroUp { from { opacity: 0; transform: translateY(28px); } }
@keyframes heroWord { from { opacity: 0; letter-spacing: 0.14em; } }
@keyframes heroPhoto { from { opacity: 0; transform: translateX(40px) scale(1.04); } }
@keyframes underline { from { background-size: 0 4px; } }
.hero h1 { border-bottom: 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 4px no-repeat; }
.js .hero .prepared { animation: heroUp 0.8s var(--ease) 0.05s backwards; }
.js .hero .hero-word { animation: heroWord 1.3s var(--ease) 0.1s backwards; }
.js .hero h1 { animation: heroUp 0.8s var(--ease) 0.35s backwards, underline 0.9s var(--ease) 0.9s backwards; }
.js .hero .hero-role { animation: heroUp 0.8s var(--ease) 0.5s backwards; }
.js .hero .hero-skills li { animation: heroUp 0.6s var(--ease) backwards; animation-delay: calc(0.65s + var(--i, 0) * 70ms); }
.js .hero .hero-photo { animation: heroPhoto 1.2s var(--ease) 0.25s backwards; }

/* Link + lightbox motion */
dialog.lightbox[open] img { animation: pop 0.35s var(--ease); }
dialog.lightbox[open]::backdrop { animation: fade 0.3s ease; }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1020px) {
  .nav-links a::after { display: none; }
}
@media (max-width: 520px) {
  .fab { height: 52px; padding: 0 16px; }
  .fab span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .chapter .reveal .num { opacity: 1; transform: none; transition: none; }
  .js .hero * { animation: none !important; }
  .chapter h2::after { transform: scaleX(1); transition: none; }
  .ripple { display: none; }
  [data-px], .orb { translate: none !important; }
}

/* ══ Revised layout: rails, marquee, player, new sections ══ */

/* Scrollable image rails */
.rail-wrap { position: relative; margin-top: 36px; }
.rail {
  --rail-h: clamp(200px, 27vw, 330px);
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity;
  padding: 6px 2px 18px; margin: 0; scrollbar-width: thin; scrollbar-color: #cdbfb1 transparent;
  -webkit-overflow-scrolling: touch; cursor: grab;
}
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging * { pointer-events: none; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: #cdbfb1; border-radius: 3px; }
.dark .rail { scrollbar-color: #4a4449 transparent; }
.dark .rail::-webkit-scrollbar-thumb { background: #4a4449; }
.rail > * { flex: none; scroll-snap-align: start; }
.rail .zoom img { height: var(--rail-h); width: auto; max-width: none; border-radius: 8px; }
.rail .zoom { cursor: zoom-in; }
.rail.tiles-rail { --tile-w: clamp(190px, 21.5vw, 268px); gap: 18px; }
.rail.tiles-rail .tile { width: var(--tile-w); aspect-ratio: 9 / 16; }
.duo .rail { --rail-h: clamp(120px, 14vw, 170px); margin-top: 0; }
.duo .rail-wrap { margin-top: 24px; }
.rail-btn {
  position: absolute; top: calc(50% - 12px); transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--ink); box-shadow: var(--e3);
  display: grid; place-items: center; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.rail-btn:hover { box-shadow: var(--e4); transform: translateY(-50%) scale(1.08); }
.rail-btn.prev { left: -10px; }
.rail-btn.next { right: -10px; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
.rail-wrap.fits .rail-btn { display: none; }
.rail-wrap.fits .rail { cursor: default; }
.rail-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 18px; width: 56px; pointer-events: none; z-index: 2;
  background: linear-gradient(to right, transparent, var(--cream)); opacity: 1; transition: opacity 0.3s;
}
.dark .rail-wrap::after { background: linear-gradient(to right, transparent, var(--ink)); }
.rail-wrap.fits::after, .rail-wrap.at-end::after { opacity: 0; }

/* Brand marquee */
.marquee { overflow: hidden; margin-top: 10px; -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.brands .marquee-track { display: flex; flex-wrap: nowrap; gap: 14px; width: max-content; margin: 0; padding: 6px 0 10px; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.brands .marquee-track li {
  display: inline-flex; align-items: center; gap: 12px; flex: none; white-space: nowrap;
  padding: 8px 20px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 15px; font-weight: 500; box-shadow: var(--e1);
}
.logo {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--ink); color: var(--on-dark); font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: 0.02em;
}
.marquee-track li:nth-child(3n+2) .logo { background: var(--accent); color: #fff; }
.marquee-track li:nth-child(3n) .logo { background: var(--card); color: var(--accent); border: 1px solid #d9cdbf; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Video player */
dialog.player { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
dialog.player::backdrop { background: rgba(20, 18, 21, 0.92); }
dialog.player[open] { animation: pop 0.35s var(--ease); }
.player .frame { background: #000; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); margin: 0 auto; }
.player .frame.portrait { height: min(82vh, 760px); aspect-ratio: 9 / 16; max-width: 94vw; }
.player .frame.landscape { width: min(92vw, 1000px); aspect-ratio: 16 / 9; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; color: var(--on-dark); font-size: 13px; }
.player-bar a { color: var(--on-dark-muted); text-decoration: none; letter-spacing: 0.04em; }
.player-bar a:hover { color: #fff; }
.player-bar button { border: 1px solid rgba(255, 255, 255, 0.3); background: none; color: #fff; border-radius: 999px; padding: 7px 18px; font: inherit; font-weight: 500; cursor: pointer; }
.player-bar button:hover { background: rgba(255, 255, 255, 0.12); }

/* Ramsons PR */
.pr-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: end; margin-top: 36px; }
.pr-img img { width: 100%; height: auto; }
.cov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cov a, .reviews a {
  display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); padding: 16px 16px 14px;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cov a { background: #fff; border: 1px solid var(--line); box-shadow: var(--e1); min-height: 112px; }
.cov a:hover { box-shadow: var(--e3); transform: translateY(-4px); border-color: var(--accent); }
.cov strong { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; }
.cov .kind { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.go { margin-top: auto; padding-top: 14px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.go::after { content: " →"; display: inline-block; margin-left: 6px; transition: transform 0.2s; }
a:hover > .go::after { transform: translateX(4px); }

/* Captioned photo */
.captioned { margin: 30px 0 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 24px; }
.captioned .zoom { flex: 0 1 340px; }
.captioned img { width: 100%; border-radius: 8px; }
.captioned figcaption { flex: 1 1 200px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; border-left: 2px solid var(--accent); padding-left: 14px; color: #4a4340; }

/* Writing cards */
.caps-tags span { text-transform: uppercase; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; color: var(--accent); background: #fff; }
.write-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.write-cards article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--e1); transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease); }
.write-cards article:hover { box-shadow: var(--e3); transform: translateY(-4px); }
.write-cards header { background: var(--ink); color: var(--on-dark); padding: 18px 20px 16px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 10px; }
.write-cards .num { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent-soft); line-height: 1; }
.write-cards .kind { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-align: right; color: var(--on-dark-muted); }
.write-cards h3 { grid-column: 1 / -1; font-size: 21px; margin-top: 8px; }
.write-cards .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.write-cards .body p { font-size: 14.5px; line-height: 1.55; flex: 1; }
.write-cards .meta { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.write-cards .link { margin-top: 14px; }

/* Teaching with reviews */
.teach2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: 8px; }
.teach2 blockquote { margin: 28px 0 40px; font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.4; }
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reviews a { background: var(--ink-2); color: var(--on-dark); position: relative; padding: 18px 18px 14px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 10px; }
.reviews a:hover { background: #322e33; transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.reviews .q { grid-column: 1 / -1; font-family: var(--serif); font-size: 34px; line-height: 0.7; color: var(--accent-soft); }
.reviews p { grid-column: 1 / -1; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; margin-bottom: 14px; }
.reviews .src { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); }
.reviews .go { margin: 0; padding: 0; color: var(--accent-soft); }

.hero-skills { grid-template-columns: repeat(2, max-content); }

@media (max-width: 1020px) {
  .write-cards { grid-template-columns: repeat(2, 1fr); }
  .pr-grid { grid-template-columns: 1fr; }
  .pr-img { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 820px) {
  .teach2 { grid-template-columns: 1fr; }
  .rail-btn { display: none; }
  .rail.tiles-rail { --tile-w: 62vw; }
  .cov { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .write-cards, .reviews { grid-template-columns: 1fr; }
  .rail { --rail-h: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  .brands .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track li[aria-hidden="true"] { display: none; }
}

/* Grid columns must be allowed to shrink around rails */
.duo > *, .case-grid > *, .pr-grid > *, .doc > *, .teach2 > *, .feature > *, .split-tiles > * { min-width: 0; }
@media (max-width: 1140px) {
  .write-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .write-cards { grid-template-columns: 1fr; }
}
