/* pdi / Paramétrico de Diseño: site styles.
   Palette and type follow the brand book in brand/: eight neutrals from
   ink to white, no accent color. Myriad Pro is the brand face; the web
   uses Source Sans 3, its open-source sibling, self-hosted. */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */
:root {
  /* Brand book, page 7 */
  --ink: #1b1d1f;          /* primary text, dark field */
  --graphite: #2b2e31;     /* brand backdrop */
  --charcoal: #474a4d;     /* secondary information */
  --steel: #74787c;        /* rules, diagrams */
  --silver: #b6b8ba;       /* surface accents */
  --fog: #e6e7e8;          /* dividers, fields */
  --paper: #f6f6f4;        /* editorial field */
  --white: #ffffff;
  /* Working shades derived from them */
  --label: #63676b;        /* steel, darkened so small text passes contrast on white */
  --ink-deep: #131517;     /* control strip under the hero */
  --line-dark: #3a3d40;    /* rules on ink */
  --text-dark: #d5d6d7;    /* body text on ink */

  --sans: "Source Sans 3", "Myriad Pro", Myriad, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.2vw, 64px);
  --col-gap: clamp(16px, 2vw, 28px);
  --header-h: 68px;
  --section-pad: clamp(72px, 10vw, 152px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, address, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 700; }

h1, h2, h3 { color: var(--ink); font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

/* Labels: letter-spaced capitals, as on the brand board. */
.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--label);
}

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

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 10px; }

/* Em-dash bullets. */
.dash li { position: relative; padding-left: 1.6em; }
.dash li::before { content: "\2014"; position: absolute; left: 0; color: var(--silver); }
.dash li + li { margin-top: 0.3em; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn .bi { font-size: 1.05em; transition: transform 0.18s ease; }
.btn:hover .bi-arrow-right { transform: translateX(3px); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: transparent; color: var(--white); }
.btn--ghost { border-color: var(--steel); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: rgb(255 255 255 / 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--fog);
}

/* Logo: the paramétricodiseño wordmark, light and bold. */
.logo {
  font-size: 1.625rem; font-weight: 300; letter-spacing: -0.01em; line-height: 1;
  color: var(--charcoal); text-decoration: none; white-space: nowrap;
}
.logo strong { font-weight: 700; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.site-nav ul { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.site-nav a { text-decoration: none; }
.site-nav li a {
  display: inline-block; padding: 10px 0; color: var(--charcoal);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav li a:hover, .site-nav li a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

.lang { display: flex; gap: 2px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; }
.lang > * { padding: 6px 8px; color: var(--label); text-decoration: none; }
.lang a:hover { color: var(--ink); }
.lang [aria-current] { color: var(--white); background: var(--ink); }

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; cursor: pointer; font-size: 1.6rem; color: var(--ink);
}

.header-back { font-size: 1rem; text-decoration: none; color: var(--charcoal); }
.header-back:hover { color: var(--ink); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav:not(.site-nav--plain) {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--white); border-bottom: 1px solid var(--ink);
  }
  .site-nav.is-open { display: flex; }
  .site-nav:not(.site-nav--plain) ul { flex-direction: column; gap: 0; }
  .site-nav:not(.site-nav--plain) li a { display: block; padding: 18px 0; font-size: 0.875rem; border-bottom: 1px solid var(--fog); }
  .site-nav:not(.site-nav--plain) .lang { margin-top: 18px; }
  .site-nav:not(.site-nav--plain) .lang > * { padding: 10px 12px; }
  .site-nav--plain .header-back { font-size: 0; }
  .site-nav--plain .header-back .bi { font-size: 1.25rem; }
}
@media (max-width: 360px) {
  .logo { font-size: 1.4375rem; }
}

/* ------------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto;
  column-gap: var(--col-gap);
  min-height: calc(100svh - var(--header-h));
  padding: 0 var(--gutter);
  overflow: hidden;
  background: var(--ink); color: var(--text-dark);
}

.hero__copy {
  grid-column: 1 / span 7; grid-row: 1;
  align-self: center; position: relative; z-index: 2;
  padding-block: clamp(40px, 6vh, 88px);
  pointer-events: none;                 /* drags pass through to the model */
}
.hero__copy > * { pointer-events: auto; }

/* INDUSTRIAL DESIGN / PRODUCT DEVELOPMENT / PARAMETRIC THINKING */
.hero__tagline { display: flex; flex-wrap: wrap; gap: 4px 0; margin-bottom: clamp(22px, 3.4vh, 40px); color: var(--silver); }
.hero__tagline span + span::before { content: "/"; margin: 0 1.1em; color: var(--label); font-weight: 400; }

h1 {
  font-size: clamp(2.75rem, 5.6vw, 5.75rem);
  font-weight: 300; line-height: 1; letter-spacing: -0.02em; color: var(--white);
}

/* Two bold statements under a rule, as on the brand board. */
.hero__statements {
  margin-top: clamp(22px, 3.4vh, 38px); padding-top: clamp(22px, 3.4vh, 38px);
  border-top: 1px solid var(--steel);
  font-size: clamp(1.6rem, 2.9vw, 3rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.012em;
  color: var(--white);
}
.hero__statements span { display: block; }

.lede {
  max-width: 24em; margin-top: clamp(22px, 3.4vh, 38px);
  font-size: clamp(1.125rem, 1.45vw, 1.5rem); line-height: 1.4;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vh, 44px); }

/* The parametric surface is the background of the whole hero. */
.hero__figure {
  grid-column: 1 / -1; grid-row: 1;
  position: relative; min-height: 380px;
  margin: 0 calc(var(--gutter) * -1);
  -webkit-user-select: none; user-select: none;
  touch-action: pan-y; cursor: grab;
}
.hero__figure.is-dragging { cursor: grabbing; }
.figure__stage { position: absolute; inset: 0; }
.figure__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__figure noscript img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: invert(1); }

.figure__meta {
  position: absolute; right: var(--gutter); bottom: 14px;
  display: flex; justify-content: flex-end; gap: 28px;
  color: #9a9da0; pointer-events: none;
}
.figure__meta .bi { font-size: 1.15em; vertical-align: -0.12em; }
.figure__drag, .figure__dims { white-space: nowrap; }
.figure__dims { text-transform: none; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.figure__dims output { color: var(--white); }

/* Control strip under the model. */
.params {
  grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 4.6fr);
  margin: 0 calc(var(--gutter) * -1);
  border-top: 1px solid var(--line-dark);
  background: var(--ink-deep);
}
.params__detail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.param {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; align-content: center; row-gap: 2px;
  padding: 16px 22px 14px; border-left: 1px solid var(--line-dark); cursor: pointer;
}
.params > .param:first-child { border-left: 0; padding-left: var(--gutter); }
.params__detail > .param:last-child { padding-right: var(--gutter); }
.param__name { color: #9a9da0; }
.param__value { font-size: 0.9375rem; font-weight: 600; color: var(--white); font-variant-numeric: tabular-nums; }
.param input { grid-column: 1 / -1; }
.param__scale {
  grid-column: 1 / -1; display: flex; justify-content: space-between;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8d90;
}

/* Design and Surface are the main controls: lighter cell, larger marker. */
.param--main {
  --track: var(--white); --thumb: var(--white); --ring: var(--graphite);
  --thumb-w: 13px; --thumb-h: 27px;
  background: var(--graphite);
}
.param--main .param__name { color: var(--white); }

.params__toggle { display: none; }

/* Range input: a hairline track with a square marker. */
input[type="range"] {
  --track: #8a8d90; --thumb: var(--silver); --ring: var(--ink-deep);
  --thumb-w: 9px; --thumb-h: 19px;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 36px; margin: 0; background: transparent; cursor: ew-resize;
}
.param--main input[type="range"] { --track: inherit; --thumb: inherit; --ring: inherit; --thumb-w: inherit; --thumb-h: inherit; }
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--track); }
input[type="range"]::-moz-range-track { height: 1px; background: var(--track); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: var(--thumb-w); height: var(--thumb-h); margin-top: calc(var(--thumb-h) / -2);
  background: var(--thumb); border: 0; border-radius: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
input[type="range"]::-moz-range-thumb {
  width: var(--thumb-w); height: var(--thumb-h); background: var(--thumb); border: 0; border-radius: 0;
  box-shadow: 0 0 0 4px var(--ring);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--white); outline-offset: 4px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--white); outline-offset: 4px; }

/* Fingers need a taller target than a mouse pointer. */
@media (pointer: coarse) {
  input[type="range"] { height: 48px; --thumb-w: 12px; --thumb-h: 25px; }
  .param--main { --thumb-w: 16px; --thumb-h: 32px; }
}

@media (max-width: 1180px) {
  .params { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .params__detail { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); }
  .params__detail > .param:first-child { border-left: 0; padding-left: var(--gutter); }
  .params > .param--main + .param--main { padding-right: var(--gutter); }
}

@media (max-width: 860px) {
  .hero { grid-template-rows: auto auto auto; min-height: 0; }
  .hero__copy { grid-column: 1 / -1; padding-block: 36px 4px; }
  .hero__figure { grid-row: 2; min-height: 0; }
  .figure__stage { position: relative; inset: auto; aspect-ratio: 4 / 3; }
  .hero__figure noscript img { position: static; height: auto; }
  .figure__meta { position: static; justify-content: space-between; gap: 16px; padding: 4px var(--gutter) 14px; font-size: 0.6875rem; }

  .params { grid-row: 3; grid-template-columns: minmax(0, 1fr); }
  .params > .param--main { padding: 16px var(--gutter) 12px; border-left: 0; }
  .params > .param--main + .param--main { border-top: 1px solid var(--line-dark); }
  .params__toggle {
    display: flex; align-items: center; gap: 0.7em; width: 100%; min-height: 52px;
    padding: 0 var(--gutter); border: 0; border-top: 1px solid var(--line-dark);
    background: transparent; color: var(--text-dark); cursor: pointer;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  }
  .params__toggle .bi-chevron-down { margin-left: auto; transition: transform 0.2s ease; }
  .params__toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
  .params__detail { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .params.is-open .params__detail { display: grid; }
  .params__detail > .param { padding-left: var(--gutter); padding-right: var(--gutter); border-left: 0; border-bottom: 1px solid var(--line-dark); }
  .params__detail > .param:nth-child(even) { border-left: 1px solid var(--line-dark); padding-left: 22px; }
  .params__detail > .param:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------- sections */
.section { padding: var(--section-pad) var(--gutter); }
.section--paper { background: var(--paper); }
.section--dark {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--text-dark); padding-bottom: clamp(48px, 6vw, 88px);
}
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .label { color: #9a9da0; }
/* The model again, drawn faintly behind the contact section. */
.backdrop { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.section__head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap);
  align-items: start;
  border-top: 1px solid var(--ink); padding-top: 18px;
  margin-bottom: clamp(48px, 7vw, 104px);
}
.section--dark .section__head { border-top-color: var(--white); }
.section__tag { grid-column: 1 / span 3; color: var(--ink); padding-top: 0.6em; }
.section__tag span { color: var(--label); }
.section__tag span::after { content: "/"; margin: 0 0.9em; font-weight: 400; }
.section--dark .section__tag { color: var(--white); }
.section__title {
  grid-column: 4 / -1;
  font-size: clamp(2rem, 4.2vw, 4.25rem); font-weight: 300;
  line-height: 1.04; letter-spacing: -0.022em; max-width: 17em;
}

/* One brand line under a section title, aligned with the title. */
.section__lead {
  margin: calc(clamp(48px, 7vw, 104px) * -0.55) 0 clamp(40px, 5vw, 72px) calc((100% + var(--col-gap)) / 4);
  max-width: 30em; font-size: clamp(1.125rem, 1.35vw, 1.3125rem); line-height: 1.45; color: var(--ink);
}

@media (max-width: 860px) {
  .section__tag { grid-column: 1 / -1; padding-top: 0; margin-bottom: 20px; }
  .section__title { grid-column: 1 / -1; }
  .section__lead { margin-left: 0; }
}

/* --------------------------------------------------------------- services */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }

.services__aside {
  grid-column: 1 / span 5; align-self: start;
  position: sticky; top: calc(var(--header-h) + 28px);
}
.services__intro { max-width: 30em; font-size: clamp(1.125rem, 1.35vw, 1.3125rem); line-height: 1.45; color: var(--ink); }

.services__note { max-width: 32em; margin-top: 1em; font-size: 1rem; }
.services__caption { margin-top: clamp(28px, 4vh, 48px); padding-top: 14px; border-top: 1px solid var(--fog); }
.stack { width: 100%; max-width: 540px; height: auto; margin-top: 8px; overflow: visible; }
.stack a { text-decoration: none; cursor: pointer; outline-offset: 6px; }
.plate { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.plate__top, .plate__side { stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 0.25s ease; }
.plate__top { fill: var(--white); }
.plate__side { fill: var(--fog); }
.plate__side--right { fill: var(--silver); }
.plate__leader { stroke: var(--silver); stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke 0.25s ease; }
.plate__label { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; fill: var(--label); transition: fill 0.25s ease; }
.plate__num { fill: var(--silver); }
.plate.is-above { transform: translateY(-16px); }
.plate.is-active { transform: translateY(-8px); }
.plate.is-active .plate__top { fill: var(--ink); }
.plate.is-active .plate__side { fill: var(--charcoal); }
.plate.is-active .plate__side--right { fill: #34373a; }
.plate.is-active .plate__leader { stroke: var(--ink); }
.plate.is-active .plate__label, .plate.is-active .plate__num { fill: var(--ink); }
.plate:hover .plate__label { fill: var(--ink); }

.services__list { grid-column: 7 / -1; border-top: 1px solid var(--ink); }
.svc {
  display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 12px;
  padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--fog);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.svc__num { padding-top: 0.95em; color: var(--silver); transition: color 0.25s ease; }
.svc h3 { font-size: clamp(1.625rem, 2.4vw, 2.25rem); letter-spacing: -0.015em; line-height: 1.12; }
.svc__body > p { margin-top: 10px; max-width: 32em; }
.svc .dash { margin-top: 16px; font-size: 1rem; color: var(--label); }
.svc.is-active .svc__num { color: var(--ink); }

@media (max-width: 980px) {
  .services__aside { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
  .services__list { grid-column: 1 / -1; }
  .stack { max-width: 520px; }
  .plate__label { font-size: 14.5px; letter-spacing: 0.1em; }
}

/* ---------------------------------------------------------------- process */
.process__lead {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 20px;
  align-items: start; margin-bottom: clamp(48px, 6vw, 88px);
}
.process__statement {
  grid-column: 4 / span 8;
  font-size: clamp(1.6rem, 2.9vw, 3rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.012em; color: var(--ink);
}
.process__intro { grid-column: 4 / span 6; font-size: clamp(1.125rem, 1.35vw, 1.3125rem); line-height: 1.45; color: var(--ink); }

.process__label { margin-bottom: 14px; }

/* Four principles, numbered in a ring as in the brand book. */
.principles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap);
  border-top: 1px solid var(--ink); margin-bottom: clamp(56px, 7vw, 104px);
}
.principle { padding: 26px 0 28px; border-bottom: 1px solid var(--fog); }
.principle__num {
  display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--steel); border-radius: 50%;
  font-size: 0.8125rem; font-weight: 600; color: var(--ink);
}
.principle h4 { margin: 16px 0 0; font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.008em; color: var(--ink); }
.principle p { margin-top: 8px; font-size: 1rem; line-height: 1.45; max-width: 22em; }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.step {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 24px 0 0; min-height: 250px;
}
.step + .step { padding-left: 24px; border-left: 1px solid var(--fog); }
.step::before {            /* station marker on the rule */
  content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--ink);
}
.step + .step::before { left: -4px; }
.step h4 { margin: 14px 0 0; font-size: clamp(1.5rem, 2vw, 1.875rem); font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; color: var(--ink); }
.step__text { margin-top: 12px; font-size: 1rem; line-height: 1.45; flex: 1; }
.step__out { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--fog); font-size: 1rem; color: var(--ink); }
.step__out .label { display: block; margin-bottom: 4px; }

@media (max-width: 1100px) {
  .process__statement { grid-column: 1 / -1; }
  .process__intro { grid-column: 1 / span 8; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .process__intro { grid-column: 1 / -1; }
  .principles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { min-height: 0; padding: 22px 0 28px 26px; border-left: 0; border-bottom: 1px solid var(--fog); }
  .step::before, .step + .step::before { top: 29px; left: 0; }
}

/* ------------------------------------------------------------------- work */
.gallery {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 24px;
}
.gallery__head { grid-column: 1 / span 3; }
.gallery__head h3 { font-size: clamp(1.5rem, 2vw, 1.875rem); letter-spacing: -0.015em; }
.gallery__head p { margin-top: 6px; font-size: 1rem; color: var(--label); }
.gallery__follow { display: inline-flex; align-items: center; gap: 0.5em; margin-top: 10px; color: var(--ink); font-weight: 600; text-underline-offset: 0.2em; }
.gallery__follow:hover { text-decoration-thickness: 2px; }

/* Columns keep every image at its own proportion. */
.gallery__grid { grid-column: 4 / -1; columns: 3 220px; column-gap: 12px; }
.gallery__grid li { break-inside: avoid; margin-bottom: 12px; }
.gallery__grid a { position: relative; display: block; overflow: hidden; background: var(--paper); color: var(--white); text-decoration: none; }
.gallery__grid img { width: 100%; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery__grid a:hover img { transform: scale(1.03); }
.gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: end; gap: 12px;
  padding: 36px 14px 12px; font-size: 0.875rem; font-weight: 600;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0));
  opacity: 0; transition: opacity 0.2s ease;
}
.gallery__grid a:hover .gallery__caption, .gallery__grid a:focus-visible .gallery__caption { opacity: 1; }
@media (hover: none) { .gallery__caption { opacity: 1; } }

@media (max-width: 860px) {
  .gallery__head, .gallery__grid { grid-column: 1 / -1; }
  .gallery__grid { columns: 2 150px; column-gap: 8px; }
  .gallery__grid li { margin-bottom: 8px; }
}

/* ----------------------------------------------------------------- studio */
.studio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 48px; }
.studio__text { grid-column: 4 / span 5; }
.studio__text p + p { margin-top: 1.1em; }
.studio__lede { font-size: clamp(1.25rem, 1.7vw, 1.5625rem); line-height: 1.38; color: var(--ink); }
.studio__aside { grid-column: 10 / -1; }

/* Key and value lines. */
.kv > div { padding: 12px 0; border-top: 1px solid var(--fog); }
.kv > div:first-child { border-top-color: var(--ink); }
.kv > div:last-child { border-bottom: 1px solid var(--fog); }
.kv dd { margin-top: 2px; font-size: 1rem; color: var(--ink); }

.bio { margin-top: 40px; }
.bio h3 { font-size: 1.25rem; font-weight: 600; }
.bio .label { margin-top: 4px; }
.bio__text { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; }

@media (max-width: 1100px) {
  .studio__text { grid-column: 1 / span 7; }
  .studio__aside { grid-column: 9 / -1; }
}
@media (max-width: 860px) {
  .studio__text, .studio__aside { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- contact */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 56px; }
.contact__main { grid-column: 4 / span 5; }
.contact__text { font-size: clamp(1.125rem, 1.35vw, 1.3125rem); max-width: 26em; }
.contact__email { margin: 20px 0 22px; }
.contact__email a {
  font-size: clamp(1.375rem, 2.6vw, 2.375rem); font-weight: 300; letter-spacing: -0.015em; color: var(--white);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  text-decoration-color: var(--label); transition: text-decoration-color 0.15s ease;
  overflow-wrap: anywhere;
}
.contact__email a:hover { text-decoration-color: var(--white); }

.contact__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.contact__details h3 { margin-bottom: 10px; }
.contact__details address, .contact__details li, .contact__details p { font-size: 1rem; line-height: 1.55; }
.contact__details p { margin-top: 10px; }
.contact__details a { color: var(--white); text-decoration: underline; text-decoration-color: var(--label); text-underline-offset: 0.2em; }
.contact__details a:hover { text-decoration-color: var(--white); }
.social li + li { margin-top: 4px; }
.social .bi { margin-right: 0.35em; }

.brief { grid-column: 9 / -1; }
.brief legend { margin-bottom: 8px; }
.field { display: block; padding-top: 18px; }
.field span { display: block; font-size: 0.875rem; color: #a4a7aa; }
.field input, .field select, .field textarea {
  display: block; width: 100%; padding: 8px 0 10px;
  background: transparent; color: var(--white);
  border: 0; border-bottom: 1px solid var(--steel); border-radius: 0;
  transition: border-color 0.15s ease;
}
.field select { -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); background: var(--white); }
.field textarea { resize: vertical; min-height: 7.5em; }
.field input:hover, .field select:hover, .field textarea:hover,
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--white); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--white); }
.brief .btn { margin-top: 26px; }
/* Hidden from people; see the comment in the template. */
.brief__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brief__status { margin-top: 16px; padding: 12px 14px; border-left: 2px solid var(--silver); font-size: 1rem; color: var(--white); background: rgb(255 255 255 / 0.06); }
.brief__status[data-state="sending"] { color: var(--text-dark); }
.brief button[disabled] { opacity: 0.55; cursor: progress; }
.brief__note { margin-top: 12px; font-size: 0.875rem; color: #a4a7aa; }
.brief__note + .brief__note { margin-top: 4px; }
.brief__note a { color: var(--text-dark); text-underline-offset: 0.2em; }
.brief__note a:hover { color: var(--white); }

@media (max-width: 1100px) {
  .contact__main { grid-column: 1 / span 6; }
  .brief { grid-column: 8 / -1; }
}
@media (max-width: 860px) {
  .contact__main, .brief { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------- footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px;
  padding: 22px var(--gutter) 28px;
  background: var(--ink); color: #a4a7aa; font-size: 0.875rem;
  border-top: 1px solid var(--line-dark);
}
/* The pdi wordmark opens the legal line. */
.site-footer__legal { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.site-footer__pdi { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--white); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-right: auto; }
.site-footer a { color: var(--text-dark); text-decoration: underline; text-decoration-color: var(--label); text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--white); text-decoration-color: var(--white); }
.site-footer__version { font-size: 0.75rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ legal */
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(56px, 8vw, 120px) var(--gutter); }
.legal h1 { margin: 12px 0 0.7em; font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 300; letter-spacing: -0.022em; line-height: 1.04; color: var(--ink); }
.legal__intro { font-size: 1.1875rem; color: var(--ink); }
.legal__intro + .legal__intro { margin-top: 0.9em; }
.legal section { border-top: 1px solid var(--fog); padding: 28px 0 4px; margin-top: 28px; }
.legal h2 { display: flex; gap: 0.8em; align-items: baseline; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.6em; }
.legal h2 span { font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--label); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.legal section > * + * { margin-top: 0.9em; }
.legal a { color: var(--ink); text-underline-offset: 0.2em; overflow-wrap: anywhere; }

/* ----------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
