/* ==========================================================================
   AURA Studio — stylesheet
   A fictional architecture & interior design studio (assignment project).

   Contents
    1  Fonts
    2  Tokens
    3  Base
    4  Utilities & small type styles
    5  Column-grid overlay
    6  Buttons & links
    7  Header & navigation
    8  Hero
    9  Studio
   10  Services
   11  Selected projects (stacked panels)
   12  Approach, drifting words & figures
   13  Closing call to action
   14  Contact & enquiry form
   15  Footer
   16  Project viewer (dialog)
   17  Reveal motion
   18  No-JavaScript fallbacks, reduced motion, print
   ========================================================================== */


/* 1  Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-italic-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/hanken-grotesk-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}


/* 2  Tokens --------------------------------------------------------------- */

:root {
  --bg: #F4F0E8;           /* page */
  --stone: #E9E3D8;        /* services, contact, footer */
  --plate: #E2DACD;        /* behind photographs */
  --plate-deep: #DDD4C6;   /* behind the services preview */

  --ink: #1C1A17;
  --body: #4A453E;
  --muted: #6B645A;
  --clay: #9C5537;
  --clay-text: #975235;    /* the same clay, a touch deeper so small text passes AA on --stone */

  --rule: rgba(28, 26, 23, .18);
  --rule-strong: rgba(28, 26, 23, .2);
  --rule-soft: rgba(28, 26, 23, .14);
  --rule-field: rgba(28, 26, 23, .45);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4.5vw, 64px);
  --maxw: 1600px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* 3  Base ----------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

*,
*::before,
*::after { box-sizing: border-box; }

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }

ul[role="list"],
ol[role="list"] { list-style: none; }

img { display: block; max-width: 100%; height: auto; }
address { font-style: normal; }
button { font: inherit; }

a { color: inherit; }
a:hover { color: var(--clay); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

::selection {
  background: var(--clay);
  color: var(--bg);
}

body.menu-open,
body.dialog-open { overflow: hidden; }


/* 4  Utilities & small type styles ---------------------------------------- */

.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-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
}

.skip-link:hover { color: var(--bg); }
.skip-link:focus { left: 12px; top: 12px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* an image that fills its positioned frame, like a photograph cropped to a plate */
.fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
}

.label--stone { color: var(--clay-text); }

.mini-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.caption {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(48px, 7vw, 120px);
  line-height: .92;
  letter-spacing: -.03em;
}

.display em { font-style: italic; }
.display--narrow { max-width: 11ch; }

.req { color: var(--clay); }


/* 5  Column-grid overlay -------------------------------------------------- */

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.grid-overlay__inner {
  width: 100%;
  max-width: var(--maxw);
  padding: 0 var(--gutter);
  display: flex;
}

.grid-overlay i {
  flex: 1;
  border-left: 1px solid rgba(156, 85, 55, .07);
}

.grid-overlay i:last-child { border-right: 1px solid rgba(156, 85, 55, .07); }

@media (max-width: 767px) {
  .grid-overlay i:nth-child(n + 5) { display: none; }
  .grid-overlay i:nth-child(4) { border-right: 1px solid rgba(156, 85, 55, .07); }
}


/* 6  Buttons & links ------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  white-space: nowrap;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .3s;
}

.btn--dark,
.btn--clay {
  min-height: 56px;
  padding: 0 28px;
  color: var(--bg);
}

.btn--dark { background: var(--ink); }
.btn--clay { background: var(--clay); }

.btn--dark:hover { background: var(--clay); color: var(--bg); }
.btn--clay:hover { background: var(--ink); color: var(--bg); }

.btn--nav {
  gap: 10px;
  min-height: 44px;
  padding: 14px 20px;
  font-size: 11.5px;
  background: var(--ink);
  color: var(--bg);
}

.btn--nav:hover { background: var(--clay); color: var(--bg); }

.text-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* small text links keep their look; an invisible pad brings the tap area to 44px */
.brand,
.plain-link,
.rule-link,
.back-top,
.cta__mail {
  position: relative;
}

.plain-link,
.rule-link,
.back-top,
.cta__mail { display: inline-block; }

.brand::after,
.plain-link::after,
.rule-link::after,
.back-top::after,
.cta__mail::after {
  content: "";
  position: absolute;
  inset: -10px -6px;
}

.back-top::after { inset: -15px -8px; }

.plain-link { text-decoration: none; }

.rule-link {
  text-decoration: none;
  border-bottom: 1px solid rgba(28, 26, 23, .35);
}


/* 7  Header & navigation -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 232, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(28, 26, 23, .12);
  transition: transform .5s var(--ease);
}

.site-header.is-hidden { transform: translateY(-100%); }

.site-header__bar {
  height: var(--header-h);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
}

.site-header__progress-bar {
  width: 100%;
  height: 1px;
  background: var(--clay);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand__word {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: .2em;
}

.brand__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--clay);
}

.menu-toggle { display: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 48px);
}

.site-nav__list {
  display: flex;
  gap: clamp(16px, 2.4vw, 40px);
  list-style: none;
  font-size: 14px;
}

.nav-link {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding-block: 13px;
  text-decoration: none;
}

.nav-link__num {
  font-size: 10px;
  color: var(--muted);
}

/* on wide screens the button joins the row; the address line is menu-only */
.site-nav__foot { display: contents; }
.site-nav__note { display: none; }

@media (max-width: 767px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 4px;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    font: 500 12px var(--sans);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
  }

  .menu-toggle__icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 22px;
  }

  .menu-toggle__icon span {
    display: block;
    height: 1px;
    background: var(--ink);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 24px 20px 28px;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    overflow: auto;
    background: var(--bg);
  }

  .site-header.is-open .site-nav { display: flex; }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    font-size: inherit;
  }

  .site-nav__list li { border-bottom: 1px solid var(--rule-soft); }

  .nav-link {
    justify-content: space-between;
    padding: 18px 0;
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 300;
  }

  .nav-link__label { order: 1; }

  .nav-link__num {
    order: 2;
    font: 500 11px var(--sans);
    letter-spacing: .16em;
    color: var(--muted);
  }

  .site-nav__foot {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 32px;
  }

  .btn--nav {
    justify-content: space-between;
    min-height: 60px;
    padding: 0 22px;
    font-size: 12px;
    background: var(--clay);
  }

  .btn--nav:hover { background: var(--clay); }

  .site-nav__note {
    display: block;
    font-size: 14px;
    color: var(--muted);
  }
}


/* 8  Hero ----------------------------------------------------------------- */
/* One screen on the six-column grid: the headline steps down and across the left four columns,
   and the picture is a tall plate that fills exactly the right two. On smaller screens the same
   pieces stack: headline, full-bleed plate, then the copy. */

.hero { position: relative; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(28px, 5vw, 48px);
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hero__meta,
.hero__foot { position: relative; }

/* a hairline that draws itself in above the meta row and above the copy */
.hero__meta::before,
.hero__foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: 0 50%;
  animation: rule-draw 1.4s var(--ease) .1s backwards;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__meta-group {
  display: flex;
  gap: clamp(16px, 3vw, 48px);
  white-space: nowrap;
}

.hero__title {
  --step-2: .5em;
  --step-3: 1em;
  margin-top: clamp(28px, 5vw, 56px);
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(48px, 14.5vw, 120px);
  line-height: .9;
  letter-spacing: -.035em;
}

/* the mask is a little taller than the line: the tops of tall letters (S, ascenders, i-dots) rise
   above the tight line box and would be sliced. The negative margin keeps the lines where they were. */
.hero__mask {
  display: block;
  overflow: hidden;
  padding-top: .14em;
  margin-top: -.14em;
  padding-bottom: .06em;
}

/* each line steps further in, like a stair in section */
.hero__mask--2 { padding-left: var(--step-2); }
.hero__mask--3 { padding-left: var(--step-3); }

.hero__line {
  display: block;
  animation: line-rise 1.3s cubic-bezier(.2, .7, .1, 1) .12s backwards;
}

.hero__mask--2 .hero__line { animation-delay: .26s; }
.hero__mask--3 .hero__line { animation-delay: .4s; }

.hero__line--accent {
  font-style: italic;
  color: var(--clay);
}

/* starts well below the mask: letter tips (i-dots, ascenders) rise above the tight line box and
   would otherwise peek into view before the line arrives */
@keyframes line-rise {
  from { transform: translateY(150%); }
  to { transform: none; }
}

@keyframes rule-draw {
  from { transform: scaleX(0); }
}

@keyframes plate-settle {
  from { transform: scale(1.14); }
  to { transform: none; }
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px 48px;
  padding-top: 24px;
  animation: rise-in .9s var(--ease) .55s backwards;
}

.hero__lead {
  flex: 0 1 420px;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

/* the plate: opens upward like the page's other plates, then settles from a slight zoom */
.hero__figure {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-inline: calc(-1 * var(--gutter));
}

.hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
}

.hero__plate {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--plate);
  animation: plate-open 1.5s cubic-bezier(.7, 0, .2, 1) .15s backwards;
}

.hero__plate-inner {
  position: absolute;
  inset: 0;
  animation: plate-settle 2.2s var(--ease) .15s backwards;
}

/* frames the dusk courtyard house on its concrete volume, timber and lit interior */
.hero__plate img { object-position: 72% 50%; }

.hero__caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--gutter);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 768px) {
  .hero__title {
    --step-2: .8em;
    --step-3: 1.6em;
  }

  .hero__frame { aspect-ratio: 3 / 2; }
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: 1fr auto;
    row-gap: clamp(24px, 3vw, 40px);
    padding-bottom: clamp(32px, 4vw, 56px);
    min-height: clamp(600px, calc(100vh - 72px), 960px);
    min-height: clamp(600px, calc(100svh - 72px), 960px);
  }

  .hero__head,
  .hero__foot {
    grid-column: 1 / span 4;
    padding-right: clamp(20px, 2.4vw, 40px);
  }

  .hero__head { grid-row: 1; }
  .hero__foot { grid-row: 2; }

  /* the longest line, indent included, always fits the four columns */
  .hero__title {
    --step-2: .9em;
    --step-3: 1.8em;
    font-size: clamp(56px, 8.6vw, 140px);
  }

  .hero__foot::before { right: clamp(20px, 2.4vw, 40px); }

  .hero__figure {
    grid-column: 5 / span 2;
    grid-row: 1 / span 2;
    margin-inline: 0;
  }

  .hero__frame {
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
  }

  /* crop marks at two corners of the plate, as on a printed plate or a drawing sheet */
  .hero__frame::before,
  .hero__frame::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink);
    opacity: .5;
    pointer-events: none;
  }

  .hero__frame::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
  .hero__frame::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }

  .hero__caption {
    flex-direction: column;
    gap: 4px;
    padding-inline: 0;
  }
}


/* 9  Studio --------------------------------------------------------------- */

.studio { scroll-margin-top: var(--header-h); }

.studio__wrap {
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 144px);
}

.studio__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 20px clamp(32px, 5vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.studio__label { flex: 0 0 220px; }

.studio__title {
  flex: 1 1 420px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.studio__statement {
  margin-top: clamp(40px, 6vw, 96px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 76px);
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: pretty;
  text-indent: clamp(0px, calc((100vw - 768px) * .2), 240px);
}

/* words light up one by one as the paragraph scrolls in: --n words are lit (set by script.js) */
.studio__statement [data-word] {
  opacity: clamp(.2, calc(var(--n, 99) - var(--i, 0)), 1);
  transition: opacity .35s ease;
}

.js .studio__statement { --n: 0; }

.studio__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px clamp(32px, 5vw, 80px);
  margin-top: clamp(64px, 9vw, 144px);
}

.studio__fig {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio__fig--light { margin-top: clamp(0px, calc((100vw - 768px) * .16), 200px); }

.studio__plate {
  position: relative;
  overflow: hidden;
  background: var(--plate);
}

.studio__plate--portrait { aspect-ratio: 3 / 4; }
.studio__plate--square { aspect-ratio: 1 / 1; }

.studio__text {
  flex: 1.2 1 300px;
  min-width: 0;
  max-width: 460px;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.studio__text p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}

.topics {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}

.topics li {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topics li span { color: var(--clay); }


/* 10  Services ------------------------------------------------------------ */

.services {
  scroll-margin-top: var(--header-h);
  background: var(--stone);
}

.services__wrap {
  padding-top: clamp(80px, 11vw, 176px);
  padding-bottom: clamp(80px, 11vw, 176px);
}

.services__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 88px);
}

.services__titles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.services__hint {
  max-width: 260px;
  font-size: 13px;
  color: var(--muted);
}

.services__body {
  display: flex;
  align-items: flex-start;
  gap: clamp(32px, 5vw, 80px);
}

.service-list {
  flex: 1.3 1 0;
  min-width: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule-strong);
}

.service {
  position: relative;
  border-top: 1px solid var(--rule-strong);
}

/* the Clay line that draws across the top of the active service */
.service__line {
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--clay);
  transition: width .7s var(--ease);
}

.service.is-active .service__line { width: 100%; }

.service__head { font: inherit; }

.service__btn {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 48px);
  width: 100%;
  padding: clamp(22px, 2.6vw, 34px) 0;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.service__num {
  flex: 0 0 36px;
  font: 500 12px var(--sans);
  letter-spacing: .16em;
  color: var(--muted);
}

.service__name {
  flex: 1;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 58px);
  line-height: 1;
  letter-spacing: -.02em;
  transition: color .4s, transform .5s var(--ease);
}

.service__arrow {
  font-size: 22px;
  transition: color .4s, transform .5s var(--ease);
}

.service.is-active .service__name,
.service.is-active .service__arrow { color: var(--clay); }

.service.is-active .service__arrow { transform: translate(4px, -4px); }

@media (min-width: 768px) {
  .service.is-active .service__name { transform: translateX(14px); }
}

.service__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}

.service.is-active .service__panel { grid-template-rows: 1fr; }

.service__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.service__panel-inner p {
  max-width: 560px;
  padding: 0 0 clamp(22px, 2.6vw, 34px) calc(36px + clamp(16px, 3vw, 48px));
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

.service-preview {
  flex: 1 1 0;
  min-width: 0;
  position: sticky;
  top: 112px;
}

.service-preview__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--plate-deep);
}

.service-preview__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: opacity .6s ease, clip-path .9s var(--ease);
}

.service-preview__slide.is-active {
  opacity: 1;
  clip-path: inset(0);
}

/* how each picture is framed inside the 4:5 plate */
.service-preview__slide:nth-child(1) img { object-position: 67% 50%; }
.service-preview__slide:nth-child(3) img { object-position: 52% 50%; }
.service-preview__slide:nth-child(4) img { object-position: 9% 50%; }

.service-preview__count {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 6px 9px;
  background: var(--bg);
  font: 500 11px var(--sans);
  letter-spacing: .16em;
  pointer-events: none;
}

@media (max-width: 767px) {
  .service-preview { display: none; }
  .service__panel { grid-template-rows: 1fr; }
}


/* 11  Selected projects --------------------------------------------------- */

.projects { scroll-margin-top: var(--header-h); }

.projects__intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: clamp(80px, 11vw, 176px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.projects__titles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.projects__note {
  max-width: 240px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* each project is a full-height panel that sticks, so the next one slides over it */
.project {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

.project__inner {
  position: relative;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: clamp(16px, 3vw, 56px);
}

.project__inner > * { direction: ltr; }

.project__media {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: var(--plate);
}

.project--full .project__media { grid-column: 1 / -1; }

.project__zoom {
  position: absolute;
  inset: 0;
  transition: transform 1.2s var(--ease);
}

.project__media:hover .project__zoom { transform: scale(1.04); }

.project__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  background: var(--bg);
}

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.project__numeral {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(48px, 6vw, 104px);
  line-height: .8;
  color: var(--clay);
}

.project__count {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--muted);
}

.project__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 72px);
  line-height: .95;
  letter-spacing: -.025em;
}

.project__meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 4px 32px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.project__meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.project__meta dt {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.project__desc {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

/* "View Project" opens the viewer, so it is only offered where <dialog> works */
.project__open {
  display: none;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  font: 500 11.5px var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.project__open:hover { color: var(--clay); }

.has-dialog .project__open { display: inline-flex; }
.has-dialog .project__media { cursor: pointer; }

/* A panel taller than the screen (short windows, browser zoom, large text) would leave its lower half
   unreachable while it sticks, so script.js marks it .is-flow and it simply scrolls by. */
.project.is-flow {
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
}

.project.is-flow .project__inner {
  height: auto;
  grid-template-rows: auto;
}

.project.is-flow .project__media {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.project.is-flow .project__panel {
  position: relative;
  left: auto;
  bottom: auto;
  width: auto;
  padding: 0;
}

@media (min-width: 768px) {
  .project.is-flow .project__media { aspect-ratio: 16 / 9; }

  /* Casa Nira & The Terrace Apartment: the picture spans the panel, the details sit over it */
  .project--full .project__panel {
    position: absolute;
    left: clamp(40px, 6vw, 120px);
    bottom: clamp(40px, 5vw, 80px);
    width: min(460px, 40%);
    padding: 28px;
  }

  /* Meridian Workspace: picture on the right, details on the left */
  .project--right .project__inner { direction: rtl; }
}


/* 12  Approach, drifting words & figures ---------------------------------- */

.approach {
  position: relative;
  z-index: 1;
  scroll-margin-top: var(--header-h);
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

.approach__drift {
  overflow: hidden;
  padding: clamp(40px, 5vw, 72px) 0;
  border-bottom: 1px solid var(--rule);
}

/* --p is set by script.js as the band scrolls through the viewport */
.approach__drift-text {
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(64px, 11vw, 200px);
  line-height: 1;
  letter-spacing: -.03em;
  transform: translateX(calc(var(--p, 0) * -35%));
  will-change: transform;
}

.approach__drift-text span {
  color: var(--clay);
  font-style: italic;
}

.approach__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 56px clamp(40px, 6vw, 112px);
  padding-top: clamp(80px, 11vw, 176px);
  padding-bottom: clamp(80px, 11vw, 176px);
}

.approach__intro {
  position: static;
  top: 120px;
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 900px) {
  .approach__intro { position: sticky; }
}

.approach__title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(44px, 5.6vw, 96px);
  line-height: .95;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.approach__title em { font-style: italic; }

.approach__lead {
  max-width: 440px;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}

.principles {
  flex: 1 1 420px;
  min-width: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.principle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px clamp(20px, 3vw, 40px);
  padding: clamp(28px, 3vw, 40px) 0 clamp(48px, 6vw, 96px);
  border-top: 1px solid var(--rule);
}

.principle__num {
  grid-row: span 2;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(88px, 10vw, 168px);
  line-height: .78;
  color: transparent;
  -webkit-text-stroke: 1px var(--clay);
}

.principle__label {
  padding-top: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.principle__text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(24px, 2.3vw, 36px);
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.stats { padding-bottom: clamp(80px, 10vw, 160px); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(46%, 220px), 1fr));
  border-top: 1px solid var(--ink);
}

/* on tablets four columns do not fit; a 3 + 1 split would leave one figure stranded, so keep 2 x 2 */
@media (min-width: 768px) and (max-width: 966px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  gap: 14px;
  padding: 24px 16px 0 0;
  border-right: 1px solid var(--rule-soft);
}

.stat dt {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat dd {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(64px, 7.4vw, 128px);
  line-height: .9;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.stats__note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}


/* 13  Closing call to action ---------------------------------------------- */
/* Set like a drawing sheet, in the same language as the sections around it: a label and hairline
   (as in Studio), the invitation in large stepped type, the details in a ruled cell (as in the
   figures row) and a wide plate underneath with crop marks and a figure caption. On smaller
   screens everything stacks in reading order and the plate runs edge to edge. */

.cta {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.cta__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: clamp(16px, 2vw, 32px);
  padding-bottom: clamp(72px, 9vw, 144px);
}

.cta__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px clamp(32px, 5vw, 80px);
  margin-bottom: clamp(36px, 5vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.cta__label { flex: 0 0 220px; }

.cta__tag {
  flex: 1 1 260px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cta__title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(50px, 15.6vw, 84px);
  line-height: .88;
  letter-spacing: -.04em;
  color: var(--ink);
}

/* the second line steps in, like the stair of the hero headline */
.cta__line { display: block; }

.cta__line--2 {
  padding-left: .9em;
  font-style: italic;
  color: var(--clay);
}

.cta__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: clamp(32px, 5vw, 48px);
}

.cta__lead {
  max-width: 420px;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.cta__mail {
  padding-bottom: 2px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-field);
  transition: color .3s, border-color .3s;
}

.cta__mail:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

.cta__figure {
  margin: clamp(48px, 7vw, 96px) calc(-1 * var(--gutter)) 0;
}

.cta__frame {
  position: relative;
  aspect-ratio: 3 / 2;
}

.cta__plate {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--plate);
}

.cta__plate img { object-position: 50% 60%; }

.cta__caption {
  display: flex;
  flex-direction: column;
  gap: 4px 16px;
  margin-top: 16px;
  padding-inline: var(--gutter);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 768px) {
  .cta__title { font-size: clamp(84px, 10.4vw, 176px); }
  .cta__frame { aspect-ratio: 2 / 1; }

  .cta__caption {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .cta__wrap { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .cta__head { grid-column: 1 / -1; }

  .cta__title {
    grid-column: 1 / span 4;
    grid-row: 2;
  }

  /* the details sit in a ruled cell beside the second line of the headline */
  .cta__body {
    grid-column: 5 / -1;
    grid-row: 2;
    align-self: stretch;
    justify-content: flex-end;
    margin-top: 0;
    padding-left: clamp(20px, 2.2vw, 32px);
    border-left: 1px solid var(--rule);
  }

  .cta__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cta__figure {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-inline: 0;
  }

  .cta__frame { aspect-ratio: 5 / 2; }

  .cta__caption { padding-inline: 0; }

  /* the same crop marks as the hero plate */
  .cta__frame::before,
  .cta__frame::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--ink);
    opacity: .5;
    pointer-events: none;
  }

  .cta__frame::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; }
  .cta__frame::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; }
}


/* 14  Contact & enquiry form ---------------------------------------------- */

.contact {
  position: relative;
  z-index: 1;
  scroll-margin-top: var(--header-h);
  background: var(--stone);
}

.contact__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 64px clamp(48px, 7vw, 128px);
  padding-top: clamp(72px, 10vw, 160px);
  padding-bottom: clamp(56px, 8vw, 112px);
}

.contact__intro {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}

.contact__lede {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__title {
  max-width: 13ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 4.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.contact__lead {
  max-width: 400px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
}

.contact__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-strong);
  font-size: 15px;
  line-height: 1.7;
}

.contact__details .mini-label { margin-bottom: 8px; }

.contact__demo {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.form {
  flex: 1.4 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 40px);
}

.form__req {
  font-size: 13px;
  color: var(--muted);
}

.form .req { color: var(--clay-text); }

.form__row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 3vw, 40px) 32px;
}

.field {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form > .field { flex: none; }

.field__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}

.field__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.field__optional {
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--muted);
}

.field__control {
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-field);
  border-radius: 0;
  font: 400 18px var(--sans);
  color: var(--ink);
  outline: none;
  transition: border-color .25s;
}

textarea.field__control {
  font-size: 18px;
  line-height: 1.6;
  resize: vertical;
}

.field__control::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field__control:hover { border-bottom-color: var(--ink); }

.field__control:focus,
.field__control:focus-visible,
.field__control[aria-invalid="true"] {
  outline: none;
  border-bottom-color: var(--clay-text);
  box-shadow: 0 1px 0 var(--clay-text);
}

.field__select { position: relative; }
.field__select select { padding-right: 28px; cursor: pointer; }
.field__select option { color: var(--ink); }

.field__select-arrow {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.field__hint,
.field__error {
  font-size: 13px;
  line-height: 1.5;
}

.field__hint { color: var(--muted); }

.field__error {
  font-weight: 500;
  color: var(--clay-text);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.form__note {
  max-width: 300px;
  font-size: 13px;
  color: var(--muted);
}

.form__status {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.25;
  color: var(--ink);
}

/* the live region stays in the page so announcements work; empty, it takes no room */
.form__status:empty { margin-top: calc(-1 * clamp(28px, 3vw, 40px)); }

.form__status:not(:empty) {
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.form__status.is-error {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--clay-text);
  border-top-color: var(--clay-text);
}


/* 15  Footer -------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--stone);
}

.site-footer__wrap {
  padding-bottom: 28px;
  container-type: inline-size;   /* lets the wordmark size itself to this width */
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--rule-strong);
}

.site-footer__tagline {
  flex: 1 1 240px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 2.2vw, 32px);
  color: var(--body);
}

.site-footer__cols {
  flex: 2 1 460px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 32px;
  font-size: 15px;
  line-height: 1.9;
}

.site-footer__cols .mini-label { margin-bottom: 10px; }

/* the link columns take no room while they are empty */
.site-footer__cols:not(:has(*)) { display: none; }

/* wide screens: the tagline takes two grid columns and the link columns start exactly on the
   third, fourth and fifth column lines, so the footer lines up with the page's grid */
@media (min-width: 1360px) {
  .site-footer__top {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
  }

  .site-footer__tagline { grid-column: 1 / span 2; }

  .site-footer__cols {
    grid-column: 3 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .site-footer__cols > * { padding-right: 24px; }
}

/* AURA. is set to run the full content width. Its spacing is tight but never lets the U's serif
   touch the R or the R's leg touch the A (the old -.05em did). 2.8 is the width of the word in em. */
.site-footer__mark {
  margin: clamp(48px, 7vw, 96px) 0 clamp(16px, 2.2vw, 32px) .008em;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(110px, 27vw, 440px);
  font-size: calc(100cqw / 2.8);
  line-height: .78;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--ink);
}

.site-footer__mark span { color: var(--clay); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
  font-size: 12.5px;
  color: var(--muted);
}

.back-top {
  color: var(--ink);
  text-decoration: none;
}

.back-top:hover { color: var(--clay); }


/* 16  Project viewer (dialog) --------------------------------------------- */

.project-dialog {
  width: min(1280px, calc(100% - 2 * var(--gutter)));
  max-width: none;
  max-height: calc(100vh - 2 * clamp(16px, 3vw, 40px));
  max-height: calc(100dvh - 2 * clamp(16px, 3vw, 40px));
  margin: auto;
  padding: 0;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  border: 0;
}

.project-dialog::backdrop { background: rgba(28, 26, 23, .55); }

.project-dialog__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.project-dialog__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  min-height: 44px;
  padding: 0 20px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 0;
  font: 500 12px var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background .3s, color .3s;
}

.project-dialog__close:hover {
  background: var(--ink);
  color: var(--bg);
}

.project-dialog__figure {
  position: relative;
  background: var(--plate);
}

/* phones: the picture keeps its own proportions, so nothing is cropped */
.project-dialog__img {
  display: block;
  width: 100%;
  height: auto;
}

.project-dialog__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: clamp(24px, 3vw, 48px);
}

.project-dialog__numeral {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(64px, 8vw, 120px);
  line-height: .8;
  color: var(--clay);
}

.project-dialog__count {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--muted);
}

.project-dialog__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 4vw, 64px);
  line-height: .95;
  letter-spacing: -.025em;
}

.project-dialog__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.project-dialog__meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-dialog__meta dt {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-dialog__desc {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

.project-dialog__note {
  max-width: 400px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.project-dialog__enquire { align-self: flex-start; }

@media (min-width: 900px) {
  .project-dialog__panel { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .project-dialog__body { padding-top: 72px; }

  /* wider screens: the picture fills its plate, cropped the way the page's own plates are */
  .project-dialog__figure {
    min-height: min(78vh, 760px);
    min-height: min(78dvh, 760px);
  }

  .project-dialog__img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
  }
}

/* the picture opens like the page's own plates; the text follows */
.project-dialog[open] { animation: dialog-in .5s var(--ease); }
.project-dialog[open] .project-dialog__figure { animation: plate-open 1.1s cubic-bezier(.7, 0, .2, 1) .1s backwards; }
.project-dialog[open] .project-dialog__body > * { animation: rise-in .8s var(--ease) backwards; }
.project-dialog[open] .project-dialog__body > :nth-child(2) { animation-delay: .08s; }
.project-dialog[open] .project-dialog__body > :nth-child(3) { animation-delay: .16s; }
.project-dialog[open] .project-dialog__body > :nth-child(4) { animation-delay: .24s; }
.project-dialog[open] .project-dialog__body > :nth-child(5) { animation-delay: .32s; }
.project-dialog[open] .project-dialog__body > :nth-child(6) { animation-delay: .4s; }
.project-dialog[open] .project-dialog__body > :nth-child(7) { animation-delay: .48s; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes plate-open {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}


/* 17  Reveal motion ------------------------------------------------------- */
/* Everything is visible by default. Script marks only the elements that start below the fold
   as .is-pending, then lets them through as they scroll into view. */

[data-reveal] { transition: opacity 1s ease, transform 1s var(--ease); }
[data-reveal].is-pending { opacity: 0; transform: translateY(28px); }

[data-clip] { transition: clip-path 1.4s cubic-bezier(.7, 0, .2, 1); }
[data-clip].is-pending { clip-path: inset(100% 0 0 0); }


/* 18  No-JavaScript fallbacks, reduced motion, print ---------------------- */

.no-js .service__panel { grid-template-rows: 1fr; }

@media (max-width: 767px) {
  /* without script the menu button can do nothing, so the links stay visible under the wordmark */
  .no-js .menu-toggle { display: none; }
  .no-js .site-header__bar { height: auto; flex-wrap: wrap; padding-block: 8px; row-gap: 0; }
  .no-js .site-nav { display: flex; position: static; width: 100%; height: auto; padding: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 20px; overflow: visible; }
  .no-js .site-nav__list { flex-direction: row; flex-wrap: wrap; gap: 0 16px; font-size: 14px; }
  .no-js .site-nav__list li { border: 0; }
  .no-js .nav-link { padding: 13px 0; font: 400 14px var(--sans); }
  .no-js .nav-link__label { order: 0; }
  .no-js .nav-link__num { display: none; }
  .no-js .site-nav__foot { padding: 0; }
  .no-js .btn--nav { justify-content: flex-start; min-height: 44px; padding: 0 16px; font-size: 11.5px; background: var(--ink); }
  .no-js .site-nav__note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* nothing waits for a scroll: every word is lit */
  .js .studio__statement { --n: 99; }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .grid-overlay,
  .site-header,
  .service-preview,
  .project-dialog { display: none; }

  [data-reveal].is-pending { opacity: 1; transform: none; }
  [data-clip].is-pending { clip-path: none; }
  .project { position: static; height: auto; }
}
