@import url("fonts.css");

/* ==========================================================================
   Atelier Tria
   --------------------------------------------------------------------------
   A restrained system: two typefaces, one warm neutral ground, one accent.
   Everything else is space. Sizes are fluid via clamp() so there are very few
   breakpoints — the layout bends rather than snaps.
   ========================================================================== */

/* Palette. Every pairing below is validated against WCAG AA by
   `node tools/palette.js` — change a value there first, then here. */
:root {
  /* Ground. A warm greige rather than a cream: closer to plaster than paper. */
  --bone: #efede6;
  --bone-deep: #e5e1d8;
  --bone-warm: #d9d3c6;
  --paper: #f6f4ef;

  /* Ink. Never pure black; a warm brown-black settles into the greige. */
  --ink: #2a2622;
  --ink-soft: #4f4941;
  --ink-mute: #665f52;

  /* One accent: terracotta. Used sparingly — rules, hovers, the odd word. */
  --clay: #9b4e33;
  --clay-deep: #7e3d25;

  --line: rgba(42, 38, 34, 0.15);
  --line-soft: rgba(42, 38, 34, 0.09);
  --line-invert: rgba(239, 237, 230, 0.22);

  --display: "Cormorant Garamond", "Times New Roman", Times, serif;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Vertical rhythm. --gap-section is the single knob for page density. */
  --gap-section: clamp(5.5rem, 11vw, 11rem);
  --gap-block: clamp(2.5rem, 5vw, 4.5rem);

  --shell: 78rem;      /* standard reading/content width */
  --shell-wide: 100rem; /* full-bleed-ish galleries */
  --pad: clamp(1.5rem, 5vw, 4.5rem);

  --header-h: 5.5rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 0.9s;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  letter-spacing: 0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--clay);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display,
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.014em;
  text-wrap: balance;
}

/* Hero-scale. Only ever once per page. */
.t-hero {
  font-size: clamp(2.9rem, 8.2vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.026em;
}

/* Section headings. */
.t-xl { font-size: clamp(2.35rem, 5.4vw, 4.25rem); }
.t-lg { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.t-md { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.4;
  margin: 0 0 1.5rem;
}

.eyebrow--rule {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.eyebrow--rule::before {
  content: "";
  width: clamp(1.75rem, 4vw, 3.25rem);
  height: 1px;
  background: var(--clay);
  flex: none;
}

.lead {
  font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.3125rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 42ch;
  text-wrap: pretty;
}

.prose p {
  color: var(--ink-soft);
  max-width: 66ch;
  text-wrap: pretty;
}

.prose p + p {
  margin-top: 1.25em;
}

.prose--wide p { max-width: 72ch; }

/* Italic serif pull-quote, used once or twice per page at most. */
.pull {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.shell--wide { max-width: var(--shell-wide); }
.shell--narrow { max-width: 58rem; }

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

.section--tight { padding-block: calc(var(--gap-section) * 0.6); }

/* First section under a .page-head. The head already supplies the space above,
   so a full --gap-section on top of it reads as a hole in the page. */
.section--lede { padding-top: 0; }
.section--lede-gap { padding-top: var(--gap-block); }

.section--deep {
  background: var(--bone-deep);
}

.section--ink {
  background: var(--ink);
  color: var(--bone);
}

.section--ink .eyebrow,
.section--ink .lead,
.section--ink .prose p {
  color: rgba(239, 237, 230, 0.7);
}

.section--ink .eyebrow--rule::before { background: var(--clay); }

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Two-column split that collapses cleanly. */
.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--sticky > :first-child {
    position: sticky;
    top: calc(var(--header-h) + 3rem);
  }
  .split--aside { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--label { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* --------------------------------------------------------------------------
   Links & buttons
   -------------------------------------------------------------------------- */

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.4rem;
  background: none;
  border: 0;
  cursor: pointer;
}

.link::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  transition: width var(--slow) var(--ease), opacity 0.4s;
  opacity: 0.55;
}

.link:hover::after,
.link:focus-visible::after {
  width: 3rem;
  opacity: 1;
}

.section--ink .link { color: var(--bone); }

/* Underline that grows from the left on hover. */
.link-quiet {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--slow) var(--ease);
}

.link-quiet:hover,
.link-quiet:focus-visible {
  background-size: 100% 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.15rem 2.4rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.55s var(--ease), border-color 0.55s var(--ease);
}

/* Wipe fill, rather than a colour fade — quieter and more deliberate. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: scaleY(1);
}

.btn > * { position: relative; }

.btn:hover,
.btn:focus-visible {
  color: var(--ink);
}

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

.btn--ghost::before { background: var(--ink); }

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--bone);
  border-color: var(--ink);
}

.section--ink .btn {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

.section--ink .btn::before { background: transparent; }

.section--ink .btn:hover,
.section--ink .btn:focus-visible {
  color: var(--ink);
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.header__inner {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Solid once scrolled, or on any page without a full-bleed hero. */
.header.is-solid,
.header.is-open {
  background: var(--bone);
  border-bottom-color: var(--line-soft);
}

/* Over a dark hero image the header text flips to bone. */
.header.is-over {
  color: var(--bone);
}

.header.is-over.is-solid,
.header.is-over.is-open {
  color: var(--ink);
}

.brand {
  font-family: var(--display);
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.4s;
}

@media (min-width: 30rem) {
  .brand { letter-spacing: 0.3em; }
}

.brand:hover { opacity: 0.62; }

/* The tagline is the first thing to go when the bar gets tight. */
.brand small {
  display: none;
  font-family: var(--sans);
  font-size: 0.5rem;
  letter-spacing: 0.32em;
  margin-top: 0.42rem;
  opacity: 0.62;
  font-weight: 400;
}

@media (min-width: 26rem) {
  .brand small { display: block; }
}

.nav {
  display: none;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

@media (min-width: 60rem) {
  .nav { display: flex; }
}

.nav a {
  position: relative;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.35rem;
  opacity: 0.82;
  transition: opacity 0.35s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] { opacity: 1; }

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__end {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.lang {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 0.1rem;
  opacity: 0.7;
  transition: opacity 0.35s;
  white-space: nowrap;
}

.lang:hover { opacity: 1; }

/* Hamburger — two rules that cross into an X. */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.38rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

@media (min-width: 60rem) {
  .burger { display: none; }
}

.burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform 0.45s var(--ease), opacity 0.3s;
}

.header.is-open .burger span:first-child {
  transform: translateY(0.195rem) rotate(45deg);
}

.header.is-open .burger span:last-child {
  transform: translateY(-0.195rem) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Mobile menu
   -------------------------------------------------------------------------- */

.menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--bone);
  padding: clamp(2rem, 8vw, 4rem) var(--pad) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.75rem);
  /* visibility is discrete, so transitioning it would leave the panel
     unfocusable for half the animation. Flip it at the end on close, and
     instantly on open. */
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
    visibility 0s linear 0.5s;
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s;
}

@media (min-width: 60rem) {
  .menu { display: none; }
}

.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu__nav a {
  font-family: var(--display);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 300;
  line-height: 1.24;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.menu__nav a[aria-current="page"] { color: var(--clay); }

.menu__meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: grid;
  gap: 0.4rem;
}

.menu__meta a { text-decoration: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: flex;
  align-items: flex-end;
  padding-top: var(--header-h);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  color: var(--bone);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media .figure {
  height: 100%;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two-stop scrim: dark at the foot where the type sits, clear at the top. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(30, 26, 22, 0.72) 0%, rgba(30, 26, 22, 0.34) 42%, rgba(30, 26, 22, 0.16) 72%, rgba(30, 26, 22, 0.3) 100%);
}

.hero__inner {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.hero .eyebrow {
  color: rgba(239, 237, 230, 0.78);
}

.hero .eyebrow--rule::before { background: rgba(239, 237, 230, 0.6); }

.hero__title {
  max-width: 15ch;
  margin-bottom: 1.75rem;
}

.hero__lead {
  color: rgba(239, 237, 230, 0.84);
  max-width: 44ch;
  margin-bottom: 2.75rem;
}

.hero .btn {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

.hero .btn::before { background: transparent; }
.hero .btn:hover { color: var(--ink); }

.hero .btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(239, 237, 230, 0.45);
}

.hero .btn--ghost::before { background: var(--bone); }

.hero .btn--ghost:hover,
.hero .btn--ghost:focus-visible {
  color: var(--ink);
  border-color: var(--bone);
}

/* Compact hero for interior pages: type on bone, no image. */
.page-head {
  padding-top: calc(var(--header-h) + clamp(3.5rem, 9vw, 7rem));
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head__title {
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Figures & blur-up
   -------------------------------------------------------------------------- */

.figure {
  position: relative;
  overflow: hidden;
  background: var(--bone-warm) no-repeat center / cover;
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  /* Safety net: reveal the image after 3s no matter what, so a script error
     can never leave the page showing nothing but blur placeholders. */
  animation: figure-fallback 0.6s var(--ease) 3s forwards;
}

@keyframes figure-fallback {
  to { opacity: 1; }
}

.figure img.is-ready,
.no-js .figure img {
  opacity: 1;
  animation: none;
}

.figure--tall { aspect-ratio: 3 / 4; }
.figure--wide { aspect-ratio: 16 / 10; }
.figure--square { aspect-ratio: 1; }

/* Slow zoom on hover, only where the whole card is a link. */
.zoom img {
  transition: opacity 0.8s var(--ease), transform 1.4s var(--ease);
}

.zoom:hover img,
.zoom:focus-visible img {
  transform: scale(1.035);
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.svc-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.svc {
  display: grid;
  gap: 0.65rem 2.5rem;
  padding-block: clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  transition: padding-inline 0.6s var(--ease);
}

@media (min-width: 52rem) {
  .svc {
    grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.15fr) auto;
    align-items: baseline;
  }
  .svc:hover,
  .svc:focus-visible {
    padding-inline: 1.25rem;
  }
}

.svc__n {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--clay-deep);
}

.svc__title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.svc__body {
  color: var(--ink-soft);
  font-size: 0.975rem;
  line-height: 1.62;
  max-width: 46ch;
}

.svc__go {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--clay);
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.svc:hover .svc__go,
.svc:focus-visible .svc__go {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Portfolio grid
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter {
  background: none;
  border: 0;
  padding: 0.35rem 0;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: relative;
  transition: color 0.4s;
}

.filter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.filter:hover { color: var(--ink); }

.filter[aria-pressed="true"] {
  color: var(--ink);
}

.filter[aria-pressed="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 3.25rem);
  grid-template-columns: 1fr;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 68rem) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Every fifth card runs wide, so the grid breathes instead of marching. */
  .grid--editorial > .card:nth-child(7n + 1) {
    grid-column: span 2;
  }
  .grid--editorial > .card:nth-child(7n + 1) .figure {
    aspect-ratio: 16 / 10;
  }
}

.card {
  display: block;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.card[hidden] { display: none; }

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  transition: border-color 0.5s var(--ease);
}

.card:hover .card__meta {
  border-bottom-color: var(--clay);
}

.card__title {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.card__place {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 0.55rem;
}

.card__n {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  white-space: nowrap;
}

.empty {
  padding: 4rem 0;
  color: var(--ink-mute);
  text-align: center;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #1a1713;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
  color: var(--bone);
}

.lb.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease), visibility 0s;
}

.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem var(--pad);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lb__title {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.lb__title span {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-left: 0.9rem;
}

.lb__stage {
  position: relative;
  min-height: 0;
}

/* Absolutely positioned so the percentage caps resolve against a definite box:
   a grid/flex item with height:auto leaves max-height:100% indefinite, and the
   image spills past the stage. `width/height: auto` on a replaced element keeps
   its intrinsic size, which max-width/max-height then clamp proportionally —
   so nothing is ever upscaled.

   The side gutter is subtracted from max-width rather than set as an inset:
   percentages resolve against the whole containing block, so an inset would
   move the image without narrowing it. */
.lb__stage img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100% - 2 * clamp(0.75rem, 3vw, 2rem));
  max-height: 100%;
  width: auto;
  height: auto;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.lb__stage img.is-ready { opacity: 1; }

.lb__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.35rem var(--pad) 2rem;
}

.lb__count {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  min-width: 5rem;
  text-align: center;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.lb__btn {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-invert);
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.lb__btn:hover:not([disabled]) {
  background: rgba(239, 237, 230, 0.1);
  border-color: rgba(239, 237, 230, 0.5);
}

.lb__btn[disabled] { opacity: 0.28; cursor: default; }

.lb__btn svg { width: 1rem; height: 1rem; }

.lb__close {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  opacity: 0.78;
  transition: opacity 0.35s;
}

.lb__close:hover { opacity: 1; }

/* Side click-targets on wide screens. */
.lb__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(3rem, 12vw, 9rem);
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
}

.lb__edge--prev { left: 0; }
.lb__edge--next { right: 0; }

@media (pointer: coarse) {
  .lb__edge { display: none; }
}

/* --------------------------------------------------------------------------
   Process, testimonials, awards
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.section--ink .steps,
.section--ink .step { border-color: var(--line-invert); }

.step {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 52rem) {
  .step { grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; }
}

.step__n {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--clay);
  line-height: 1;
}

.step__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 300;
  line-height: 1.15;
}

.step__body {
  color: var(--ink-soft);
  font-size: 0.975rem;
  line-height: 1.65;
  max-width: 54ch;
}

.section--ink .step__body { color: rgba(239, 237, 230, 0.66); }

/* Testimonials: a horizontal rail on wide screens, a scroller on narrow. */
.quotes {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 56rem) {
  .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.quote {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.section--ink .quote { border-color: var(--line-invert); }

.quote p {
  font-family: var(--display);
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.42;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.quote cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: auto;
}

.section--ink .quote cite { color: rgba(239, 237, 230, 0.55); }

.awards {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: center;
  justify-content: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.awards img {
  height: clamp(4.5rem, 8vw, 6.25rem);
  width: auto;
  filter: grayscale(1);
  opacity: 0.68;
  transition: filter 0.6s var(--ease), opacity 0.6s var(--ease);
}

.awards img:hover {
  filter: none;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */

.team {
  display: grid;
  gap: clamp(3rem, 7vw, 5.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 56rem) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.member__name {
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 300;
  line-height: 1.1;
  margin-top: 1.75rem;
}

.member__role {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin: 0.7rem 0 1.35rem;
}

.cols {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 52rem) {
  .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.col {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.col h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 0.85rem;
}

.col p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.68;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 58rem) {
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tier {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 2.5vw, 2.25rem);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  height: 100%;
}

.tier--featured {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
}

.tier__name {
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 300;
  line-height: 1.05;
}

.tier__tag {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  margin-top: 0.6rem;
}

.tier--featured .tier__tag { color: rgba(239, 237, 230, 0.62); }

.tier ul {
  display: grid;
  gap: 0.9rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.tier--featured ul { color: rgba(239, 237, 230, 0.8); }

.tier li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.tier li::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  margin-top: 0.62rem;
  background: var(--clay);
  border-radius: 50%;
}

.tier__rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.tier--featured .tier__rule { border-color: var(--line-invert); }

/* Key-points list, used alongside the prose on service pages. */
.checks {
  display: grid;
  gap: 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.checks li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.checks li::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  margin-top: 0.62rem;
  background: var(--clay);
  border-radius: 50%;
}

.note {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 0.88rem;
  color: var(--ink-mute);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.form__row {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

@media (min-width: 40rem) {
  .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

.field label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.field label .opt {
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 1rem;
  font-weight: 300;
  border-radius: 0;
  transition: border-color 0.45s var(--ease);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-mute) 50%),
    linear-gradient(135deg, var(--ink-mute) 50%, transparent 50%);
  background-position: right 0.55rem center, right 0.25rem center;
  background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
  cursor: pointer;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-mute);
  opacity: 0.7;
}

.field .err {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #93341f;
  text-transform: none;
  min-height: 1rem;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-bottom-color: #93341f;
}

/* Bot trap. Off-screen rather than display:none so autofill still skips it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 1.1rem 1.35rem;
  border-left: 2px solid var(--clay);
  background: var(--bone-deep);
}

.form__status[hidden] { display: none; }

.form__status--error {
  border-left-color: #93341f;
}

/* --------------------------------------------------------------------------
   Contact details
   -------------------------------------------------------------------------- */

.detail + .detail {
  margin-top: 2.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.detail h2,
.detail h3 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.9rem;
}

.detail p,
.detail address {
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
}

.detail a { text-decoration: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--bone);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem;
}

.footer__top {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 52rem) {
  .footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
}

.footer__brand {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
}

.footer__tagline {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(239, 237, 230, 0.6);
  margin-top: 1.15rem;
}

.footer h2 {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(239, 237, 230, 0.56);
  margin-bottom: 1.35rem;
}

.footer ul {
  display: grid;
  gap: 0.7rem;
}

.footer a {
  text-decoration: none;
  font-size: 0.92rem;
  color: rgba(239, 237, 230, 0.82);
  transition: color 0.35s;
}

.footer a:hover { color: var(--bone); }

.footer address {
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(239, 237, 230, 0.82);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--line-invert);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(239, 237, 230, 0.6);
}

.footer__social {
  display: flex;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(1.35rem);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal.is-in,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Stagger children of a revealed group. */
.reveal-group > * { transition-delay: var(--d, 0s); }

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

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

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 300;
  background: var(--ink);
  color: var(--bone);
  padding: 0.85rem 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}

.skip:focus { transform: translate(-50%, 0); }

.stack > * + * { margin-top: var(--s, 1.5rem); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: clamp(2rem, 4vw, 3rem); }
.mt-4 { margin-top: clamp(2.5rem, 5vw, 4rem); }
.center { text-align: center; }
.center .lead,
.center .eyebrow { margin-inline: auto; }
.center .eyebrow--rule { justify-content: center; }
