/* ═══════════════════════════════════════════════════════
   FONTS
═══════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Young';
  src: url('fonts/YoungSerif-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'YoungB';
  src: url('fonts/YoungSerif-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Whyte';
  src: url('fonts/WhyteInktrap-Book.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'GartonOrnate';
  src: url('fonts/WTGartonOrnate-Medium.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Domine — self-hosted (SIL OFL 1.1, licence in fonts/OFL-Domine.txt).
   Variable weight, one file per unicode subset; the browser only
   downloads the subset a page actually needs. These are the same
   files Google Fonts was serving, so rendering is unchanged. Note the
   file only covers weights 400-700 — rules asking for 300 resolve to 400. */
@font-face {
  font-family: 'Domine';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Domine-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Domine';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  /* TTF fallback: same file type as the Young/Whyte fonts, which are
     known to load in Safari over file:// — used only if the woff2
     above fails to load. Regular (400) only, which is what every rule
     here renders at anyway. */
  src: url('fonts/Domine-latin.woff2') format('woff2'),
       url('fonts/Domine-Regular.ttf') format('truetype');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ═══════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  -webkit-font-smoothing: antialiased;
}


/* ═══════════════════════════════════════════════════════
   CUSTOM CURSOR
   Hidden on touch devices via @media (pointer: coarse).
═══════════════════════════════════════════════════════ */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 39px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
}

.custom-cursor svg {
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  transform-origin: center center;
  color: #fff;
}

.cursor-tilt {
  width: 100%;
  height: 100%;
  transition: transform 0.2s cubic-bezier(0.65, 0, 0.35, 1),
              filter 0.2s ease;
}

.cursor-tilt.tilted,
.cursor-tilt.tilt-ccw {
  transform: rotate(-45deg);
}

.cursor-tilt.tilt-cw {
  transform: rotate(45deg);
}

.custom-cursor svg.pointing-up {
  transform: rotate(180deg);
}

body.carousel-mode .custom-cursor svg             { transform: rotate(-90deg); }
body.carousel-mode .custom-cursor svg.pointing-up { transform: rotate(90deg);  }


/* ═══════════════════════════════════════════════════════
   SCROLL CONTAINER
═══════════════════════════════════════════════════════ */
.scroll-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}


/* ═══════════════════════════════════════════════════════
   SECTION
═══════════════════════════════════════════════════════ */
.section {
  position: relative;
  width: 100%;
  /* Each section is 100svh of content plus a 2px bottom strip in its own
     background. iOS Safari can show a sliver more than 100svh at the
     bottom, which used to reveal the next section's first pixel row; this
     strip shows this section's own colour instead. script.js steps by the
     same amount (100svh + --section-leak). */
  height: calc(100svh + var(--section-leak));
  padding-bottom: var(--section-leak);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg, #111);
  user-select: none;
  -webkit-user-select: none;
}


/* ═══════════════════════════════════════════════════════
   BACKGROUND MEDIA
═══════════════════════════════════════════════════════ */
.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}


/* ═══════════════════════════════════════════════════════
   CONTENT WRAPPER
═══════════════════════════════════════════════════════ */
.content {
  position: relative;
  z-index: 2;
  text-align: center;
  /* Padding is capped (9.75rem = 12% of the 1300px max-width) so it
     stops growing once .content itself stops growing — otherwise an
     uncapped vw padding keeps expanding past that point while the box
     width is frozen, and the usable text width actually shrinks as the
     window gets wider (verified: 952px inner width at 1450px viewport,
     844px at 1900px). This keeps inner width flat from 1300px viewport
     up through 5K instead of inverting. */
  padding: 2.5rem clamp(2rem, 12vw, 9.75rem);
  max-width: 1300px;
  width: 100%;
  margin-top: 5vh;
}

.content.overlay {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}


/* ═══════════════════════════════════════════════════════
   MEDIA BLOCKS
═══════════════════════════════════════════════════════ */
.media-block {
  max-width: 60%;
  max-height: 60svh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.media-inset {
  width: 62%;
  max-height: 56svh;
  object-fit: cover;
  display: block;
  margin: 0 auto 4.4rem;
}


/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════ */
:root {
  --nav-h: clamp(28px, 5vw, 90px);
  --section-leak: 2px;
}

h1 {
  font-family: 'Domine', Georgia, serif;
  /* Floor (3.744rem) is the exact value the mobile override below
     reaches at 768px — matching it here means the desktop formula
     picks up where mobile left off instead of snapping down at the
     769px boundary, then continuing to grow to the locked 4.6rem cap.
     Values here are scaled x 19/22 (38/44) from the Young originals —
     Domine renders visually larger at the same point size, per a
     direct Illustrator comparison (44pt Domine ~matched 38pt Young at
     the same 52.8pt leading), then a further x 0.85 on top of that
     (cumulative: 19/22 x 0.85 = 0.7341 of the Young original).
     Line-height is bumped by the exact inverse (1 / 0.7341 = 1.3622,
     so 1.1 x 1.3622 = 1.4985) — CSS line-height is a multiplier of
     font-size, so shrinking the font-size alone shrinks the actual
     leading right along with it, unlike Illustrator where leading is
     a fixed absolute value independent of point size. This keeps the
     absolute leading the same as the original Young rule, across
     BOTH size cuts (an earlier pass only compensated for the first
     19/22 cut and left line-height alone through the second 0.85 cut,
     which left leading ~15% short of correct — fixed here). */
  font-size: clamp(2.7485rem, 3.6705vw, 3.3768rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--text, #171716);
  max-width: 70ch;
  margin-bottom: 1.4rem;
  /* Lets the browser balance line lengths instead of pure greedy
     wrap — prevents a single stray word ending up alone on its own
     line as the fluid clamp() font-size/available width interact. */
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  opacity: 0.75;
}

.young-bold {
  font-family: 'Domine', Georgia, serif;
  font-weight: 700;
}

h2 {
  font-family: 'Domine', Georgia, serif;
  /* Floor (3.6rem) matches the mobile override's own cap, reached
     before 768px — same continuity reasoning as h1 above. Scaled
     x 19/22 for Domine — see the h1 rule above for why. Line-height
     bumped x 22/19 too — same reasoning as h1's rule. Font-size
     further reduced x 0.85, line-height untouched — see h1's rule. */
  font-size: clamp(2.6427rem, 3.6705vw, 3.3768rem);
  font-weight: 300;
  line-height: 1.35;
  color: #fff;
  max-width: 70ch;
  margin: 0 auto 1rem;
  text-wrap: balance;
}

p {
  font-family: 'Whyte', 'Helvetica Neue', sans-serif;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 300;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.65);
  max-width: 46ch;
  margin: 0 auto 0.6rem;
  text-wrap: pretty;
}

.body-text {
  font-family: 'Domine', Georgia, serif;
  /* Floor (2.4rem) matches the mobile override's own cap, reached
     before 768px — same continuity reasoning as h1 above. Scaled
     x 19/22 for Domine — see the h1 rule above for why. Line-height
     bumped x 22/19 too — same reasoning as h1's rule. Font-size
     further reduced x 0.85, line-height untouched — see h1's rule. */
  font-size: clamp(1.7618rem, 1.9087vw, 2.2023rem);
  font-weight: 300;
  line-height: 1.35;
  color: #171716;
  max-width: 33ch;
  margin: 0 auto 3rem;
  text-wrap: balance;
}

.content--wide .body-text {
  max-width: 42ch !important;
}

@media (min-width: 769px) {
  #end .body-text {
    max-width: 40ch;
  }
}

.overline {
  font-family: 'Whyte', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #171716;
  margin-bottom: 1.2rem;
}

.caption {
  font-family: 'Whyte', sans-serif;
  /* Locked to a fixed ratio of .quote's font-size at every tier (both
     here and in the mobile/landscape overrides below) — previously
     caption and quote each scaled with their own unrelated clamp(),
     so the relative size between the testimonial quote and its
     attribution line drifted across breakpoints (as small as ~51% of
     the quote size at the mobile/desktop floor, up to ~75% at the
     desktop cap) instead of reading as a consistent primary/secondary
     pair. First locked to 80% of quote; reduced another 20% on top
     (0.8 × 0.8 = 64%) since 80% still read too big. .quote's own base
     rule is clamp(2.16rem, 2.6vw, 3rem) — this is that × 0.64. */
  font-size: clamp(1.3824rem, 1.664vw, 1.92rem);
  letter-spacing: 0;
  color: #fff;
  opacity: 0.6;
  margin-top: 0.2rem;
  text-wrap: balance;
}

.caption-dark {
  font-family: 'Whyte', sans-serif;
  font-size: clamp(1.3824rem, 1.664vw, 1.92rem);
  letter-spacing: 0;
  color: #171716;
  opacity: 0.6;
  margin-top: 0.2rem;
  text-wrap: balance;
}

.dark { color: #222 !important; }


/* ═══════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
═══════════════════════════════════════════════════════ */
.anim,
.step-el {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.65s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.65s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: 0s;
}

.section.is-active .anim {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.3s + var(--delay, 0s));
}

.step-el.revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}

.section.is-active .anim + .anim         { transition-delay: calc(0.45s + var(--delay, 0s)); }
.section.is-active .anim + .anim + .anim { transition-delay: calc(0.6s  + var(--delay, 0s)); }

.word-fade {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.word-fade.revealed {
  opacity: 1;
}

.word-rise {
  opacity: 0;
  display: inline-block;
  transform: translateY(14px);
}

.word-rise.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.word-anim {
  opacity: 0;
  display: inline-block;
  transform: translateY(30px);
  color: var(--text, #fff);
}

.section.is-active .word-anim {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.65s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: var(--delay, 0.3s);
}


/* ═══════════════════════════════════════════════════════
   LOGO
═══════════════════════════════════════════════════════ */
.logo {
  position: fixed;
  top: 1.6rem;
  left: 1.8rem;
  z-index: 200;
  display: block;
  height: var(--nav-h);
  width: auto;
  opacity: 0.9;
  cursor: pointer;
  -webkit-touch-callout: none;
  user-select: none;
  transition: opacity 0.3s, filter 0.5s ease;
}

.logo:hover { opacity: 1; }

.logo img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════
   MAIL LINK
═══════════════════════════════════════════════════════ */
.mail-link {
  position: fixed;
  top: 1.6rem;
  right: calc(1.8rem + var(--nav-h) * 2.8586);
  z-index: 200;
  display: block;
  height: var(--nav-h);
  width: auto;
  opacity: 0.9;
  -webkit-touch-callout: none;
  user-select: none;
  transition: opacity 0.3s, filter 0.5s ease;
}

.mail-link:hover { opacity: 1; }

.mail-link img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════
   LINKEDIN LINK
═══════════════════════════════════════════════════════ */
.linkedin-link {
  position: fixed;
  top: 1.6rem;
  right: calc(1.8rem + var(--nav-h) * 2.0786);
  z-index: 200;
  display: block;
  height: var(--nav-h);
  width: auto;
  opacity: 0.9;
  -webkit-touch-callout: none;
  user-select: none;
  transition: opacity 0.3s, filter 0.5s ease;
}

.linkedin-link:hover { opacity: 1; }

.linkedin-link img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════
   INFO LINK — far-right nav item (outlined SVG wordmark, same
   200-unit artboard as the other nav icons). On index.html it
   reads "info" and links to info.html; on info.html the same
   element carries home.svg and links back. Positioned so its
   ink sits where LinkedIn's used to; LinkedIn/mail/crosshair
   offsets above were shifted left by the measured amount (ink
   gap to LinkedIn = 44 artboard units, same as mail↔LinkedIn).
═══════════════════════════════════════════════════════ */
.info-link {
  position: fixed;
  top: 1.6rem;
  right: calc(1.8rem + var(--nav-h) * 0.0203);
  z-index: 200;
  display: block;
  height: var(--nav-h);
  width: auto;
  opacity: 0.9;
  -webkit-touch-callout: none;
  user-select: none;
  transition: opacity 0.3s, filter 0.5s ease;
}

.info-link:hover { opacity: 1; }

.info-link img {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
}

/* Hit-areas. Each nav SVG sits on a 200-unit artboard with ~62-67 units of
   empty padding each side, and the <a> box is the whole artboard — so
   neighbouring links' boxes overlap (info over LinkedIn's right edge, and
   LinkedIn over mail's) and the later one in the DOM wins the click.
   clip-path also clips hit-testing, so trim each link to its ink plus a
   20-unit margin each side; the ink gap between neighbours is 44 units,
   which leaves 4 units between hit-areas, no overlap. Percentages are
   (padding - 20) / artboard width. If an icon is re-exported with different
   padding, recompute these. */
.linkedin-link { clip-path: inset(0 18.97% 0 18.97%); }
.mail-link     { clip-path: inset(0 16.81% 0 16.81%); }
.info-link     { clip-path: inset(0 8.56% 0 8.56%); }


/* ═══════════════════════════════════════════════════════
   ARROWS
═══════════════════════════════════════════════════════ */
@keyframes arrowFloat {
  0%, 100% { transform: translateX(-50%) translateY(0);   }
  50%       { transform: translateX(-50%) translateY(6px); }
}

.arrow-up {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  /* This button only ever appears on the contact/last section, so
     it's safe to set the blue directly here rather than via a
     section-conditional class — same opacity levels as before. */
  color: rgba(0, 35, 255, 0.7);
  width: 36px;
  height: 39px;
  opacity: 0;
  pointer-events: none;
  animation: arrowFloat 2.4s ease-in-out infinite;
  transition: opacity 0.4s ease, color 0.3s ease;
}

.arrow-up.visible {
  opacity: 1;
  pointer-events: auto;
}

.arrow-up:hover { color: rgba(0, 35, 255, 1); }

.arrow-up svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(180deg);
}

.arrow-down {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  /* This button only ever appears on slide 1 (the hero), so it's
     safe to set the blue directly here rather than via a
     section-conditional class — same opacity levels as before. */
  color: rgba(0, 35, 255, 0.7);
  width: 36px;
  height: 39px;
  animation: arrowFloat 2.4s ease-in-out infinite;
  transition: opacity 0.4s ease, color 0.3s ease;
}

.arrow-down:hover { color: rgba(0, 35, 255, 1); }

.arrow-down svg {
  width: 100%;
  height: 100%;
  display: block;
}

.arrow-down.hidden {
  opacity: 0;
  pointer-events: none;
}

.arrow-down.on-light       { color: rgba(0, 0, 0, 0.35); }
.arrow-down.on-light:hover { color: rgba(0, 0, 0, 0.7);  }


/* ═══════════════════════════════════════════════════════
   TWO COLUMN
═══════════════════════════════════════════════════════ */
.content-two-col {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Half of this gap is the space between the text column and the photo
     (the photo starts at 50vw, so the text column ends gap/2 before it). */
  gap: 8rem;
  align-items: start;
  padding: 2.5rem 0;
  width: 70%;
  max-width: 1300px;
  margin-top: 5vh;
}

.content-two-col .col-text {
  text-align: left;
  max-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.content-two-col .col-text p {
  /* Measure tied to the font size (not to the viewport) so the lines
     wrap the same way at every desktop width — "working" always drops
     to the last line of the final paragraph, and the text keeps a fixed
     gutter from the photo. 23ch is a narrower, two-column-only measure;
     the global .body-text 33ch is untouched. Mobile overrides this with
     max-width: 100% !important. */
  max-width: 23ch;
  margin-bottom: 0.8em;
  /* No line-height here anymore — this selector (2 classes + element)
     was out-specificity-ing .body-text's own line-height, silently
     locking the two-column paragraphs to the old pre-Domine 1.1 ratio
     while every other page picked up the compensated value. Every
     paragraph in this container is always .body-text in practice, so
     removing this lets .body-text's own line-height apply normally. */
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-wrap: pretty;
}

.two-col-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ═══════════════════════════════════════════════════════
   CAROUSEL
═══════════════════════════════════════════════════════ */
.carousel-section {
  overflow: hidden;
  padding: 0;
}

.carousel-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.carousel-slide {
  flex-shrink: 0;
  width: 100vw;
  height: 100svh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg, transparent);
}

.carousel-section--inset .carousel-slide {
  padding: 6svh 12vw;
  box-sizing: border-box;
}

.carousel-section--inset .media-inset {
  /* --logo-scale (set inline per logo, default 1) lets one logo be
     sized up without touching the others — e.g. the wide Banijay
     mark needs more width than the squarer BBC/Mill/Purcell ones to
     read at a similar visual weight. Applied in all three breakpoint
     rules below so it stays proportional everywhere. */
  width: calc(30% * var(--logo-scale, 1));
  max-height: 42svh;
}

.quote {
  font-family: 'Domine', Georgia, serif;
  /* Floor (2.16rem) matches the mobile override's own cap, reached
     before 768px — same continuity reasoning as h1 above. Scaled
     x 19/22 for Domine — see the h1 rule above for why. Font-size
     further reduced x 0.85, line-height untouched — see h1's rule. */
  font-size: clamp(1.5857rem, 1.9087vw, 2.2023rem);
  font-weight: 300;
  color: #fff;
  max-width: 55ch;
  margin: 0 auto 1rem;
  /* Bumped x 22/19 from the original 1.15 — see h1's rule for why. */
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.quote-dark {
  font-family: 'Domine', Georgia, serif;
  font-size: clamp(1.5857rem, 1.9087vw, 2.2023rem);
  font-weight: 300;
  color: #171716;
  max-width: 55ch;
  margin: 0 auto 1rem;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #fff;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.35s ease;
}

.dot.active { opacity: 1; }


/* ═══════════════════════════════════════════════════════
   LOGO TICKER
═══════════════════════════════════════════════════════ */
.ticker-section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 1.3rem;
}

/* Clipping lives on its own element, separate from the blend-mode
   element below — keeping overflow:hidden + mix-blend-mode + an
   animated child all on one element is what was destabilizing
   Safari's compositor and causing the flash. */
.ticker-clip {
  width: 100%;
  overflow: hidden;
}

.ticker-wrap {
  width: 100%;
  /* Screen instead of multiply — this section moved from a light to
     a dark background, and screen is multiply's dark-bg counterpart:
     it lets the logos' (now inverted-white, see .ticker-track img)
     opaque light background disappear into the dark page background
     the same way multiply hid an opaque white background into a
     light page background. */
  mix-blend-mode: screen;
  isolation: isolate;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  /* Position is driven by JS (script.js, TICKER section), not a CSS
     animation — a long-duration `animation: ... infinite` combined
     with mix-blend-mode on .ticker-wrap was causing WebKit to stall
     the main thread for ~300ms roughly once per 60s cycle, producing
     a visible flash + catch-up jump. Confirmed via frame-by-frame
     analysis of a screen recording, not a CSS math/seam error. A JS
     rAF loop sidesteps whatever WebKit does internally to long CSS
     animations, and lets us clamp the per-frame delta so even a real
     stall can never produce a visible jump. will-change/backface
     hints still help keep this composited efficiently either way.
     Do not reintroduce a CSS `animation` here without re-testing for
     the same flash. */
  will-change: transform;
  backface-visibility: hidden;
}

.ticker-track img {
  height: 144px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.9;
  /* The source files (confirmed via checkerboard test) have an
     OPAQUE white canvas, not real transparency — brightness(0) was
     crushing that white background AND the logo mark to identical
     black before inverting, wiping out the contrast between them and
     leaving a flat white box (that was the bug). grayscale(1) first
     neutralises any brand colour, then invert(1) alone preserves the
     light/dark relationship: the opaque white canvas flips to black
     (which mix-blend-mode: screen above then hides into the dark
     page background, screen's black being its no-op colour, the same
     way multiply's no-op is white), while the logo mark itself flips
     to white/light grey and stays visible. */
  filter: grayscale(1) invert(1);
}

/* ═══════════════════════════════════════════════════════
   SIGNUP FORM
═══════════════════════════════════════════════════════ */
.signup-text {
  color: #fff;
  margin-bottom: 2.5rem;
}

/* The contact paragraph is the only thing on the closing slide, so its
   2.5rem margin-bottom (from .signup-text above) would push it off
   centre. Zeroed here (id selector beats the plain class rule). */
#end .signup-text {
  margin-bottom: 0;
}

/* Closing call to action — brand blue, underlined so it reads as a link.
   Phones get the lifted blue in the PHONE BLUE block below. */
.cta-link {
  color: rgb(0, 35, 255);
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
}

.signup-form {
  display: flex;
  gap: 0;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.signup-input {
  flex: 1;
  background: #fff;
  border: none;
  outline: none;
  height: 2.85rem;
  padding: 0 1.2rem;
  font-family: 'Domine', Georgia, serif;
  font-size: clamp(0.9250rem, 1.4095vw, 1.1012rem);
  font-weight: 300;
  color: #171716;
  -webkit-appearance: none;
  border-radius: 0;
}

.signup-input::placeholder {
  color: rgba(29, 29, 27, 0.5);
}

.signup-input:-webkit-autofill,
.signup-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #fdf3f4 inset;
  -webkit-text-fill-color: #171716;
}

.signup-btn {
  background: #171716;
  border: none;
  outline: none;
  height: 2.85rem;
  padding: 0 calc(1.2rem + 10px) 0 calc(1.2rem + 20px);
  font-family: 'Domine', Georgia, serif;
  font-size: clamp(0.9250rem, 1.4095vw, 1.1012rem);
  font-weight: 300;
  color: #fff;
  cursor: pointer;
  border-radius: 0;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  transition: background 0.4s ease;
}

.signup-btn:hover  { background: #34342f; }
.signup-btn:active { background: #fff; color: #171716; transition: background 0s, color 0s; }

.signup-btn.invalid-flash {
  background: #ff4444 !important;
  color: #fff !important;
  transition: background 0s, color 0s;
}

.signup-arrow {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  transform: rotate(-90deg);
  color: #fff;
}

.signup-message {
  margin-top: 2rem;
  font-family: 'Domine', Georgia, serif;
  font-size: clamp(1.0277rem, 1.9087vw, 2.2023rem);
  font-weight: 300;
  color: #fff;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.65s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.signup-message.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   VIDEOS
   Click-to-play facades — thumbnail + play button, real
   YouTube iframe only injected on click (script.js).
═══════════════════════════════════════════════════════ */
.video-heading {
  color: #fff;
  margin-bottom: 2.5rem;
  /* h2's default size (clamp(2rem, 5.5vw, 4.5rem)) is built for big
     full-bleed statements elsewhere in the storybook — this is a
     short label, so match .body-text's scale instead. */
  font-size: clamp(1.0277rem, 1.9087vw, 2.2023rem);
  text-wrap: balance;
}

.video-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.video-facade {
  position: relative;
  /* ONE explicit dimension only (width), with aspect-ratio deriving
     height purely from it — this is the only version of this rule
     that's structurally guaranteed to stay 16:9, since there's never
     a second, independently-constrained dimension for it to conflict
     with. min() picks whichever cap is smallest: 90% (horizontal
     safety), 960px (absolute cap), or 46svh converted to a width via
     the 16:9 ratio (vertical safety, so it can't grow into the fixed
     nav icons or arrow buttons even on short viewports). Two earlier
     attempts both broke this by introducing a second, independent
     dimension (a fixed height, or width+max-height together, or
     leaving both auto with only max-* — the last of those collapsed
     to 0×0 since this div has no intrinsic content size to derive
     from, unlike an <img>/<video> tag). Tested at 375–1920px width
     and both tall (900px+) and short (600px) heights — ratio holds
     at 1.778 throughout. */
  width: min(90%, 960px, calc(46svh * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.video-thumb {
  /* Placeholder block (site blue) standing in for the real YouTube
     thumbnail for now — was an <img>, now a plain <div>. */
  width: 100%;
  height: 100%;
  background: rgb(0, 35, 255);
  display: block;
  pointer-events: none;
}

.video-facade iframe,
.video-facade video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

.video-facade video {
  object-fit: contain;
}

.video-play {
  /* No more circle backing — just a plain centred hit-area sized to
     match the (now much bigger) arrow icon itself. */
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 88px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.video-play:hover {
  transform: scale(1.06);
}

.video-play svg {
  /* 400% of the original 22px icon (was inside a circular button). */
  width: 88px;
  height: 88px;
  color: #fff;
  margin-left: 12px;
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE UTILITIES
═══════════════════════════════════════════════════════ */
.mob-br  { display: none; }
.desk-br { display: inline; }


/* ═══════════════════════════════════════════════════════
   TOUCH DEVICES
═══════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  *, *::before, *::after { cursor: auto !important; }
  .custom-cursor { display: none !important; }
}


/* ═══════════════════════════════════════════════════════
   MOBILE PORTRAIT — up to 768px
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  :root { --nav-h: clamp(26px, 7.2vw, 43px); }

  .logo {
    top:  max(1rem, env(safe-area-inset-top, 0px) + 0.7rem);
    left: max(1.2rem, env(safe-area-inset-left, 0px) + 1rem);
  }

  .mail-link {
    top:   max(1rem, env(safe-area-inset-top, 0px) + 0.7rem);
    right: calc(max(1.2rem, env(safe-area-inset-right, 0px) + 1rem) + var(--nav-h) * 2.8586);
  }

  .linkedin-link {
    top:   max(1rem, env(safe-area-inset-top, 0px) + 0.7rem);
    right: calc(max(1.2rem, env(safe-area-inset-right, 0px) + 1rem) + var(--nav-h) * 2.0786);
  }

  .info-link {
    top:   max(1rem, env(safe-area-inset-top, 0px) + 0.7rem);
    right: calc(max(1.2rem, env(safe-area-inset-right, 0px) + 1rem) + var(--nav-h) * 0.0203);
  }

  .arrow-down,
  .arrow-up {
    bottom: max(1.5rem, env(safe-area-inset-bottom, 0px) + 1rem);
  }

  .content {
    padding:    5rem calc(1.6rem + 6vw) 4rem;
    margin-top: 0;
  }

  .mob-br  { display: block; }
  .desk-br { display: none; }

  /* Scaled x 19/22 for the Domine trial — see the base h1 rule for why. */
  h1 { font-size: clamp(1.4095rem, 5.7259vw, 2.8189rem); }
  h2 { font-size: clamp(1.5857rem, 6.6068vw, 2.6427rem); }

  .body-text {
    font-size:     clamp(1.1012rem, 3.9641vw, 1.7618rem);
    margin-bottom: 1.8rem;
    max-width:     100%;
  }

  .caption,
  .caption-dark {
    /* 64% of the mobile .quote rule (clamp(1.26rem, 4.8vw, 2.16rem)) —
       same consistent-ratio reasoning as the base rule above. */
    font-size:      clamp(0.8064rem, 3.072vw, 1.3824rem);
    letter-spacing: 0;
  }

  .media-block { max-width: 90%; max-height: 50svh; }
  .media-inset { width: 88%; max-height: 38svh; margin-bottom: 2rem; }

  .content-two-col {
    grid-template-columns: 1fr;
    gap:        1.5rem;
    /* Top padding is the photo's height, so the content box is the
       space beneath it; align-content centres the text in that space.
       min-height (not height) lets a tall text block grow downward
       rather than ride up over the photo on small screens. */
    padding:    50svh calc(1.6rem + 6vw) 1.6rem;
    min-height: 100svh;
    box-sizing: border-box;
    align-content: center;
    width:      100%;
    margin-top: 0;
  }

  .content-two-col .col-text {
    height:     auto;
    max-height: none;
    overflow:   visible;
    text-align: center;
  }

  .content-two-col .col-text .body-text--col {
    font-size:     clamp(1.0130rem, 3.5237vw, 1.5857rem) !important;
    margin-bottom: 1rem !important;
    max-width:     100% !important;
    margin-left:   0 !important;
    margin-right:  0 !important;
  }

  .two-col-section { flex-direction: column; justify-content: flex-start; }
  .two-col-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50svh;
  }

  .carousel-section--inset .carousel-slide {
    padding: 5svh 0;
  }

  .carousel-section--inset .media-inset {
    width:         calc(55% * var(--logo-scale, 1));
    max-height:    28svh;
    margin-bottom: 1.5rem;
  }

  .quote,
  .quote-dark    { font-size: clamp(0.9250rem, 3.5237vw, 1.5857rem); }
  .carousel-dots { bottom: 1.5rem; }

  .ticker-section-inner { gap: 0.8rem; }
  .ticker-track img     { height: 72px; }

  .signup-form  { flex-direction: column; }
  /* signup-btn didn't have its own mobile font-size override, so it
     stayed at the small desktop-scale size while signup-input grew
     via its own steeper mobile clamp() below — the button text ended
     up visibly smaller than the "your@email.com" field. Matched. */
  .signup-btn   { width: 100%; justify-content: flex-start; padding-left: 1.2rem; height: 3.04rem; font-size: clamp(0.8809rem, 3.3034vw, 1.3214rem); }
  .signup-input { height: 3.04rem !important; min-height: 3.04rem; padding-top: 0; padding-bottom: 0; font-size: clamp(0.8809rem, 3.3034vw, 1.3214rem); box-sizing: border-box; }
  .signup-text  { margin-bottom: 1.5rem; }

  .video-grid {
    flex-direction: column;
    gap: 1.2rem;
  }

  /* Same single-width-expression pattern as the base rule above —
     see its comment for why every other approach tried here broke
     the ratio in some case. */
  .video-facade {
    width: min(100%, calc(26svh * 16 / 9));
    aspect-ratio: 16 / 9;
  }

  /* No mobile-specific .video-play size anymore — the base rule's
     88px hit-area already matches the (now much bigger) icon at
     every breakpoint, so a separate smaller override here would just
     make the tap target smaller than the visible arrow. */

}


/* ═══════════════════════════════════════════════════════
   PHONE BLUE — up to 700px
   Phones only (the widest is ~440px; the smallest iPad is 744px).
   The brand blue (0,35,255) is only ~2.3:1 on the near-black hero and
   reads much weaker on a phone than on a desktop display, so lift it
   here (~3:1, the large-text minimum). !important beats the inline
   --text on the hero. Tablets and desktop keep the original blue.
═══════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .section[data-large-arrow] { --text: rgb(0, 80, 255) !important; }
  .arrow-down,
  .arrow-up        { color: rgba(0, 80, 255, 0.9); }
  /* "Let's talk" call to action on the contact slide. */
  .cta-link { color: rgb(0, 80, 255); }
}


/* ═══════════════════════════════════════════════════════
   TABLET PORTRAIT — 769px to 1024px
═══════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {

  :root { --nav-h: clamp(51.6px, 5.4vw, 62.4px); }

  .content-two-col {
    width: 85%;
    gap:   3rem;
  }

  /* No tablet-specific .body-text font-size here anymore — it was a
     third, mismatched tier (conflicting with both the mobile and
     desktop formulas at the 769px/1024px boundaries, one of them
     shrinking the text below its own mobile size). The base rule's
     continuous clamp() now covers this range cleanly. */
  .ticker-track img { height: 100px; }

  /* No tablet-specific .content padding here anymore either — 24vw
     was double the base rule's 12vw rate with no shared cap, so inner
     text width jumped ~50% right at the 1024px/1025px boundary
     (532px → 779px, measured). The base rule (now capped at 1300px's
     equivalent) covers 769px+ as one continuous curve instead. */
  .carousel-section--inset .carousel-slide { padding: 6svh 0; }
}


/* ═══════════════════════════════════════════════════════
   LANDSCAPE PHONE — height < 500px
═══════════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 500px) {

  :root { --nav-h: clamp(36px, 8vh, 56px); }

  .logo {
    top:  max(0.5rem, env(safe-area-inset-top, 0px) + 0.4rem);
    left: max(0.8rem, env(safe-area-inset-left, 0px) + 0.6rem);
  }

  .mail-link {
    top:   max(0.5rem, env(safe-area-inset-top, 0px) + 0.4rem);
    right: calc(max(0.8rem, env(safe-area-inset-right, 0px) + 0.6rem) + var(--nav-h) * 2.8586);
  }

  .linkedin-link {
    top:   max(0.5rem, env(safe-area-inset-top, 0px) + 0.4rem);
    right: calc(max(0.8rem, env(safe-area-inset-right, 0px) + 0.6rem) + var(--nav-h) * 2.0786);
  }

  .info-link {
    top:   max(0.5rem, env(safe-area-inset-top, 0px) + 0.4rem);
    right: calc(max(0.8rem, env(safe-area-inset-right, 0px) + 0.6rem) + var(--nav-h) * 0.0203);
  }

  .arrow-down,
  .arrow-up {
    bottom: max(0.8rem, env(safe-area-inset-bottom, 0px) + 0.5rem);
  }

  .section {
    margin-left:   calc(-1 * env(safe-area-inset-left, 0px));
    width:         calc(100vw + env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px));
    padding-left:  env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    box-sizing:    border-box;
  }

  .content { padding: 3rem 2rem 2.5rem; margin-top: 0; }

  /* Scaled x 19/22 for the Domine trial — see the base h1 rule for why. */
  h1          { font-size: clamp(1.5783rem, 4.9561vh, 2.5693rem); }
  h2          { font-size: clamp(1.3948rem, 4.4045vh, 2.2023rem); }
  .body-text  { font-size: clamp(0.9910rem, 3.1566vh, 1.4682rem); margin-bottom: 1rem; max-width: 48ch; }
  .quote,
  .quote-dark { font-size: clamp(0.9910rem, 3.4502vh, 1.4682rem); max-width: 48ch; }
  .caption,
  .caption-dark {
    /* 64% of this block's own .quote rule (clamp(1.35rem, 4.7vh, 2rem)). */
    font-size: clamp(0.864rem, 3.008vh, 1.28rem);
  }

  .media-inset { max-height: 45svh; margin-bottom: 1rem; }
  .media-block { max-height: 42svh; }

  .content-two-col {
    grid-template-columns: 1fr 1fr;
    gap:        2rem;
    padding:    3rem 2rem;
    width:      90%;
    margin-top: 0;
  }

  .content-two-col .col-text {
    max-height: 55svh;
    overflow:   hidden;
  }

  .content-two-col .col-text .body-text--col { font-size: clamp(0.8809rem, 2.7895vh, 1.2847rem) !important; }

  .carousel-section--inset .carousel-slide { padding: 3svh 8vw; }
  .carousel-section--inset .media-inset    { width: calc(22% * var(--logo-scale, 1)); max-height: 38svh; }

  .ticker-track img { height: 50px; }

  .signup-form { flex-direction: row; }
  .signup-btn  { width: auto; }
  .signup-text { margin-bottom: 1rem; }
}
