@font-face {
  font-family: "Noto Serif Display Variable";
  src: url("/assets/fonts/noto-serif-display-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  size-adjust: 100%; ascent-override: 97%; descent-override: 26%; line-gap-override: 0%;
}
@font-face {
  font-family: "Noto Serif Display Variable";
  src: url("/assets/fonts/noto-serif-display-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

@font-face {
  font-family: "Raleway Variable";
  src: url("/assets/fonts/raleway-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  size-adjust: 100%; ascent-override: 95%; descent-override: 24%; line-gap-override: 0%;
}

@layer tokens, base, type, layout, components, motion;

/* ========================================================================
   HAUS BELLE | The Breathing Room
   Palette is two colours plus one accent. Every photo frame is square.
   ===================================================================== */

@layer tokens {
  :root {
    --stone: #ECEBE6;
    --paper: #F6F4EF;
    --ink:   #17173E;
    --ink-2: #26264D;
    --ivory: #F4F1EA;
    --mute:  rgba(23, 23, 62, .68);
    --line:  rgba(23, 23, 62, .16);
    --oak:   #A9825B;

    --f-display: "Noto Serif Display Variable", "Noto Serif Display", Georgia, "Times New Roman", serif;
    --f-text: "Raleway Variable", "Raleway", system-ui, sans-serif;

    --shell: 1560px;
    --margin: clamp(16px, 4.5vw, 72px);
    --gutter: clamp(12px, 1.6vw, 24px);
    --rhythm: clamp(96px, 16vh, 200px);

    --t-wordmark: clamp(3.75rem, 15.5vw, 17rem);
    --t-h1: clamp(2.75rem, 7vw, 7.5rem);
    --t-h2: clamp(2rem, 4.6vw, 4.5rem);
    --t-h3: clamp(1.375rem, 2.2vw, 2rem);
    --t-body: clamp(1rem, .96rem + .2vw, 1.125rem);
    --t-label: .72rem;
    --t-caption: .8125rem;

    --ease-out: cubic-bezier(.23, 1, .32, 1);
    --ease-in-out: cubic-bezier(.77, 0, .175, 1);
    --ease-breath: cubic-bezier(.45, .05, .55, .95);

    --warm: 0;
  }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html {
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
    /* NO scroll-behavior: smooth here. Lenis animates scroll itself, and the
       two fight each other every frame on a real trackpad or smooth wheel,
       which reads as stutter. Anchor scrolling is handled in main.js instead. */
    scroll-padding-top: clamp(5rem, 9vw, 7rem);
  }
  /* nothing scrolls until the curtain lifts */
  html:not([data-ready="true"]) body { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  html:not(.lenis) { scroll-behavior: smooth; }

  body {
    background: var(--stone);
    color: var(--ink);
    font-family: var(--f-text);
    font-weight: 300;
    font-size: var(--t-body);
    line-height: 1.65;
    /* clip, not hidden: overflow-x:hidden makes the body a scroll container,
       which silently breaks position:sticky for every descendant. clip
       contains the same overflow without creating one. */
    overflow-x: clip;
    font-synthesis-weight: none;
  }

  img, picture, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; color: inherit; }
  ul, ol { list-style: none; padding: 0; }

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

  :focus-visible {
    outline: 1px solid var(--oak);
    outline-offset: 4px;
  }

  .skip {
    position: absolute; left: var(--margin); top: -100px; z-index: 300;
    background: var(--ink); color: var(--ivory);
    padding: .75rem 1.25rem; font-size: var(--t-label);
    letter-spacing: .18em; text-transform: uppercase;
    transition: transform .2s var(--ease-out);
  }
  .skip:focus { transform: translateY(124px); }

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

@layer type {
  h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
  p { text-wrap: pretty; }

  .display, h1, h2 {
    font-family: var(--f-display);
    font-weight: 300;
    letter-spacing: -.015em;
    line-height: .98;
  }
  h1 { font-size: var(--t-h1); }
  h2 { font-size: var(--t-h2); }
  h3 {
    font-family: var(--f-display);
    font-size: var(--t-h3);
    font-weight: 400;
    line-height: 1.12;
  }

  .wordmark {
    font-family: var(--f-display);
    font-weight: 350;
    font-size: var(--t-wordmark);
    line-height: .92;
    letter-spacing: -.02em;
  }

  .label {
    font-family: var(--f-text);
    font-size: var(--t-label);
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    line-height: 1.4;
  }
  .label--mute { color: var(--mute); }

  .caption {
    font-size: var(--t-caption);
    color: var(--mute);
    line-height: 1.5;
  }

  .lede { font-size: clamp(1.125rem, 1.6vw, 1.5rem); line-height: 1.5; max-width: 34ch; }
  .body { max-width: 62ch; }
  .body + .body { margin-top: 1.25em; }

  .num {
    font-variant-numeric: lining-nums tabular-nums;
    font-family: var(--f-text);
    font-weight: 400;
  }

  .quote {
    font-family: var(--f-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.5rem, 3.2vw, 2.75rem);
    line-height: 1.18;
    max-width: 22ch;
  }

  .link {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
  }
  .link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left;
    transition: transform .24s var(--ease-out);
  }
  @media (hover: hover) and (pointer: fine) {
    .link:hover::after { transform: scaleX(1); }
    .link:hover { color: var(--ink-2); }
  }
  .link:focus-visible::after { transform: scaleX(1); }
}

@layer layout {
  .shell {
    width: min(var(--shell), 100% - var(--margin) * 2);
    margin-inline: auto;
  }
  .section { padding-block: var(--rhythm); }
  .section--tight { padding-block: calc(var(--rhythm) * .55); }

  .grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
  }
  @media (max-width: 860px) { .grid { grid-template-columns: repeat(6, 1fr); } }

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

  /* navy plate alternating with stone pages, as in the printed portfolio */
  .plate-dark {
    background: var(--ink);
    color: var(--ivory);
    position: relative;
    z-index: 1;
  }
  .plate-dark .caption, .plate-dark .label--mute { color: rgba(244, 241, 234, .66); }
  .plate-dark .rule { background: rgba(244, 241, 234, .2); }
}

@layer components {

  /* ---- ambient: one fixed daylight layer + a static grain ------------- */
  .daylight {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    contain: strict;
  }
  /* a soft patch of window light, crossed by two blurred mullion shadows.
     Cool at the top of a page, golden by the footer: --warm is set by scroll. */
  .daylight i {
    position: absolute; inset: -20%;
    background:
      radial-gradient(42% 34% at 28% 22%, rgba(23, 23, 62, .5), transparent 70%),
      radial-gradient(38% 52% at 74% 66%, rgba(169, 130, 91, calc(.22 + var(--warm) * .5)), transparent 72%);
    opacity: .05;
  }
  .daylight u {
    position: absolute; inset: -20%;
    background: repeating-linear-gradient(
      74deg,
      transparent 0 clamp(120px, 17vw, 260px),
      rgba(23, 23, 62, .55) 0 calc(clamp(120px, 17vw, 260px) + 18px)
    );
    -webkit-mask-image: radial-gradient(40% 34% at 30% 24%, #000, transparent 70%);
    mask-image: radial-gradient(40% 34% at 30% 24%, #000, transparent 70%);
    opacity: .04;
  }
  .grain {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("/assets/img/grain.png");
    background-size: 180px;
    opacity: .03;
    contain: strict;
  }
  main, .site-header, .site-footer, .p1-foot { position: relative; z-index: 1; }

  /* ---- running heads -------------------------------------------------- */
  .runners {
    position: fixed; top: 0; left: 0; right: 0; z-index: 90;
    display: grid; grid-template-columns: 1fr auto 1fr;
    padding: 1.5rem var(--margin);
    pointer-events: none;
    color: var(--mute);
    transition: color .3s var(--ease-out);
  }
  [data-top-dark="true"] .runners { color: rgba(244, 241, 234, .66); }
  .runners span:nth-child(2) { text-align: center; transition: opacity .35s var(--ease-out); }
  .runners[data-swap="true"] span:nth-child(2) { opacity: 0; }
  .runners span:nth-child(3) { text-align: right; }
  @media (max-width: 860px) { .runners { display: none; } }

  /* ---- header --------------------------------------------------------- */
  .site-header--legacy {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.1rem, 2.4vw, 1.9rem) var(--margin);
    transition: transform .4s var(--ease-out);
  }
  /* The bar is a ground, not decoration: without it the nav vanishes the
     moment a photograph or a navy plate scrolls underneath it. */
  .site-header::before {
    content: "";
    position: absolute; inset: 0;
    background: var(--stone);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transition: opacity .32s var(--ease-out);
    pointer-events: none;
  }
  [data-scrolled="true"] .site-header::before { opacity: 1; }
  [data-top-dark="true"] .site-header::before { background: var(--ink); border-bottom-color: rgba(244, 241, 234, .18); }
  .site-header > * { position: relative; z-index: 1; }
  .site-header[data-hidden="true"] { transform: translateY(-110%); }
  /* the hero square breaks the grid and bleeds to the right edge, so the
     cover reads as a spread rather than two polite columns */
  .cover__bleed { margin-right: calc(var(--margin) * -1); }
  @media (max-width: 860px) { .cover__bleed { margin-right: 0; } }

  /* project pages open on a navy plate: invert what floats over it */
  [data-top-dark="true"] .site-header--legacy { color: var(--ivory); }

  .site-header__mark {
    display: block; width: 34px; position: relative;
    transform-origin: left center;
    transition: transform .32s var(--ease-out);
  }
  [data-scrolled="true"] .site-header__mark { transform: scale(.84); }
  .site-header__mark img { width: 100%; }
  .mark--ivory { display: none; }
  [data-top-dark="true"] .mark--ink { display: none; }
  [data-top-dark="true"] .mark--ivory { display: block; }
  .nav { display: flex; gap: .5rem; align-items: center; }
  .nav__links { display: flex; align-items: center; gap: clamp(.25rem, 1vw, .75rem); }
  .nav__links a {
    position: relative;
    display: block;
    padding: .7rem clamp(.6rem, 1.1vw, 1rem);
    transition: opacity .24s var(--ease-out);
  }
  .nav__links a::after {
    content: "";
    position: absolute; left: clamp(.6rem, 1.1vw, 1rem); right: clamp(.6rem, 1.1vw, 1rem); bottom: .35rem;
    height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left;
    transition: transform .28s var(--ease-out);
  }
  @media (hover: hover) and (pointer: fine) {
    .nav__links a:hover::after { transform: scaleX(1); }
  }
  .nav__links a:focus-visible::after { transform: scaleX(1); }
  .nav__links a[aria-current="page"] { opacity: 1; }
  .nav__links a[aria-current="page"]::after { transform: scaleX(1); background: var(--ink); }
  @media (max-width: 760px) { .nav__links { display: none; } }

  .burger {
    display: none; background: none; border: 0; cursor: pointer;
    padding: .5rem; width: 44px; height: 44px;
  }
  @media (max-width: 760px) { .burger { display: grid; place-items: center; gap: 5px; } }
  .burger i { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .3s var(--ease-out); }
  [data-menu="true"] .burger i:first-child { transform: translateY(3px) rotate(45deg); }
  [data-menu="true"] .burger i:last-child { transform: translateY(-3px) rotate(-45deg); }

  /* ---- full screen menu ----------------------------------------------- */
  .menu {
    position: fixed; inset: 0; z-index: 200;
    background: var(--ink); color: var(--ivory);
    display: grid; align-content: center; gap: .5rem;
    padding: var(--margin);
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease-out), visibility .4s;
  }
  .menu[data-open="true"] { opacity: 1; visibility: visible; }
  .menu:not([data-open="true"]) a, .menu:not([data-open="true"]) button { pointer-events: none; }
  .menu nav { display: grid; gap: .25rem; }
  .menu a {
    font-family: var(--f-display); font-size: clamp(2.25rem, 10vw, 4rem);
    font-weight: 300; line-height: 1.12;
    padding: .35rem 0;
    display: block;
    transform: translateY(14px); opacity: 0;
    transition: transform .5s var(--ease-out), opacity .5s var(--ease-out);
  }
  .menu[data-open="true"] a { transform: none; opacity: 1; }
  .menu[data-open="true"] a:nth-child(2) { transition-delay: 60ms; }
  .menu[data-open="true"] a:nth-child(3) { transition-delay: 120ms; }
  .menu[data-open="true"] a:nth-child(4) { transition-delay: 180ms; }
  .menu__foot { margin-top: clamp(2.5rem, 7vw, 4rem); display: grid; gap: .6rem; }
  .menu__foot a { font-family: var(--f-text); font-size: var(--t-caption); letter-spacing: .02em; opacity: 1; transform: none; padding: .25rem 0; }
  .menu__close {
    position: absolute; top: var(--margin); right: var(--margin);
    background: none; border: 0; color: inherit; cursor: pointer;
    width: 44px; height: 44px; font-size: 1.5rem;
  }

  /* ---- THE SQUARE RULE: every photo sits in a 1:1 frame --------------- */
  .sq {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--paper);
  }
  .sq img {
    width: 100%; height: 100%;
    object-fit: cover;
  }
  .sq--plate { background: var(--paper); }
  .sq--plate img { object-fit: contain; }

  /* registration marks, as on an architectural drawing sheet. Four corner
     ticks, 1px, drawn on the paper rather than framing it. */
  .sq--plate::after {
    content: "";
    position: absolute; inset: 5.5%;
    pointer-events: none;
    --tick: linear-gradient(var(--line), var(--line));
    background:
      var(--tick) 0 0 / 11px 1px no-repeat,
      var(--tick) 0 0 / 1px 11px no-repeat,
      var(--tick) 100% 0 / 11px 1px no-repeat,
      var(--tick) 100% 0 / 1px 11px no-repeat,
      var(--tick) 0 100% / 11px 1px no-repeat,
      var(--tick) 0 100% / 1px 11px no-repeat,
      var(--tick) 100% 100% / 11px 1px no-repeat,
      var(--tick) 100% 100% / 1px 11px no-repeat;
  }

  figure { margin: 0; }
  figcaption { margin-top: .75rem; }

  .fig {
    display: flex; gap: .6rem; align-items: baseline;
    font-size: var(--t-caption); color: var(--mute);
  }
  .fig__n { flex: none; letter-spacing: .1em; text-transform: uppercase; font-size: var(--t-label); }

  /* ---- plate legend set as real text, beside the drawing -------------- */
  .legend { display: grid; gap: .4rem; margin-top: 1.25rem; }
  .legend li { display: flex; gap: .75rem; font-size: var(--t-caption); color: var(--mute); }
  .legend .num { color: var(--ink); flex: none; min-width: 1.75rem; }
  .plate-dark .legend .num { color: var(--ivory); }

  /* ---- contents index -------------------------------------------------- */
  .index { border-top: 1px solid var(--line); }
  .index__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(1rem, 3vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
    position: relative;
  }
  /* the rule under each row is drawn, not faded: rows arrive as their
     hairline is ruled across the page */
  .index__row::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: var(--line);
    transform-origin: left;
    transition: transform 1.1s var(--ease-out);
  }
  .index__n { font-size: var(--t-label); letter-spacing: .14em; color: var(--mute); transition: color .24s var(--ease-out); }
  .index__name { font-family: var(--f-display); font-size: clamp(1.5rem, 3.4vw, 2.75rem); font-weight: 300; line-height: 1.05; }
  .index__sector { font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
  @media (max-width: 700px) {
    .index__row { grid-template-columns: auto 1fr; }
    .index__sector { grid-column: 2; }
  }
  @media (hover: hover) and (pointer: fine) {
    .index__row:hover .index__n { color: var(--ink); }
  }
  .index__thumb { display: none; }
  @media (max-width: 700px) {
    .index__thumb { display: block; grid-column: 1 / -1; width: 76%; margin-top: 1rem; }
  }

  /* cursor-following preview, desktop only */
  .preview {
    position: fixed; top: 0; left: 0; z-index: 80;
    width: 19vw; max-width: 280px;
    pointer-events: none; opacity: 0;
    transition: opacity .28s var(--ease-out);
    will-change: transform;
  }
  .preview[data-on="true"] { opacity: 1; }
  @media (max-width: 860px), (hover: none) { .preview { display: none; } }

  /* ---- buttons --------------------------------------------------------- */
  .btn {
    display: inline-flex; align-items: center; gap: .75rem;
    min-height: 44px; padding: .85rem 1.5rem;
    border: 1px solid var(--line); background: none; cursor: pointer;
    font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase;
    transition: transform .18s var(--ease-out), background-color .24s var(--ease-out), color .24s var(--ease-out), border-color .24s var(--ease-out);
  }
  .btn:active { transform: scale(.97); }
  @media (hover: hover) and (pointer: fine) {
    .btn:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
  }
  .btn--solid { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
  @media (hover: hover) and (pointer: fine) {
    .btn--solid:hover { background: var(--ink-2); border-color: var(--ink-2); }
  }
  [data-top-dark="true"] .mh__item i { background: var(--ivory); }
  .plate-dark .btn { border-color: rgba(244, 241, 234, .3); }
  @media (hover: hover) and (pointer: fine) {
    .plate-dark .btn:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
  }

  /* ---- form ------------------------------------------------------------ */
  .field { display: grid; gap: .5rem; }
  .field label { font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
  .field input, .field select, .field textarea {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: .9rem 1rem;
    font-size: 1rem;
    min-height: 48px;
    border-radius: 0;
    transition: border-color .24s var(--ease-out);
  }
  .field textarea { min-height: 9rem; resize: vertical; }
  .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
  .field[data-error="true"] input, .field[data-error="true"] textarea { border-color: #8E2F2F; }
  .field__err { font-size: var(--t-caption); color: #8E2F2F; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .form-note { font-size: var(--t-caption); color: var(--mute); max-width: 48ch; }
  .consent { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--t-caption); color: var(--mute); }
  .consent input { min-height: 0; width: 18px; height: 18px; margin-top: .2rem; flex: none; }

  /* ---- footer ----------------------------------------------------------- */
  .site-footer { background: var(--ink); color: var(--ivory); padding-block: var(--rhythm) 2.5rem; }
  .site-footer a:hover { color: var(--ivory); }
  .footer-mark { width: 100%; }
  .footer-mark span { display: inline-block; }


  /* ---- the portfolio seal ---------------------------------------------
     A slowly turning ring of type around a still arrow. It invites without
     covering anything, and it reads as a stamp on a page rather than a
     button stuck on top of one. */
  .seal {
    display: inline-grid; place-items: center;
    width: clamp(86px, 11vw, 124px); aspect-ratio: 1;
    position: relative; flex: none;
    color: var(--ink);
  }
  .seal__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
  .seal__ring text {
    font-family: var(--f-text);
    font-size: 9.1px; font-weight: 500;
    letter-spacing: .24em; text-transform: uppercase;
    fill: var(--mute);
  }
  .seal__dot {
    position: relative; display: grid; place-items: center;
    width: 44%; aspect-ratio: 1; border-radius: 50%;
    border: 1px solid var(--line);
    transition: transform .4s var(--ease-out), background-color .4s var(--ease-out), border-color .4s var(--ease-out);
  }
  .seal__dot svg { width: 36%; stroke: currentColor; stroke-width: 1.5; fill: none; transition: transform .4s var(--ease-out); }
  @media (hover: hover) and (pointer: fine) {
    .seal:hover .seal__dot { background: var(--ink); border-color: var(--ink); color: var(--ivory); transform: scale(1.08); }
    .seal:hover .seal__dot svg { transform: translateX(2px); }
  }
  .seal:focus-visible .seal__dot { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

  /* ---- misc -------------------------------------------------------------- */
  .scroll-cue { display: flex; align-items: center; gap: .75rem; color: var(--mute); font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; }
  .breath-line { display: block; width: 100%; height: 1px; background: var(--line); transform-origin: left; }
  .plate-dark .breath-line { background: rgba(244, 241, 234, .3); }

  /* ---- the breathing line --------------------------------------------
     The one organic gesture in the whole site: a hairline that bows a few
     pixels with the breath cycle and ripples with scroll velocity, then
     settles straight. Aalto's warmth, drawn with a single stroke. */
  .bline { display: block; width: 100%; height: 16px; overflow: visible; }
  .bline path {
    fill: none;
    stroke: var(--line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
  }
  .plate-dark .bline path { stroke: rgba(244, 241, 234, .3); }
  .bline--short { max-width: 88px; }
}

@layer motion {
  /* Content is fully visible without JS. Hidden initial states exist only
     under .js, and only when the visitor has not asked for reduced motion. */
  @media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] { opacity: 0; transform: translateY(14px); }
    .js .index__row::after { transform: scaleX(0); }
    .js .index__row[data-in="true"]::after { transform: scaleX(1); }
    /* The clip lives on the inner square, never on the observed element.
       An element clipped to zero area is never reported as intersecting, so
       clipping the observed figure deadlocks it shut forever. */
    .js [data-shutter] .sq { clip-path: inset(50% 0 50% 0); }
    .js [data-shutter] img { transform: scale(1.12); }
    .js [data-shutter] figcaption { opacity: 0; transform: translateY(12px); }
    .js [data-lines] > * { opacity: 0; transform: translateY(.5em); }
  }

  [data-reveal] { transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
  [data-reveal][data-in="true"] { opacity: 1; transform: none; }

  [data-shutter] .sq { transition: clip-path 1.2s var(--ease-in-out); }
  [data-shutter] img { transition: transform 1.4s var(--ease-out); }
  [data-shutter] figcaption { transition: opacity .7s var(--ease-out) .15s, transform .7s var(--ease-out) .15s; }
  [data-shutter][data-in="true"] .sq { clip-path: inset(0); }
  [data-shutter][data-in="true"] img { transform: none; }
  [data-shutter][data-in="true"] figcaption { opacity: 1; transform: none; }

  [data-lines] > * { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
  [data-lines][data-in="true"] > * { opacity: 1; transform: none; }
  [data-lines][data-in="true"] > *:nth-child(2) { transition-delay: 80ms; }
  [data-lines][data-in="true"] > *:nth-child(3) { transition-delay: 160ms; }
  [data-lines][data-in="true"] > *:nth-child(4) { transition-delay: 240ms; }
  [data-lines][data-in="true"] > *:nth-child(5) { transition-delay: 320ms; }

  /* the hero square breathes, slowly */
  @media (prefers-reduced-motion: no-preference) {
    .js .seal__ring { animation: turn 26s linear infinite; }
  }
  @keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
  @keyframes drift { from { transform: translate3d(-2%, -1%, 0); } to { transform: translate3d(2%, 1.5%, 0); } }
  @keyframes turn { to { transform: rotate(360deg); } }

  /* the preloader lives in its own layer below */

  @media (prefers-reduced-motion: reduce) {
    .pl { display: none; }
    [data-reveal], [data-shutter], [data-lines] > * { transition-duration: .2s; }
    [data-shutter] .sq { clip-path: none !important; }
    [data-shutter] img { transform: none !important; }
    [data-shutter] figcaption { opacity: 1 !important; transform: none !important; }
    .preview { display: none; }
  }

  @view-transition { navigation: auto; }
}


/* ===== facelift: the portfolio index ==================================
   Tall editorial rows. Eyebrow, a large name that rises through a mask,
   and a "View project" affordance whose rule draws in from the left and
   leaves to the right. No opacity dimming: the previous version washed the
   whole block out instead of creating depth. */
@layer components {
  .idx { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .idx li { border-bottom: 1px solid var(--line); }
  .idx__a {
    display: grid; gap: clamp(.875rem, 1.4vw, 1.25rem);
    padding: clamp(2.25rem, 4.5vw, 3.5rem) 0;
    color: var(--ink);
  }
  .idx__eye { color: var(--mute); }
  .idx__name {
    display: block; overflow: hidden;
    font-family: var(--f-display); font-weight: 300;
    font-size: clamp(2.125rem, 4.8vw, 5.5rem);
    line-height: 1.02; letter-spacing: -.018em; text-wrap: balance;
  }
  .idx__contrib { color: var(--mute); }
  .idx__go {
    position: relative; justify-self: start;
    display: inline-flex; align-items: center; gap: .875rem;
    padding: .4rem 0;
    font-size: var(--t-label); letter-spacing: .22em;
    text-transform: uppercase; font-weight: 500;
  }
  .idx__go::before, .idx__go::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0;
    height: 1px; background: currentColor;
  }
  .idx__go::before { opacity: .2; }
  .idx__go::after {
    transform: scaleX(0); transform-origin: right;
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  }
  .idx__arrow { display: inline-block; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
  @media (hover: hover) and (pointer: fine) {
    .idx__a:hover .idx__go::after { transform: scaleX(1); transform-origin: left; }
    .idx__a:hover .idx__arrow { transform: translateX(6px); }
  }
  .idx__a:focus-visible .idx__go::after { transform: scaleX(1); transform-origin: left; }
}

@layer motion {
  /* the name rises through its own mask, line by line, as the row arrives */
  .idx__name > span { display: block; }
  @media (prefers-reduced-motion: no-preference) {
    .js .idx__name > span { transform: translateY(104%); }
  }
  .idx__name > span { transition: transform 1s var(--ease-out); }
  .idx li[data-in="true"] .idx__name > span { transform: none; }
  .idx li:nth-child(2) .idx__name > span { transition-delay: 60ms; }
  .idx li:nth-child(3) .idx__name > span { transition-delay: 120ms; }
  .idx li:nth-child(4) .idx__name > span { transition-delay: 180ms; }
  .idx li:nth-child(5) .idx__name > span { transition-delay: 240ms; }
  @media (prefers-reduced-motion: reduce) {
    .idx__name > span { transform: none !important; }
  }
}


/* ===== the preloader ==================================================
   A navy plate that holds until webfonts have swapped and the hero has
   decoded, showing honest progress rather than a timer, then wipes upward
   to hand over the page already composed. */
@layer components {
  .pl {
    position: fixed; inset: 0; z-index: 260;
    background: var(--ink); color: var(--ivory);
    display: grid; place-items: center;
    padding: var(--margin);
    transition: clip-path 1s var(--ease-in-out);
  }
  .pl[data-done="true"] { clip-path: inset(0 0 100% 0); pointer-events: none; }

  .pl__heads {
    position: absolute; top: var(--margin); left: var(--margin); right: var(--margin);
    display: flex; justify-content: space-between; gap: 1.5rem;
    font-size: var(--t-label); letter-spacing: .24em;
    text-transform: uppercase; font-weight: 500;
  }
  .pl__heads span, .pl__word, .pl__foot span { display: block; overflow: hidden; }
  .pl__heads i, .pl__foot i { display: block; font-style: normal; opacity: .68; }

  .pl__mid { width: min(300px, 72vw); display: grid; gap: 1.125rem; }
  .pl__word i {
    display: block; font-style: normal; text-align: center;
    font-size: .8125rem; letter-spacing: .62em; padding-left: .62em;
    text-transform: uppercase; font-weight: 500;
  }
  .pl__meter { display: grid; gap: .75rem; }
  .pl__track { position: relative; height: 1px; }
  .pl__track::before { content: ""; position: absolute; inset: 0; background: var(--ivory); opacity: .2; }
  .pl__bar {
    position: absolute; inset: 0; background: var(--ivory);
    transform: scaleX(0); transform-origin: left;
  }
  .pl__foot {
    display: flex; justify-content: space-between; gap: 1rem;
    font-size: .625rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 500;
  }
  .pl__foot i { font-variant-numeric: tabular-nums; }
  .pl__hint {
    position: absolute; left: 0; right: 0; bottom: 1.625rem; text-align: center;
    font-size: .625rem; letter-spacing: .24em; text-transform: uppercase; opacity: .5;
  }

  /* the masked lines rise once the plate is up */
  .pl i { transform: translateY(110%); transition: transform .9s var(--ease-out); }
  .pl[data-lit="true"] i { transform: none; }
  .pl[data-lit="true"] .pl__heads span:nth-child(2) i { transition-delay: 70ms; }
  .pl[data-lit="true"] .pl__foot i { transition-delay: 140ms; }
}

@layer motion {
  /* cross document transitions: the old page lifts clear, then the new one
     rises. The two must never be on screen together: the outgoing page is
     opaque, so any overlap reads as a double exposure. The incoming delay is
     therefore the full outgoing duration, not a fraction of it. */
  @keyframes hbVtOut { to { opacity: 0; transform: translateY(-28px); } }
  @keyframes hbVtIn { from { opacity: 0; transform: translateY(36px); } }
  ::view-transition-old(root) { animation: 360ms cubic-bezier(.4, 0, 1, 1) both hbVtOut; }
  ::view-transition-new(root) { animation: 620ms cubic-bezier(.16, 1, .3, 1) 360ms both hbVtIn; }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  }
}


/* ===== facelift: ONE masthead =========================================
   The running heads and the navigation were two independent fixed layers
   that collided and had no shared ground. They are one bar now. */
@layer components {
  .mh {
    position: fixed; top: 0; left: 0; right: 0; z-index: 120;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 1.5rem; padding: 1.2rem clamp(18px, 3vw, 38px);
    transition: transform .4s var(--ease-out);
  }
  .mh::before {
    content: ""; position: absolute; inset: 0;
    background: var(--stone); border-bottom: 1px solid var(--line);
    opacity: 0; transition: opacity .32s var(--ease-out);
  }
  [data-scrolled="true"] .mh::before, [data-panel="true"] .mh::before { opacity: 1; }
  .mh > * { position: relative; z-index: 1; }
  .mh[data-hidden="true"] { transform: translateY(-110%); }

  .mh__l { display: flex; align-items: center; gap: 1rem; min-width: 0; }
  .mh__mark { display: block; width: 30px; flex: none; }
  .mh__mark img { width: 100%; }
  .mh__bar { width: 1px; height: 17px; background: var(--line); flex: none; }
  .mh__issue, .mh__right { color: var(--mute); white-space: nowrap; }
  @media (max-width: 1180px) { .mh__issue, .mh__right { display: none; } }

  .mh__nav { display: flex; align-items: center; gap: clamp(.25rem, 1vw, .65rem); }
  .mh__item {
    position: relative; display: inline-flex; align-items: center; gap: .6rem;
    padding: .7rem clamp(.85rem, 1.3vw, 1.2rem);
    background: none; border: 0; cursor: pointer; color: inherit; font: inherit;
    font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
    transition: background-color .24s var(--ease-out);
  }
  .mh__item i { width: 5px; height: 5px; flex: none; background: var(--ink); opacity: 0; transition: opacity .3s var(--ease-out); }
  .mh__item[aria-current="page"] i { opacity: 1; }
  .mh__item svg { width: 9px; flex: none; stroke: currentColor; stroke-width: 1.5; fill: none; transition: transform .3s var(--ease-out); }
  .mh__item[aria-expanded="true"] { background: var(--paper); }
  .mh__item[aria-expanded="true"] svg { transform: rotate(180deg); }
  @media (hover: hover) and (pointer: fine) { .mh__item:hover { background: var(--paper); } }
  @media (max-width: 900px) { .mh__nav { display: none; } }

  .mh__panel {
    position: fixed; left: 0; right: 0; top: 0; z-index: 110;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: calc(1.2rem + 74px) clamp(18px, 3vw, 38px) clamp(2.5rem, 4.5vw, 3.5rem);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .34s var(--ease-out), transform .34s var(--ease-out), visibility .34s;
  }
  .mh__panel[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .pan {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr) minmax(0, 4fr);
    gap: clamp(1.75rem, 4.5vw, 4.5rem); align-items: start;
    max-width: var(--shell); margin-inline: auto;
  }
  @media (max-width: 1040px) { .pan { grid-template-columns: 1fr; } .pan__fig, .pan__cta { display: none; } }
  .pan__head { display: flex; justify-content: space-between; color: var(--mute); padding-bottom: 1.1rem; }
  .pan__list { border-top: 1px solid var(--line); }
  .pan__list a {
    display: grid; grid-template-columns: auto 1fr auto; align-items: baseline;
    gap: clamp(1.25rem, 2.8vw, 2.75rem); padding: 1rem 0; border-bottom: 1px solid var(--line);
  }
  .pan__n { font-size: var(--t-label); letter-spacing: .14em; color: var(--mute); transition: color .24s var(--ease-out); }
  .pan__nm { font-family: var(--f-display); font-weight: 300; font-size: clamp(1.2rem, 1.85vw, 1.75rem); line-height: 1.1; }
  .pan__sec { font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
  @media (hover: hover) and (pointer: fine) { .pan__list a:hover .pan__n { color: var(--ink); } }
  .pan__stack, .idxfig__stack { position: relative; aspect-ratio: 1 / 1; background: var(--stone); }
  .pan__stack figure, .idxfig__stack figure { position: absolute; inset: 0; opacity: 0; transition: opacity .55s var(--ease-out); }
  .pan__stack figure[data-on="true"], .idxfig__stack figure[data-on="true"] { opacity: 1; }
  .pan__cap, .idxfig__cap { display: flex; justify-content: space-between; gap: 1rem; margin-top: .85rem; color: var(--mute); }
  .pan__cta { display: grid; gap: 1.25rem; justify-items: start; }
}

/* ===== facelift: the contents spread, list beside a sticky square ===== */
@layer components {
  .idxwrap {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 6vw, 7.5rem);
    align-items: stretch;   /* the aside must own the full row height */
  }
  .idxfig { height: 100%; }
  .idx li { min-height: clamp(19rem, 52vh, 29rem); display: flex; align-items: center; }
  .idx__a { width: 100%; }
  .idxfig__in {
    position: sticky; top: clamp(6rem, 13vh, 8.5rem);
    max-width: min(100%, calc(100svh - 15rem));
  }
  .idx__thumb { display: none; }
  @media (max-width: 900px) {
    .idxwrap { grid-template-columns: 1fr; }
    .idxfig { display: none; }
    .idx li { min-height: 0; }
    /* the square travels with the row instead of pinning beside the list */
    .idx__thumb { display: block; width: 78%; margin-top: .35rem; }
    .idx__a { gap: 1rem; }
  }
}


/* ===== facelift: the cover wordmark ===================================
   Haus in roman over Belle in italic, each line rising through its own
   mask. The italic is the one flourish on the page, so it carries it. */
@layer components {
  .hb__stack { display: block; }
  .hb__line { display: block; overflow: hidden; }
  .hb__line > span { display: block; line-height: .88; }
  .hb__it > span { font-style: italic; padding-left: .055em; }
}
@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .js .hb__line > span { transform: translateY(104%); }
  }
  .hb__line > span { transition: transform 1.15s var(--ease-out); }
  [data-ready="true"] .hb__line > span { transform: none; }
  [data-ready="true"] .hb__it > span { transition-delay: 110ms; }
  @media (prefers-reduced-motion: reduce) { .hb__line > span { transform: none !important; } }
}


/* ===== final pass ====================================================== */
@layer components {
  /* the cover now runs the full measure, with no photograph beside it */
  .cover--full .hb__stack { font-size: clamp(4rem, 17vw, 19rem); }
  .cover--full .hb__line > span { line-height: .84; }

  /* section openers all speak with the same voice as Contents. */
  .opener {
    font-family: var(--f-display); font-weight: 350;
    font-size: clamp(2.5rem, 7.5vw, 6.5rem);
    line-height: .98; letter-spacing: -.018em;
  }

  /* numbered editorial columns: blue on stone, ivory on navy, never brown */
  .n-mark { color: var(--ink); }
  .plate-dark .n-mark { color: var(--ivory); }

  /* ---- footer ---- */
  .site-footer { padding-block: clamp(4rem, 9vw, 7rem) 2.5rem; }
  .foot__top {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 6vw, 6rem); align-items: end;
  }
  .foot__word { font-size: clamp(3rem, 11vw, 9rem); line-height: .85; display: block; }
  .foot__cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
  .foot__cols2 h4 { font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase;
    font-weight: 500; color: rgba(244, 241, 234, .55); margin-bottom: 1.1rem; }
  .foot__cols2 li + li { margin-top: .6rem; }
  .foot__bot2 {
    display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between;
    margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.5rem;
    border-top: 1px solid rgba(244, 241, 234, .18);
  }
  @media (max-width: 760px) { .foot__top { grid-template-columns: 1fr; align-items: start; } }

  /* ---- about: credentials ---- */
  .cred { display: grid; gap: clamp(2rem, 4.5vw, 3.5rem); }
  .cred__b h3 { font-size: var(--t-label); letter-spacing: .18em; text-transform: uppercase;
    font-weight: 500; color: var(--mute); margin-bottom: 1.1rem; }
  .plate-dark .cred__b h3 { color: rgba(244, 241, 234, .55); }
  .cred__row { padding-block: .85rem; border-top: 1px solid var(--line); }
  .plate-dark .cred__row { border-top-color: rgba(244, 241, 234, .18); }
  .cred__row p + p { margin-top: .2rem; }
}


/* ===== one typographic rhythm, every browser and every width ==========
   Labels and captions were picking up slightly different sizes from their
   context, so the same row read differently on Chrome, on Brave and on a
   phone. These are the single source of truth. */
@layer components {
  .label, .idx__eye, .idx__go, .pan__sec, .pan__head, .idxfig__cap, .pan__cap, .fig__n {
    font-size: var(--t-label);
    letter-spacing: .18em;
    line-height: 1.45;
  }
  .caption, .idx__contrib { font-size: var(--t-caption); line-height: 1.5; }
  .idx__go { letter-spacing: .2em; }

  @media (max-width: 600px) {
    :root { --t-label: .68rem; }
    .idx__name { font-size: clamp(1.875rem, 9vw, 2.75rem); }
    .opener { font-size: clamp(2.25rem, 11vw, 3.25rem); }
    .cover--full .hb__stack { font-size: clamp(3.5rem, 22vw, 6rem); }
    .foot__word { font-size: clamp(2.75rem, 17vw, 4.5rem); }
  }
}


/* ===== hero: HAUS BELLE on one line, 360px to 1920px =================== */
@layer components {
  .hb__one {
    display: block;
    white-space: nowrap;
    text-transform: uppercase;
    font-style: normal;
    font-size: clamp(2rem, 10.4vw, 12.5rem);
    line-height: 1;
    letter-spacing: -.01em;
  }
}

/* ===== philosophy: two equal columns sharing one top line ============== */
@layer components {
  .philo__h { margin-top: clamp(2.5rem, 6vw, 4rem); }
  .philo__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5rem;
    align-items: start;          /* both paragraphs begin on the same line */
    margin-top: clamp(2rem, 4.5vw, 3rem);
  }
  .philo__cols > p { margin: 0; max-width: none; }
  @media (max-width: 768px) {
    .philo__cols { grid-template-columns: 1fr; gap: 1.75rem; }
  }
}


/* ======================================================================
   PHASE 1 | tokens, header, home, footer
   Two faces only: Noto Serif Display for display, Raleway for everything
   else. Colours are the four that already existed; nothing new.
   ================================================================== */
@layer tokens {
  :root {
    --fs-section:   clamp(2.75rem, 5.2vw, 4.5rem);
    --fs-project:   clamp(2.125rem, 3.6vw, 3.125rem);
    --fs-principle: clamp(1.5rem, 2vw, 1.625rem);
    --fs-wordmark:  clamp(3.75rem, 7vw, 6.25rem);
    --fs-body: 17px;
    --lh-body: 1.68;
    --container: 1240px;
    --pad-x: clamp(20px, 6vw, 92px);
    --pad-y: clamp(64px, 8vw, 112px);
    --hdr: 80px;
  }
  @media (max-width: 768px) { :root { --fs-body: 16px; --hdr: 64px; } }
  html { scroll-padding-top: var(--hdr); }
}

@layer components {
  /* the pre Phase 1 container, restored verbatim: min(1560px, 100% - 2 x margin),
     no inner padding. Phase 1 had squeezed every section into 1240px. */
  .p1 { width: min(var(--shell), 100% - var(--margin) * 2); margin-inline: auto; padding-inline: 0; }
  .p1-sec { padding-block: var(--pad-y); }
  .p1-rule { height: 1px; background: var(--line); border: 0; margin: 0; }
  .plate-dark .p1-rule { background: rgba(244, 241, 234, .25); }

  .p1-h { font-family: var(--f-display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
  .p1-h--section { font-size: var(--fs-section); }
  .p1-label {
    font-family: var(--f-text); font-weight: 500; font-size: 12px;
    text-transform: uppercase; letter-spacing: .2em; line-height: 1.4; margin: 0;
  }
  @media (max-width: 768px) { .p1-label { font-size: 11px; letter-spacing: .16em; } }
  .p1-body { font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; margin: 0; }
  .lining { font-variant-numeric: lining-nums tabular-nums; }

  /* ---------------- header ---------------- */
  .mh {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    height: var(--hdr); padding: 0 var(--margin); gap: 1.5rem;
    background: var(--stone);
    border-bottom: 1px solid var(--line);
    transition: none;
  }
  .mh::before { content: none; }
  .mh[data-hidden] { transform: none; }
  .mh__mark { display: flex; align-items: center; width: auto; transform: translateX(-24px); }
  .mh__mark img { height: 40px; width: auto; }
  @media (max-width: 768px) { .mh__mark { transform: none; } .mh__mark img { height: 32px; } }
  .mh__nav { display: flex; align-items: center; gap: 40px; justify-self: center; }
  .mh__item {
    position: relative; display: inline-block; padding: 0; background: none; border: 0;
    font-family: var(--f-text); font-weight: 500; font-size: 13px;
    text-transform: uppercase; letter-spacing: .14em; color: var(--ink);
  }
  .mh__item i, .mh__item svg { display: none; }
  .mh__item::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
    background: currentColor; opacity: 0; transition: opacity .2s ease;
  }
  .mh__item:hover::after, .mh__item[aria-current="page"]::after { opacity: 1; }
  .mh__item:focus-visible { outline: 1px solid var(--oak); outline-offset: 4px; }
  .mh__end { justify-self: end; display: flex; align-items: center; gap: 1rem; }
  .mh__right { color: var(--mute); display: block; }
  @media (max-width: 1024px) { .mh__right { display: none; } }
  @media (max-width: 768px) { .mh__nav { display: none; } }
  .burger { width: 44px; height: 44px; }
  .menu { z-index: 200; }

  /* ---------------- hero ---------------- */
  .p1-hero {
    box-sizing: border-box;
    min-height: 100svh;
    padding-top: var(--hdr);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
  }
  .p1-hero__t {
    font-family: var(--f-display); font-weight: 400; font-style: normal;
    text-transform: uppercase; color: var(--ink);
    letter-spacing: .06em; white-space: nowrap; line-height: 1;
    font-size: clamp(2rem, 9.2vw, 10rem); margin: 0;
  }
  .p1-hero__s { margin: 20px 0 0; font-family: var(--f-text); font-weight: 500;
    font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }

  /* ---------------- philosophy ---------------- */
  .p1-phil__h { margin-top: 64px; }
  .p1-phil__tag { margin-top: 14px; margin-bottom: 0; color: var(--mute); }
  .p1-phil p.p1-body { max-width: 820px; text-align: left; }
  .p1-phil__tag + .p1-body { margin-top: 36px; }
  .p1-phil .p1-body { margin-bottom: 0; }
  .p1-phil p.p1-body + p.p1-body { margin-top: 22px; }

  /* ---------------- contents ---------------- */
  .p1-con__grid {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2.5rem, 6vw, 7.5rem); align-items: stretch;
  }
  /* the aside is the full height track; the inner wrapper is what sticks.
     Sticky on the stretched grid item itself has nowhere to travel. */
  .p1-con__fig { align-self: stretch; height: 100%; }
  .p1-con__in { position: sticky; top: clamp(6rem, 13vh, 8.5rem); width: 100%; }
  .p1-con__frame { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper); }
  .p1-con__frame figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .4s ease; }
  .p1-con__frame figure[data-on="true"] { opacity: 1; }
  .p1-con__frame img { width: 100%; height: 100%; object-fit: cover; }
  .p1-con__count { display: block; text-align: right; margin-top: 12px; color: var(--mute); }
  /* vertical centring comes from justify-content in a column flex, so every
     child still starts on the column's left edge */
  .p1-proj {
    min-height: clamp(19rem, 52vh, 29rem);
    display: flex; flex-direction: column; justify-content: center; align-items: stretch;
    text-align: left;
  }
  .p1-proj > * { align-self: flex-start; text-align: left; }
  .p1-proj__t { font-size: var(--fs-project); margin-top: 18px; }
  .p1-proj__t br { display: inline; }
  .p1-proj__c { margin-top: 12px; font-family: var(--f-text); font-weight: 400; font-size: 15px; color: var(--mute); }
  .p1-proj__go {
    display: inline-flex; align-items: center; gap: .6rem; margin-top: 22px;
    border-bottom: 1px solid currentColor; padding-bottom: 2px; align-self: flex-start; color: var(--ink);
  }
  .p1-con__mobfig { display: none; }
  @media (max-width: 1024px) {
    .p1-con__grid { grid-template-columns: 1fr; }
    .p1-con__fig { display: none; }
    .p1-proj { min-height: 0; padding-block: 28px; }
    .p1-proj__t br { display: none; }
    .p1-con__mobfig { display: block; margin-top: 24px; }
    .p1-con__mobfig .p1-con__frame figure { position: relative; opacity: 1; }
  }

  /* ---------------- approach ---------------- */
  .p1-app { background: var(--ink); color: var(--ivory); }
  .p1-app .p1-h { color: var(--ivory); }
  .p1-app__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 60px; }
  .p1-app__n { color: rgba(244, 241, 234, .6); }
  .p1-app__rule { height: 1px; background: rgba(244, 241, 234, .25); border: 0; margin: 18px 0 22px; }
  .p1-app__h { font-family: var(--f-display); font-weight: 400; font-size: var(--fs-principle); line-height: 1.08; color: var(--ivory); margin: 0; }
  .p1-app__p { margin: 14px 0 0; font-family: var(--f-text); font-size: 16px; line-height: 1.6; color: rgba(244, 241, 234, .85); }
  @media (max-width: 1024px) { .p1-app__cols { grid-template-columns: 1fr; gap: 40px; } }

  /* ---------------- footer ---------------- */
  .p1-foot { background: var(--ink); color: var(--ivory); padding-top: var(--pad-y); padding-bottom: 32px; }
  .p1-foot__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
  .p1-foot__word { display: block; width: clamp(220px, 26vw, 400px); height: auto; }
  .p1-foot__sub { margin-top: 16px; color: rgba(244, 241, 234, .7); }
  .p1-foot__list { margin-top: 18px; display: grid; gap: 10px; }
  .p1-foot__list a { font-family: var(--f-text); font-size: 16px; color: var(--ivory); }
  .p1-foot__loc { margin-top: 24px; font-size: 13px; color: rgba(244, 241, 234, .7); }
  .p1-foot__div { height: 1px; background: rgba(244, 241, 234, .25); border: 0; margin-top: var(--pad-y); }
  .p1-foot__c { margin-top: 24px; font-size: 12px; color: rgba(244, 241, 234, .6); }
  @media (max-width: 768px) { .p1-foot__top { flex-direction: column; align-items: flex-start; } }
}


/* the enquiry fields are laid out on the 12 column grid, which drops to 6
   columns on small screens: a 12 span then spills past the viewport */
@media (max-width: 860px) {
  .grid > * { grid-column: 1 / -1 !important; }
}


/* Both navy blocks sit above the ambient wash so they read as one colour.
   The footer previously sat below it, which is what made the seam. */
@layer components {
  .p1-app, .p1-foot { position: relative; z-index: 1; background: var(--ink); }
}
