/* Direction X: Current, Studied. The live site's palette and faces, consolidated into one token block.
   Every colour, size, space, radius and duration below comes from here. */
:root {
  /* colour: the live site's values, one of each */
  --bg: #131313;
  --surface: #1c1b1b;
  --surface-2: #201f1f;
  --line: #353534;
  --text: #e5e2e1;
  --muted: #d1c5b0;
  --dim: #a89e8b;
  --gold: #ecc155;          /* the one accent */
  --gold-ink: #131313;      /* text on gold */
  --band: color-mix(in srgb, var(--bg) 72%, transparent);
  --hairline-img: color-mix(in srgb, var(--text) 8%, transparent);

  /* type */
  --font-display: 'Epilogue', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-figure: 'JetBrains Mono', ui-monospace, monospace;   /* counts only */
  --text-hero: clamp(2.75rem, 6.5vw, 6rem);
  --text-display: clamp(2.5rem, 5vw, 4.75rem);
  --text-section: clamp(2rem, 3.2vw, 3.25rem);
  --text-title: clamp(1.25rem, 1vw + 0.9rem, 1.5rem);
  --text-lead: clamp(1.0625rem, 0.4vw + 0.95rem, 1.25rem);
  --text-body: 1rem;
  --text-small: 0.875rem;

  /* space */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 40px; --space-7: 64px; --space-8: 96px; --space-9: 144px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: 32px;
  --max-w: 1376px;
  --nav-h: 72px;
  --frame-h: clamp(200px, 23vw, 340px);
  --hero-h: clamp(560px, calc(100svh - var(--nav-h)), 900px);

  /* shape and motion */
  --radius: 2px;
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 600ms;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --z-raised: 10; --z-skip: 500;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: var(--space-7); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--text-body)/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--gold-ink); }
.wrap { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--space-4); top: calc(-1 * var(--space-8)); z-index: var(--z-skip); padding: var(--space-2) var(--space-4); background: var(--text); color: var(--bg); }
.skip:focus-visible { top: var(--space-4); }

/* Nav: the live logo, plain links, gold underline on hover */
.nav__row { display: flex; justify-content: space-between; align-items: center; min-height: var(--nav-h); gap: var(--space-5); }
.nav__logo { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: var(--text-title); letter-spacing: -0.02em; }
.nav__logo img { width: 30px; height: 30px; filter: invert(1); }
.nav__links { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: var(--text-small); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.nav__links a:hover { text-decoration-color: var(--gold); }

/* Hero: the live slice hero and band, kept. The band is now solid enough to read over any frame. */
.hero { position: relative; display: grid; height: var(--hero-h); }
.hero__slices { grid-area: 1 / 1; display: flex; gap: 2px; overflow: hidden; }
.hero__slice { flex: 1 1 0; min-width: 0; background-size: cover; background-position: center; position: relative; transition: flex-grow var(--dur-long) var(--ease-out); }
.hero__slice:hover { flex-grow: 1.6; }
.hero__band { grid-area: 1 / 1; align-self: center; z-index: var(--z-raised); background: var(--band); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.hero__inner { display: grid; justify-items: center; text-align: center; gap: var(--space-5); padding-block: var(--space-7); }
.hero h1 { font-size: var(--text-hero); max-width: 16ch; }
.word { color: var(--gold); display: inline-block; transition: opacity var(--dur-micro) var(--ease-out); }
.word.is-out { opacity: 0; }
.hero__sub { font-size: var(--text-lead); color: var(--muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3) var(--space-4); }

/* Buttons, all states */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-5); border: 1px solid var(--gold); border-radius: var(--radius); font: 600 var(--text-body)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn--primary { background: var(--gold); color: var(--gold-ink); }
.btn--primary:hover { background: var(--text); border-color: var(--text); }
.btn--quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Work: the grid is the homepage */
.work { padding-block: var(--space-9) var(--space-8); }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-5) var(--space-7); margin-bottom: var(--space-7); }
.work__head h2 { font-size: var(--text-section); max-width: 16ch; }
.filter { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
html:not(.js) .filter { display: none; }
.filter__btn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--dim); font-family: var(--font-display); font-weight: 500; font-size: var(--text-title); letter-spacing: -0.01em; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out); }
.filter__btn sup { margin-left: var(--space-1); font: 500 0.55em/1 var(--font-figure); }
.filter__btn:hover { color: var(--text); }
.filter__btn[aria-pressed="true"] { color: var(--text); text-decoration-color: var(--gold); }
.filter__btn[aria-pressed="true"] sup { color: var(--gold); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--space-7); }
.s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s7 { grid-column: span 7; }
.grid.is-filtered .tile { grid-column: span 4; }
.tile a { display: block; text-decoration: none; }
.tile__frame { display: block; height: var(--frame-h); background: var(--surface); border-radius: var(--radius); overflow: hidden; outline: 1px solid var(--hairline-img); outline-offset: -1px; }
.tile__frame img { width: 100%; height: 100%; object-fit: cover; }
.tile h3 { margin-top: var(--space-4); font-size: var(--text-title); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.tile p { margin-top: var(--space-1); color: var(--dim); }
.tile a:hover h3 { text-decoration-color: var(--gold); }
.tile a:focus-visible { outline-offset: 6px; }

/* Studio: one surface band, a statement and four facts */
.studio { background: var(--surface); padding-block: var(--space-8); }
.studio__grid { display: grid; gap: var(--space-7); }
.statement { font-size: var(--text-display); max-width: 24ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts > div { padding-inline: var(--space-5); border-left: 1px solid var(--line); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-size: var(--text-small); color: var(--dim); }
.facts dd { margin-top: var(--space-1); font-size: var(--text-lead); line-height: 1.35; }

/* Disciplines: one frame held still while three panels pass */
.disc { padding-block: var(--space-9) var(--space-8); }
.disc__h { font-size: var(--text-section); margin-bottom: var(--space-7); }
.pin { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.pin__stage { grid-column: 1 / span 7; display: grid; gap: var(--space-5); align-self: start; }
.pin__frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); outline: 1px solid var(--hairline-img); outline-offset: -1px; }
.pin__frame figcaption { margin-top: var(--space-3); font-size: var(--text-small); color: var(--dim); }
.pin__panels { grid-column: 9 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-8); align-content: start; }
.pin__panel h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-section); letter-spacing: -0.02em; line-height: 1.04; }
.pin__panel p { margin-top: var(--space-4); color: var(--muted); max-width: 40ch; }

@media (min-width: 60rem) {
  .js .pin__stage { position: sticky; top: var(--space-7); display: block; aspect-ratio: 4 / 3; }
  .js .pin__frame { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
  .js .pin__frame.is-on { opacity: 1; }
  .js .pin__frame figcaption { position: absolute; left: 0; top: calc(100% + var(--space-3)); margin: 0; }
  .js .pin__panels { gap: 0; }
  .js .pin__panel { min-height: min(70svh, 640px); display: flex; flex-direction: column; justify-content: center; }
  .js .pin__panel h3 { color: var(--dim); transition: color var(--dur-short) var(--ease-out); }
  .js .pin__panel.is-on h3 { color: var(--gold); }
}

/* Tools: three rows */
.tools { padding-block: var(--space-8); border-top: 1px solid var(--line); }
.tools__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--space-6); }
.tools__head { grid-column: 1 / span 4; display: grid; gap: var(--space-4); align-content: start; }
.tools__head h2 { font-size: var(--text-section); }
.tools__lead { color: var(--muted); font-size: var(--text-lead); }
.rows { grid-column: 5 / -1; list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3fr); column-gap: var(--gap); align-items: baseline; padding-block: var(--space-6); border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: var(--text-title); }
.row p { color: var(--muted); }
.row .row__meta { font-size: var(--text-small); color: var(--dim); }
.row h3 a:hover { text-decoration-color: var(--gold); }
.fill { padding: 0 0.25em; border: 1px dashed var(--dim); border-radius: var(--radius); color: var(--dim); }

/* Close: the live site's line, kept */
.cta { padding-block: var(--space-9); border-top: 1px solid var(--line); }
.cta__h { font-size: var(--text-hero); }
.cta__h a { color: var(--gold); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 4px; text-underline-offset: 0.12em; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.cta__h a:hover { text-decoration-color: var(--gold); }
.cta__mail { margin-top: var(--space-5); font-size: var(--text-lead); }
.cta__mail a { color: var(--muted); }
.cta__mail a:hover { color: var(--text); }

.foot { border-top: 1px solid var(--line); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-7); padding-block: var(--space-6); color: var(--dim); font-size: var(--text-small); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.foot__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); }
.foot__legal { margin-left: auto; }

/* Under 60rem: stack in reading order; the pinned pair unpins and each frame sits above its panel */
@media (max-width: 60rem) {
  .s4, .s5, .s7, .grid.is-filtered .tile { grid-column: span 6; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-6); }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .pin { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-5); }
  .pin__stage, .pin__panels { display: contents; }
  .pin__frame, .pin__panel { order: var(--o); }
  .pin__panel { margin-bottom: var(--space-7); }
  .tools__head, .rows { grid-column: 1 / -1; }
  .row { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2); }
  .foot__legal { margin-left: 0; }
}
@media (max-width: 40rem) {
  :root { --frame-h: 56vw; --gap: 16px; }
  .nav__links { gap: var(--space-4); }
  .nav__logo span { display: none; }
  .hero__slice:nth-child(n+5) { display: none; }
  .s4, .s5, .s7, .grid.is-filtered .tile { grid-column: 1 / -1; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slice, .btn, .word, .js .pin__frame, .nav__links a, .filter__btn, .tile h3 { transition: none; }
}
