/* ==========================================================================
   Andrey PW — portfolio
   One stylesheet. No framework.

   Design system
   -------------
   Two skins from one set of tokens: the professional pages run light
   ("paper"), Behind the Lens runs dark. Everything else — type scale,
   spacing, hairlines, motion — is shared, so the two halves read as one
   site. Accent is sampled from the APW monogram (crimson -> violet).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* --- surface + ink (light skin) --- */
  --paper:        #fbfaf8;
  --surface:      #ffffff;
  --surface-2:    #f4f2ee;
  --ink:          #17181a;
  --ink-2:        #45484c;
  --muted:        #74787d;
  --line:         #e7e4de;
  --line-strong:  #d5d1c9;

  /* --- accent, sampled from the logo gradient --- */
  --accent:       #c4265e;
  --accent-deep:  #a31e4e;
  --accent-wash:  rgba(196, 38, 94, 0.08);
  --grad:         linear-gradient(100deg, #ee1532 0%, #c4265e 45%, #665ebc 100%);

  /* --- type --- */
  --font-display: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, sans-serif;

  --t-eyebrow:  0.75rem;
  --t-small:    0.8125rem;
  --t-body:     1rem;
  --t-lead:     clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  --t-h3:       clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --t-h2:       clamp(1.75rem, 1.35rem + 1.8vw, 2.875rem);
  --t-h1:       clamp(2.5rem, 1.5rem + 4.4vw, 5rem);

  /* --- space --- */
  --gutter:     clamp(1.25rem, 4vw, 2.5rem);
  --section-y:  clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --maxw:       1200px;
  --maxw-text:  62ch;

  /* --- motion --- */
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --fast:       160ms;
  --slow:       560ms;

  --radius:     3px;
  --nav-h:      4.25rem;

  color-scheme: light;
}

/* Dark skin. Applied per page via <body class="skin-dark">, or to a single
   band inside a light page via class="band-dark". Same token names, so every
   component below works in both without a single override. */
.skin-dark,
.band-dark {
  --paper:        #0c0d0f;
  --surface:      #15171a;
  --surface-2:    #1d2024;
  --ink:          #f3f2f0;
  --ink-2:        #c3c6c9;
  --muted:        #8a8f95;
  --line:         rgba(255, 255, 255, 0.1);
  --line-strong:  rgba(255, 255, 255, 0.2);

  --accent:       #ee6188;   /* lifted for contrast on near-black */
  --accent-deep:  #f5849f;
  --accent-wash:  rgba(238, 97, 136, 0.12);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;

  /* Keeps the footer on the bottom edge of short pages (contact) instead of
     leaving it stranded mid-viewport. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: var(--t-h3); line-height: 1.35; letter-spacing: -0.012em; font-weight: 550; }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

img { height: auto; }

button, input, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-small);
  transition: top var(--fast) var(--ease);
}
.skip-link:focus { top: 0.75rem; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }

.band-dark {
  background: var(--paper);
  color: var(--ink);
}

/* Hairline rule that carries the brand gradient. Used sparingly — once or
   twice per page, never as a background wash. */
.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}
.rule--accent {
  height: 2px;
  width: 3.5rem;
  background: var(--grad);
  border-radius: 2px;
}

/* Small uppercase label. The one piece of "chrome" in the whole design. */
.eyebrow {
  display: block;
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.011em;
  max-width: var(--maxw-text);
}

.muted { color: var(--muted); }

/* Section header: eyebrow + title, optional trailing link. */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.sec-head__title { display: grid; gap: 0.9rem; }

/* --------------------------------------------------------------------------
   4. Buttons + links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--fast) var(--ease),
              border-color var(--fast) var(--ease),
              color var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--accent); }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.btn:active { transform: translateY(1px); }

.btn__arrow { transition: transform var(--fast) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Text link with an underline that draws in from the left. */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 280ms var(--ease), color var(--fast) var(--ease);
}
.link:hover { color: var(--accent); background-size: 100% 1px; }
.link .btn__arrow { transition: transform var(--fast) var(--ease); }
.link:hover .btn__arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) linear,
              background var(--fast) linear;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.015em;
}
.brand img { width: 1.75rem; height: 1.75rem; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  font-size: var(--t-small);
  font-weight: 450;
  color: var(--muted);
  padding-block: 0.35rem;
  transition: color var(--fast) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  transition: border-color var(--fast) var(--ease),
              color var(--fast) var(--ease),
              background var(--fast) var(--ease);
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-wash);
}
.icon-btn svg { width: 1rem; height: 1rem; }

.nav__right { display: flex; align-items: center; gap: 1.25rem; }

/* Hamburger -> full-screen panel on small screens */
/* Flex column with an explicit gap, not grid: auto grid rows stretch to fill the
   button (align-content defaults to stretch), which spreads the bars far wider
   apart than the 6px the X animation below translates them. */
.nav__toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 1.25rem;
  height: 1px;
  background: var(--ink);
  transition: transform 280ms var(--ease), opacity var(--fast) linear;
}
/* Bars sit at y = 0, 6, 12 (1px tall + 5px gap), so the outer two each travel
   6px to meet the middle before rotating — half that leaves a chevron, not an X. */
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav__toggle { display: flex; }

  .nav__panel {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem var(--gutter) 2rem;
    display: grid;
    gap: 0.25rem;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 360ms var(--ease);
  }
  .nav__panel.is-open { clip-path: inset(0 0 0 0); }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__link {
    display: block;          /* inline anchors would clip the hairline to the text width */
    font-size: 1.125rem;
    font-family: var(--font-display);
    color: var(--ink);
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__panel .icon-btn { margin-top: 1.25rem; }
}

@media (min-width: 768px) {
  .nav__panel { display: contents; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: calc(var(--nav-h) + clamp(2rem, 4vw, 3.5rem));
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero__copy { display: grid; gap: 1.75rem; justify-items: start; }

.hero__name { max-width: 15ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__figure { position: relative; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

@media (min-width: 900px) {
  .hero__figure img { aspect-ratio: 5 / 6; }
}

/* --------------------------------------------------------------------------
   7. Stat strip
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  padding-right: 1.5rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) {
  .stat { border-bottom: 0; }
  .stat + .stat { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 3vw, 2.25rem); }
}
@media (max-width: 859px) {
  .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1.25rem; }
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.stat__label {
  font-size: var(--t-small);
  color: var(--muted);
  line-height: 1.45;
  display: block;
  max-width: 22ch;
}

/* --------------------------------------------------------------------------
   8. Two-column editorial block (About)
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; }
  .split__aside { position: sticky; top: calc(var(--nav-h) + 3rem); align-self: start; }
}
.split__aside { display: grid; gap: 1.25rem; align-content: start; }

/* Numbered rows, hairline-separated. Replaces the old photo cards. */
.rows { display: grid; }

.row-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1.25rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 1px solid var(--line); }

.row-item__idx {
  font-family: var(--font-display);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.28rem;
}
.row-item__body { display: grid; gap: 0.6rem; }
.row-item__body p { color: var(--ink-2); max-width: var(--maxw-text); }

@media (max-width: 520px) {
  .row-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .row-item__idx { padding-top: 0; }
}

/* --------------------------------------------------------------------------
   9. Wide image band
   -------------------------------------------------------------------------- */

.band-img { position: relative; }
.band-img img {
  width: 100%;
  height: clamp(16rem, 42vw, 30rem);
  object-fit: cover;
  background: var(--surface-2);
}
.band-img figcaption {
  margin-top: 0.9rem;
  font-size: var(--t-small);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   10. Numbered tile grid (Core Expertise)
   -------------------------------------------------------------------------- */

/* Explicit column counts, not auto-fit: the hairline grid is drawn by the 1px
   background showing through the gaps, so a partly-filled last row would leave
   a visible block of --line. 6 items divide evenly into 1, 2 and 3. */
.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 620px)  { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.75rem;
  align-content: space-between;
  min-height: 11rem;
  transition: background var(--fast) var(--ease);
}
.tile:hover { background: var(--surface); }

/* Icon left, index right, title anchored to the bottom of the tile. */
.tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tile__icon {
  width: 1.625rem;
  height: 1.625rem;
  color: var(--ink-2);
  transition: color 240ms var(--ease);
}
.tile__icon svg { width: 100%; height: 100%; }
.tile:hover .tile__icon { color: var(--accent); }

.tile__idx {
  font-family: var(--font-display);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color var(--fast) var(--ease);
}
.tile:hover .tile__idx { color: var(--accent); }

.tile h3 { max-width: 22ch; }

/* --------------------------------------------------------------------------
   11. Toolkit
   -------------------------------------------------------------------------- */

.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 620px)  { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools { grid-template-columns: repeat(3, 1fr); } }

.tool {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  padding: clamp(1.35rem, 2.5vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--fast) var(--ease),
              transform 280ms var(--ease);
}
.tool:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.tool__logo { height: 2.125rem; display: flex; align-items: center; }
.tool__logo img {
  height: 100%;
  width: auto;
  max-width: 8rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter 280ms var(--ease), opacity 280ms var(--ease);
}
.tool:hover .tool__logo img { filter: grayscale(0); opacity: 1; }

.tool__text { display: grid; gap: 0.45rem; }
.tool__text p { font-size: var(--t-small); color: var(--muted); line-height: 1.55; }

/* --------------------------------------------------------------------------
   12. Career timeline
   -------------------------------------------------------------------------- */

.timeline { display: grid; }

.job {
  display: grid;
  gap: 0.5rem 2.5rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.job:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 820px) {
  .job { grid-template-columns: 11rem 1fr; }
}

.job__period {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  padding-top: 0.2rem;
}
@media (min-width: 820px) {
  .job__period::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0.7rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background var(--fast) var(--ease);
  }
  .job:first-child .job__period::before { background: var(--accent); }
}

.job__body { display: grid; gap: 0.55rem; }
.job__org {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--accent);
}
.job__body p { color: var(--ink-2); max-width: var(--maxw-text); }

/* --------------------------------------------------------------------------
   13. Photo grids
   -------------------------------------------------------------------------- */

/* Teaser: three photos, equal frames. */
.photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.photo-row img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* Gallery: CSS columns for true masonry with zero JavaScript. */
.gallery {
  columns: 1;
  column-gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
@media (min-width: 620px)  { .gallery { columns: 2; } }
@media (min-width: 1024px) { .gallery { columns: 3; } }

.shot {
  margin: 0 0 clamp(0.75rem, 1.5vw, 1.25rem);
  break-inside: avoid;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
}
.shot img {
  width: 100%;
  transition: transform 700ms var(--ease), opacity 400ms linear;
}
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  transition: opacity 280ms var(--ease);
  pointer-events: none;
}
.shot:hover img { transform: scale(1.02); }
.shot:hover::after { opacity: 0.12; }

/* --------------------------------------------------------------------------
   14. Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  /* minmax(0,1fr), not 1fr: a bare 1fr row keeps an automatic min-size of
     `auto`, so a tall photo stretches the row and spills over the controls. */
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(8, 9, 10, 0.97);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--ease), visibility 280ms linear;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  color: #f3f2f0;
}
.lightbox__count {
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
  color: rgba(243, 242, 240, 0.6);
}

/* The photo is absolutely positioned inside the stage rather than centred as a
   grid item. As a grid item its `max-height: 100%` resolves against an
   indefinite block and is dropped, so tall frames render at full size and spill
   over the controls; against an absolute containing block the percentage always
   resolves. `inset: 0` + `margin: auto` handles the centring. */
.lightbox__stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.lightbox__stage img {
  position: absolute;
  inset: 0 var(--gutter);
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem var(--gutter) 1.5rem;
}

.lb-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: none;
  color: #f3f2f0;
  cursor: pointer;
  transition: background var(--fast) var(--ease),
              border-color var(--fast) var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.45); }
.lb-btn svg { width: 1.1rem; height: 1.1rem; }

body.lb-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   15. Form
   -------------------------------------------------------------------------- */

.form { display: grid; gap: 1.25rem; }

.field { display: grid; gap: 0.5rem; }

.field label {
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: border-color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field textarea { resize: vertical; min-height: 9rem; }

@media (min-width: 560px) {
  .form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

.form__note { font-size: var(--t-small); color: var(--muted); }

/* Inline submit result. Carries a coloured hairline on the leading edge rather
   than a filled alert box — same restraint as the rest of the page. */
.form__status {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 0.9rem;
  border-left: 2px solid var(--line-strong);
}
.form__status.is-ok  { border-left-color: #2f7d5b; }
.form__status.is-err { border-left-color: var(--accent); }
.form__status[hidden] { display: none; }

/* Direct-contact list on the contact page */
.channels { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }

.channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
  transition: padding-inline var(--fast) var(--ease);
}
.channel:last-child { border-bottom: 1px solid var(--line); }
.channel__label { font-size: var(--t-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.channel__value { font-size: 0.9375rem; font-weight: 450; }
.channel a { transition: color var(--fast) var(--ease); }
.channel a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   16. CTA + footer
   -------------------------------------------------------------------------- */

.cta {
  display: grid;
  gap: 2rem;
  justify-items: start;
  padding-block: clamp(4rem, 3rem + 5vw, 7rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .cta {
    grid-template-columns: 1fr auto;
    align-items: end;
    justify-items: stretch;
  }
}

.footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer a { transition: color var(--fast) var(--ease); }
.footer a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   17. Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--slow) var(--ease),
              transform var(--slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* No JS, no problem — content must never stay invisible. */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .shot:hover img { transform: none; }
}

/* --------------------------------------------------------------------------
   18. Print
   -------------------------------------------------------------------------- */

@media print {
  .nav, .lightbox, .cta, .hero__figure, .band-img { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
  .reveal { opacity: 1; transform: none; }
}
