/* ==========================================================================
   Laura Schulmann — Portfolio
   Static site. No build step. Tokens → base → layout → components → sections
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  --paper: #f7f4ee;
  --paper-2: #efeae1;
  --ink: #171614;
  --ink-2: #3b3834;
  --muted: #6a655d;
  --line: #d9d2c5;
  --line-soft: #e5dfd4;
  --accent: #1d5fd6;          /* the blue of Laura's Canva spirals, darkened for text contrast */

  --night: #161513;
  --night-ink: #f3efe8;
  --night-muted: #a39d93;
  --night-line: rgba(243, 239, 232, 0.16);
  --night-accent: #9fbcff;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 11vw, 152px);
  --header-h: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* long, soft landing for reveals */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);  /* curtains and drawn rules */
  --dur: 180ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
strong { font-weight: 600; color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--paper); }

.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 1000;
  background: var(--ink); color: var(--paper); padding: 10px 14px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--tint { background: var(--paper-2); }

/* ---------- Typography ---------- */
.display, .h2, .step-title, .outcome-value, .contact-row .val, .spec strong, .brand {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
}
.display {
  font-size: clamp(46px, 6.4vw, 90px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em, .h2 em { font-style: italic; }

.lead { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.55; max-width: 50ch; text-wrap: pretty; }
.prose { max-width: 56ch; font-size: 18px; text-wrap: pretty; }
.prose p + p { margin-top: 1em; }

.kicker, .label, .section-label, .facts dt, .outcome-label, .spec dt, .contact-row .lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.kicker { color: var(--accent); }
.label { color: var(--muted); }

/* A section opens with its label sitting on a full-width rule. */
.section-label {
  position: relative;
  display: block;
  padding-top: 14px;
  color: var(--ink);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-label > span { display: inline-block; }
/* Hairline rules are pseudo-elements so they can draw in from the left (see Motion). */
.section-label::before, .facts::before, .step::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--rule, var(--ink)); transform-origin: left center;
}

.split-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
@media (max-width: 900px) { .split-head { grid-template-columns: 1fr; } }

/* ---------- Buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur), border-color var(--dur), color var(--dur);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { scale: 0.98; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

.link-arrow {
  font-weight: 600; color: var(--ink); padding-bottom: 4px;
  /* Resting hairline plus a second line that draws across on hover */
  background:
    linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat;
  transition: color var(--dur), background-size 0.6s var(--ease-out);
}
.link-arrow:hover { color: var(--accent); background-size: 100% 1px, 100% 1px; }

/* Arrows nudge in the direction they point */
.arr { display: inline-block; margin-left: 4px; transition: translate 0.45s var(--ease-out); }
.arr--right { --nudge: 4px 0; }
.arr--down  { --nudge: 0 3px; }
.arr--up    { --nudge: 0 -3px; }
.arr--out   { --nudge: 3px -3px; }
a:hover > .arr, a:hover .account-cta > .arr { translate: var(--nudge); }

/* ---------- Decorative spirals (Laura's Canva op-art, recoloured via mask) ---------- */
.spiral {
  position: absolute; display: block; pointer-events: none;
  background: var(--accent);
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.spiral--b { --m: url("../img/spiral-b.svg"); }
.spiral--c { --m: url("../img/spiral-c.svg"); }

/* ---------- Icon masks (Canva icons, recoloured) ---------- */
.icon-mask {
  display: inline-block; flex: none;
  background: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
/* Canva exported these PNGs as a colour+mask pair side by side; show the left half only */
.icon-mask--sprite {
  -webkit-mask-size: 200% 100%; mask-size: 200% 100%;
  -webkit-mask-position: left center; mask-position: left center;
  mask-mode: luminance;
}
.icon-challenge { -webkit-mask-image: url("../img/icon-challenge-sprite.webp"); mask-image: url("../img/icon-challenge-sprite.webp"); aspect-ratio: 800 / 791; }
.icon-idea      { -webkit-mask-image: url("../img/icon-idea-sprite.webp");      mask-image: url("../img/icon-idea-sprite.webp");      aspect-ratio: 667 / 800; }
.icon-role      { -webkit-mask-image: url("../img/icon-role-sprite.webp");      mask-image: url("../img/icon-role-sprite.webp");      aspect-ratio: 797 / 800; }
.icon-outcome   { -webkit-mask-image: url("../img/icon-outcome-sprite.webp");   mask-image: url("../img/icon-outcome-sprite.webp");   aspect-ratio: 764 / 800; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: var(--accent); transform-origin: left center; transform: scaleX(0);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { font-size: 25px; line-height: 1; letter-spacing: -0.005em; white-space: nowrap; }

.site-nav ul { display: flex; gap: 2px; position: relative; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: color var(--dur), text-decoration-color var(--dur);
}
.site-nav a:hover { color: var(--ink); text-decoration-color: var(--line); }
.site-nav a.is-active { color: var(--ink); text-decoration-color: var(--ink); }
.nav-contact { display: none; }
/* Desktop: one rule glides between links instead of each link underlining itself */
.nav-indicator {
  position: absolute; left: 0; bottom: 6px; width: 1px; height: 1px; background: var(--ink);
  transform-origin: left center; opacity: 0; pointer-events: none;
  transition: transform 0.6s var(--ease-out), opacity 0.3s;
}
.nav-indicator.is-on { opacity: 1; }
.has-indicator a.is-active { text-decoration-color: transparent; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .header-cta { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    display: flex; flex-direction: column; justify-content: space-between;
    background: var(--paper);
    padding: 8px var(--gutter) max(28px, env(safe-area-inset-bottom));
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity var(--dur), visibility var(--dur);
  }
  body.nav-open .site-nav { opacity: 1; visibility: visible; }
  body.nav-open .site-header { border-bottom-color: var(--line); }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a {
    display: flex; min-height: 68px; padding: 0;
    font: 400 34px/1 var(--serif); color: var(--ink);
  }
  .site-nav a.is-active { text-decoration-color: transparent; color: var(--accent); }
  .nav-indicator { display: none; }
  .nav-contact { display: grid; gap: 6px; padding-top: 32px; font-size: 16px; }
  .nav-contact a { font: 500 16px/1.5 var(--sans); min-height: 0; color: var(--ink-2); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(36px, 6vw, 88px) var(--section); overflow-x: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 7vw, 112px);
  align-items: center;
}
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero-copy .display { max-width: 13ch; }
.hero-copy .lead { max-width: 44ch; }
.hero-copy .actions { margin-top: 8px; }

.hero-media { position: relative; isolation: isolate; }
.hero-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.hero-par { position: absolute; inset: -7% 0; }   /* taller than the frame so the parallax never shows an edge */
.hero-par img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-spiral { width: clamp(150px, 17vw, 240px); aspect-ratio: 1; top: -12%; right: -14%; z-index: -1; }
figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-frame { aspect-ratio: 5 / 6; }
  .hero-spiral { right: -8%; top: -6%; }
}

.facts {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(64px, 9vw, 120px);
}
.facts > div { padding: 16px 24px 0 0; display: grid; gap: 6px; align-content: start; }
.facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { color: var(--ink); font-weight: 500; line-height: 1.45; text-wrap: pretty; }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div + div { padding: 14px 0; border-left: 0; }
  .facts > div + div { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   About
   ========================================================================== */
#about { overflow-x: clip; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px clamp(40px, 8vw, 128px);
  align-items: center;
}
.about-media { position: relative; isolation: isolate; }
.about-frame { overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.about-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* The two solid spirals peeking out from behind the portrait come from the original Canva layout. */
.about-media .spiral { z-index: -1; }
.about-spiral-1 { width: 140px; height: 140px; left: -52px; top: 28px; }
.about-spiral-2 { width: 180px; height: 180px; left: -72px; top: 184px; }

.about-copy { display: grid; gap: 28px; align-content: center; }

.account {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px;
  padding: 18px 0; border-block: 1px solid var(--line);
}
.account-handle { font-weight: 600; color: var(--ink); }
.account-meta { grid-row: 2; font-size: 14px; color: var(--muted); }
.account-cta {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-weight: 600; font-size: 15px; color: var(--ink);
  transition: color var(--dur);
}
.account:hover .account-cta { color: var(--accent); }

/* From idea to execution: one long line of the process that travels with the scroll */
.band { margin-top: clamp(88px, 11vw, 150px); }
.band .label { margin-bottom: 16px; }
.ticker { overflow: clip; border-block: 1px solid var(--line); padding-block: clamp(10px, 1.6vw, 22px) clamp(16px, 2.2vw, 30px); }
.ticker-track {
  display: flex; width: max-content; white-space: nowrap;
  font: 400 clamp(54px, 9.6vw, 150px)/1.05 var(--serif); letter-spacing: -0.02em; color: var(--ink);
}
.ticker-track li { display: inline-flex; align-items: center; }
.ticker-track li:nth-child(even) { font-style: italic; }
.ticker-track li:not(:last-child)::after {
  content: ""; flex: none; width: 0.44em; height: 0.44em; margin: 0 0.32em;
  background: var(--accent);
  -webkit-mask: url("../img/spiral-c.svg") center / contain no-repeat;
  mask: url("../img/spiral-c.svg") center / contain no-repeat;
  transform: rotate(var(--spin, 0deg));
}
/* Without motion (reduced-motion preference or no JS) the line wraps inside the container. */
html:not(.motion) .ticker-track {
  width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto;
  flex-wrap: wrap; white-space: normal; row-gap: 0.1em; font-size: clamp(34px, 5.2vw, 72px);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 520px; margin-left: 36px; }
  .about-spiral-1 { width: 96px; height: 96px; left: -40px; top: 16px; }
  .about-spiral-2 { width: 124px; height: 124px; left: -52px; top: 118px; }
}

/* ==========================================================================
   Results
   ========================================================================== */
/* About and Results share the paper background, so the rule alone separates them from what precedes. */
#about, #results { padding-top: 0; }
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px clamp(40px, 8vw, 128px);
  align-items: start;
}
.results-copy { display: grid; gap: 28px; }

.outcomes { margin-top: 20px; border-top: 1px solid var(--line); }
.outcome {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 24px; row-gap: 4px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.outcome-label { color: var(--muted); padding-top: 12px; }
.outcome-value { font-size: clamp(30px, 3vw, 40px); line-height: 1.08; }
.outcome-desc { grid-column: 2; color: var(--muted); font-size: 16px; }
@media (max-width: 520px) {
  .outcome { grid-template-columns: 1fr; }
  .outcome-label { padding-top: 0; }
  .outcome-desc { grid-column: 1; }
}

.shot img {
  width: 100%; aspect-ratio: 480 / 1044;
  filter: drop-shadow(0 1px 1px rgba(23, 22, 20, 0.10)) drop-shadow(0 18px 32px rgba(23, 22, 20, 0.12));
}
.shot a { display: block; cursor: zoom-in; border-radius: 24px; }
.shot a img { transition: translate 0.6s var(--ease-out); }
.shot a:hover img { translate: 0 -8px; }
.shot figcaption { margin-top: 16px; }
.shot--profile { max-width: 340px; justify-self: end; width: 100%; }
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
  .shot--profile { justify-self: center; max-width: 300px; }
  .shot--profile figcaption { text-align: center; }
}

/* Best-performing post */
.feature { margin-top: var(--section); }
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 56px clamp(40px, 8vw, 128px);
  align-items: center;
}
.feature-media { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.feature-media > :nth-child(2) { margin-top: 56px; }
.feature-copy { display: grid; gap: 28px; justify-items: start; }

.spec { width: 100%; border-top: 1px solid var(--line); }
.spec > div {
  display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.spec dt { color: var(--muted); }
.spec dd { color: var(--ink); font-weight: 500; }
.spec strong { font-size: 30px; line-height: 1; margin-right: 4px; }
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-copy { order: -1; }
  .feature-media { max-width: 560px; }
}
@media (max-width: 420px) { .spec > div { grid-template-columns: 1fr; gap: 2px; } }

/* ==========================================================================
   Case study
   ========================================================================== */
.steps {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(44px, 5vw, 72px) clamp(32px, 6vw, 96px);
}
.step { position: relative; display: grid; gap: 16px; align-content: start; padding-top: 18px; }
.step-head { display: flex; align-items: baseline; gap: 16px; }
.step-num { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-title { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.05; }
.step-icon { width: 30px; height: 30px; margin-left: auto; align-self: center; color: var(--accent); }
.step p { font-size: 18px; max-width: 44ch; text-wrap: pretty; }

.role-list { columns: 2; column-gap: 28px; max-width: 480px; }
.role-list li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; font-size: 16px; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Design & visual content
   ========================================================================== */
.filters {
  display: flex; gap: clamp(18px, 2.4vw, 28px);
  overflow-x: auto; scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--line); /* a border would sit under the scroll area and clip the active tab's rule */
  margin-bottom: 32px;
}
.filters::-webkit-scrollbar { display: none; }
.filters[hidden] { display: none; }
.filter {
  position: relative; flex: none; padding: 12px 0;
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color var(--dur), border-color var(--dur);
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filter-count { margin-left: 3px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; vertical-align: 1px; }
@media (max-width: 760px) {
  /* Tabs scroll edge to edge on phones; the cut-off last tab signals there is more. */
  .filters { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
}

/* Justified rows: each item grows in proportion to its aspect ratio (--r), so a row shares
   one height and no artwork is cropped. --row-h tracks the container width so the nine
   pieces settle into two full rows on desktop; max-width stops short last rows ballooning. */
.gallery-wrap { container-type: inline-size; }
.gallery {
  --row-h: 23cqi;
  --gap: 16px;
  display: flex; flex-wrap: wrap; gap: 36px var(--gap);
}
/* Soaks up the leftover space on a short last row; the negative margin cancels its flex gap. */
.gallery::after { content: ""; flex: 0.0001 1 0px; margin-left: calc(-1 * var(--gap)); }
.gallery-item {
  flex: var(--r) 1 calc(var(--r) * var(--row-h));
  max-width: calc(var(--r) * var(--row-h) * 1.3);
  min-width: 0;
}
.gallery-item[hidden] { display: none; }
.gallery-link { display: block; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.gallery-link img { width: 100%; aspect-ratio: var(--r); object-fit: cover; transition: scale 0.9s var(--ease-out); }
.gallery-link:hover img { scale: 1.045; }
.gallery-cap b { transition: color var(--dur); }
.gallery-item:hover .gallery-cap b { color: var(--accent); }
.gallery-cap { margin-top: 10px; display: grid; line-height: 1.35; }
.gallery-cap b, .gallery-cap span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gallery-cap b { font-weight: 500; font-size: 14.5px; color: var(--ink); }
.gallery-cap span { font-size: 13px; color: var(--muted); }

/* Below ~710px the nine pieces no longer pack into two rows, so switch to two masonry columns. */
@container (max-width: 720px) {
  .gallery { display: block; columns: 2; column-gap: 14px; }
  .gallery::after { content: none; }
  .gallery-item { max-width: none; break-inside: avoid; margin-bottom: 24px; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  position: relative; overflow: clip;
  background: var(--night); color: var(--night-muted);
  padding-block: var(--section) clamp(72px, 9vw, 120px);
}
.contact .container { position: relative; }
.contact .section-label { color: var(--night-ink); --rule: var(--night-line); }
.contact-title { color: var(--night-ink); max-width: 17ch; font-size: clamp(42px, 5.8vw, 80px); line-height: 0.98; }
.contact .lead { color: var(--night-muted); max-width: 40ch; }
.contact-spiral {
  width: clamp(280px, 38vw, 540px); aspect-ratio: 1; right: -8%; top: -6%;
  background: var(--night-accent); opacity: 0.12;
}

.contact-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(40px, 8vw, 128px);
  margin-top: clamp(48px, 6vw, 88px);
  align-items: start;
}
.contact-list { border-top: 1px solid var(--night-line); }
.contact-row {
  display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 8px 20px;
  padding: 20px 0; border-bottom: 1px solid var(--night-line);
}
.contact-row .lbl { color: var(--night-muted); }
.contact-row .val {
  color: var(--night-ink); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; overflow-wrap: anywhere;
  justify-self: start; padding-bottom: 4px;
  background: linear-gradient(var(--night-accent), var(--night-accent)) left bottom / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease-out), color var(--dur);
}
.contact-row .val:hover { color: #fff; background-size: 100% 1px; }
.copy {
  min-height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--night-ink);
  background: transparent; border: 1px solid var(--night-line);
  transition: background-color var(--dur), border-color var(--dur), color var(--dur);
}
.copy:hover { border-color: var(--night-muted); }
.copy.is-done { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.contact :focus-visible { outline-color: var(--night-accent); }

@media (max-width: 900px) {
  .contact-body { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .contact-row { grid-template-columns: minmax(0, 1fr) auto; }
  .contact-row .lbl { grid-column: 1 / -1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--night); color: var(--night-muted); font-size: 14px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  padding: 24px 0 32px; border-top: 1px solid var(--night-line);
}
.site-footer a { color: var(--night-ink); }
.site-footer .link-arrow {
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--night-line), var(--night-line));
}
.site-footer .link-arrow:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--night-accent); }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; inset: 0; color: #fff; }
.lightbox::backdrop { background: rgba(18, 17, 15, 0.97); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox-frame { position: relative; display: grid; gap: 14px; justify-items: center; align-content: center; width: 100%; height: 100%; padding: 64px 88px 28px; }
.lightbox-frame img { max-width: min(100%, 960px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; touch-action: pan-y; user-select: none; }
.lightbox-caption { font-size: 14px; color: #d9d3c9; text-align: center; max-width: 70ch; text-wrap: balance; }
.lightbox-count { position: absolute; left: 24px; top: 22px; font-size: 13px; color: #a39d93; font-variant-numeric: tabular-nums; }
.lightbox-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background-color var(--dur), border-color var(--dur);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }
.lightbox-btn svg { width: 20px; height: 20px; }
.lightbox-close { right: 16px; top: 12px; }
.lightbox-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 20px; top: 50%; translate: 0 -50%; }
.lightbox-btn[disabled] { display: none; }
.lightbox :focus-visible { outline-color: #fff; }
.lightbox[open]::backdrop, .lightbox[open] .lightbox-frame { animation: lb-fade 0.4s var(--ease-out); }
.lightbox[open] .lightbox-frame img { animation: lb-zoom 0.7s var(--ease-out); }
@keyframes lb-fade { from { opacity: 0; } }
@keyframes lb-zoom { from { opacity: 0; transform: translateY(14px) scale(0.95); } }
@media (max-width: 700px) {
  .lightbox-frame { padding: 64px 16px 88px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 20px; translate: none; }
}

/* ==========================================================================
   Motion
   Hidden start states apply only under html.motion, which <head> sets when JS runs and the
   visitor has not asked for reduced motion. main.js adds .is-in as elements enter the view:
   --d staggers elements that arrive together, --i orders children, --wi orders the words
   of a split heading.
   ========================================================================== */
.motion [data-reveal] {
  opacity: 0; transform: translate3d(0, 32px, 0);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Images: a curtain rises while the picture settles from a slight zoom */
.motion [data-reveal="image"] {
  opacity: 1; transform: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease-in-out) calc(var(--d, 0) * 90ms);
}
.motion [data-reveal="image"] img { transform: scale(1.18); transition: transform 1.9s var(--ease-out) calc(var(--d, 0) * 90ms); }
.motion [data-reveal="image"].is-in { clip-path: inset(0 0 0 0); }
.motion [data-reveal="image"].is-in img { transform: none; }

/* Gallery pieces rise while their artwork settles inside the frame */
.motion .gallery-item[data-reveal] img {
  transform: scale(1.12);
  transition: transform 1.6s var(--ease-out) calc(var(--d, 0) * 90ms), scale 0.9s var(--ease-out);
}
.motion .gallery-item.is-in img { transform: none; }

/* Rules draw in from the left; the element itself stays put */
.motion [data-reveal="line"] { opacity: 1; transform: none; }
.motion [data-reveal="line"]::before { transform: scaleX(0); transition: transform 1.4s var(--ease-in-out) calc(var(--d, 0) * 90ms); }
.motion [data-reveal="line"].is-in::before { transform: none; }

/* Children rise one after another */
.motion [data-stagger] > * {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms + 180ms + var(--i, 0) * 90ms);
}
.motion [data-stagger].is-in > * { opacity: 1; transform: none; }

/* Headings: each word rises out of its own mask. The padding/negative margin pair gives
   descenders and italic overhangs room inside the mask without changing the layout. */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.08em 0.14em; margin: 0 -0.08em -0.14em; }
[data-split] .wi { display: inline-block; }
.motion [data-split] .wi {
  transform: translate3d(0, 108%, 0);
  transition: transform 1.2s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms + var(--wi, 0) * 45ms);
}
.motion [data-split].is-in .wi { transform: none; }

/* The About text lights up word by word as it scrolls into the reading zone */
.motion [data-fill] .fw { opacity: 0.16; transition: opacity 0.5s var(--ease-out); }
.motion [data-fill] .fw.on { opacity: 1; }

/* Mobile menu links cascade in */
@media (max-width: 900px) {
  .motion .site-nav li, .motion .nav-contact {
    opacity: 0; transform: translate3d(0, 28px, 0);
    transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: calc(60ms + var(--i, 0) * 55ms);
  }
  .motion body.nav-open .site-nav li, .motion body.nav-open .nav-contact { opacity: 1; transform: none; }
}

/* Scroll-linked pieces are moved by transform from main.js */
.motion [data-parallax], .motion [data-float], .motion [data-spin], .motion .ticker-track { will-change: transform; }

/* "View" bubble that follows the pointer over artwork that opens in the viewer (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; }
.cursor span {
  display: grid; place-items: center; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  /* Accent blue with a faint light ring reads on both the black and the pale artwork */
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 10px 30px rgba(23, 22, 20, 0.25);
  scale: 0; transition: scale 0.45s var(--ease-out);
}
.cursor.is-on span { scale: 1; }
.has-cursor [data-lightbox] { cursor: none; }

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .lightbox, .spiral, .copy, .filters, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 28px; }
  .contact, .site-footer { background: #fff; color: #000; }
  .contact-title, .contact-row .val, .site-footer a { color: #000; }
  .motion [data-reveal], .motion [data-stagger] > *, .motion [data-split] .wi, .motion [data-fill] .fw {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
}
