/* ==========================================================================
   45giristudio — stylesheet

   1  Tokens          7  Visuals (project tiles)
   7b Tools / Software
   2  Base            8  About
   3  Header          9  Manifesto
   4  Hero           10  Contact (reveal panel + “?” button)
   5  Section head   11  Footer
   6  Work grid      12  Project modal
                     13  Reduced motion

   Approach: small-screen styles first, then one `min-width: 801px` block per
   component for the desktop layout. 801px is the old 800px breakpoint, so the
   desktop view is unchanged. Big type is sized from its container (cqw units)
   so it can never overflow, whatever the screen.
   ========================================================================== */


/* 0 — Fonts ----------------------------------------------------------------- */
/* Self-hosted so no third-party connection stands between the page and its first text.
   Inter is a variable font: one file covers every weight from 400 to 900. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/inter-var.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dm-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/dm-mono-500.woff2") format("woff2");
}


/* 1 — Tokens ---------------------------------------------------------------- */

:root {
  color-scheme: dark;

  --bg: #0a0a09;
  --fg: #f0eee8;
  --fg-soft: #c6c4bd;
  --muted: #85847e;
  --muted-dim: #7d7b75;           /* ≥ 4.5:1 on --bg, used for the quietest text */
  --line: #282824;
  --acid: #d7ff35;

  --font-sans: Inter, Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  --gutter: clamp(1rem, 0.4rem + 2.5vw, 1.75rem);   /* 16px phones → 28px desktop */
  --card-radius: clamp(8px, 0.9vw, 14px);           /* softened corners on the work tiles */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}


/* 2 — Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

/* The modal is a <dialog>; stop the page scrolling behind it. */
html:has(.modal[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  overflow-x: clip;               /* safety net only — nothing should overflow */
}

h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }

/* Buttons don't inherit type by default; make them behave like text. */
button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Film grain over the whole page (was an empty <div class="noise">). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

/* Small uppercase mono labels used across the site. */
.site-header__status,
.hero__meta,
.hero__scroll,
.section-head,
.project__info,
.site-footer,
.modal__kicker,
.modal__tech {
  font-family: var(--font-mono);
  text-transform: uppercase;
}


/* 3 — Header ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 74px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: #fff;
  transition: transform 0.35s ease;
}

.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; }      /* never hide it from keyboard users */

.site-header a {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
}

.site-header__logo-mark {
  width: 13px;
  height: 13px;
  border: 1px solid #fff;
  border-radius: 50%;
}

.site-header__nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.site-header__status {
  display: none;                  /* shown from 561px up — it doesn't fit next to the nav on phones */
  margin: 0 0 0 36px;
  font-size: 0.625rem;
}

.site-header__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #fff;
}

@media (min-width: 561px) {
  .site-header__status { display: block; }
}


/* 4 — Hero ------------------------------------------------------------------ */
/* Phones/tablets portrait: a simple vertical stack, so text can never overlap.
   Desktop (≥ 801px): the original free-floating composition. */

.hero {
  --hero-size: 38vw;              /* every size inside the title derives from this */

  /* Background photo and the dark wash over it. The wash is per image, because nebula2 is
     much brighter than nebula1 and the white type needs more cover on it. */
  --hero-bg: url("portfolio/nebula1.webp");
  /* The wash slider writes --hero-wash-user, which then wins over the per-photo default
     below; until it is touched each photograph keeps its own. */
  --hero-wash-base: 0.56;
  --hero-wash: var(--hero-wash-user, var(--hero-wash-base));

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(100vh, 700px);
  min-height: max(100svh, 700px);   /* grows if the content is taller (e.g. a phone held sideways) */
  padding: 100px var(--gutter) 32px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* The photograph and the wash over it are separate layers, because brightness and saturation
   have to reach the image alone — a filter on .hero itself would catch the type as well. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  background: var(--hero-bg) center / cover no-repeat;
  filter: brightness(var(--hero-brightness, 1)) saturate(var(--hero-saturation, 1));
}

.hero::after {
  background: linear-gradient(to bottom,
    rgb(10 10 9 / calc(var(--hero-wash) + 0.16)) 0%,
    rgb(10 10 9 / var(--hero-wash)) 24%,
    rgb(10 10 9 / calc(var(--hero-wash) + 0.05)) 52%,
    rgb(10 10 9 / 0.9) 88%,
    var(--bg) 100%);
}

/* the second image */
.hero:has(.hero__bg-toggle:checked) {
  --hero-bg: url("portfolio/nebula2.webp");
  --hero-wash-base: 0.72;         /* the brighter photograph needs more cover */
}

/* The switcher shows the image you'd get by pressing it, and sits inside the hero, so it
   scrolls away with the first screen. Where supported it also fades as it leaves. */
.hero__bg-switch {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 28px;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #fff;
  border-radius: 50%;
  /* a 160px thumbnail: the swatch is 44px, the full photo is only fetched if chosen */
  background: #15151a url("portfolio/nebula2-thumb.webp") center / cover no-repeat;
  box-shadow: 0 0 0 3px rgb(8 8 8 / 0.7);
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.45s ease, scale 0.18s ease;
}

/* script.js adds .is-gone once the first screen has mostly scrolled past */
.hero__bg-switch.is-gone {
  opacity: 0;
  pointer-events: none;
}

.hero:has(.hero__bg-toggle:checked) .hero__bg-switch {
  background-image: url("portfolio/nebula1.webp");
}

@media (hover: hover) {
  .hero__bg-switch:hover { scale: 1.1; }
}

.hero__bg-toggle:focus-visible + .hero__bg-switch {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.hero__meta,
.hero__title,
.hero__copy,
.hero__scroll {
  position: relative;
  z-index: 1;                     /* above the background photo */
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--fg-soft);          /* was --muted: too dim once a photo sits behind it */
}

.hero__title {
  order: 2;
  margin: calc(var(--hero-size) * 0.5) 0 1.5rem;   /* top margin = room for the mark, which pokes upward */
  font-size: var(--hero-size);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.105em;
  text-align: center;             /* phones: everything centred */
}

.hero__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.08em;
  height: 0.78em;
  margin-inline: auto;
}

.hero__mark img {
  width: 1.02em;
  height: 1.02em;
  object-fit: contain;
  filter: invert(1);              /* black SVG artwork becomes white on the dark hero */
  translate: -0.014em -0.229em;   /* optical nudge, in em so it scales with the title */
}

.hero__giri {
  display: block;
  letter-spacing: -0.037em;
  font-kerning: none;
  white-space: nowrap;
}

.hero__giri-kern { margin-left: 0.018em; }    /* G–I optical spacing */

.hero__studio {
  display: block;
  margin: 0.22em 0 0;
  font-size: 0.31em;
  letter-spacing: -0.05em;
}

.hero__reg {
  margin-left: 0.14em;
  font-size: 0.32em;
  vertical-align: top;
}

.hero__copy {
  order: 1;
  max-width: 22rem;
  margin: auto auto 0;            /* auto top margin shares the free space with .hero__scroll */
  font-size: 0.8125rem;
  text-align: center;
  line-height: 1.55;
  color: var(--fg-soft);
}

.hero__scroll {
  order: 3;
  align-self: center;
  margin-top: auto;               /* with .hero__copy's auto margin, centres copy + title in the free space */
  font-size: 0.625rem;
  color: #fff;
}

.hero__scroll span {
  margin-right: 8px;
  font-size: 1rem;
}

@media (min-width: 801px) {
  /* Sized from the width AND the height: on a wide but short window the title would otherwise
     grow tall enough to run up under the “Independent visual studio” row. */
  .hero { --hero-size: clamp(6.25rem, min(20vw, 32vh), 19.375rem); }

  .hero__title {
    position: absolute;
    left: 2vw;
    bottom: 8vh;
    margin: 0;
    text-align: left;
  }

  /* One vertical signature: 45 centred over GIRI, with STUDIO® tucked in alongside GIRI
     on the same baseline. Phones keep the centred stack above.

     A two-column grid does the centring: the first column is sized by its widest item,
     which is GIRI, so `justify-self: center` puts the 45 exactly over the wordmark with
     no magic numbers — it stays centred if the type size or the artwork ever changes. */
  .hero__title {
    display: grid;
    grid-template-areas:
      "mark   ."
      "giri studio";
    grid-template-columns: max-content max-content;
    justify-content: start;
    align-items: baseline;
  }

  .hero__mark {
    grid-area: mark;
    justify-self: center;         /* centred on GIRI's column */
    margin-inline: 0;
  }

  .hero__giri { grid-area: giri; margin-left: 0; }

  .hero__studio {
    grid-area: studio;
    margin: 0 0 0 0.12em;
    font-size: 0.28em;
  }

  .hero__copy {
    position: absolute;
    right: 5vw;
    top: 50%;                     /* centred on the hero's height, beside the galaxy */
    bottom: auto;
    translate: 0 -50%;
    width: min(360px, 32vw);
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .hero__scroll {
    position: absolute;
    align-self: auto;
    left: var(--gutter);
    bottom: 31px;
  }

}


/* 4b — Hero image controls --------------------------------------------------- */

/* WASH fades the dark gradient over the photograph; BRIGHTNESS and SATURATION filter the
   photograph itself (see .hero::before / ::after above). All three write a custom property,
   so the JS stays three one-line formulas and the look lives entirely here.

   Phones first: the three rows collapse into a shallow panel behind the IMAGE trigger that
   sits in the metadata row. Desktop turns the same markup into a rail in normal flow,
   directly under the metadata — no magic offsets, so it follows the metadata wherever it
   goes. */
.img-ctl {
  position: absolute;
  z-index: 3;                     /* over the photo layers (0) and the hero content (1) */
  top: calc(100px + 1.5rem);      /* hero padding-top, clearing the metadata row */
  left: var(--gutter);
  right: var(--gutter);
  /* One grid for all three rows — the items below go `display: contents`, so every label,
     track and readout shares a column and the three tracks come out the same length.
     Sizing each row on its own would stagger them, because SATURATION is far wider
     than WASH. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 3px;                   /* shallow on purpose: keep the photograph visible */
  padding: 8px 11px 9px;
  background: rgb(10 10 9 / 0.46);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 3px;
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;

  /* collapsed until the trigger is pressed. visibility, not display, so the transition runs
     and the sliders stay out of the tab order while hidden. */
  visibility: hidden;
  opacity: 0;
  translate: 0 -5px;
  transition: opacity 0.2s ease, translate 0.2s ease, visibility 0.2s;
}

.img-ctl.is-open {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
}

.img-ctl__item {
  display: contents;
  margin: 0;
}

/* Reset sits above WASH on phones as a row of its own, and at the far end of the rail on
   desktop, so the WASH label still lines up with the metadata above it. */
.img-ctl__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
  justify-self: start;
  margin-bottom: 3px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--fg-soft);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.img-ctl__reset:hover,
.img-ctl__reset:focus-visible { opacity: 1; }

/* the trigger's glyph is 16x12, this one is square — size it so it is not letterboxed */
.img-ctl__reset .img-ctl__icon { width: 11px; height: 11px; }

.img-ctl__name {
  white-space: nowrap;
  color: var(--fg-soft);
  opacity: 0.74;
}

.img-ctl__val {
  min-width: 2.9em;
  text-align: right;
  color: var(--fg-soft);
  opacity: 0.52;
  font-variant-numeric: tabular-nums;   /* so the row does not twitch while dragging */
}

/* The slider. Appearance is reset on both the track and the thumb, otherwise each engine
   draws its own chrome; WebKit and Firefox need separate pseudo-elements for each. */
.img-ctl__slider {
  appearance: none;
  width: 100%;
  height: 12px;                   /* a comfortable touch target around a hairline track */
  margin: 0;
  background: none;
  cursor: ew-resize;
}

/* The two track pseudo-elements must stay in separate rules: an engine throws away a whole
   rule whose selector list contains one it does not recognise, so grouping them means
   neither browser draws a track at all. The thumb rules below are split for the same reason. */
.img-ctl__slider::-webkit-slider-runnable-track {
  height: 1px;
  background: rgb(255 255 255 / 0.3);
}

.img-ctl__slider::-moz-range-track {
  height: 1px;
  background: rgb(255 255 255 / 0.3);
}

.img-ctl__slider::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  margin-top: -4px;               /* WebKit centres the thumb on the track by hand */
  border: 0;
  border-radius: 50%;
  background: var(--fg-soft);
  transition: scale 0.15s ease, background-color 0.15s ease;
}

.img-ctl__slider::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--fg-soft);
  transition: scale 0.15s ease, background-color 0.15s ease;
}

.img-ctl__slider:hover::-webkit-slider-thumb,
.img-ctl__slider:active::-webkit-slider-thumb { background: #fff; scale: 1.25; }
.img-ctl__slider:hover::-moz-range-thumb,
.img-ctl__slider:active::-moz-range-thumb { background: #fff; scale: 1.25; }

.img-ctl__slider:focus-visible { outline: none; }
.img-ctl__slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.3); }
.img-ctl__slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.3); }

/* The phone trigger, a third item in the metadata row. */
.img-ctl__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
}

.img-ctl__toggle[aria-expanded="true"] { color: #fff; }
.img-ctl__icon { width: 14px; height: 11px; flex: none; }


@media (min-width: 801px) {
  /* The metadata row keeps the studio line at the left, then pushes the year and the trigger
     together against the right gutter — the auto margin eats the free space that
     space-between would otherwise put between them. */
  .hero__meta { gap: 20px; }
  .hero__meta > span + span { margin-left: auto; }

  /* Back into normal flow, so it sits under the metadata row without a measured offset.
     The metadata is the hero's only in-flow child on desktop — the title, copy and scroll
     cue are all absolutely positioned — so nothing else shifts. */
  /* The rail spans the hero gutter to gutter: three equal groups, with reset sized to its
     own content at the end so it never takes a quarter of the width. */
  .img-ctl {
    position: static;
    margin-top: 20px;
    grid-template-columns: repeat(3, 1fr) max-content;
    gap: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }

  /* One grid per group again, so the three sit side by side with a hairline between.
     first-of-type, not first-child: the reset button is the panel's first child now. */
  .img-ctl__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding-inline: clamp(16px, 2.2vw, 30px);
  }
  /* Both of these need an explicit row. The reset button is first in the markup and claims
     column 4; without a row on everything, auto-placement parks the cursor at column 4 and
     wraps the three sliders onto a second row below it. */
  .img-ctl__item { grid-row: 1; }
  .img-ctl__item:first-of-type { padding-left: 0; }
  .img-ctl__item + .img-ctl__item,
  .img-ctl__reset { border-left: 1px solid rgb(255 255 255 / 0.15); }

  .img-ctl__reset {
    grid-area: 1 / 4;              /* the three sliders then fill columns 1–3 of the same row */
    align-self: center;
    margin: 0;
    padding: 0 0 0 clamp(16px, 2.2vw, 30px);
    border-bottom: 0;
  }
}


/* 5 — Section head ---------------------------------------------------------- */

.section-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.section-head--centered {
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-align: center;
}


/* 6 — Work grid ------------------------------------------------------------- */

.work { padding: 25px var(--gutter) 0; }   /* the Tools board follows and nearly touches it */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 22px;
}

.project { cursor: pointer; }

.project__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 13px 0 28px;
  font-size: 0.625rem;
  color: var(--muted);
}

.project__info h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg);
  text-align: right;
}

.project__info > :last-child { display: none; }     /* tech line is on the modal for phones */

/* The Tools board follows the last tile, so its caption keeps only a small gap. */
.project:last-child .project__info { padding-bottom: 8px; }

.project__open {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

@media (min-width: 801px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .project--feature,
  .project--wide { grid-column: 1 / -1; }

  .project__info {
    grid-template-columns: 1fr 1.3fr 1fr;
    padding-bottom: 38px;
  }

  .project__info h2 { text-align: center; }

  .project__info > :last-child {
    display: block;
    text-align: right;
  }
}


/* 7 — Visuals (project tiles) ------------------------------------------------ */
/* Each tile is a size container: type and shapes inside use cqw/cqh so they
   scale with the tile itself, not with the window. */

.visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: #111;
  container-type: size;
  aspect-ratio: 1;                /* square on phones */
  transition: transform 0.7s var(--ease-out);
}

/* Every autoplay tile carries a still underneath its video. If playback never starts — a
   phone with Reduce Motion switched on, a slow connection, a decode that fails — the tile
   shows this frame instead of an empty black box. Without it there is nothing to paint:
   the video sits at readyState 0 with no frame in existence, and you see the tile's own
   background colour. The video stays transparent until it is genuinely running. */
.visual__media[data-autoplay] {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.visual.is-playing .visual__media[data-autoplay] { opacity: 1; }

.visual__media {                  /* video + photos fill the tile */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 801px) {
  .visual {
    aspect-ratio: auto;
    height: clamp(430px, 45vw, 560px);
  }
  .project--feature .visual { height: clamp(430px, 58vw, 720px); }
  .project--wide .visual    { height: clamp(430px, 50vw, 620px); }
}

@media (hover: hover) {
  .project:hover .visual { transform: scale(0.985); }
}

/* 01 · Liquid Caustics */
.visual--liquid { background: #07100f; }

.visual__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0002, #0005);
  pointer-events: none;
}

/* Draggable image strip + scrubber. Keyed on [data-slider] rather than on a single project,
   because more than one tile uses it now — add data-slider to a .visual and it behaves the
   same way, in the grid and in the modal, with no JS or CSS to change. */
[data-slider] {
  cursor: grab;
  touch-action: pan-y;            /* vertical page scroll still works; horizontal drags go to the slider */
}

[data-slider].is-dragging { cursor: grabbing; }

.slider__track {
  display: flex;
  height: 100%;
  transform: translate3d(calc(var(--index, 0) * -100% + var(--drag, 0px)), 0, 0);
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}

[data-slider].is-dragging .slider__track { transition: none; }

.slider__track img {
  position: static;               /* undo .visual__media — slides sit side by side in the flex row */
  flex: 0 0 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.slider__scrubber {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 1;
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0 22px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: ew-resize;
  touch-action: pan-y;
}

.slider__scrubber::-webkit-slider-runnable-track { height: 1px; background: rgb(255 255 255 / 0.72); }
.slider__scrubber::-moz-range-track              { height: 1px; background: rgb(255 255 255 / 0.72); }

.slider__scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4.5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--bg);
}

.slider__scrubber::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--bg);
}

.slider__scrubber:focus-visible { outline: none; }
.slider__scrubber:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--acid); outline-offset: 2px; }
.slider__scrubber:focus-visible::-moz-range-thumb     { outline: 2px solid var(--acid); outline-offset: 2px; }

/* 03 · 45 T-Shirt — a vertical clip of the garment in motion. Black, like the footage,
   so there is no flash of another colour before the video has loaded. */
.visual--shirt { background: #000; }

/* 04 · Cycles Temporal Engine */
.visual--temporal {
  display: grid;
  place-items: center;
  background: #050505;
}

.temporal__title {
  position: relative;
  z-index: 1;
  font-size: 14cqw;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.frame {
  position: absolute;
  width: 35%;
  height: 62%;
  border: 1px solid #fff4;
  opacity: 0.25;
  transform: skew(-8deg) rotate(-7deg);
}

.frame--1 { left: 10%; top: 18%; }
.frame--2 { left: 33%; top: 15%; }
.frame--3 { left: 56%; top: 12%; }

.scan {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 20px var(--acid);
  animation: scan 2s ease-in-out infinite;
}

@keyframes scan {                 /* moves with transform (cheap) instead of animating `top` */
  0%, 100% { transform: translateY(15cqh); }
  50%      { transform: translateY(85cqh); }
}

@media (min-width: 801px) {
  .temporal__title { font-size: clamp(2.2rem, 7.2cqw, 6.25rem); }
}

/* 05 · Euphoria */
/* 05 · Euphoria — a clip of the form turning. Black, like the footage, so nothing of
   another colour shows before the video has loaded. */
.visual--euphoria { background: #000; }


/* 7b — Tools / Software ------------------------------------------------------ */
/* A compact monochrome strip. The board is drawn entirely in CSS — a ruled head and four
   corner brackets — so there is no artwork file to keep in step with the layout.
   Each name stays hidden until its mark is hovered or focused; the space for it is always
   reserved, so revealing a name never shifts the row.

   ---- HOW TO CUSTOMISE -------------------------------------------------------
   On .tools:
     --ink         line, type and disc colour
     --tool-size   diameter of each disc
     --bracket     arm length of the corner brackets
   Per mark, in the "Optical balance" block below: --logo-size, the mark's share of its disc.
   Adding or removing a tool: edit the <li> list in index.html, add a --logo-size line, and
   update the count in .tools__head. The row is a 7-column grid here and 2 columns on phones,
   so change grid-template-columns in both places if the count changes. */

.tools {
  --ink: #0a0a09;
  --tool-size: clamp(2.5rem, 4.2vw, 3.4rem);
  --bracket: clamp(10px, 1.1vw, 16px);
  --orbit-spill: 27%;          /* how far the rings orbit outside the disc */

  padding: 38px var(--gutter) 42px;
  background: #fff;
  color: var(--ink);
}

/* head: label — ruled line with a + at its centre — count */
.tools__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(20px, 2.4vw, 30px);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools__rule {
  position: relative;
  height: 1px;
  background: rgb(10 10 9 / 0.3);
}

.tools__rule::after {
  content: "+";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  padding-inline: 8px;
  background: #fff;               /* punches a gap in the rule behind the + */
  font: 400 0.8rem/1 var(--font-mono);
  color: var(--ink);
}

/* Four corner brackets, each an L drawn from two gradients. No extra markup. */
.tools__frame {
  --b: 1px;

  position: relative;
  padding: clamp(18px, 2.2vw, 28px) clamp(12px, 1.8vw, 24px) clamp(26px, 2.6vw, 34px);
  background:
    linear-gradient(var(--ink), var(--ink)) 0    0    / var(--bracket) var(--b) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0    0    / var(--b) var(--bracket) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 0    / var(--bracket) var(--b) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 0    / var(--b) var(--bracket) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0    100% / var(--bracket) var(--b) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0    100% / var(--b) var(--bracket) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 100% / var(--bracket) var(--b) no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 100% / var(--b) var(--bracket) no-repeat;
}

.tools__list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools__item {
  position: relative;
  display: flex;
  justify-content: center;
}

/* short tick between marks */
.tools__item + .tools__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--tool-size) / 2);
  width: 1px;
  height: 1.4em;
  translate: 0 -50%;
  background: rgb(10 10 9 / 0.18);
}

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1.6rem;         /* room the revealed name drops into — always reserved */
  -webkit-tap-highlight-color: transparent;
}

.tool:focus-visible { outline: none; }   /* the ring goes on the disc instead */

.tool__button {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tool-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: scale 0.25s var(--ease-out);
}

/* the disc is small by design, so the touch target is padded out invisibly to 44px */
.tool__button::after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  width: max(2.75rem, 100%);
  height: max(2.75rem, 100%);
  translate: -50% -50%;
  border-radius: 50%;
}

.tool__logo {
  width: var(--logo-size, 58%);
  height: var(--logo-size, 58%);
  object-fit: contain;
  /* turns any mark — coloured or white — into a clean white silhouette */
  filter: brightness(0) invert(1);
}

.tool__label {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 4px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.25s var(--ease-out);
}

/* The orbit sits behind the mark and spills outside the disc. Idle it is part-drawn;
   revealing a tool closes the rings and fades the nodes in. */
.tools__defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.tool__orbit {
  position: absolute;
  inset: calc(var(--orbit-spill) * -1);
  width: calc(100% + 2 * var(--orbit-spill));
  height: calc(100% + 2 * var(--orbit-spill));
  max-width: none;                /* the global `svg { max-width: 100% }` would shrink it off-centre */
  overflow: visible;
  pointer-events: none;

  color: var(--ink);
  stroke: currentColor;
  fill: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;

  stroke-dashoffset: 0.72;        /* idle: only a loose arc of each ring is drawn */
  stroke-opacity: 0.3;
  fill-opacity: 0;

  transition:
    stroke-dashoffset 0.8s var(--ease-out),
    stroke-opacity 0.4s ease,
    fill-opacity 0.45s ease 0.18s,
    rotate 1s var(--ease-out);
}

/* One reveal state for pointer, keyboard and touch. script.js adds .is-open on tap. */
.tool:hover .tool__label,
.tool:focus-visible .tool__label,
.tool.is-open .tool__label { opacity: 1; translate: -50% 0; }

.tool:hover .tool__orbit,
.tool:focus-visible .tool__orbit,
.tool.is-open .tool__orbit {
  stroke-dashoffset: 0;
  stroke-opacity: 1;
  fill-opacity: 0.95;
  rotate: 7deg;
}

.tool:hover .tool__button,
.tool.is-open .tool__button { scale: 1.06; }

.tool:focus-visible .tool__button {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

/* Optical balance: each mark's share of its disc. Wide wordmarks sit larger,
   dense round marks smaller. */
.tool--blender   { --logo-size: 72%; }
.tool--davinci   { --logo-size: 54%; }
.tool--adobe     { --logo-size: 56%; }
.tool--jwildfire { --logo-size: 76%; }
.tool--openai    { --logo-size: 54%; }
.tool--claude    { --logo-size: 52%; }
.tool--fspy      { --logo-size: 54%; }

/* Narrow screens: Blender alone on the first row, then three rows of two. Below about
   660px seven across leaves the orbits overlapping their neighbours. This breakpoint is
   only here now — there is no artwork <source> left to keep it in step with. */
@media (max-width: 660px) {
  .tools { --tool-size: clamp(2.6rem, 11vw, 3.4rem); }

  .tools__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: clamp(14px, 3.6vw, 22px);
    max-width: 22rem;             /* keeps the pairs together on a wide-ish phone or tablet */
    margin-inline: auto;
  }

  .tools__item--blender { grid-column: 1 / -1; }

  /* the tick belongs between the pairs, not before the first of each row */
  .tools__item + .tools__item::before { display: none; }
  .tools__item:nth-child(odd):not(.tools__item--blender)::before { display: block; left: 0; }

}


/* 7c — Showreel -------------------------------------------------------------- */
/* Full-bleed, no autoplay and no sound until asked.

   The still is an <img> layered under the video rather than the video's poster attribute:
   object-fit is reliably honoured on an <img> in every engine, whereas WebKit renders a
   video poster without cropping it, leaving the image's baked-in letterbox bars visible as
   a black band under the white section above. The thumbnail is 16:10 holding a 16:9 frame,
   so a 16:9 box with object-fit: cover trims those bars exactly. */

.showreel__frame {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.showreel__poster,
.showreel__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the video is transparent until it has actually started, so the still shows through */
.showreel__video { opacity: 0; }

.showreel__poster,
.showreel__video { transition: opacity 0.3s ease; }

.showreel__frame.has-started .showreel__video { opacity: 1; }
.showreel__frame.has-started .showreel__poster { opacity: 0; }

.showreel__play {
  position: absolute;
  /* sits just below the poster's “45 GIRI” lettering rather than on top of it */
  top: 62%;
  left: 0;
  right: 0;
  translate: 0 -50%;
  margin-inline: auto;
  width: clamp(54px, 5.8vw, 78px);
  height: clamp(54px, 5.8vw, 78px);
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  /* the poster has bright areas, so the glyph carries its own shadow as well as a scrim */
  filter: drop-shadow(0 2px 10px rgb(0 0 0 / 0.55));
  transition: opacity 0.3s ease, scale 0.2s var(--ease-out);
}

.showreel__play svg { width: 100%; height: 100%; }

@media (hover: hover) {
  .showreel__play:hover { scale: 1.08; }
}

.showreel__frame.is-playing .showreel__play {
  opacity: 0;
  pointer-events: none;
}

.showreel__bar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px calc(var(--gutter) - 4px) 10px var(--gutter);
  background: linear-gradient(transparent, rgb(0 0 0 / 0.35) 45%, rgb(0 0 0 / 0.82));
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.showreel__sep { opacity: 0.6; }
.showreel__time { margin-right: auto; font-variant-numeric: tabular-nums; }

.showreel__ctl {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.showreel__ctl svg { width: 19px; height: 19px; fill: currentColor; }

/* the mute glyph shows a cross when muted and an arc when not */
.showreel__loud { display: none; }
[data-showreel-mute][aria-pressed="false"] .showreel__muted { display: none; }
[data-showreel-mute][aria-pressed="false"] .showreel__loud { display: block; }

.showreel__play:focus-visible,
.showreel__ctl:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}


/* 8 — About ----------------------------------------------------------------- */

.about {
  padding: 34px var(--gutter) 56px;
  /* no border-top: About now follows the hero, which already draws its own bottom edge */
  background: #fff;               /* the only light section on the site */
  color: #000;
}

.about .section-head {
  color: #555;
  border-bottom-color: rgb(0 0 0 / 0.15);
}

.about__grid {
  display: grid;
  gap: 70px;
  padding-top: 55px;
  text-align: center;             /* phones: the 45 and the copy share one centre line */
}

.about__number {
  font-size: 55vw;
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: 0;              /* was -0.075em, which made the 4 and 5 touch */
}

.about__copy {
  max-width: 680px;
  margin-inline: auto;
  padding-top: 25px;
}

.about__copy p:not(.about__lead) {
  max-width: 560px;
  margin-inline: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #000;
}

.about__lead {
  margin-bottom: 55px;
  font-size: 11vw;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.about__copy .about__note {
  margin-top: 28px;
  color: rgb(0 0 0 / 0.55);       /* keeps the quieter look of the closing note */
}

@media (min-width: 801px) {
  .about { padding-bottom: 90px; }

  .about__grid {
    grid-template-columns: 5fr 7fr;
    gap: 5vw;
    text-align: left;
  }
  .about__number { font-size: clamp(11.25rem, 27vw, 26.25rem); }
  .about__lead   { font-size: clamp(1.75rem, 4vw, 3.625rem); }
}


/* 9 — Manifesto ------------------------------------------------------------- */
/* Each line is sized from the section width so “UNEXPECTED” always fits.
   6.3 is the line's width in em (6.12) plus a little safety margin. */

.manifesto {
  container-type: inline-size;
  padding: 34px 0;                /* phones: sits close to the sections above and below */
  border-block: 1px solid var(--line);
  border-top: 0;                  /* the showreel above ends on its own hard edge */
}

.manifesto__line {
  padding-inline: var(--gutter);
  /* 6.6 is the width of “UNEXPECTED” in em at the phone tracking below (6.93 - 0.04 x 9 = 6.57), plus slack */
  font-size: min(13.75rem, 15cqw, (100cqw - 2 * var(--gutter)) / 6.6);
  font-weight: 900;
  line-height: 0.92;              /* phones: the lines no longer touch */
  letter-spacing: -0.04em;        /* phones: looser, so the big type stays legible */
}

.manifesto__line:nth-child(2) { text-align: center; }
.manifesto__line:nth-child(3) { text-align: right; }
.manifesto__edge { letter-spacing: -0.055em; }       /* pulls the last “D” flush with the gutter */

@media (min-width: 801px) {
  .manifesto { padding-block: 100px; }

  /* desktop keeps the original tight setting */
  .manifesto__line {
    font-size: min(13.75rem, 15cqw, (100cqw - 2 * var(--gutter)) / 6.3);
    line-height: 0.78;
    letter-spacing: -0.09em;
  }
}


/* 10 — Contact -------------------------------------------------------------- */

.contact { padding: 30px var(--gutter) 90px; }

/* The panel is a before/after reveal. Two image layers sit under the text:
     ::before  the dim image (always visible)
     ::after   the bright image, clipped to the left of --reveal
   .idea-panel__content (the headline + email) is clipped to the same edge.
   --reveal is set by script.js while dragging; --selected-bg when the “?” is clicked. */
.idea-panel {
  --reveal: 78%;
  --selected-bg: url("portfolio/clouds2.webp");

  position: relative;
  isolation: isolate;
  margin-block: 22px;
  overflow: hidden;
  background: #151513;
  container-type: inline-size;    /* the headline sizes itself from the panel width */
  cursor: ew-resize;
  touch-action: pan-y;            /* vertical scroll still works on touch */
  user-select: none;
  -webkit-user-select: none;
}

.idea-panel::before,
.idea-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--selected-bg) center / cover no-repeat;
}

.idea-panel::before { opacity: 0.75; }
.idea-panel::after  { clip-path: inset(0 calc(100% - var(--reveal)) 0 0); }

.idea-panel__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60svh;
  padding: 6vw 4vw;
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}

.idea-panel__title {
  /* Where the dot of the “?” is, measured on Inter Bold: 0.2563em from the glyph's
     left edge, and the button sits 0.03em above the baseline (just under the stem). */
  --dot-x: 0.2563em;
  --dot-y: 0.03em;

  margin-bottom: max(0.4em, 2rem);
  font-size: min(11.25rem, 14.5cqw);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.1em;
  white-space: nowrap;
}

/* The “?” button.
   .dot-anchor is a zero-size box that sits on the text baseline, right where the “?” starts.
   The button is positioned from it in em, so it follows the glyph at any font size or layout. */
.dot-anchor {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
}

.cloud-picker {
  --size: 0.35em;
  --ring: max(1.5px, 0.012em);

  position: absolute;
  left: var(--dot-x);
  bottom: var(--dot-y);
  width: var(--size);
  height: var(--size);
  translate: -50% 50%;            /* centre the button on that point */
  padding: 0;
  border: var(--ring) solid #fff;
  border-radius: 50%;
  background: #d9d6cb var(--selected-bg) center / cover no-repeat;
  box-shadow: 0 0 0 var(--ring) rgb(8 8 8 / 0.82);
  cursor: pointer;
  touch-action: manipulation;
  transition: scale 0.18s ease;
}

/* Visual size stays proportional to the type; the tap target grows to at least 44px. */
.cloud-picker::before {
  content: "";
  position: absolute;
  inset: min(0px, calc((var(--size) - 2.75rem) / 2));
  border-radius: 50%;
}

.cloud-picker:focus-visible {
  scale: 1.15;
  outline-offset: 0.06em;
}

@media (hover: hover) {
  .cloud-picker:hover { scale: 1.15; }
}

.email {
  width: max-content;
  max-width: 100%;
  padding-bottom: 8px;
  border-bottom: 1px solid #fff;
  font: 0.875rem var(--font-mono);
  color: #fff;
  cursor: pointer;
  user-select: text;
  -webkit-user-select: text;
}

.email span {
  margin-left: 20px;
  color: var(--acid);
}

.reveal__handle {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: var(--reveal);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #0a0a09e8;
  box-shadow: 0 0 0 2px #0006;
  font: 11px/1 var(--font-mono);
  color: #fff;
  pointer-events: none;
}

.reveal__input:focus-visible + .reveal__handle {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

@media (min-width: 801px) {
  .idea-panel__content {
    min-height: 55svh;
    padding: 4vw;
  }
  .idea-panel__title { font-size: min(11.25rem, 12.5cqw); }
}

/* Phones: break the headline into 4 lines so it can be much bigger. The widest line,
   “making?”, is 3.56em wide, so font-size = available width ÷ 3.7 (a little slack).
   The “?” button is positioned in em, so it scales with the type automatically. */
.br-narrow { display: none; }

@media (max-width: 560px) {
  .br-narrow { display: inline; }
  .idea-panel__title { font-size: min(11.25rem, calc((100cqw - 8vw) / 3.7)); }
}


/* 11 — Footer --------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 16px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.5625rem;
  color: var(--muted-dim);
}

@media (min-width: 801px) {
  .site-footer { padding-block: 18px; }
}


/* 12 — Project modal -------------------------------------------------------- */
/* script.js copies the tile's .visual into .modal__visual, so the modal shows
   the real work (video, images, slider) instead of an empty box. */

.modal {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 70px var(--gutter) 30px;
  border: 0;
  overflow: auto;
  background: #0a0a09f8;
  color: var(--fg);
}

.modal[open] {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 35px;
}

.modal::backdrop { background: transparent; }

.modal__close {
  position: fixed;
  top: 12px;
  right: calc(var(--gutter) - 8px);
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 40px;
  font-weight: 200;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}

.modal__visual {
  height: 52dvh;
  overflow: hidden;
  background: #111;
}

.modal__visual .visual {
  aspect-ratio: auto;
  height: 100%;
}

.modal__kicker,
.modal__tech {
  font-size: 0.625rem;
  color: #888;
}

.modal__title {
  margin: 20px 0;
  font-size: clamp(2.8rem, 7vw, 6.25rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.08em;
}

.modal__text {
  max-width: 440px;
  margin-bottom: 20px;
  line-height: 1.6;
  color: #aaa;
}

/* The media is shown whole (contain) in a 16:10 frame, and the title is sized from its own
   column so a long word like “Mediterranean” can no longer squeeze the image. The shirt clip
   is vertical, but it is black to its edges, so it letterboxes invisibly here. */
.modal .modal__visual {
  height: auto;
  max-height: 75dvh;
  aspect-ratio: 16 / 10;
}

.modal .modal__visual .visual__media { object-fit: contain; }

.modal .modal__copy { container-type: inline-size; }

.modal .modal__title {
  font-size: min(6.25rem, 13.5cqw);   /* longest word is ~7.2em wide: 100 ÷ 7.2 ≈ 13.9 */
  overflow-wrap: break-word;
}

@media (min-width: 801px) {
  .modal { padding: 7vh 7vw; }

  .modal[open] {
    grid-template-columns: 1.35fr 0.65fr;
    align-content: normal;
    align-items: center;
    gap: 5vw;
  }

  .modal__close { top: 20px; right: 28px; }
  .modal__visual { height: 75dvh; }

  /* minmax(0, …) lets the image column keep its 1.35 : 0.65 share whatever the title says */
  .modal[open] { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); }
}


/* 13 — Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .ring,
  .scan { animation: none; }

  .site-header,
  .visual,
  .slider__track,
  .cloud-picker,
  .tool__button,
  .tool__orbit,
  .tool__label,
  .showreel__play,
  .showreel__poster,
  .showreel__video { transition: none; }
}
