/* ==========================================================================
   Revival Building Co.
   A quiet, editorial design system. Everything is driven by the tokens in
   :root — change a token, and the change carries across every page.

   1  Tokens
   2  Reset & base
   3  Typography
   4  Layout primitives
   5  Header & navigation
   6  Hero
   7  Plates (imagery, parallax, hover)
   8  Editorial blocks
   9  Portfolio
   10 Case study
   11 Enquiry form
   12 Footer
   13 Motion & reveal
   14 Responsive
   ========================================================================== */

/* ------------------------------------------------------------ 1  TOKENS */
:root {
  /* Paper — warm, tone-on-tone. Never pure white. */
  --paper:        #FDFCF7;
  --paper-2:      #F8F6F0;
  --paper-3:      #F1EDE3;
  --paper-4:      #E8E3D6;

  /* Ink — warm black through to a soft stone grey. */
  --ink:          #1A1A1A;
  --ink-2:        #46423B;
  --ink-3:        #837C70;
  --ink-4:        #A79F91;

  /* Hairlines */
  --rule:         #EAE5DC;
  --rule-strong:  #D8D1C2;

  /* Muted earth accents — used sparingly, never as "brand colour". */
  --olive:        #5C6150;
  --stone:        #B4A894;
  --espresso:     #3A2E24;

  /* Dark ground, for the one or two sections that invert. */
  --ground:       #211E19;
  --ground-2:     #2C2822;

  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype",
           Palatino, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
           Helvetica, Arial, sans-serif;

  /* Fluid measures. The gutter is deliberately large; the page should
     feel unhurried even at 1440. */
  --gutter:   clamp(1.375rem, 5.5vw, 6.5rem);
  --max:      1560px;
  --max-mid:  1180px;
  --measure:  38rem;

  --section:  clamp(5.5rem, 13vw, 11.5rem);
  --section-s:clamp(3.5rem, 8vw, 7rem);

  /* Motion. Long, eased, never bouncy. */
  --ease:     cubic-bezier(.22, 1, .36, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
  --slow:     1.15s;
  --med:      .68s;
  --fast:     .32s;
}

/* -------------------------------------------------------- 2  RESET/BASE */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

/* Focus is visible, but quiet — a hairline, not a halo. */
:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -140%);
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: .9rem 1.6rem;
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--fast) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

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

/* ------------------------------------------------------- 3  TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.5rem, 6.4vw, 5.375rem);
  line-height: .96;
  letter-spacing: -.022em;
}
.display--sm {
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.018em;
}

h2, .h2 {
  font-size: clamp(1.875rem, 3.6vw, 3.375rem);
  line-height: 1.1;
  letter-spacing: -.014em;
}
h3, .h3 {
  font-size: clamp(1.3125rem, 1.9vw, 1.75rem);
  line-height: 1.24;
  letter-spacing: -.008em;
}
h4, .h4 {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.34;
}

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 clamp(1.25rem, 2.4vw, 2.25rem);
}
.eyebrow--tight { margin-bottom: .9rem; }

/* A hairline that runs with the eyebrow, magazine-style. */
.eyebrow--ruled {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.eyebrow--ruled::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

p { margin: 0 0 1.4em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.0625rem, 1.45vw, 1.375rem);
  line-height: 1.66;
  color: var(--ink-2);
  letter-spacing: .004em;
}

.prose { max-width: var(--measure); color: var(--ink-2); }
.prose p + p { margin-top: 0; }
.prose > * + h3 { margin-top: 2.6em; }
.prose h3 + p { margin-top: .9em; }

.serif-statement {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.1vw, 2.75rem);
  line-height: 1.32;
  letter-spacing: -.012em;
  color: var(--ink);
}

.pull {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.5vw, 2.125rem);
  line-height: 1.36;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: clamp(2.5rem, 5vw, 4rem) 0;
  padding-left: clamp(1.25rem, 2.5vw, 2.25rem);
  border-left: 1px solid var(--rule-strong);
}
.pull cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: .6875rem;
  font-style: normal;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.caption {
  font-size: .75rem;
  line-height: 1.65;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Links: the underline draws itself in, left to right. */
a { color: inherit; }

.link {
  display: inline-block;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: .45rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size var(--med) var(--ease), color var(--fast) linear;
}
.link:hover, .link:focus-visible { background-size: 0 1px; }

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

.link--arrow::after {
  content: "";
  display: inline-block;
  width: 1.75rem; height: 1px;
  margin-left: .85rem;
  vertical-align: .28em;
  background: currentColor;
  transition: width var(--med) var(--ease);
}
.link--arrow:hover::after { width: 2.75rem; }

/* The one button on the site. Restrained: a hairline box, not a slab. */
.btn {
  display: inline-block;
  padding: 1.15rem 2.5rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--med) var(--ease), border-color var(--med) var(--ease);
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform var(--med) var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn > span { position: relative; }

.btn--light { border-color: rgba(253,252,247,.5); color: var(--paper); }
.btn--light::before { background: var(--paper); }
.btn--light:hover, .btn--light:focus-visible { color: var(--ink); border-color: var(--paper); }

/* --------------------------------------------------- 4  LAYOUT PRIMITIVES */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--mid { max-width: calc(var(--max-mid) + var(--gutter) * 2); }

.section { padding-block: var(--section); }
.section--s { padding-block: var(--section-s); }
.section--top { padding-top: var(--section); padding-bottom: 0; }
.section--flush { padding-bottom: 0; }

.tone-2 { background: var(--paper-2); }
.tone-3 { background: var(--paper-3); }
.tone-dark { background: var(--ground); color: var(--paper); }
.tone-dark h1, .tone-dark h2, .tone-dark h3, .tone-dark h4 { color: var(--paper); }
.tone-dark .eyebrow, .tone-dark .caption { color: rgba(253,252,247,.5); }
.tone-dark .lede, .tone-dark .prose { color: rgba(253,252,247,.72); }
.tone-dark .hr { background: rgba(253,252,247,.16); }

.hr {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.stack > * + * { margin-top: clamp(1.5rem, 2.6vw, 2.5rem); }
.stack-s > * + * { margin-top: 1rem; }

.center { text-align: center; }
.center .eyebrow--ruled { justify-content: center; }
.center .eyebrow--ruled::after { display: none; }

.narrow { max-width: 46rem; margin-inline: auto; }
.narrow-xs { max-width: 34rem; }

/* Two columns: a short label rail on the left, the substance on the right.
   This is the workhorse layout of the whole site. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--centred { align-items: center; }

.rail-label {
  font-family: var(--sans);
  font-size: .6875rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: sticky;
  top: 8.5rem;
}

/* ---------------------------------------------------- 5  HEADER & NAV */
.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-block: clamp(1.1rem, 2vw, 1.75rem);
  background: transparent;
  transition: background var(--med) var(--ease),
              padding var(--med) var(--ease),
              box-shadow var(--med) var(--ease),
              transform var(--med) var(--ease);
}
.site-head::after {
  content: "";
  position: absolute; inset: auto 0 0;
  height: 1px;
  background: var(--rule);
  opacity: 0;
  transition: opacity var(--med) var(--ease);
}
.site-head.is-solid {
  background: var(--paper);
  padding-block: clamp(.85rem, 1.4vw, 1.15rem);
}
.site-head.is-solid::after { opacity: 1; }
.site-head.is-hidden { transform: translateY(-104%); }

/* Over a dark hero the header inverts until it goes solid. */
.site-head.is-over-hero:not(.is-solid) { color: var(--paper); }
.site-head.is-over-hero:not(.is-solid) .brand__name,
.site-head.is-over-hero:not(.is-solid) .brand__sub,
.site-head.is-over-hero:not(.is-solid) .nav__link,
.site-head.is-over-hero:not(.is-solid) .head__aside a { color: var(--paper); }
.site-head.is-over-hero:not(.is-solid) .nav-toggle__bar { background: var(--paper); }

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 4rem);
}
.head-right {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.2vw, 3.25rem);
  margin-left: auto;
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  line-height: 1;
}
.brand__name {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
  letter-spacing: .045em;
  color: var(--ink);
  transition: color var(--med) var(--ease);
}
.brand__sub {
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color var(--med) var(--ease);
}

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

.nav__link {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: .3rem;
  position: relative;
  transition: color var(--med) var(--ease), opacity var(--med) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--med) var(--ease);
}
.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); opacity: .4; }

.head__aside {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2vw, 2rem);
}
.head__tel {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color var(--med) var(--ease);
}
.head__tel:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 2.5rem; height: 2.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle__bar {
  position: absolute;
  left: .35rem; right: .35rem;
  height: 1px;
  background: var(--ink);
  transition: transform var(--med) var(--ease), opacity var(--fast) linear,
              background var(--med) var(--ease);
}
.nav-toggle__bar:nth-child(1) { top: .95rem; }
.nav-toggle__bar:nth-child(2) { top: 1.5rem; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(.275rem) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(-.275rem) rotate(-45deg);
}

/* Full-screen menu on small viewports. */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--med) var(--ease), visibility var(--med);
}
.nav-panel.is-open { opacity: 1; visibility: visible; }

body.nav-open .site-head.is-over-hero:not(.is-solid) .brand__name { color: var(--ink); }
body.nav-open .site-head.is-over-hero:not(.is-solid) .brand__sub { color: var(--ink-3); }
body.nav-open .site-head.is-over-hero:not(.is-solid) .nav-toggle__bar { background: var(--ink); }
body.nav-open .site-head { transform: none; }

.nav-panel__link {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.32;
  letter-spacing: -.014em;
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity var(--med) var(--ease), transform var(--med) var(--ease);
}
.nav-panel.is-open .nav-panel__link {
  opacity: 1;
  transform: none;
  transition-delay: calc(.06s * var(--i, 0) + .08s);
}
.nav-panel__foot {
  margin-top: auto;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: .4rem;
  font-size: .75rem;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.nav-panel__foot a { text-decoration: none; color: var(--ink); }

body.nav-open { overflow: hidden; }

/* ------------------------------------------------------------- 6  HERO */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ground);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: -6% 0 -6%;
  z-index: -2;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  opacity: 0;
  will-change: transform, opacity;
}
.is-ready .hero__media img {
  opacity: 1;
  transform: scale(1);
  transition: opacity 2.1s var(--ease-io), transform 3.6s var(--ease);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(18,14,9,.86) 0%, rgba(18,14,9,.58) 30%, rgba(18,14,9,.18) 62%, rgba(18,14,9,.06) 100%),
    linear-gradient(to right, rgba(18,14,9,.52) 0%, rgba(18,14,9,.16) 46%, rgba(18,14,9,0) 72%),
    linear-gradient(to bottom, rgba(18,14,9,.50) 0%, rgba(18,14,9,0) 26%);
}

.hero__inner {
  width: 100%;
  padding-block: clamp(3.5rem, 9vh, 7rem);
  color: var(--paper);
}
.hero__inner .eyebrow { color: rgba(253,252,247,.62); }
.hero h1 { color: var(--paper); max-width: 21ch; }
.hero__lede {
  max-width: 34rem;
  margin-top: clamp(1.5rem, 2.6vw, 2.25rem);
  color: rgba(253,252,247,.82);
  font-size: clamp(1rem, 1.25vw, 1.1875rem);
  line-height: 1.72;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

/* Staggered entrance for the hero text. */
.hero__inner > * {
  opacity: 0;
  transform: translateY(1.6rem);
}
.is-ready .hero__inner > * {
  opacity: 1;
  transform: none;
  transition: opacity 1.4s var(--ease) calc(.34s + .13s * var(--i, 0)),
              transform 1.4s var(--ease) calc(.34s + .13s * var(--i, 0));
}

.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 2.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .5625rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(253,252,247,.6);
}
.hero__scroll { writing-mode: vertical-rl; gap: 1.1rem; }
.hero__scroll span::after {
  content: "";
  display: block;
  width: 1px; height: 3.5rem;
  margin: 1rem auto 0;
  background: linear-gradient(rgba(253,252,247,.6), rgba(253,252,247,0));
  animation: drift 2.8s var(--ease-io) infinite;
}
@keyframes drift {
  0%   { transform: scaleY(0); transform-origin: 50% 0; }
  45%  { transform: scaleY(1); transform-origin: 50% 0; }
  55%  { transform: scaleY(1); transform-origin: 50% 100%; }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* A shorter hero for interior pages. */
.page-head {
  position: relative;
  min-height: clamp(52vh, 62vh, 74vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ground);
  isolation: isolate;
}
.page-head .hero__media { inset: -5% 0 -5%; }
.page-head::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(18,14,9,.84) 0%, rgba(18,14,9,.44) 46%, rgba(18,14,9,.14) 78%),
    linear-gradient(to right, rgba(18,14,9,.46) 0%, rgba(18,14,9,.10) 52%, rgba(18,14,9,0) 76%),
    linear-gradient(to bottom, rgba(18,14,9,.52), rgba(18,14,9,0) 28%);
}
.page-head__inner {
  width: 100%;
  padding-block: clamp(3rem, 7vh, 5.5rem);
  color: var(--paper);
}
.page-head__inner .eyebrow { color: rgba(253,252,247,.6); }
.page-head h1 { color: var(--paper); }
.page-head__lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: rgba(253,252,247,.8);
}

/* ----------------------------------------------------------- 7  PLATES */
/* A "plate" is one photograph. The inner element carries parallax; the
   image itself carries the hover zoom, so the two never fight. */
.plate {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
}
.plate__inner {
  position: absolute;
  inset: -8% 0;
  will-change: transform;
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease), filter 1.6s var(--ease);
}
.plate--static { aspect-ratio: 4 / 3; }
.plate--static .plate__inner { position: static; inset: auto; height: 100%; }

.ratio-16-9  { aspect-ratio: 16 / 9; }
.ratio-4-3   { aspect-ratio: 4 / 3; }
.ratio-3-2   { aspect-ratio: 3 / 2; }
.ratio-1-1   { aspect-ratio: 1 / 1; }
.ratio-4-5   { aspect-ratio: 4 / 5; }
.ratio-3-4   { aspect-ratio: 3 / 4; }
.ratio-2-3   { aspect-ratio: 2 / 3; }

a.plate-link { display: block; text-decoration: none; color: inherit; }
a.plate-link:hover .plate img,
a.plate-link:focus-visible .plate img { transform: scale(1.045); }

.figure { margin: 0; }
.figure figcaption {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: .75rem;
  line-height: 1.6;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}
.figure figcaption em {
  font-style: normal;
  color: var(--ink-4);
  text-align: right;
}

/* Drawings sit on paper, not bled to the edge. */
.plate--drawing {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(1rem, 2.4vw, 2.25rem);
}
.plate--drawing img { mix-blend-mode: multiply; }

/* ------------------------------------------------- 8  EDITORIAL BLOCKS */
.statement {
  max-width: 26ch;
  margin-inline: auto;
}
.statement--wide { max-width: 34ch; }

/* Numbered editorial list — used for the process and the values. */
.ledger { border-top: 1px solid var(--rule); }
.ledger__row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(1rem, 3vw, 3.5rem);
  padding-block: clamp(1.75rem, 3.4vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ledger__num {
  font-family: var(--serif);
  font-size: .875rem;
  letter-spacing: .1em;
  color: var(--ink-4);
}
.ledger__body { color: var(--ink-2); font-size: .9375rem; }

/* Horizontal rail — the craftsmanship section. Scrolls with the trackpad,
   drags with a mouse, and snaps. */
.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-inline: var(--gutter);
  padding-bottom: .5rem;
  cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.is-dragging * { pointer-events: none; }
.rail__item {
  flex: 0 0 clamp(17rem, 30vw, 30rem);
  scroll-snap-align: center;
}
.rail__item:last-child { padding-right: var(--gutter); box-sizing: content-box; }
.rail__body {
  margin-top: 1.4rem;
  max-width: 30rem;
  color: var(--ink-2);
  font-size: .9375rem;
}
.rail__body h3 { margin-bottom: .7rem; }

.rail-nav {
  display: flex;
  gap: .75rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
.rail-btn {
  width: 3.25rem; height: 3.25rem;
  border: 1px solid var(--rule-strong);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color var(--med) var(--ease), background var(--med) var(--ease);
}
.rail-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.rail-btn svg { width: 1rem; height: 1rem; stroke: var(--ink); fill: none; stroke-width: 1; }
.rail-btn[disabled] { opacity: .3; cursor: default; }
.rail-btn[disabled]:hover { border-color: var(--rule-strong); background: none; }

/* Fact strip. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts > div {
  padding: clamp(1.75rem, 3.2vw, 2.75rem) clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--rule);
}
.facts > div:last-child { border-right: 0; }
.facts dt {
  font-size: .625rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .9rem;
}
.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.01em;
}
.facts dd small {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: .5rem;
}

/* --------------------------------------------------------- 9  PORTFOLIO */
/* Deliberately asymmetric: entries take different column spans and sit at
   different heights, the way plates fall in a printed monograph. */
.works {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 6rem) clamp(1.5rem, 3vw, 3.5rem);
}
.work { grid-column: span 12; }
.work--l   { grid-column: 1 / span 7; }
.work--r   { grid-column: 6 / span 7; }
.work--rs  { grid-column: 8 / span 5; }
.work--ls  { grid-column: 1 / span 5; }
.work--mid { grid-column: 3 / span 8; }
.work--full{ grid-column: 1 / -1; }
.work--drop { margin-top: clamp(2rem, 7vw, 8rem); }
.work--lift { margin-top: clamp(-6rem, -5vw, -1rem); }

.work__meta {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  transition: border-color var(--med) var(--ease);
}
a.plate-link:hover .work__meta { border-color: var(--rule-strong); }
.work__name {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -.008em;
}
.work__style {
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}
.work__place {
  margin-top: .55rem;
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--ink-4);
}

/* Filter row on the portfolio index. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 1.15rem;
}
.filter {
  background: none;
  border: 0;
  padding: .25rem 0;
  cursor: pointer;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: relative;
  transition: color var(--med) var(--ease);
}
.filter::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--med) var(--ease);
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); }
.filter[aria-pressed="true"]::after,
.filter:hover::after { transform: scaleX(1); }

.work[hidden] { display: none; }
.work.is-out { opacity: 0; transform: translateY(.75rem); }
.work { transition: opacity var(--med) var(--ease), transform var(--med) var(--ease); }

/* Archive list — projects without a full case study. */
.archive { border-top: 1px solid var(--rule); }
.archive__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 7rem;
  gap: 1.5rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule);
  font-size: .8125rem;
  letter-spacing: .06em;
  color: var(--ink-2);
  align-items: baseline;
}
.archive__row span:first-child { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); }
.archive__row span:last-child { text-align: right; color: var(--ink-4); font-size: .75rem; letter-spacing: .14em; }

/* -------------------------------------------------------- 10  CASE STUDY */
.dossier {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.dossier > div {
  padding: clamp(1.5rem, 2.8vw, 2.5rem) clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--rule);
}
.dossier > div:last-child { border-right: 0; }
.dossier dt {
  font-size: .625rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .8rem;
}
.dossier dd {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Material schedule — reads like a specification, not a feature list. */
.schedule { border-top: 1px solid var(--rule); }
.schedule__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.schedule dt {
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.schedule dd {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* Alternating text/image spreads inside a case study. */
.spread {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
.spread__media { grid-column: 1 / span 7; }
.spread__body  { grid-column: 9 / span 4; }
.spread--flip .spread__media { grid-column: 6 / span 7; grid-row: 1; }
.spread--flip .spread__body  { grid-column: 1 / span 4; grid-row: 1; }

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}
.duo--offset > *:nth-child(2) { margin-top: clamp(2rem, 6vw, 6rem); }

.next-project {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 4vw, 3.5rem);
}
.next-project__name {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.018em;
  margin-top: .75rem;
  display: inline-block;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size var(--slow) var(--ease);
}
.next-project:hover .next-project__name { background-size: 100% 1px; }

/* Press list. */
.press { border-top: 1px solid var(--rule); }
.press__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr) 8rem;
  gap: 1rem clamp(1.5rem, 3vw, 3rem);
  padding-block: clamp(1.5rem, 2.6vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.press__pub {
  font-size: .6875rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.press__title {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.6vw, 1.4375rem);
  line-height: 1.28;
  letter-spacing: -.006em;
}
.press__note {
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--ink-2);
  max-width: 44rem;
}
.press__date {
  font-size: .6875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: right;
}

/* ------------------------------------------------------ 11  ENQUIRY FORM */
.enquiry { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }

.fieldset {
  /* A labelled group, not a <fieldset> — a <legend> is never a grid item. */
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  padding-top: clamp(1.75rem, 3vw, 2.75rem);
  border-top: 1px solid var(--rule);
}
.fieldset__legend {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.fieldset__legend b {
  display: block;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-top: .55rem;
}
.fieldset__fields { display: grid; gap: clamp(1.5rem, 2.6vw, 2.25rem); }
.fieldset__fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { display: grid; gap: .55rem; }
.field__label {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field__hint { font-size: .75rem; color: var(--ink-4); letter-spacing: .02em; }

.input, .select, .textarea {
  width: 100%;
  padding: .85rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .01em;
  color: var(--ink);
  transition: border-color var(--med) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.textarea { resize: vertical; min-height: 6.5rem; line-height: 1.7; }

/* Native select, dressed down to a hairline and a hand-drawn chevron. */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%231A1A1A' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .1rem center;
  background-size: .7rem;
}
/* Grey while nothing has been chosen, whether or not the field is required. */
.select:invalid { color: var(--ink-4); }
.select:has(option[value=""]:checked) { color: var(--ink-4); }
.select option { color: var(--ink); }

/* Scope choices — cards, not radio dots. */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: block;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--rule-strong);
  font-size: .8125rem;
  line-height: 1.35;
  letter-spacing: .04em;
  color: var(--ink-2);
  transition: border-color var(--med) var(--ease), color var(--med) var(--ease),
              background var(--med) var(--ease);
}
.choice span em {
  display: block;
  font-style: normal;
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-top: .5rem;
}
.choice input:hover + span { border-color: var(--ink-4); }
.choice input:checked + span {
  border-color: var(--ink);
  background: var(--paper-2);
  color: var(--ink);
}
.choice input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 3px; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  padding-top: clamp(1.75rem, 3vw, 2.75rem);
  border-top: 1px solid var(--rule);
}

.form-note {
  font-size: .75rem;
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 32rem;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  border-left: 1px solid var(--ink);
  background: var(--paper-2);
  font-size: .875rem;
  color: var(--ink-2);
}
.form-status[hidden] { display: none; }

.field-error {
  font-size: .75rem;
  letter-spacing: .06em;
  color: #8A3A2A;
}
.field-error[hidden] { display: none; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-bottom-color: #8A3A2A;
}

.honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Contact details block. */
.contact-list { border-top: 1px solid var(--rule); }
.contact-list > div {
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
}
.contact-list dt {
  font-size: .625rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-list dd { margin: 0; font-size: .9375rem; line-height: 1.6; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.contact-list a:hover { border-bottom-color: var(--ink); }

/* ----------------------------------------------------------- 12  FOOTER */
.site-foot {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 3vw, 2.75rem);
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
.foot-brand__name {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  letter-spacing: .03em;
  line-height: 1.2;
}
.foot-brand p {
  margin-top: 1.15rem;
  max-width: 26rem;
  font-size: .875rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.foot-col__title {
  font-family: var(--sans);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.35rem;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.foot-col a {
  text-decoration: none;
  font-size: .875rem;
  color: var(--ink-2);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size var(--med) var(--ease), color var(--fast) linear;
}
.foot-col a:hover { color: var(--ink); background-size: 100% 1px; }
.foot-col address { font-style: normal; font-size: .875rem; line-height: 1.8; color: var(--ink-2); }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(1.75rem, 2.6vw, 2.25rem);
  font-size: .6875rem;
  letter-spacing: .14em;
  color: var(--ink-4);
}
.foot-bottom nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.foot-bottom a { text-decoration: none; color: var(--ink-4); transition: color var(--fast) linear; }
.foot-bottom a:hover { color: var(--ink); }

/* CTA band above the footer. */
.cta-band { text-align: center; }
.cta-band .display--sm { max-width: 20ch; margin-inline: auto; }

/* --------------------------------------------------- 13  MOTION & REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 1.05s var(--ease) calc(.05s * var(--i, 0)),
              transform 1.05s var(--ease) calc(.05s * var(--i, 0));
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* Images wipe up from behind a mask as they enter. */
.reveal-plate .plate img,
.reveal-plate.plate img { transform: scale(1.08); }
.reveal-plate.is-in .plate img,
.reveal-plate.is-in img { transform: scale(1); transition: transform 1.8s var(--ease); }

/* Page transition: the whole document fades. */
body { opacity: 0; transition: opacity .55s var(--ease-io); }
body.is-ready { opacity: 1; }
body.is-leaving { opacity: 0; transition-duration: .34s; }

/* No-JS safety: never leave content invisible. */
.no-js body, body.no-js { opacity: 1 !important; }
body.no-js .reveal { opacity: 1; transform: none; }
body.no-js .hero__media img,
body.no-js .hero__inner > * { opacity: 1; transform: none; }

/* ------------------------------------------------------- 14  RESPONSIVE */
@media (max-width: 1180px) {
  /* Six nav items need a tighter rhythm before the menu collapses at 900px. */
  .nav { gap: clamp(1.15rem, 2.2vw, 2.25rem); }
  .work--l, .work--r { grid-column: span 12; }
  .work--ls, .work--rs { grid-column: span 6; }
  .work--mid { grid-column: 2 / span 10; }
  .work--lift { margin-top: 0; }
  .spread__media { grid-column: 1 / span 12; }
  .spread__body  { grid-column: 1 / span 12; }
  .spread--flip .spread__media,
  .spread--flip .spread__body { grid-column: 1 / span 12; grid-row: auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(2n) { border-right: 0; }
  .facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .dossier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dossier > div:nth-child(2n) { border-right: 0; }
  .dossier > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .head__tel { display: none; }

  .split, .split--even, .split--wide-left { grid-template-columns: minmax(0, 1fr); }
  .rail-label { position: static; }
  .fieldset { grid-template-columns: minmax(0, 1fr); }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .ledger__row { grid-template-columns: 3rem minmax(0, 1fr); }
  .ledger__body { grid-column: 2; margin-top: .5rem; }
  .press__row { grid-template-columns: minmax(0, 1fr) 6rem; }
  .press__pub { grid-column: 1 / -1; }
  .archive__row { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .archive__row span:nth-child(2) { grid-column: 1; font-size: .75rem; color: var(--ink-3); }
}

@media (max-width: 700px) {
  body { line-height: 1.75; }
  .work--ls, .work--rs, .work--mid { grid-column: span 12; }
  .work--drop { margin-top: 0; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo--offset > *:nth-child(2) { margin-top: 0; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .fieldset__fields--2 { grid-template-columns: minmax(0, 1fr); }
  .facts, .dossier { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .dossier > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .facts > div:last-child, .dossier > div:last-child { border-bottom: 0; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .contact-list > div { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .schedule__row { grid-template-columns: minmax(0, 1fr); }
  .figure figcaption { flex-direction: column; gap: .35rem; }
  .figure figcaption em { text-align: left; }
  .hero__scroll { display: none; }
  .form-foot { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; text-align: center; }
  .hero__actions .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__media img, .hero__inner > * { opacity: 1; transform: none; }
  body { opacity: 1; }
  .hero__scroll span::after { animation: none; }
}

@media print {
  .site-head, .nav-panel, .hero__scroll, .rail-nav, .cta-band { display: none; }
  body { opacity: 1; color: #000; background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
