/* Erastata, erastata.lt
   Two surfaces from the two logos: stone + charcoal (day) and black to indigo (night).
   Motion language: lines are drawn first, then content settles onto them. */

@property --zoom { syntax: "<number>"; inherits: true; initial-value: 1.1; }

:root {
  /* day: logo 1 */
  --paper:   oklch(0.948 0.007 85);
  --paper-2: oklch(0.975 0.004 85);
  --stone:   oklch(0.842 0.013 85);
  --ink:     oklch(0.235 0.014 278);
  --ink-2:   oklch(0.40 0.014 278);
  --rule:    oklch(0.235 0.014 278 / 0.16);
  --rule-2:  oklch(0.235 0.014 278 / 0.45);

  /* night: logo 2 */
  --night-0: oklch(0.135 0.022 278);
  --night-1: oklch(0.205 0.075 277);
  --indigo:  oklch(0.44 0.205 275);
  --indigo-ink: oklch(0.40 0.19 275);
  --on-night:   oklch(0.915 0.013 85);
  --on-night-2: oklch(0.80 0.045 280);
  --rule-night: oklch(0.915 0.013 85 / 0.2);

  --error: oklch(0.50 0.17 27);

  --night-grad: linear-gradient(100deg in oklab, var(--night-0) 0%, var(--night-0) 18%, var(--night-1) 55%, var(--indigo) 100%);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");

  --hh: 72px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(88px, 11vw, 168px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);   /* quint */
  --quart: cubic-bezier(0.25, 1, 0.5, 1);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --flare: "FLAR" 0, "VOLM" 0;
  --flare-display: "FLAR" 55, "VOLM" 0;
  --focus: var(--indigo);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hh) + 16px);
  scrollbar-gutter: stable; /* no layout jump when the intro releases the scroll lock */
  color-scheme: light;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variation-settings: var(--flare);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--indigo); color: var(--paper-2); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
[data-surface="night"] { --focus: var(--on-night); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--paper-2); color: var(--ink); padding: 12px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

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

.h2 {
  font-size: clamp(2.1rem, 1.25rem + 3vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-weight: 560;
  font-variation-settings: var(--flare-display);
  text-wrap: balance;
}

/* film grain on the night surfaces: keeps the big gradient from looking flat or banded */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain);
  opacity: 0.07; mix-blend-mode: overlay;
}

/* ---------- Buttons & links ---------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 2px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: color .35s var(--quart), border-color .35s var(--quart), transform .15s var(--quart);
}
/* fill sweeps in from the left, leaves to the right */
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--fill, var(--indigo));
  transform: scaleX(0); transform-origin: right center;
  transition: transform .45s var(--quart);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn svg, .link-arrow svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.btn:hover svg { animation: arrow-pass .55s var(--quart); }
@keyframes arrow-pass {
  0% { transform: none; opacity: 1; }
  45% { transform: translateX(12px); opacity: 0; }
  46% { transform: translateX(-12px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.btn--light { background: var(--on-night); color: var(--ink); --fill: var(--indigo); }
.btn--light:hover { color: var(--paper-2); border-color: var(--indigo); }
.btn--ghost { border-color: var(--rule-night); color: var(--on-night); --fill: var(--on-night); }
.btn--ghost:hover { border-color: var(--on-night); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper-2); --fill: var(--indigo); }
.btn { transform: translate(var(--mx, 0px), var(--my, 0px)); }
.btn.is-magnet { transition: color .35s var(--quart), border-color .35s var(--quart), transform .18s var(--quart); }
.btn:not(.is-magnet) { transition: color .35s var(--quart), border-color .35s var(--quart), transform .7s var(--expo); }
.btn:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.98); }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn[aria-busy] svg { animation: arrow-pass .9s var(--quart) infinite; }

.link-arrow {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--indigo-ink); font-weight: 600; text-decoration: none;
  padding-bottom: 4px;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; right: 28px; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0.25); transform-origin: left;
  transition: transform .45s var(--quart);
}
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow svg { transition: transform .35s var(--quart); }
.link-arrow:hover svg { transform: translateX(4px); }

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

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--hh);
  color: var(--on-night);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .45s var(--quart);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled[data-surface="night"] { background: var(--night-0); box-shadow: 0 1px 0 var(--rule-night); }
.site-header[data-surface="paper"],
.site-header[data-surface="stone"] {
  --focus: var(--indigo);
  background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--rule);
}
.site-header__in {
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}
/* reading progress, drawn like one more line of the logo;
   it hangs just below the header, so it stays on screen when the header hides */
.site-header__progress {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: currentColor; opacity: .9;
  transform: scaleX(0); transform-origin: left;
  pointer-events: none;
}
.site-header[data-surface="paper"] .site-header__progress,
.site-header[data-surface="stone"] .site-header__progress { background: var(--indigo); }

.lockup {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; margin-right: auto;
}
.lockup__mark { height: 40px; width: auto; stroke-width: 6.5; }
.lockup__word {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-weight: 330;
  font-size: 1.0625rem;
  font-variation-settings: "FLAR" 100, "VOLM" 0;
  margin-right: -0.26em;
}

.nav ul { display: flex; gap: 32px; }
.nav a {
  position: relative;
  font-size: 0.975rem; font-weight: 500; text-decoration: none;
  padding-block: 8px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--quart);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.header-call {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid currentColor; border-radius: 2px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color .35s var(--quart);
}
.header-call::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: currentColor;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .4s var(--quart);
}
.header-call:hover::before { transform: scaleY(1); }
.site-header[data-surface="night"] .header-call:hover { color: var(--ink); }
.site-header[data-surface="night"] .header-call::before { background: var(--on-night); }
.site-header[data-surface="paper"] .header-call::before,
.site-header[data-surface="stone"] .header-call::before { background: var(--ink); }
.site-header[data-surface="paper"] .header-call:hover,
.site-header[data-surface="stone"] .header-call:hover { color: var(--paper-2); border-color: var(--ink); }
.header-call svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.header-call:hover svg { animation: ring .6s var(--quart); }
@keyframes ring {
  0%, 100% { transform: none; }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
}

.menu-btn {
  display: none;
  align-items: center; gap: 10px;
  min-height: 44px; padding: 0 4px 0 8px;
  background: none; border: 0; cursor: pointer;
  font-weight: 600; font-size: 0.95rem;
}
.menu-btn__bars, .menu-btn__bars::before {
  display: block; width: 20px; height: 1.5px; background: currentColor;
  transition: transform .3s var(--quart);
}
.menu-btn__bars { position: relative; transform: translateY(-3px); }
.menu-btn__bars::before { content: ""; position: absolute; top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { transform: translateY(0) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 899px) {
  :root { --hh: 64px; }
  .site-header__in { gap: 12px; }
  .lockup__mark { height: 34px; }
  .lockup__word { font-size: 1rem; }
  .menu-btn { display: inline-flex; }
  .header-call { padding: 0 12px; }
  .header-call span { display: none; }
  .nav {
    position: absolute; inset: var(--hh) 0 auto;
    background: var(--night-0); color: var(--on-night);
    box-shadow: 0 1px 0 var(--rule-night);
    padding: 8px var(--gutter) 24px;
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .4s var(--quart), visibility 0s .4s;
  }
  .site-header[data-surface="paper"] .nav,
  .site-header[data-surface="stone"] .nav { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
  .nav.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .5s var(--expo), visibility 0s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { opacity: 0; transform: translateY(-8px); transition: opacity .3s var(--quart), transform .3s var(--quart); }
  .nav.is-open li { opacity: 1; transform: none; transition-duration: .5s; }
  .nav.is-open li:nth-child(2) { transition-delay: .05s; }
  .nav.is-open li:nth-child(3) { transition-delay: .1s; }
  .nav.is-open li:nth-child(4) { transition-delay: .15s; }
  .nav a { display: block; padding: 14px 0; font-size: 1.25rem; border-bottom: 1px solid var(--rule-night); }
  .site-header[data-surface="paper"] .nav a,
  .site-header[data-surface="stone"] .nav a { border-bottom-color: var(--rule); }
  .nav a::after { display: none; }
  .site-header.menu-open { background: var(--night-0); }
  .site-header.menu-open[data-surface="paper"],
  .site-header.menu-open[data-surface="stone"] { background: var(--paper); }
}

/* ---------- Split headings: words rise out of their own line box ---------- */

[data-split] .w {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  /* room for Lithuanian ogoneks below and carons above */
  padding: 0.1em 0.03em 0.2em;
  margin: -0.1em -0.03em -0.2em;
}
[data-split] .w > span { display: inline-block; }
.js [data-split] .w > span {
  transform: translateY(115%);
  transition: transform 1.1s var(--expo);
  transition-delay: calc(var(--wi, 0) * 45ms);
}
.js [data-split].is-in .w > span { transform: none; }

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

.hero {
  position: relative;
  background: var(--night-grad);
  color: var(--on-night);
  padding-top: calc(var(--hh) + clamp(40px, 7vh, 88px));
  /* stop just short of the fold so the horizon line and the paper below show */
  min-height: max(640px, min(calc(100svh - 36px), 940px));
  display: flex;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto;
  column-gap: 24px;
}
.hero__copy {
  grid-column: 1 / span 7;
  align-self: center;
  padding-bottom: clamp(40px, 6vh, 72px);
  will-change: transform;
}
.hero__kicker {
  display: flex; align-items: center; gap: 14px;
  color: var(--on-night-2);
  font-size: 1rem;
  margin-bottom: clamp(20px, 3vh, 32px);
}
.hero__kicker::before { content: ""; width: 32px; height: 1.5px; background: currentColor; flex: none; }
.hero__title {
  font-size: clamp(2.9rem, 1.1rem + 5.6vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 560;
  font-variation-settings: "FLAR" 60, "VOLM" 0;
  text-wrap: balance;
}
.hero__lead {
  margin-top: clamp(20px, 3vh, 32px);
  max-width: 36ch;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.35rem);
  line-height: 1.55;
  color: var(--on-night-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4.5vh, 48px); }

.hero__tower {
  grid-column: 8 / -1;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: end;
  margin-right: clamp(0px, 4vw, 72px);
  height: clamp(380px, 74svh, 740px);
  aspect-ratio: 124 / 194;
  color: var(--on-night);
}
.hero__tower svg { width: 100%; height: 100%; overflow: visible; }
.hero__lines path { stroke-width: 0.95; }

.hero__ground {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--on-night);
  transform-origin: left;
}

@media (max-width: 899px) {
  .hero { min-height: 0; padding-top: calc(var(--hh) + 40px); }
  .hero__grid { grid-template-rows: auto auto; }
  .hero__copy { grid-column: 1 / -1; padding-bottom: 0; }
  .hero__tower {
    grid-column: 1 / -1; grid-row: 2;
    justify-self: end;
    height: clamp(200px, 30svh, 320px);
    margin-top: 28px;
    margin-right: 4%;
  }
  .hero__lines path { stroke-width: 1.2; }
  .hero__actions .btn { padding: 0 20px; }
  .btn__more { display: none; }
}

/* intro: the horizon is drawn, the building rises from it, then the words */
.js .site-header__in { opacity: 0; }
.js.is-loaded .site-header__in { animation: fade .9s var(--ease) .15s forwards; }
.js .hero__ground { transform: scaleX(0); }
.js.is-loaded .hero__ground { animation: grow 1.6s var(--expo) forwards; }
.js .hero__lines path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js.is-loaded .hero__lines path { animation: draw 1.5s var(--expo) forwards; animation-delay: calc(var(--i, 0) * 55ms + 300ms); }
.js.is-loaded .hero__title .w > span { transform: none; transition-delay: calc(var(--wi, 0) * 85ms + 250ms); transition-duration: 1.3s; }
.js .hero__copy > :not(.hero__title) { opacity: 0; transform: translateY(14px); }
.js.is-loaded .hero__kicker { animation: rise 1s var(--expo) .15s forwards; }
.js.is-loaded .hero__lead { animation: rise 1.1s var(--expo) .7s forwards; }
.js.is-loaded .hero__actions { animation: rise 1.1s var(--expo) .85s forwards; }
.js .hero__kicker::before { transform: scaleX(0); transform-origin: left; }
.js.is-loaded .hero__kicker::before { animation: grow 1.1s var(--expo) .35s forwards; }
/* the floating group of the logo keeps floating, very slowly */
.js.is-loaded .ln-float { animation: float 7s ease-in-out 3.2s infinite alternate; }
@keyframes float { to { transform: translateY(-2.4px); } }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Drawn rules: every divider is drawn left to right as it enters ---------- */

.rule-t, .rule-b { position: relative; }
.rule-t::before, .rule-b::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--rw, 1px);
  background: var(--rc, var(--rule));
  transform-origin: left;
}
.rule-t::before { top: 0; }
.rule-b::after { bottom: 0; }
.js .reveal.rule-t::before, .js .reveal.rule-b::after {
  transform: scaleX(0);
  transition: transform 1.2s var(--expo);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-in.rule-t::before, .js .reveal.is-in.rule-b::after { transform: none; }

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

.services { background: var(--paper); padding-block: var(--section); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 56px;
}
.services__intro { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--hh) + 48px); }
.services__intro p { margin-top: 24px; color: var(--ink-2); font-size: 1.125rem; max-width: 36ch; }
.services__intro .link-arrow { margin-top: 32px; }
.services__lists { grid-column: 6 / -1; }

.svc-group + .svc-group { margin-top: clamp(56px, 7vw, 96px); }
.svc-group__title {
  --rw: 2px; --rc: var(--ink);
  font-size: 1rem; font-weight: 600; color: var(--ink-2);
  padding-bottom: 14px;
}
.svc {
  --rc: var(--rule);
  isolation: isolate;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding-block: 30px;
}
/* hover: a paper wash sweeps under the row, the title steps forward */
.svc::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); z-index: -1;
  background: var(--paper-2);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--quart);
}
.svc:hover::before { transform: scaleX(1); transform-origin: left; }
.svc__n {
  font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--ink-2);
  padding-top: 0.5em;
  transition: color .3s var(--quart);
}
.svc:hover .svc__n, .svc:target .svc__n { color: var(--indigo-ink); }
.svc__title {
  font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.85rem);
  line-height: 1.2;
  font-weight: 560;
  letter-spacing: -0.012em;
  font-variation-settings: var(--flare-display);
  transition: transform .45s var(--quart);
}
.svc:hover .svc__title { transform: translateX(6px); }
.svc__body p { margin-top: 10px; color: var(--ink-2); max-width: 58ch; }
.svc__body .svc__scope { margin-top: 14px; font-size: 0.95rem; color: var(--ink); }
.svc__scope::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 18px; height: 1.5px; margin-right: 10px; background: var(--indigo);
  transition: width .45s var(--quart);
}
.svc:hover .svc__scope::before { width: 30px; }

@media (max-width: 899px) {
  .services__intro { grid-column: 1 / -1; position: static; }
  .services__lists { grid-column: 1 / -1; }
  .svc { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding-block: 24px; }
  .svc::before { display: none; }
}

/* ---------- Works ---------- */

.works { background: var(--stone); padding-block: var(--section); }
.works__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.works__kicker {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  font-weight: 600; font-size: 1rem; color: var(--ink-2);
  margin-bottom: clamp(20px, 2.5vw, 32px);
}
.works__kicker::before { content: ""; width: 32px; height: 1.5px; background: var(--indigo); }
.statement {
  grid-column: 1 / span 11;
  font-size: clamp(2rem, 1.1rem + 3.5vw, 4.5rem);
  line-height: 1.07;
  letter-spacing: -0.026em;
  font-weight: 540;
  font-variation-settings: var(--flare-display);
  max-width: 22ch;
  text-wrap: balance;
}
/* each word's ink rises from 15% to 100% as the sentence scrolls past; --p is set by site.js */
.js .statement .sw {
  opacity: calc(0.15 + 0.85 * clamp(0, calc((var(--p, 0) * (var(--n, 1) + 6) - var(--i, 0)) / 6), 1));
}
.works__head .h2 { grid-column: 1 / span 7; }
.works__note {
  grid-column: 8 / -1; align-self: end;
  color: var(--ink-2); max-width: 44ch;
}


/* ---------- Projects ---------- */

.projects { margin-top: 0; }
.project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding-block: clamp(48px, 6vw, 96px);
  border-top: 1px solid var(--rule-2);
  scroll-margin-top: calc(var(--hh) + 8px);
}
.project:last-child { padding-bottom: 0; }

.project__text { grid-column: 9 / -1; grid-row: 1; align-self: start; display: grid; gap: 16px; }
.project__media { grid-column: 1 / span 8; grid-row: 1; min-width: 0; }
.project__foot { grid-column: 9 / -1; grid-row: 1; align-self: end; display: flex; }
.project--flip .project__media { grid-column: 5 / -1; }
.project--flip .project__text, .project--flip .project__foot { grid-column: 1 / span 4; }
.project__title {
  font-size: clamp(1.75rem, 1.05rem + 2.2vw, 2.75rem);
  line-height: 1.06; letter-spacing: -0.022em;
  font-weight: 560; font-variation-settings: var(--flare-display);
  text-wrap: balance;
}
.project__lead { color: var(--ink-2); max-width: 40ch; }

.project__strip {
  grid-column: 1 / -1; grid-row: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-top: 12px;
}
.strip__item { --zoom: 1.06; position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 2px; background: oklch(0.78 0.012 85); }
.strip__item a { display: block; height: 100%; }
.strip__item img {
  width: 100%; height: 100%; object-fit: cover;
  transform: translate3d(0, var(--py, 0%), 0) scale(var(--zoom));
  transition: transform 1.2s var(--expo);
}
.strip__item:hover { --zoom: 1.12; }

.btn--line { border-color: var(--rule-2); color: var(--ink); --fill: var(--ink); }
.btn--line:hover { color: var(--paper-2); border-color: var(--ink); }
.project__more svg { transition: transform .5s var(--expo); }
.project__more:hover svg { animation: none; }
.project__more[aria-expanded="true"] svg { transform: rotate(45deg); }

/* ---------- Projects: albums ---------- */

.album { grid-column: 1 / -1; grid-row: 3; display: grid; }
.album__in { min-height: 0; overflow: hidden; }
.js .album { grid-template-rows: 0fr; transition: grid-template-rows .8s var(--expo); }
.js .album.is-open { grid-template-rows: 1fr; }
.js .album:not(.is-open) .album__in { visibility: hidden; transition: visibility 0s .8s; }

.album__stage { padding-top: clamp(28px, 3.5vw, 48px); scroll-margin-top: calc(var(--hh) + 16px); }
.album__title {
  padding-top: 12px; margin-bottom: 14px;
  border-top: 2px solid var(--ink);
  font-size: 1.125rem; font-weight: 600;
}
.album__n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 450; font-size: 0.95rem; }
.album__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.album__grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; background: oklch(0.78 0.012 85); }
.album__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--expo), opacity .3s var(--quart); }
.album__grid a:hover img { transform: scale(1.06); }
.album__grid a:focus-visible, .strip__item a:focus-visible { outline-offset: 2px; }

/* ---------- Projects: before and after ---------- */

.compare-tabs { display: inline-flex; margin-bottom: 12px; border: 1px solid var(--rule-2); border-radius: 2px; }
.compare-tabs__btn {
  min-height: 44px; padding: 0 18px;
  background: none; border: 0; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; color: var(--ink-2);
  transition: background-color .3s var(--quart), color .3s var(--quart);
}
.compare-tabs__btn + .compare-tabs__btn { border-left: 1px solid var(--rule-2); }
.compare-tabs__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper-2); }
.compare-tabs__btn:not([aria-pressed="true"]):hover { color: var(--ink); background: oklch(0.235 0.014 278 / 0.06); }

.compare[hidden] { display: none; }
.compare__frame {
  --x: 50%; --xv: 50;
  position: relative; overflow: hidden;
  aspect-ratio: var(--ar);
  border-radius: 2px;
  background: oklch(0.78 0.012 85);
  cursor: ew-resize; touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.compare__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; -webkit-user-drag: none;
}
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare__seam {
  position: absolute; top: 0; bottom: 0; left: var(--x);
  width: 2px; margin-left: -1px;
  background: var(--paper-2);
  box-shadow: 0 0 0 0.5px oklch(0.235 0.014 278 / 0.25);
  pointer-events: none;
}
.compare__knob {
  position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; translate: -50% -50%;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink);
  border-radius: 2px;
  box-shadow: 0 8px 24px oklch(0.18 0.02 278 / 0.28);
  transition: scale .35s var(--expo), background-color .3s var(--quart), color .3s var(--quart);
}
.compare__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compare__frame:hover .compare__knob, .compare__frame.is-dragging .compare__knob { background: var(--indigo); color: var(--paper-2); }
.compare__frame.is-dragging .compare__knob { scale: 0.92; }
.compare__frame:has(.compare__range:focus-visible) .compare__knob { outline: 2px solid var(--indigo); outline-offset: 3px; }
.compare__tag {
  position: absolute; top: 14px;
  padding: 6px 11px; border-radius: 2px;
  font-size: 0.875rem; font-weight: 600; line-height: 1.2;
  pointer-events: none;
  transition: opacity .25s var(--quart);
}
.compare__tag--before { left: 14px; background: var(--ink); color: var(--paper-2); opacity: clamp(0, calc((var(--xv) - 14) / 10), 1); }
.compare__tag--after { right: 14px; background: var(--paper-2); color: var(--ink); opacity: clamp(0, calc((86 - var(--xv)) / 10), 1); }
.compare__range {
  position: absolute; inset: auto 0 0 0; width: 100%; height: 1px;
  margin: 0; opacity: 0; pointer-events: none;
}

/* the frame is uncovered from the ground up, like the logo's lines rising */
.js .compare__frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--expo); }
.js .compare.is-in .compare__frame { clip-path: inset(0 0 0 0); }
.js .compare__seam { opacity: 0; transition: opacity .5s var(--quart) .5s; }
.js .compare.is-in .compare__seam { opacity: 1; }

/* strip photos rise the same way */
.js .strip__item { --zoom: 1.25; background: transparent; transition: --zoom 1.8s var(--expo); transition-delay: calc(var(--d, 0) * 110ms); }
.js .strip__item img { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--expo), transform 1.2s var(--expo); transition-delay: calc(var(--d, 0) * 110ms); }
.js .strip__item.is-in { --zoom: 1.06; }
.js .strip__item.is-in img { clip-path: inset(0 0 0 0); }
.js .strip__item.is-in:hover { --zoom: 1.12; transition-delay: 0s; }
.js .strip__item.is-in:hover img { transition-delay: 0s; }

/* ---------- Viewer ---------- */

html.viewer-open { overflow: hidden; }
.viewer {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--night-0); color: var(--on-night);
  overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: oklch(0.135 0.022 278 / 0.94); }
.viewer[open] { animation: viewer-in .45s var(--expo); }
@keyframes viewer-in { from { opacity: 0; } }

.viewer__bar { display: flex; align-items: center; gap: 20px; padding: 8px 8px 8px var(--gutter); }
.viewer__title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__count { font-variant-numeric: tabular-nums; color: var(--on-night-2); }
.viewer__close, .viewer__nav {
  display: grid; place-items: center;
  width: 52px; height: 52px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: 2px;
  color: var(--on-night); cursor: pointer;
  transition: background-color .3s var(--quart), border-color .3s var(--quart);
}
.viewer__close:hover, .viewer__nav:hover { border-color: var(--rule-night); background: oklch(0.915 0.013 85 / 0.06); }
.viewer__close svg, .viewer__nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.viewer__stage {
  position: relative; min-height: 0;
  display: grid; place-items: center;
  padding: 0 clamp(8px, 6vw, 96px);
  touch-action: pan-y pinch-zoom;
}
.viewer__img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  border-radius: 2px;
  transition: opacity .24s var(--quart), translate .5s var(--expo);
}
.viewer__img.is-leaving { opacity: 0; translate: calc(var(--dir, 1) * -24px) 0; transition-duration: .14s, .14s; }
.viewer__img.is-entering { opacity: 0; translate: calc(var(--dir, 1) * 24px) 0; transition: none; }
.viewer__nav { position: absolute; top: 50%; translate: 0 -50%; }
.viewer__nav--prev { left: 8px; }
.viewer__nav--next { right: 8px; }

.viewer__foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
  padding: 14px var(--gutter) max(18px, env(safe-area-inset-bottom));
  max-width: 1360px; width: 100%; margin-inline: auto;
}
.viewer__stage-name { font-weight: 600; }
.viewer__stage-name:empty { display: none; }
.viewer__cap { color: var(--on-night-2); }

@media (max-width: 899px) {
  .statement { grid-column: 1 / -1; }
  .works__head .h2 { grid-column: 1 / -1; }
  .works__note { grid-column: 1 / -1; margin-top: 12px; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project__text, .project--flip .project__text { grid-column: 1; grid-row: 1; margin-bottom: 24px; }
  .project__media, .project--flip .project__media { grid-column: 1; grid-row: 2; }
  .project__strip { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
  .project__foot, .project--flip .project__foot { grid-column: 1; grid-row: 4; margin-top: 24px; }
  .project__foot .btn { width: 100%; }
  .album { grid-row: 5; }
  .album__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
  .compare__knob { width: 42px; height: 42px; }
  .compare__tag { top: 10px; font-size: 0.8125rem; padding: 5px 9px; }
  .compare__tag--before { left: 10px; }
  .compare__tag--after { right: 10px; }
}
@media (max-width: 899px) and (hover: none) {
  .viewer__nav { display: none; }
}

/* ---------- About ---------- */

.about { background: var(--paper); padding-block: var(--section); }
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 56px;
  align-items: end;
}
.about__text { grid-column: 1 / span 8; }
.about__lead {
  margin-top: 28px;
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem);
  line-height: 1.42;
  letter-spacing: -0.006em;
  max-width: 34ch;
}
.about__text p + p { margin-top: 20px; color: var(--ink-2); max-width: 56ch; }

.years {
  grid-column: 8 / -1;
  --lw: 3px;
  --gap: clamp(12px, 1.6vw, 20px);
  --w: calc(var(--n) * var(--lw) + (var(--n) - 1) * var(--gap));
}
.years__plot { position: relative; }
.years__plot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ink); transform-origin: left;
}
.years__lines {
  width: var(--w); margin-inline: auto;
  height: clamp(220px, 26vw, 340px);
  display: flex; align-items: flex-end; gap: var(--gap);
}
.years__lines span {
  flex: none; width: var(--lw);
  height: calc(var(--h) * 100%);
  background: linear-gradient(to top, var(--ink) 55%, oklch(0.235 0.014 278 / 0.18));
  transform-origin: bottom;
}
.years__lines .is-now { background: linear-gradient(to top, var(--indigo) 55%, oklch(0.44 0.205 275 / 0.2)); }
.years__axis {
  width: var(--w); margin-inline: auto;
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.years__now { color: var(--indigo-ink); font-weight: 600; }
.years figcaption { margin-top: 18px; text-align: center; font-size: 0.925rem; color: var(--ink-2); }
.js .years .years__plot::after { transform: scaleX(0); transition: transform 1.3s var(--expo) .1s; }
.js .years.is-in .years__plot::after { transform: none; }
.js .years .years__lines span { transform: scaleY(0); transition: transform 1.2s var(--expo); transition-delay: calc(var(--i, 0) * 70ms + 400ms); }
.js .years.is-in .years__lines span { transform: none; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(72px, 9vw, 128px);
}
.principles li { --rw: 2px; --rc: var(--ink); padding-top: 20px; }
.principles h3 { font-size: 1.25rem; font-weight: 600; font-variation-settings: var(--flare-display); }
.principles p { margin-top: 10px; color: var(--ink-2); max-width: 36ch; }

.quotes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 48px;
  margin-top: clamp(96px, 12vw, 176px);
}
.quotes__title {
  grid-column: 1 / span 3;
  font-size: 1rem; font-weight: 600; color: var(--ink-2);
  padding-top: 0.6em;
}
.quote figcaption {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px; font-size: 0.95rem; color: var(--ink-2);
}
.quote figcaption::before { content: ""; width: 24px; height: 1.5px; background: var(--indigo); }
.quote--lead { grid-column: 4 / -1; }
.quote--lead blockquote p {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 480;
  font-variation-settings: var(--flare-display);
  text-wrap: balance;
  max-width: 24ch;
}
.js .quote--lead blockquote p .w > span { transition-delay: calc(var(--wi, 0) * 30ms); }
.quote:not(.quote--lead) { grid-column: span 4; }
.quote:not(.quote--lead) blockquote p { font-size: 1.2rem; line-height: 1.45; }
.quote--lead + .quote { grid-column: 4 / span 4; }

@media (max-width: 899px) {
  .about__text, .years { grid-column: 1 / -1; }
  .principles { grid-template-columns: 1fr; gap: 28px; }
  .quotes__title, .quote--lead, .quote--lead + .quote, .quote:not(.quote--lead) { grid-column: 1 / -1; }
  .quotes { row-gap: 36px; }
}

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

.contact {
  background: var(--night-grad);
  color: var(--on-night);
  padding-block: var(--section);
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 56px;
  align-items: start;
}
.contact__info { grid-column: 1 / span 5; }
.contact__lead { margin-top: 24px; color: var(--on-night-2); font-size: 1.125rem; max-width: 40ch; }

.steps { margin-top: 40px; }
.steps li {
  --rc: var(--rule-night);
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px;
  padding-block: 16px;
}
.steps li:last-child { border-bottom: 1px solid var(--rule-night); }
.steps__n { font-variant-numeric: tabular-nums; color: var(--on-night-2); }
.steps h3 { font-size: 1.0625rem; font-weight: 600; }
.steps p { color: var(--on-night-2); font-size: 0.975rem; margin-top: 2px; }

.direct { margin-top: 40px; }
.direct__who { color: var(--on-night-2); font-size: 0.95rem; margin-bottom: 8px; }
.direct__line {
  position: relative;
  display: block; width: fit-content;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 500; letter-spacing: -0.01em; line-height: 1.35;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.direct__line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--quart);
}
.direct__line:hover::after { transform: scaleX(1); transform-origin: left; }

.brief {
  grid-column: 7 / -1;
  --focus: var(--indigo);
  background: var(--paper);
  color: var(--ink);
  padding: clamp(24px, 3.6vw, 52px);
  border-radius: 2px;
}
.js .brief.reveal { transform: translateY(40px); transition-duration: 1.2s; transition-timing-function: var(--expo); }
.brief__title { font-size: 1.5rem; font-weight: 600; font-variation-settings: var(--flare-display); }
.brief__set { border: 0; margin-top: 28px; min-width: 0; }
.brief__set legend { font-weight: 600; font-size: 0.975rem; margin-bottom: 12px; padding: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--rule-2); border-radius: 2px;
  font-size: 0.95rem; line-height: 1.25;
  background: var(--paper-2);
  transition: background-color .2s var(--quart), color .2s var(--quart), border-color .2s var(--quart), transform .15s var(--quart);
  pointer-events: none;
}
.chip:hover span { border-color: var(--ink); }
.chip:active span { transform: scale(0.97); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.chip input[type="checkbox"] + span::before {
  content: ""; width: 0; height: 6px; margin-top: -3px; margin-right: -8px;
  border-left: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
  transform: rotate(-45deg) scale(0);
  opacity: 0;
  transition: transform .3s var(--expo), opacity .2s var(--quart), width .3s var(--expo), margin-right .3s var(--expo);
}
.chip input[type="checkbox"]:checked + span::before { width: 10px; margin-right: 0; transform: rotate(-45deg) scale(1); opacity: 1; }
.chip input:focus-visible + span { outline: 2px solid var(--indigo); outline-offset: 2px; }

.brief__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-top: 24px; min-width: 0; }
.field label { display: block; font-weight: 600; font-size: 0.975rem; margin-bottom: 8px; }
.req { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 1rem; line-height: 1.4;
  background: var(--paper-2);
  border: 1px solid var(--rule-2); border-radius: 2px;
  transition: border-color .2s var(--quart), box-shadow .2s var(--quart);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
.field ::placeholder { color: oklch(0.50 0.012 278); opacity: 1; }
.field.is-invalid input { border-color: var(--error); animation: nudge .4s var(--quart); }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(3px); } }
.field__err { margin-top: 8px; color: var(--error); font-size: 0.925rem; font-weight: 500; }
.field__err:not([hidden]) { animation: rise .35s var(--quart) both; transform: translateY(-4px); opacity: 0; }

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

.brief__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  margin-top: 32px;
}
.brief__note { flex: 1 1 240px; font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }

.brief__status {
  margin-top: 24px; padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--rule-2); border-radius: 2px;
  font-size: 0.975rem;
}
.brief__status:not([hidden]) { animation: rise .5s var(--expo) both; opacity: 0; transform: translateY(8px); }
.brief__status strong { display: block; font-weight: 600; margin-bottom: 4px; }
.brief__status.is-error { border-color: var(--error); }
.brief__status a { color: var(--indigo-ink); font-weight: 600; }
.brief__status button {
  margin-top: 12px; min-height: 44px; padding: 0 16px;
  background: none; border: 1px solid var(--ink); border-radius: 2px;
  font-weight: 600; cursor: pointer;
  transition: background-color .2s var(--quart), color .2s var(--quart);
}
.brief__status button:hover { background: var(--ink); color: var(--paper-2); }

@media (max-width: 1099px) {
  .contact__info { grid-column: 1 / span 6; }
  .brief { grid-column: 7 / -1; }
}
@media (max-width: 899px) {
  .contact__info, .brief { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .brief__row { grid-template-columns: 1fr; gap: 0; }
  .brief { margin-inline: calc(var(--gutter) * -0.5); }
}

/* ---------- Footer: a drawing title block ---------- */

.footer {
  background: var(--night-0);
  color: var(--on-night);
  padding-block: clamp(48px, 6vw, 80px) 32px;
}
.titleblock {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule-night);
  border: 1px solid var(--rule-night);
}
.tb { background: var(--night-0); padding: 20px 22px; margin: 0; min-width: 0; }
.tb--brand {
  grid-row: span 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-block: 36px;
  text-align: center;
}
.tb__mark { width: min(240px, 80%); height: auto; }
.tb__mark path { stroke-width: 2.4; }
.tb__word {
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: 0.24em; margin-right: -0.24em;
  font-weight: 320;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
  font-variation-settings: "FLAR" 100, "VOLM" 0;
  line-height: 1;
}
.tb__slogan {
  margin-top: 12px;
  font-size: 0.75rem; letter-spacing: 0.2em; margin-right: -0.2em;
  text-transform: uppercase; color: var(--on-night-2);
}
/* the page ends the way it began: the logo is built once more */
.js .tb__mark path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--expo); transition-delay: calc(var(--i, 0) * 45ms); }
.js .tb--brand.is-in .tb__mark path { stroke-dashoffset: 0; }
.js .tb__word, .js .tb__slogan { opacity: 0; transform: translateY(10px); transition: opacity 1s var(--expo), transform 1s var(--expo); }
.js .tb--brand.is-in .tb__word { opacity: 1; transform: none; transition-delay: .7s; }
.js .tb--brand.is-in .tb__slogan { opacity: 1; transform: none; transition-delay: .85s; }

.tb dt { font-size: 0.8125rem; color: var(--on-night-2); margin-bottom: 6px; }
.tb dd { font-size: 0.975rem; line-height: 1.5; overflow-wrap: anywhere; }
.tb dd a { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .4s var(--quart); }
.tb dd a:hover { background-size: 100% 1px; }
.tb--foot {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 0.875rem; color: var(--on-night-2);
}
.tb__top {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; text-decoration: none; color: var(--on-night);
}
.tb__top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--quart); }
.tb__top:hover svg { transform: translateY(-3px); }

@media (max-width: 1099px) {
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb--brand { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 540px) {
  .titleblock { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 1s var(--expo), transform 1s var(--expo);
  transition-delay: calc(var(--d, 0) * 90ms + 120ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion: everything in its final place, no movement ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero__copy > *, .js .site-header__in, .js .intro__word span, .js .intro__sl,
  .js .tb__word, .js .tb__slogan { opacity: 1; transform: none; }
  .js [data-split] .w > span { transform: none; }
  .js .hero__lines path, .js .tb__mark path { stroke-dashoffset: 0; }
  .js .hero__ground, .js .years .years__lines span, .js .years .years__plot::after,
  .js .reveal.rule-t::before, .js .reveal.rule-b::after { transform: none; }
  .js .strip__item { --zoom: 1.06; }
  .js .strip__item img, .js .compare__frame { clip-path: none; }
  .js .compare__seam { opacity: 1; }
  .js .statement .sw { opacity: 1; }
  .site-header.is-hidden { transform: none; }
  html.js .intro { display: none; }
  .js.is-loaded .ln-float { animation: none; }
  .js .hero__kicker::before, .js .intro__rule, .js .intro__dash { transform: none; }
}

/* ---------- Intro: the logo builds itself, then the curtain lifts ---------- */

.intro { display: none; }
.js .intro {
  --t: 1;
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--night-grad);
  color: var(--on-night);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1);
  cursor: pointer;
}
.js.intro-quick .intro { --t: 0.55; }
.js.intro-on { overflow: hidden; }
.js.intro-out .intro { clip-path: inset(0 0 100% 0); pointer-events: none; }
.js.intro-done .intro { display: none; }

.intro__logo {
  display: flex; flex-direction: column; align-items: center;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1), opacity .5s ease-in;
}
.js.intro-out .intro__logo { transform: translateY(-8vh); opacity: 0; }

.intro__mark { width: min(360px, 68vw); height: auto; overflow: visible; }
.intro__mark path { stroke-width: 2.3; }
.js .intro__mark path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw calc(1.15s * var(--t)) var(--expo) forwards;
  animation-delay: calc((var(--i, 0) * 45ms + 120ms) * var(--t));
}
.js .intro__mark .intro__wing { animation-duration: calc(1.4s * var(--t)); }

.intro__word {
  display: flex;
  margin-top: clamp(18px, 3vh, 30px);
  padding: 0.12em 0 0.06em;
  overflow: hidden;
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.9rem);
  font-weight: 300;
  font-variation-settings: "FLAR" 100, "VOLM" 0;
  letter-spacing: 0.24em; margin-right: -0.24em;
  line-height: 1;
}
.intro__word span { display: inline-block; }
.js .intro__word span {
  transform: translateY(115%);
  animation: rise calc(1.1s * var(--t)) var(--expo) forwards;
  animation-delay: calc((950ms + var(--li, 0) * 60ms) * var(--t));
}

.intro__slogan {
  display: flex; align-items: center; gap: 14px;
  margin-top: 16px;
  font-size: clamp(0.66rem, 0.6rem + 0.25vw, 0.8rem);
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--on-night-2);
  white-space: nowrap;
}
.intro__sl { margin-right: -0.3em; }
.intro__rule { width: clamp(24px, 6vw, 72px); height: 1.5px; background: var(--on-night); }
.js .intro__sl { opacity: 0; animation: fade calc(0.9s * var(--t)) ease-out forwards; animation-delay: calc(1.5s * var(--t)); }
.js .intro__rule { transform: scaleX(0); animation: grow calc(1.1s * var(--t)) var(--expo) forwards; animation-delay: calc(1.45s * var(--t)); }
.intro__rule:first-child { transform-origin: right; }
.intro__rule:last-child { transform-origin: left; }
@media (max-width: 360px) {
  .intro__slogan { letter-spacing: 0.18em; gap: 10px; }
  .intro__sl { margin-right: -0.18em; }
  .intro__rule { width: 16px; }
}

.intro__year {
  position: absolute; left: var(--gutter); bottom: clamp(20px, 4vh, 40px);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; font-variant-numeric: tabular-nums;
  color: var(--on-night-2);
}
.intro__dash { width: 44px; height: 1.5px; background: currentColor; transform-origin: left; }
.js .intro__dash { transform: scaleX(0); animation: grow calc(1.7s * var(--t)) var(--expo) calc(0.3s * var(--t)) forwards; }
.intro__to { color: var(--on-night); min-width: 4ch; }

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

.belt {
  background: var(--paper);
  overflow: hidden;
  padding-block: clamp(18px, 2.6vw, 34px);
  border-bottom: 1px solid var(--rule);
}
.belt__track { display: flex; width: max-content; will-change: transform; }
.belt__list { display: flex; flex: none; align-items: center; }
.belt__list li { display: flex; align-items: center; }
.belt__list a {
  padding-inline: clamp(18px, 2.4vw, 40px);
  font-size: clamp(1.9rem, 1.1rem + 3vw, 4.3rem);
  font-weight: 520;
  letter-spacing: -0.022em;
  line-height: 1.12;
  font-variation-settings: var(--flare-display);
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  transition: color .3s var(--quart), -webkit-text-stroke-color .3s var(--quart);
}
/* every second word is drawn as an outline, like a line drawing of the first */
.belt__list li:nth-child(even) a { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.belt__list a:hover { color: var(--indigo-ink); }
.belt__list li:nth-child(even) a:hover { color: transparent; -webkit-text-stroke-color: var(--indigo-ink); }
.belt__mark { height: clamp(26px, 3vw, 56px); width: auto; color: var(--indigo); stroke-width: 7; flex: none; }

/* ---------- Services: a plumb line follows your progress down the list ---------- */

.services__lists { position: relative; }
.services__lists::before, .services__lists::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -44px;
}
.services__lists::before { width: 1px; background: var(--rule); }
.services__lists::after {
  width: 2px; margin-left: -0.5px;
  background: var(--indigo);
  transform: scaleY(var(--sp, 0)); transform-origin: top;
}
.plumb {
  position: absolute; top: -4px; left: -48px;
  width: 9px; height: 9px;
  background: var(--indigo);
  transform: translateY(calc(var(--sp, 0) * var(--sh, 0px)));
}
@media (max-width: 899px) {
  .services__lists::before, .services__lists::after, .plumb { display: none; }
}

/* ---------- Service pages ---------- */

.hero--page { min-height: 0; padding-bottom: clamp(56px, 9vh, 104px); }
.hero--page .hero__grid { grid-template-rows: auto; }
.hero--page .hero__copy { grid-column: 1 / span 10; padding-bottom: 0; }
.hero--page .hero__title { font-size: clamp(2.5rem, 1.2rem + 4.4vw, 5.2rem); max-width: 16ch; }
.hero--page .hero__lead { max-width: 46ch; }
.crumbs { flex-wrap: wrap; gap: 10px; }
.crumbs a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .4s var(--quart); }
.crumbs a:hover { background-size: 100% 1px; }
.crumbs [aria-current] { color: var(--on-night); }
.more-links { list-style: none; padding: 0; margin-top: 32px; display: grid; gap: 14px; justify-items: start; }
.services__intro .more-links .link-arrow { margin-top: 0; }

/* a service row whose title leads to its own page */
.svc__title a { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: 10px; }
.svc__title a svg { width: 18px; height: 18px; flex: none; align-self: center; fill: none; stroke: var(--indigo-ink); stroke-width: 1.6; transition: transform .35s var(--quart); }
/* the whole row is the link target; the title moves on hover, so the cover hangs off the row instead */
.svc:has(.svc__title a) { cursor: pointer; }
.svc:has(.svc__title a) .svc__title { position: static; }
.svc__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* nothing between the row and the cover may transform, or the cover shrinks to it: only the arrow moves */
.svc:has(.svc__title a):hover .svc__title { transform: none; }
.svc:hover .svc__title a svg { transform: translateX(6px); }
.svc__title a:focus-visible { outline: none; }
.svc:has(.svc__title a:focus-visible) { outline: 2px solid var(--indigo); outline-offset: 4px; }
.project__link { margin-top: 20px; }

@media (max-width: 899px) {
  .hero--page .hero__copy { grid-column: 1 / -1; }
}
