/* ==========================================================================
   Robin Hale — main stylesheet
   Desktop values come from the 1728px Figma artboard. They are expressed in
   --u (one Figma pixel, scaled to the container width and capped at 1728px),
   in rem for UI parts that should not shrink, and clamp() for readable type.
   ========================================================================== */


/* --- Tokens ------------------------------------------------------------- */
/* Work Sans (variable 100–900), self-hosted */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/work-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/work-sans-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

:root {
  /* Colours (Figma) */
  --c-bg: #56261a;
  --c-accent: #f18126;
  --c-cream: #f6e7dc;
  --c-placeholder: #351710;
  --c-wall: #c6b7af;
  --c-reel-overlay: rgb(64 27 18 / 0.55);
  --c-divider-soft: rgb(86 38 26 / 0.25);
  --c-row-hover: rgb(86 38 26 / 0.1);
  --c-shadow: rgb(26 10 5 / 0.35);

  /* Type */
  --font: 'Work Sans', system-ui, sans-serif;
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;

  /* Layout */
  --max: 108rem; /* 1728px */
  --cols: 12;

  /* Radii */
  --r-pill: 999px;
  --r-dropdown: 2rem;
  --r-row: 1.25rem;

  /* Motion (set from js/motion.config.js at start-up; these are fallbacks) */
  --ease-grow: cubic-bezier(0.34, 2.27, 0.64, 1);
  --ease-fill: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-press: cubic-bezier(0.4, 0, 0.2, 1);
  --t-grow: 0.425s;
  --t-grow-delay: 0.05s;
  --t-fill: 0.45s;
  --t-press: 0.15s;
  --btn-hover-scale: 1.065 1.095;
  --btn-press-scale: 0.955 0.925;

  /* z-index scale */
  --z-page: 1;
  --z-hero: 2;
  --z-dropdown: 20;
  --z-curtain: 100;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--c-accent);
}
body {
  min-height: 100vh;
  font-family: var(--font);
  font-weight: var(--w-regular);
  color: var(--c-accent);
  background: var(--c-accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--c-cream); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 1rem; top: 1rem;
  z-index: calc(var(--z-curtain) + 1);
  padding: 0.75rem 1rem;
  border-radius: var(--r-pill);
  background: var(--c-cream);
  color: var(--c-bg);
  font-weight: var(--w-semibold);
  translate: 0 -200%;
}
.skip-link:focus-visible { translate: 0 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
}
.icon--22 { width: 1.375rem; height: 1.375rem; }
.icon--28 { width: 1.75rem; height: 1.75rem; }
.icon--30 { width: 1.875rem; height: 1.875rem; }

/* --- Site + units ------------------------------------------------------- */
.site {
  container-type: inline-size;
  container-name: site;
}

/* One Figma pixel. Resolved inside .site, so the scrollbar never causes overflow. */
.site * {
  --u: calc(min(100cqi, var(--max)) / 1728);
}

.page, .footer {
  /* Desktop defaults */
  --margin: calc(80 * var(--u));
  --gutter: calc(12 * var(--u));
  --fs-xs: clamp(0.75rem, 15 * var(--u), 0.9375rem);
  --fs-nav: clamp(0.875rem, 18 * var(--u), 1.125rem);
  --fs-copy: clamp(1.375rem, 32 * var(--u), 2rem);
  --fs-hero-s: calc(82.868 * var(--u));
  --fs-display: calc(160 * var(--u));
  --fs-wordmark: calc(288 * var(--u));
  --lh-display: 0.8; /* 128px rhythm of stacked display lines */
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* --- Page + reveal footer ---------------------------------------------- */
.page {
  position: relative;
  z-index: var(--z-page);
  background: var(--c-bg);
}

.footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  background: var(--c-accent);
  color: var(--c-bg);
  overflow: clip; /* letters waiting below must not extend the page */
}
/* Taller than the viewport: scroll normally */
.footer.is-static { position: relative; }

/* --- Shared type ------------------------------------------------------- */
.label-xs,
.section__label,
.section__meta,
.header__intro,
.work__intro,
.reel__caption,
.contact__text,
.weather__eyebrow,
.project__caption {
  font-size: var(--fs-xs);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-medium);
}

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.07em;
  text-transform: uppercase;
  font-weight: var(--w-regular);
  white-space: nowrap;
}
.display__line {
  display: block;
  width: fit-content;
  /* Clip only the bottom, so letters rise out of the baseline */
  clip-path: inset(-0.3em -0.3em 0 -0.3em);
  padding-bottom: 0.02em;
}
.display__line .char { display: inline-block; will-change: transform; }

/* Divider at the top of each section */
.section::before {
  content: '';
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  height: 1px;
  background: var(--c-accent);
}
.section__bar {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: calc(24 * var(--u));
}
.section__label { font-weight: var(--w-semibold); }

/* Stack layout: children share one grid row and are placed with margins,
   which keeps the manual Figma composition without absolute positioning. */
.stack > * { grid-row: 1; align-self: start; }

/* --- Header ------------------------------------------------------------- */
.header {
  padding-top: calc(54 * var(--u));
  min-height: calc(164 * var(--u));
  row-gap: 1.5rem;
  align-items: start;
  position: relative;
}
.header::after {
  content: '';
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: 0;
  height: 1px;
  background: var(--c-accent);
}
.header__logo,
.header__nav {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-nav);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-semibold);
  margin-top: calc(2 * var(--u));
}
.header__logo { grid-column: 1 / span 2; justify-self: start; }
.header__intro {
  grid-column: 5 / span 4;
  margin-left: calc(24 * var(--u));
  max-width: calc(382 * var(--u));
  min-width: 17rem;
}
.header__nav { grid-column: 11 / -1; justify-self: end; align-items: flex-start; }
.footer a:not(.roll-link) { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.3s var(--ease-fill); }
@media (hover: hover) and (pointer: fine) {
  .footer a:not(.roll-link):hover { background-size: 100% 1px; }
}
/* Header nav: same text roll as the button labels (text-shadow copy rolls in from below) */
.roll-link__label { display: block; overflow: clip; overflow-clip-margin: 0.05em; }
.roll-link__text {
  display: inline-block;
  text-shadow: 0 1.3em currentColor;
  transition: translate var(--t-fill) var(--ease-fill);
}
.roll-link:focus-visible .roll-link__text { translate: 0 -1.3em; }
@media (hover: hover) and (pointer: fine) {
  .roll-link:hover .roll-link__text { translate: 0 -1.3em; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: var(--z-hero);
  padding-bottom: calc(116 * var(--u));
}
.hero > * { grid-row: 1; align-self: start; }

.hero__title {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  position: relative;
  z-index: 2;
  pointer-events: none;
  font-weight: var(--w-regular);
  text-transform: uppercase;
}
.hero__title > * { grid-row: 1; align-self: start; pointer-events: auto; }

.hero__small {
  grid-column: 1 / span 5;
  margin-top: calc(83 * var(--u));
  font-size: var(--fs-hero-s);
  line-height: 0.86;
  letter-spacing: -0.07em;
}
.hero__big {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.07em;
  white-space: nowrap;
}
.hero__big--1 { grid-column: 5 / -1; margin-top: calc(373 * var(--u)); }
.hero__big--2 { grid-column: 7 / -1; margin-top: calc(501 * var(--u)); margin-left: calc(-24 * var(--u)); }

/* Line masks for the page-load rise */
.mask {
  display: block;
  width: fit-content;
  overflow: clip;
  overflow-clip-margin: 0.08em;
  padding-inline: 0.04em;
  margin-inline: -0.04em;
}
.mask__line { display: block; }

/* Portrait frame with Robin */
.portrait {
  grid-column: 9 / -1;
  justify-self: end;
  width: calc(450 * var(--u));
  margin-top: calc(90 * var(--u));
  position: relative;
  z-index: 1;
}
.robin {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--c-wall);
  isolation: isolate;
}
.robin__layer,
.robin__still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
}
.robin__still { pointer-events: none; }
.robin.is-reduced .robin__layer { display: none; }

/* Weather block */
.weather {
  grid-column: 1 / span 5;
  margin-top: calc(620 * var(--u));
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.weather__eyebrow { margin-bottom: 0.625rem; }
.weather__copy {
  width: min(calc(383 * var(--u)), 100%);
  min-width: min(17rem, 100%);
  font-size: var(--fs-copy);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5625rem;
}
.weather__switch { position: relative; }
.weather__caption {
  margin-top: 1.5625rem;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-medium);
  opacity: 0.5;
}

/* Text swap (roll up / roll in). All copies share one grid cell;
   ghost copies reserve the tallest height so nothing below moves. */
.swap {
  display: grid;
  overflow: clip;
  overflow-clip-margin: 0.05em;
}
.swap > * { grid-area: 1 / 1; }
.swap__ghost { visibility: hidden; pointer-events: none; }
.swap__text { display: block; white-space: inherit; }
.swap__word {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 0.08em;
  vertical-align: top;
}
.swap__word-inner { display: inline-block; }

/* --- Buttons (pill) ----------------------------------------------------- */
.btn {
  --btn-bg: var(--c-accent);
  --btn-bg-hover: var(--c-cream);
  --btn-fg: var(--c-bg);
  --btn-fg-hover: var(--c-bg);
  --btn-ring: var(--c-cream);
  position: relative;
  display: inline-grid;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--btn-fg);
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  line-height: 1;
}
.btn::after {
  content: '';
  position: absolute;
  inset: -0.25rem;
  border-radius: var(--r-pill);
  pointer-events: none;
  z-index: 2;
  transition: box-shadow 0.3s var(--ease-fill), scale var(--t-grow) var(--ease-grow);
}
.btn:focus-visible::after {
  box-shadow: 0 0 0 2px var(--btn-ring);
  scale: var(--btn-hover-scale);
  transition: box-shadow 0.3s var(--ease-fill), scale var(--t-grow) var(--t-grow-delay) var(--ease-grow);
}
.btn__bg-wrap {
  grid-area: 1 / 1;
  display: grid;
  border-radius: var(--r-pill);
  overflow: clip;
  pointer-events: none;
  transition: scale var(--t-grow) var(--ease-grow), transform var(--t-press) var(--ease-press);
}
.btn__bg,
.btn__bg-hover { grid-area: 1 / 1; border-radius: var(--r-pill); }
.btn__bg {
  background: var(--btn-bg);
  place-self: center;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
}
.btn__bg-hover {
  z-index: 1;
  background: var(--btn-bg-hover);
  border-radius: 50% 50% 0 0;
  translate: 0 101%;
  transition: translate var(--t-fill) var(--ease-fill), border-radius var(--t-fill) var(--ease-fill);
}
.btn__inner {
  grid-area: 1 / 1;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.btn__label { display: block; overflow: clip; }
.btn__roll {
  display: inline-block;
  white-space: nowrap;
  text-shadow: 0 1.3em var(--btn-fg-hover);
  transition: translate var(--t-fill) var(--ease-fill);
}
.btn:active .btn__bg-wrap { transform: scale(var(--btn-press-scale)); }

/* Hover (fine pointers) and keyboard focus share one state;
   an open dropdown keeps the weather pill in its hover look (Figma). */
.btn:focus-visible .btn__bg-wrap,
.weather-pill[aria-expanded='true'] .btn__bg-wrap {
  scale: var(--btn-hover-scale);
  transition: scale var(--t-grow) var(--t-grow-delay) var(--ease-grow), transform var(--t-press) var(--ease-press);
}
.btn:focus-visible .btn__bg-hover,
.weather-pill[aria-expanded='true'] .btn__bg-hover {
  translate: 0 0;
  border-radius: 0;
  transition-delay: var(--t-grow-delay);
}
.btn:focus-visible .btn__roll {
  translate: 0 -1.3em;
  transition: translate var(--t-fill) var(--t-grow-delay) var(--ease-fill);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn__bg-wrap {
    scale: var(--btn-hover-scale);
    transition: scale var(--t-grow) var(--t-grow-delay) var(--ease-grow), transform var(--t-press) var(--ease-press);
  }
  .btn:hover .btn__bg-hover {
    translate: 0 0;
    border-radius: 0;
    transition-delay: var(--t-grow-delay);
  }
  .btn:hover .btn__roll {
    translate: 0 -1.3em;
    transition: translate var(--t-fill) var(--t-grow-delay) var(--ease-fill);
  }
}

/* CTA: "Start a project →" */
.btn--cta .btn__inner {
  padding: 1.5rem 1.6875rem;
  min-width: 15.375rem;
  font-size: 1.125rem;
  line-height: 0.875rem;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-semibold);
}
.btn--cta .btn__label { padding-block: 0.1em; margin-block: -0.1em; }

/* Play button (circle pill) */
.btn--play {
  width: clamp(4.5rem, 160 * var(--u), 10rem);
  aspect-ratio: 1;
}
.btn--play .btn__inner { padding-left: 6%; }
.btn__play-icon {
  width: 27.5%;
  height: auto;
  fill: currentColor;
}

/* Weather pill */
.weather-pill .btn__inner {
  gap: 1rem;
  padding: 1.125rem 1.625rem 1.125rem 1.375rem;
  justify-content: flex-start;
  text-align: left;
}
.weather-pill__icon {
  display: grid;
  width: 1.875rem;
  height: 1.875rem;
  flex: none;
}
.weather-pill__icon > * { grid-area: 1 / 1; }
.weather-pill__lines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  white-space: nowrap;
}
.weather-pill__line1 {
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-medium);
}
.weather-pill__line2 {
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.04em;
  opacity: 0.85;
}
.weather-pill__chevron { display: grid; flex: none; }

/* --- Weather dropdown -------------------------------------------------- */
.dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  z-index: var(--z-dropdown);
  width: 28.75rem;
  max-width: calc(100cqi - 2 * var(--margin));
}
/* Shadow on its own layer behind the panel: it unfolds with the panel
   (scaleY from the top) and fades in and out, so nothing is cut off. */
.dropdown__shadow {
  position: absolute;
  inset: 0;
  border-radius: var(--r-dropdown);
  box-shadow: 0 1.5rem 3rem var(--c-shadow);
  transform-origin: 50% 0;
  pointer-events: none;
}
.dropdown__panel { position: relative; }
.dropdown[hidden] { display: none; }
.dropdown__panel {
  background: var(--c-accent);
  color: var(--c-bg);
  border-radius: var(--r-dropdown);
  padding: 1.25rem;
}
.dropdown__list { outline: none; }
.dropdown__heading {
  padding: 0.375rem 0.375rem 0.625rem;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: var(--w-semibold);
  opacity: 0.85;
}
.dropdown__divider {
  height: 1px;
  margin: 0.625rem 0.25rem;
  background: var(--c-divider-soft);
}
.dropdown__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--r-row);
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s var(--ease-fill);
}
.dropdown__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.dropdown__title {
  font-size: 1.0625rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: var(--w-medium);
}
.dropdown__sub {
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.04em;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown__check { display: none; color: var(--c-accent); }
.dropdown__badge {
  display: none;
  flex: none;
  padding: 0.375rem 0.625rem;
  border: 1.2px solid currentColor;
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: var(--w-semibold);
}
/* No-consent state from Figma (not wired yet) */
[data-consent='false'] .dropdown__badge { display: inline-block; }

@media (hover: hover) and (pointer: fine) {
  .dropdown__row:hover { background: var(--c-row-hover); }
}
.dropdown__list:focus-visible .dropdown__row.is-active {
  box-shadow: inset 0 0 0 2px var(--c-bg);
}
.dropdown__row[aria-selected='true'] { background: var(--c-bg); }
.dropdown__row[aria-selected='true'] .dropdown__title,
.dropdown__row[aria-selected='true'] .dropdown__icon { color: var(--c-cream); }
.dropdown__row[aria-selected='true'] .dropdown__sub { color: var(--c-accent); opacity: 1; }
.dropdown__row[aria-selected='true'] .dropdown__check { display: block; }
.dropdown__list:focus-visible .dropdown__row[aria-selected='true'].is-active {
  box-shadow: inset 0 0 0 2px var(--c-cream);
}

/* --- Selected work ------------------------------------------------------ */
.work { padding-bottom: calc(164 * var(--u)); }
.work > * { grid-row: 1; align-self: start; }
.work__title { grid-column: 1 / -1; margin-top: calc(109 * var(--u)); }
.work__title-2 { margin-left: calc(340 * var(--u)); }
.work__intro {
  grid-column: 10 / -1;
  margin-left: calc(75 * var(--u));
  max-width: calc(274 * var(--u));
  min-width: 13rem;
  margin-top: calc(120 * var(--u));
  justify-self: start;
}

.project { margin-top: calc(480 * var(--u)); }
.project--1 { grid-column: 1 / span 6; width: calc(620 * var(--u)); }
.project--2 { grid-column: 6 / span 5; width: calc(440 * var(--u)); margin-left: calc(82 * var(--u)); }
.project--3 { grid-column: 10 / -1; width: calc(308 * var(--u)); margin-left: calc(75 * var(--u)); margin-top: calc(781 * var(--u)); }
.project__media { background: var(--c-placeholder); }
.project--1 .project__media { aspect-ratio: 620 / 820; }
.project--2 .project__media { aspect-ratio: 440 / 560; }
.project--3 .project__media { aspect-ratio: 308 / 400; }
.project__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  min-height: 1.25rem;
  white-space: nowrap;
}
.project .project__caption {
  display: block;
  clip-path: inset(-0.4em -1em 0 -1em);
}
.project__caption-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.project__title { display: flex; gap: 1rem; }
.project__name { font-weight: var(--w-semibold); }
.project__tags { opacity: 0.6; }

/* --- Showreel ----------------------------------------------------------- */
.reel { padding-bottom: calc(124 * var(--u)); }
.reel > * { grid-column: 1 / -1; }
.reel .section__bar { grid-row: auto; }
.reel__frame {
  position: relative;
  margin-top: calc(61 * var(--u));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-placeholder);
}
.reel__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel__cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  container-type: inline-size;
}
.reel__cover.is-hidden { visibility: hidden; }
.reel__poster,
.reel__cover::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel__cover::after { content: ''; background: var(--c-reel-overlay); }
.reel__word {
  position: absolute;
  z-index: 1;
  top: 78.23%; /* 690 / 882 */
  font-size: calc(160 / 1568 * 100cqi);
  line-height: 0.9125;
  pointer-events: none;
}
.reel__word span { display: block; clip-path: inset(-0.3em -0.3em 0 -0.3em); }
.reel__word .char { display: inline-block; will-change: transform; }
.reel__word--1 { left: 3.89%; } /* 61 / 1568 */
.reel__word--2 { right: 4.6%; }
.reel__cover .btn--play { z-index: 2; }
/* Blocked third-party embed (Figma "Showreel – blocked"), used for the reel and the brief */
.consent-block {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.0625rem;
  padding: 2rem;
  background: #260f0a;
  color: var(--c-accent);
  text-align: center;
}
.consent-block[hidden] { display: none; }
.consent-block__title {
  font-size: 2rem;
  line-height: 0.96;
  text-transform: uppercase;
}
.consent-block__text,
.consent-block__link,
.btn--consent .btn__inner {
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.consent-block__text { max-width: 36rem; font-weight: var(--w-medium); }
.consent-block__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
}
/* Site pill button (same hover fill, text roll and press as the CTA) */
.btn--consent .btn__inner { padding: 0.8125rem 1.375rem; font-weight: var(--w-semibold); }
.btn--consent .btn__label { padding-block: 0.1em; margin-block: -0.1em; }
.consent-block__link { padding-block: 0.25rem; color: var(--c-accent); font-weight: var(--w-medium); }
.booking__frame--form .consent-block { position: absolute; }
.booking__form[hidden] { display: none; }
.reel__cover[hidden] { display: none; }

.reel__caption {
  margin-top: calc(24 * var(--u));
  max-width: calc(380 * var(--u));
  min-width: min(17rem, 100%);
  line-height: 1;
}

/* --- Contact ----------------------------------------------------------- */
.contact { padding-bottom: calc(120 * var(--u)); }
.contact > * { grid-row: 1; align-self: start; }
.contact__title { grid-column: 1 / -1; margin-top: calc(119 * var(--u)); }
.contact__title-2 { margin-left: calc(265 * var(--u)); }
.contact__body {
  grid-column: 1 / span 5;
  margin-top: calc(580 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(32 * var(--u));
}
.contact__text { max-width: calc(382 * var(--u)); min-width: min(17rem, 100%); }
.booking { grid-column: 7 / -1; margin-top: calc(580 * var(--u)); }
.booking__frame {
  position: relative;
  aspect-ratio: 778 / 560;
  overflow: clip;
  background: var(--c-placeholder);
}
/* Typeform: the embed script fills the div with an iframe */
.booking .booking__frame--form { aspect-ratio: auto; height: max(calc(560 * var(--u)), 32rem); padding: 0.8rem; }
.booking__form, .booking__form iframe { width: 100%; height: 100%; border: 0; }
.booking__form iframe { border-radius: 0.375rem; }

/* --- Footer ------------------------------------------------------------- */
.footer__inner { padding-top: calc(64 * var(--u)); padding-bottom: calc(43 * var(--u)); }
.footer__cols {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: var(--fs-xs);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.footer__col { display: flex; flex-direction: column; gap: 1rem; }
.footer__head { font-weight: var(--w-medium); opacity: 0.6; }
.footer__col ul { font-weight: var(--w-semibold); }
.footer__col li { line-height: 1; }
.footer__wordmark {
  clip-path: inset(-50% -10% 0 -10%);
  margin-top: calc(42 * var(--u));
  margin-left: calc(-30 * var(--u));
  font-size: var(--fs-wordmark);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Curtain ----------------------------------------------------------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: var(--z-curtain);
  background: var(--c-accent);
  pointer-events: none;
  /* Fallback if scripts never run */
  animation: curtain-fallback 0.6s ease 8s forwards;
}
.curtain.is-done { display: none; }
.has-intro .curtain { animation: none; }
@keyframes curtain-fallback { to { opacity: 0; visibility: hidden; } }

/* ==========================================================================
   Tablet portrait and below: 4 columns
   ========================================================================== */
@media (max-width: 991px) {
  .page, .footer {
    --cols: 4;
    --margin: 2.5rem;
    --gutter: 0.75rem;
    --content: calc(min(100cqi, var(--max)) - 2 * var(--margin));
    --fs-xs: 0.8125rem;
    --fs-nav: 1rem;
    --fs-copy: 1.75rem;
    --fs-display: calc(var(--content) / 5.6);
    --fs-hero-s: calc(var(--content) / 7.2);
    --fs-wordmark: calc(var(--content) / 5.7);
  }

  /* Header */
  .header { padding-top: 2rem; padding-bottom: 2rem; min-height: 0; }
  .header__logo { grid-column: 1 / span 2; }
  .header__nav { grid-column: 3 / -1; }
  .header__intro { grid-column: 1 / span 3; grid-row: 2; margin-left: 0; max-width: 26rem; }

  /* Hero */
  .hero { padding-top: 3rem; padding-bottom: 5rem; }
  .hero > * { grid-row: auto; }
  .hero__title { grid-row: 1; }
  .hero__small { grid-column: 1 / -1; margin-top: 0; }
  .hero__big--1 { grid-column: 1 / -1; margin-top: calc(var(--fs-hero-s) * 2.58 + var(--fs-display) * 0.35); margin-left: 12%; }
  .hero__big--2 { grid-column: 1 / -1; margin-top: calc(var(--fs-hero-s) * 2.58 + var(--fs-display) * 1.15); margin-left: 32%; }
  .portrait {
    grid-column: 3 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
    margin-top: calc(var(--fs-display) * -0.55);
  }
  .weather {
    grid-column: 1 / span 2;
    grid-row: 2;
    margin-top: calc(var(--fs-display) * 0.9);
    align-self: start;
  }
  .weather__copy { width: 100%; min-width: 0; }

  /* Work */
  .work { padding-bottom: 6rem; }
  .work > * { grid-row: auto; }
  .work::before, .work .section__bar { grid-row: 1; }
  .work__title { grid-row: 2; margin-top: 3.5rem; }
  .work__title-2 { margin-left: 22%; }
  .work__intro { grid-row: 3; grid-column: 1 / span 3; margin: 2rem 0 0; max-width: 22rem; }
  .project { width: auto; margin-left: 0; margin-top: 3.5rem; }
  .project--1 { grid-row: 4; grid-column: 1 / span 3; }
  .project--2 { grid-row: 5; grid-column: 2 / -1; }
  .project--3 { grid-row: 6; grid-column: 1 / span 2; margin-top: 3.5rem; }

  /* Reel */
  .reel { padding-bottom: 6rem; }
  .reel__frame { margin-top: 2.5rem; }
  .reel__caption { margin-top: 1.25rem; max-width: 24rem; }

  /* Contact */
  .contact { padding-bottom: 6rem; }
  .contact > * { grid-row: auto; }
  .contact::before, .contact .section__bar { grid-row: 1; }
  .contact__title { grid-row: 2; margin-top: 3.5rem; font-size: calc(var(--content) / 6.8); }
  .contact__title-2 { margin-left: 14%; }
  .contact__body { grid-row: 3; grid-column: 1 / span 3; margin-top: 2.5rem; gap: 2rem; }
  .contact__text { max-width: 24rem; }
  .booking { grid-row: 4; grid-column: 1 / -1; margin-top: 3.5rem; }

  /* Footer */
  .footer__inner { padding-top: 3rem; padding-bottom: 1.75rem; }
  .footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .footer__wordmark { margin-top: 3rem; margin-left: -0.035em; }
}

/* Mobile landscape */
@media (max-width: 767px) {
  .page, .footer {
    --margin: 1.5rem;
    --fs-copy: 1.5rem;
  }
  .header__intro { grid-column: 1 / -1; }
  .portrait { margin-top: calc(var(--fs-display) * -0.45); }
}

/* Mobile portrait */
@media (max-width: 479px) {
  .page, .footer {
    --margin: 1rem;
    --fs-xs: 0.75rem;
    --fs-copy: 1.5rem;
    --fs-display: calc(var(--content) / 5.45);
    --fs-hero-s: calc(var(--content) / 6.6);
  }
  .header { padding-top: 1.5rem; padding-bottom: 1.5rem; row-gap: 1.25rem; }
  .header__nav { flex-direction: row; gap: 1rem; }
  .header__intro { max-width: none; min-width: 0; }

  .hero { padding-top: 2.25rem; padding-bottom: 4rem; }
  .hero__big--1 { margin-left: 0; }
  .hero__big--2 { margin-left: 24%; }
  .portrait { grid-column: 1 / -1; width: 100%; margin-top: calc(var(--fs-display) * -0.4); }
  .robin { aspect-ratio: 4 / 5; }
  .weather { grid-column: 1 / -1; grid-row: 3; margin-top: 2.25rem; }
  .dropdown { width: calc(100cqi - 2 * var(--margin)); }

  .work__intro, .contact__body { grid-column: 1 / -1; }
  .project--1 { grid-column: 1 / -1; }
  .project--2 { grid-column: 2 / -1; }
  .project--3 { grid-column: 1 / span 3; }
  .project__caption,
  .project__caption-line { white-space: normal; }

  .btn--cta .btn__inner { min-width: 0; padding: 1.25rem 1.5rem; }

  .footer__cols { row-gap: 2rem; }
}

/* --- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn__bg-wrap,
  .btn__bg-hover,
  .btn__roll,
  .btn::after { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .btn:is(:hover, :focus-visible) .btn__bg-wrap { scale: none; }
  .btn:is(:hover, :focus-visible) .btn__roll { translate: none; }
  .btn:active .btn__bg-wrap { transform: none; }
  .roll-link__text { transition: none !important; }
}

/* Short landscape screens: keep the portrait inside the viewport */
@media (max-width: 991px) and (orientation: landscape) and (max-height: 560px) {
  .portrait { max-width: calc(80svh * 0.75); justify-self: end; }
}
