/* Mathias Heinke · Arbeitsjournal
   Warm paper, espresso and clay taken from the photographs; Instrument Serif
   for display, Manrope for reading. Scroll motion is driven by a few CSS
   custom properties that script.js writes; without them every value falls
   back to the final, static state. */

@font-face {
  font-family:Manrope;
  src:url('assets/manrope-variable.woff2') format('woff2');
  font-weight:200 800;
  font-style:normal;
  font-display:swap;
}

@font-face {
  font-family:'Instrument Serif';
  src:url('assets/instrument-serif-regular.woff2') format('woff2');
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

@font-face {
  font-family:'Instrument Serif';
  src:url('assets/instrument-serif-italic.woff2') format('woff2');
  font-weight:400;
  font-style:italic;
  font-display:swap;
}

:root {
  --espresso:#191512;
  --ink:#1c1916;
  --paper:#f2ede4;
  --paper-2:#e8e0d2;
  --sand:#d9cab1;
  --clay:#a9471f;
  --clay-deep:#8e3a18;
  --clay-bright:#d0643a;
  --court:#1f4a42;
  --muted:#6b6259;
  --muted-light:#b9ae9f;
  --line:rgba(28,25,22,.16);
  --line-light:rgba(242,237,228,.2);
  --serif:'Instrument Serif','Iowan Old Style',Georgia,serif;
  --sans:Manrope,'Helvetica Neue',Arial,sans-serif;
  --gutter:clamp(16px,4vw,64px);
  --pad:max(var(--gutter),calc((100vw - 1560px) / 2));
  --sheet-radius:clamp(22px,2.6vw,36px);
  --ease:cubic-bezier(.22,1,.36,1);
  --focus:var(--ink);
}

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

html {
  background:var(--espresso);
  scroll-padding-top:88px;
  -webkit-text-size-adjust:100%;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

h1,h2,h3,p,figure,dl,dd,ul,ol {
  margin:0;
}

h1,h2,h3 {
  font-weight:400;
}

em {
  font-family:var(--serif);
  font-style:italic;
  font-weight:400;
}

a {
  color:inherit;
  text-decoration:none;
}

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

button {
  font:inherit;
  color:inherit;
}

a,button,summary {
  -webkit-tap-highlight-color:transparent;
}

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

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

[tabindex="-1"]:focus {
  outline:none;
}

.sprite {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

.i {
  width:1em;
  height:1em;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

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

.skip-link {
  position:fixed;
  top:12px;
  left:12px;
  z-index:100;
  padding:12px 18px;
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  font-weight:600;
  transform:translateY(-160%);
}

.skip-link:focus {
  transform:none;
}

/* Shared pieces ------------------------------------------------------- */

.section-label {
  display:flex;
  align-items:center;
  gap:14px;
  font:600 .75rem/1 var(--sans);
  letter-spacing:.16em;
  text-transform:uppercase;
}

.section-label span {
  color:var(--clay);
}

.section-label::after {
  content:"";
  width:56px;
  height:1px;
  background:currentColor;
  opacity:.35;
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.6em;
  min-height:52px;
  padding:0 1.45em;
  border-radius:999px;
  font:600 .9375rem/1 var(--sans);
  white-space:nowrap;
  transition:background-color .3s,color .3s,border-color .3s,transform .4s var(--ease);
}

.btn .i {
  transition:transform .4s var(--ease);
}

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

.btn-ghost {
  border:1px solid var(--line-light);
  color:var(--paper);
}

.btn-paper {
  background:var(--paper);
  color:var(--ink);
}

.text-link {
  display:inline-flex;
  align-items:center;
  gap:.5em;
  padding-bottom:5px;
  font-weight:600;
  background:linear-gradient(currentColor,currentColor) 0 100% / 100% 1px no-repeat;
  transition:background-size .5s var(--ease);
}

.text-link .i {
  transition:transform .4s var(--ease);
}

.sheet {
  position:relative;
  margin-top:calc(var(--sheet-radius) * -1);
  border-radius:var(--sheet-radius) var(--sheet-radius) 0 0;
}

.frame {
  position:relative;
  overflow:hidden;
  border-radius:18px;
  background:var(--paper-2);
}

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

[data-parallax] .frame img {
  position:absolute;
  left:0;
  top:-7%;
  height:114%;
  transform:translate3d(0,calc((var(--para,.5) - .5) * -12%),0);
}

figcaption {
  display:flex;
  gap:12px;
  margin-top:14px;
  color:var(--muted);
  font:500 .8125rem/1.4 var(--sans);
}

figcaption span {
  color:var(--clay);
  font-weight:700;
}

.plus {
  position:relative;
  flex:none;
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:50%;
  transition:background-color .3s,border-color .3s;
}

.plus::before,
.plus::after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:12px;
  height:1.5px;
  background:currentColor;
  transform:translate(-50%,-50%);
  transition:transform .4s var(--ease);
}

.plus::after {
  transform:translate(-50%,-50%) rotate(90deg);
}

details[open] > summary .plus::after {
  transform:translate(-50%,-50%) rotate(0deg);
}

summary {
  cursor:pointer;
  list-style:none;
}

summary::-webkit-details-marker {
  display:none;
}

/* Navigation ---------------------------------------------------------- */

.site-header {
  position:fixed;
  top:12px;
  left:0;
  right:0;
  z-index:50;
  display:flex;
  justify-content:center;
  padding:0 8px;
  pointer-events:none;
  --focus:var(--paper);
}

.nav {
  position:relative;
  display:flex;
  align-items:center;
  gap:4px;
  padding:6px;
  border:1px solid rgba(242,237,228,.14);
  border-radius:999px;
  background:rgba(25,21,18,.66);
  color:var(--paper);
  box-shadow:0 12px 32px rgba(10,8,6,.18);
  -webkit-backdrop-filter:blur(16px) saturate(1.3);
  backdrop-filter:blur(16px) saturate(1.3);
  pointer-events:auto;
}

/* Logo: "mh." with a text cursor, drawn from JetBrains Mono SemiBold
   outlines (OFL, see assets/jetbrains-mono-OFL.txt), so no extra font loads. */
.monogram {
  display:inline-flex;
  align-items:center;
  flex:none;
  height:40px;
  padding:0 13px 0 12px;
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  transition:background-color .3s;
}

.logo-mark {
  display:block;
  width:auto;
  height:17px;
  overflow:visible;
  fill:currentColor;
}

.logo-mark .lm-dot,
.logo-mark .lm-caret {
  fill:var(--clay-bright);
}

.nav-links {
  display:flex;
  align-items:center;
  gap:2px;
}

.nav-links a {
  padding:12px 15px;
  border-radius:999px;
  color:rgba(242,237,228,.82);
  font:500 .875rem/1 var(--sans);
  transition:background-color .25s,color .25s;
}

.nav-links a:hover,
.nav-links a[aria-current] {
  background:rgba(242,237,228,.12);
  color:var(--paper);
}

.nav-links .nav-contact {
  margin-left:6px;
  background:var(--clay);
  color:var(--paper);
}

.nav-links .nav-contact:hover,
.nav-links .nav-contact[aria-current] {
  background:var(--clay-deep);
}

.nav-progress {
  position:absolute;
  left:26px;
  right:26px;
  bottom:-1px;
  height:2px;
  border-radius:2px;
  background:var(--clay-bright);
  transform:scaleX(var(--page,0));
  transform-origin:left;
}

.menu-toggle {
  display:none;
  align-items:center;
  gap:12px;
  height:40px;
  padding:0 16px;
  border:0;
  border-radius:999px;
  background:rgba(242,237,228,.12);
  font-size:.875rem;
  font-weight:600;
  cursor:pointer;
}

.menu-icon {
  position:relative;
  width:16px;
  height:10px;
}

.menu-icon::before,
.menu-icon::after {
  content:"";
  position:absolute;
  left:0;
  width:100%;
  height:1.5px;
  border-radius:2px;
  background:currentColor;
  transition:transform .35s var(--ease),top .35s var(--ease);
}

.menu-icon::before {
  top:0;
}

.menu-icon::after {
  top:calc(100% - 1.5px);
}

.nav.is-open .menu-icon::before {
  top:calc(50% - .75px);
  transform:rotate(45deg);
}

.nav.is-open .menu-icon::after {
  top:calc(50% - .75px);
  transform:rotate(-45deg);
}

/* Cover --------------------------------------------------------------- */

.cover {
  --name-size:min(calc((100vw - 2 * var(--gutter)) / 5.3),28vh);
  --split:calc(var(--gutter) + var(--name-size) * 2.733);
  --name-bottom:clamp(40px,5.4vh,60px);
  position:relative;
  height:100vh;
  height:100svh;
  min-height:620px;
  overflow:hidden;
  background:var(--espresso);
  color:var(--paper);
  --focus:var(--paper);
}

.cover::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  background:var(--espresso);
  opacity:calc(var(--hero,0) * .6);
  pointer-events:none;
}

.cover-inner {
  position:absolute;
  inset:0;
}

.cover-photo {
  position:absolute;
  top:84px;
  right:12px;
  bottom:0;
  left:var(--split);
  overflow:hidden;
  border-radius:24px 24px 0 0;
  background:#2a231d;
  transform:translate3d(0,calc(var(--hero,0) * 9vh),0);
}

.cover-photo img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 0;
  transform:scale(calc(1 + var(--hero,0) * .08));
  transform-origin:50% 20%;
}

.cover-photo::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top,rgba(25,21,18,.92) 0%,rgba(25,21,18,.62) 26%,rgba(25,21,18,0) 52%);
  pointer-events:none;
}

.cover-copy {
  position:absolute;
  top:96px;
  bottom:calc(var(--name-size) * .84 + var(--name-bottom) + 20px);
  left:var(--gutter);
  width:calc(var(--split) - var(--gutter) - 48px);
  max-width:700px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:22px;
  opacity:calc(1 - var(--hero,0) * 1.6);
  transform:translate3d(0,calc(var(--hero,0) * -6vh),0);
}

.cover-kicker {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--muted-light);
  font:600 .75rem/1 var(--sans);
  letter-spacing:.16em;
  text-transform:uppercase;
}

.dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--clay-bright);
  box-shadow:0 0 0 4px rgba(208,100,58,.22);
}

.cover-lede {
  max-width:13em;
  font-family:var(--serif);
  font-size:clamp(2rem,min(4.2vw,6.6vh),4.75rem);
  line-height:1.02;
  letter-spacing:-.01em;
  text-wrap:balance;
}

.cover-lede em {
  color:var(--clay-bright);
}

.cover-sub {
  max-width:30em;
  color:rgba(242,237,228,.76);
  font-size:clamp(.95rem,1.2vw,1.0625rem);
}

.cover-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:6px;
}

.cover-products {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  max-width:36em;
  font-size:.875rem;
}

.cover-products span {
  flex:0 0 100%;
  margin-bottom:2px;
  color:var(--muted-light);
  font:600 .6875rem/1 var(--sans);
  letter-spacing:.16em;
  text-transform:uppercase;
}

.cover-products a {
  padding:9px 14px;
  border:1px solid var(--line-light);
  border-radius:999px;
  color:rgba(242,237,228,.88);
  font-weight:600;
  line-height:1;
  transition:border-color .3s,background-color .3s;
}

.cover-name {
  position:absolute;
  left:var(--gutter);
  bottom:var(--name-bottom);
  z-index:2;
  font-family:var(--serif);
  font-size:var(--name-size);
  line-height:.84;
  letter-spacing:-.02em;
  white-space:nowrap;
  transform:translate3d(0,calc(var(--hero,0) * -14vh),0);
}

.cover-name .line {
  display:inline-block;
  overflow:hidden;
  padding:.08em .06em .04em;
  margin:-.08em -.06em -.04em;
  vertical-align:bottom;
}

.cover-name .line + .line {
  margin-left:.09em;
}

.cover-name .line > * {
  display:inline-block;
}

/* Editorial ----------------------------------------------------------- */

.editorial {
  z-index:2;
  padding:clamp(72px,10vw,150px) var(--pad) clamp(40px,6vw,80px);
  background:var(--paper);
}

.statement {
  max-width:15.5em;
  margin:clamp(28px,4vw,56px) 0 clamp(64px,9vw,140px);
  font-family:var(--serif);
  font-size:clamp(2.15rem,5.4vw,5.6rem);
  line-height:1.02;
  letter-spacing:-.015em;
  text-wrap:pretty;
}

.statement em {
  color:var(--clay);
}

.statement .w {
  opacity:clamp(.14,calc((var(--ink,1) * (var(--n,0) + 4) - var(--i,0)) / 3),1);
  transition:opacity .2s linear;
}

@media (prefers-contrast: more) {
  .statement .w { opacity:1; }
}

.editorial-grid {
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr);
  gap:clamp(32px,7vw,128px);
  align-items:end;
}

.editorial-photo .frame {
  aspect-ratio:4 / 5;
}

.editorial-copy {
  display:grid;
  gap:24px;
  max-width:36rem;
  padding-bottom:30px;
}

.lead {
  font-size:clamp(1.2rem,1.6vw,1.45rem);
  line-height:1.5;
}

.editorial-copy > p:not(.lead):not(.pull) {
  color:var(--muted);
}

.pull {
  padding:22px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  font-family:var(--serif);
  font-size:clamp(1.9rem,3vw,2.9rem);
  line-height:1.05;
}

.pull em {
  color:var(--clay);
}

.facts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 28px;
}

.facts div {
  padding-top:12px;
  border-top:1px solid var(--line);
}

.facts dt {
  margin-bottom:4px;
  color:var(--muted);
  font:600 .6875rem/1.4 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.facts dd {
  font-weight:600;
  line-height:1.4;
}

/* Strip --------------------------------------------------------------- */

.strip {
  position:relative;
  z-index:2;
  overflow:hidden;
  overflow:clip;
  padding:clamp(32px,5vw,64px) 0 calc(var(--sheet-radius) + clamp(64px,9vw,130px));
  background:var(--paper);
}

.strip-row {
  display:flex;
  gap:clamp(12px,1.4vw,20px);
  padding:0 var(--pad);
}

.strip-images {
  flex-wrap:wrap;
}

.strip-item {
  position:relative;
  flex:none;
  height:clamp(280px,34vw,470px);
  margin:0;
  overflow:hidden;
  border-radius:18px;
}

.strip-photo {
  aspect-ratio:4 / 5;
}

.strip-photo img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 25%;
}

.strip-photo figcaption {
  position:absolute;
  left:12px;
  bottom:12px;
  margin:0;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(25,21,18,.62);
  color:var(--paper);
  font-size:.75rem;
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}

.tile {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  width:clamp(230px,22vw,330px);
  padding:clamp(18px,2vw,28px);
}

.tile-no {
  font:600 .75rem/1 var(--sans);
  letter-spacing:.16em;
}

.tile-word {
  font-family:var(--serif);
  font-size:clamp(2.5rem,4.2vw,4.25rem);
  line-height:.92;
  letter-spacing:-.01em;
}

.tile-text {
  max-width:16em;
  font-size:.9375rem;
  line-height:1.45;
}

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

.tile-ink {
  background:var(--espresso);
  color:var(--paper);
}

.tile-paper {
  border:1px solid var(--line);
  background:var(--paper-2);
}

.tile-court {
  width:clamp(280px,27vw,400px);
  background:var(--court);
  color:var(--paper);
}

.tile-quote {
  width:clamp(300px,36vw,560px);
  background:var(--sand);
}

.quote-text {
  font-family:var(--serif);
  font-size:clamp(2.6rem,5vw,5rem);
  line-height:.95;
}

.quote-text em {
  color:var(--clay);
}

.quote-arrow {
  width:min(70%,260px);
  fill:none;
  stroke:var(--clay);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.strip-words {
  width:max-content;
  gap:.35em;
  margin-top:clamp(20px,3vw,44px);
  font-family:var(--serif);
  font-size:clamp(3.6rem,10vw,9.5rem);
  line-height:1;
  white-space:nowrap;
}

.strip-words .outline {
  color:transparent;
  font-style:italic;
  -webkit-text-stroke:1.2px var(--ink);
}

/* Philosophy: what the work is measured against ----------------------- */

.philosophy {
  z-index:3;
  padding:clamp(80px,10vw,150px) var(--pad) calc(var(--sheet-radius) + clamp(80px,10vw,140px));
  background:var(--court);
  color:var(--paper);
  --focus:var(--paper);
}

.philosophy .section-label span {
  color:var(--clay-bright);
}

.philosophy-grid {
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr);
  gap:clamp(40px,7vw,128px);
  align-items:start;
}

.philosophy-head {
  position:sticky;
  top:110px;
  display:grid;
  gap:clamp(24px,3vw,36px);
}

.philosophy-head h2 {
  font-family:var(--serif);
  font-size:clamp(2.6rem,5vw,5.4rem);
  line-height:.96;
  letter-spacing:-.015em;
}

.philosophy-head h2 em {
  color:var(--sand);
}

.philosophy-quote {
  margin:0;
  padding-left:20px;
  border-left:2px solid var(--clay-bright);
  max-width:26em;
  color:rgba(242,237,228,.82);
  font-size:clamp(1.05rem,1.3vw,1.2rem);
  line-height:1.5;
}

.principles {
  margin:0;
  padding:0;
  list-style:none;
}

.principle {
  display:grid;
  grid-template-columns:3.2rem minmax(0,1fr);
  gap:10px 18px;
  padding:clamp(22px,2.6vw,34px) 0;
  border-top:1px solid var(--line-light);
}

.principle:last-child {
  border-bottom:1px solid var(--line-light);
}

.principle-no {
  grid-row:span 2;
  padding-top:.7em;
  color:var(--clay-bright);
  font:600 .75rem/1 var(--sans);
  letter-spacing:.16em;
}

.principle h3 {
  font-family:var(--serif);
  font-size:clamp(1.9rem,2.9vw,2.9rem);
  font-weight:400;
  line-height:1;
  letter-spacing:-.01em;
}

.principle h3 em {
  color:var(--sand);
}

.principle p {
  max-width:34em;
  color:rgba(242,237,228,.74);
  line-height:1.55;
}

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

.work {
  z-index:3;
  padding:clamp(80px,10vw,150px) var(--pad) clamp(72px,9vw,130px);
  background:var(--espresso);
  color:var(--paper);
  --focus:var(--paper);
}

.work .section-label span {
  color:var(--clay-bright);
}

.work-head {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);
  gap:28px 48px;
  align-items:end;
}

.work-head .section-label {
  grid-column:1 / -1;
}

.work-head h2 {
  font-family:var(--serif);
  font-size:clamp(2.8rem,6.6vw,7rem);
  line-height:.95;
  letter-spacing:-.015em;
}

.work-head h2 em {
  color:var(--sand);
}

.work-intro {
  justify-self:end;
  max-width:24em;
  color:var(--muted-light);
}

.work-stack {
  display:grid;
  gap:clamp(20px,3vw,44px);
  margin:clamp(40px,5vw,72px) 0 0;
  padding:0;
  list-style:none;
}

.work-card {
  position:sticky;
  top:calc(84px + var(--i) * 16px);
}

.card-mail {
  --card-bg:var(--paper);
  --card-fg:var(--ink);
  --media-bg:#e4d9c7;
  --focus:var(--ink);
}

.card-eve {
  --card-bg:var(--clay);
  --card-fg:var(--paper);
  --media-bg:var(--clay-deep);
}

.card-tieflot {
  --card-bg:var(--court);
  --card-fg:var(--paper);
  --media-bg:#173a33;
}

.card-atlas {
  --card-bg:var(--espresso);
  --card-fg:var(--paper);
  --media-bg:#2b2622;
}

.card-tutor {
  --card-bg:var(--sand);
  --card-fg:var(--ink);
  --media-bg:#cdb99a;
  --focus:var(--ink);
}

.work-inner {
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  height:min(calc(100vh - 140px),700px);
  min-height:500px;
  overflow:hidden;
  border-radius:28px;
  background:var(--card-bg);
  color:var(--card-fg);
  box-shadow:0 -18px 50px rgba(0,0,0,.28);
  transform:scale(calc(1 - var(--cover,0) * .05));
  transform-origin:50% 0;
}

.work-inner::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:6;
  background:#0d0b09;
  opacity:calc(var(--cover,0) * .45);
  pointer-events:none;
}

.work-media {
  position:relative;
  display:grid;
  place-items:center;
  margin:12px;
  overflow:hidden;
  border-radius:20px;
  background:var(--media-bg);
  isolation:isolate;
}

.work-body {
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:18px;
  padding:clamp(24px,3.4vw,52px);
}

.work-meta {
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:auto;
  font:600 .75rem/1.3 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.work-body h3 {
  font-family:var(--serif);
  font-size:clamp(2.6rem,4.4vw,4.9rem);
  line-height:.92;
  letter-spacing:-.015em;
}

.work-body > p:not(.work-meta) {
  max-width:28em;
  font-size:clamp(1rem,1.2vw,1.125rem);
}

.work-link::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:4;
  border-radius:28px;
}

.work-link:focus-visible {
  outline:none;
}

.work-link:focus-visible::after {
  outline:3px solid var(--focus);
  outline-offset:-8px;
}

.work-url {
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  gap:.5em;
  padding:12px 18px;
  border:1px solid currentColor;
  border-radius:999px;
  font-size:.9375rem;
  font-weight:600;
  transition:background-color .3s,color .3s;
}

.work-url .i {
  transition:transform .4s var(--ease);
}

/* Project screens: real app views with a short guided tour ----------
   Each card shows a real screen from the product, filled with sample data.
   script.js zooms into two or three places and outlines them; without
   JavaScript the full first screen and its note stay visible. */

.media-screen {
  /* Above the card link so the tour buttons stay clickable; the screen itself
     lets clicks through to the card link and opens the product. */
  z-index:5;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  gap:clamp(14px,1.6vw,20px);
  place-items:stretch;
  padding:clamp(18px,2.2vw,30px) clamp(18px,2.2vw,30px) clamp(16px,1.8vw,22px);
  pointer-events:none;
}

.screen-stage {
  display:grid;
  place-items:center;
  min-height:0;
  container-type:size;
}

.screen {
  width:min(100cqw,calc((100cqh - 30px) * 1.6));
  overflow:hidden;
  border-radius:14px;
  background:#fbfaf7;
  box-shadow:0 34px 70px -30px rgba(25,21,18,.6),0 12px 26px -14px rgba(25,21,18,.4),0 0 0 1px rgba(25,21,18,.08);
  transition:transform .8s var(--ease);
}

.screen-bar {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:12px;
  height:30px;
  padding:0 12px;
  border-bottom:1px solid rgba(28,25,22,.08);
  background:#efeae2;
  color:#5f574e;
  font:600 .6875rem/1 var(--sans);
}

.screen-dots {
  display:flex;
  gap:6px;
}

.screen-dots i {
  width:9px;
  height:9px;
  border-radius:50%;
  background:rgba(28,25,22,.16);
}

.screen-url {
  padding:5px 14px;
  border-radius:6px;
  background:rgba(255,255,255,.75);
  white-space:nowrap;
}

.screen-bar small {
  justify-self:end;
  overflow:hidden;
  font:inherit;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.screen-view {
  position:relative;
  aspect-ratio:16 / 10;
  overflow:hidden;
  background:#f4f2ee;
}

.screen-shot {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transform-origin:0 0;
  transform:translate(var(--tx,0%),var(--ty,0%)) scale(var(--z,1));
  transition:opacity .7s var(--ease),transform 1.4s var(--ease);
}

.screen-shot.is-active {
  opacity:1;
}

.screen-focus {
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  border-radius:10px;
  opacity:0;
  pointer-events:none;
  box-shadow:0 0 0 2px var(--clay-bright),0 0 0 9999px rgba(25,21,18,.18);
  transition:opacity .6s var(--ease),left 1.4s var(--ease),top 1.4s var(--ease),width 1.4s var(--ease),height 1.4s var(--ease);
}

.screen-focus.is-on {
  opacity:1;
}

.tour {
  position:relative;
  z-index:5;
  display:grid;
  justify-items:start;
  gap:10px;
}

.tour-steps {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  pointer-events:auto;
}

.tour-steps[hidden] {
  display:none;
}

.tour-steps button {
  position:relative;
  overflow:hidden;
  min-height:40px;
  padding:0 16px;
  border:1px solid color-mix(in srgb,currentColor 28%,transparent);
  border-radius:999px;
  background:transparent;
  color:inherit;
  font:600 .8125rem/1 var(--sans);
  cursor:pointer;
  transition:background-color .3s,color .3s,border-color .3s;
}

.tour-steps button[aria-pressed="true"] {
  border-color:var(--card-fg);
  background:var(--card-fg);
  color:var(--card-bg);
}

.tour-steps button::after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:currentColor;
  opacity:.6;
  transform:scaleX(0);
  transform-origin:0 50%;
}

.tour.is-running .tour-steps button[aria-pressed="true"]::after {
  animation:tour-fill var(--tour-ms,4800ms) linear forwards;
}

@keyframes tour-fill {
  to { transform:scaleX(1); }
}

.tour-steps button:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:2px;
}

.tour-note {
  min-height:2.9em;
  max-width:44em;
  font-size:.9375rem;
  line-height:1.45;
  opacity:.88;
}

/* Tieflot stage: the speed to lead simulation from tieflot.de ---------
   lead-field.js draws the funnel and adds .has-field and .is-wide; the
   padding below reserves room for the funnel under the text on narrow
   stages. */

.stage {
  --brass:#d4b673;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin-top:clamp(48px,7vw,100px);
  padding:clamp(36px,5vw,72px) clamp(22px,4vw,64px);
  border-radius:28px;
  background:radial-gradient(60% 55% at 80% 72%,rgba(212,182,115,.1),rgba(212,182,115,0) 70%),#131110;
  color:var(--paper);
  box-shadow:inset 0 0 0 1px rgba(242,237,228,.08);
  --focus:var(--paper);
}

.stage::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(180deg,rgba(19,17,16,.72),rgba(19,17,16,0) 55%);
  pointer-events:none;
}

.stage.is-wide {
  min-height:clamp(620px,calc(100svh - 140px),780px);
  padding-bottom:clamp(110px,10vw,140px);
}

.stage.is-wide::after {
  background:linear-gradient(90deg,rgba(19,17,16,.74) 0%,rgba(19,17,16,.36) 40%,rgba(19,17,16,0) 62%);
}

.stage.has-field:not(.is-wide) {
  padding-bottom:calc(22rem + 170px);
}

.stage-field {
  position:absolute;
  inset:0;
  z-index:-1;
  display:block;
  width:100%;
  height:100%;
}

.stage-copy {
  display:grid;
  justify-items:start;
  gap:20px;
  max-width:34rem;
}

.stage.is-wide .stage-copy {
  max-width:max(34rem,min(46rem,50%));
}

.stage-kicker {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 14px;
  color:var(--brass);
  font:600 .75rem/1.3 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.stage-kicker span {
  color:rgba(242,237,228,.6);
}

.stage h3 {
  font-family:var(--serif);
  font-size:clamp(2.7rem,5.2vw,5.4rem);
  line-height:.94;
  letter-spacing:-.015em;
  text-wrap:balance;
}

.stage h3 em {
  color:var(--brass);
}

.stage-lead {
  max-width:31em;
  color:rgba(242,237,228,.8);
  font-size:clamp(1rem,1.2vw,1.125rem);
  line-height:1.6;
}

.stage-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:4px;
}

.btn-brass {
  background:var(--brass);
  color:var(--espresso);
}

.stage-hint {
  color:rgba(242,237,228,.6);
  font-size:.8125rem;
}

.stage-hint[hidden] {
  display:none;
}

.stage-hud-wrap {
  position:absolute;
  right:clamp(12px,2vw,28px);
  bottom:clamp(12px,2vw,28px);
  left:clamp(12px,2vw,28px);
  display:flex;
  justify-content:flex-end;
  pointer-events:none;
}

.stage-hud {
  display:grid;
  grid-template-columns:auto auto;
  align-items:center;
  gap:1.25rem;
  padding:.5rem 1.25rem .5rem .875rem;
  border:1px solid rgba(242,237,228,.12);
  border-radius:12px;
  background:rgba(22,20,18,.66);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  backdrop-filter:blur(16px) saturate(140%);
  box-shadow:0 24px 60px -30px rgba(0,0,0,.8),inset 0 1px rgba(242,237,228,.06);
  pointer-events:auto;
}

.stage-hud[hidden] {
  display:none;
}

.stage-sim {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

.stage-sim-tag {
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  color:#aaa49a;
  font-size:.75rem;
  font-weight:600;
  white-space:nowrap;
}

.stage-sim-tag::before {
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#e3c47e;
  box-shadow:0 0 0 0 rgba(227,196,126,.55);
  animation:stage-live 1.2s var(--ease) infinite;
}

.stage.is-unanswered .stage-sim-tag::before {
  background:#7a8ca0;
  animation:none;
}

@keyframes stage-live {
  70%,to { box-shadow:0 0 0 7px rgba(227,196,126,0); }
}

.stage-mode {
  display:inline-flex;
  gap:2px;
  padding:2px;
  border:1px solid rgba(242,237,228,.1);
  border-radius:9px;
  background:rgba(242,237,228,.04);
}

.stage-mode button {
  min-height:36px;
  padding:0 .9rem;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#aaa49a;
  font:600 .8125rem/1 var(--sans);
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .22s,color .22s;
}

.stage-mode button[aria-pressed="true"] {
  background:rgba(242,237,228,.13);
  color:var(--paper);
}

.stage-mode button:focus-visible {
  outline:2px solid var(--paper);
  outline-offset:2px;
}

.stage-count {
  display:grid;
  grid-template-columns:repeat(4,minmax(5.75rem,auto));
  gap:.625rem 1rem;
  margin:0;
  padding:0 0 0 1.25rem;
  border-left:1px solid rgba(242,237,228,.08);
}

.stage-count > div {
  display:grid;
  gap:.1rem;
  min-width:0;
}

.stage-count dt {
  display:flex;
  align-items:center;
  gap:.4rem;
  color:#aaa49a;
  font-size:.75rem;
  white-space:nowrap;
}

.stage-count dt::before {
  content:"";
  flex:none;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--dot,#e3c47e);
}

.stage-count .is-time { --dot:#f4ac52; }
.stage-count .is-booked { --dot:#f2ede4; }
.stage-count .is-lost { --dot:#7a8ca0; }

.stage-count dd {
  margin:0;
  color:var(--paper);
  font-size:1.25rem;
  font-weight:500;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.stage.is-unanswered .stage-count .is-lost dd,
.stage.is-unanswered .stage-count .is-time dd {
  color:#a9b8c7;
}

.stage:not(.is-wide) .stage-hud {
  grid-template-columns:minmax(0,1fr);
  gap:.75rem;
  width:100%;
  padding:.625rem .875rem .75rem;
}

.stage:not(.is-wide) .stage-count {
  grid-template-columns:repeat(4,minmax(0,1fr));
  padding:.625rem .25rem 0;
  border-top:1px solid rgba(242,237,228,.08);
  border-left:0;
}

/* Collaboration ------------------------------------------------------- */

.collab {
  z-index:4;
  padding:clamp(80px,10vw,150px) var(--pad);
  background:var(--paper);
}

.collab-grid {
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr);
  gap:clamp(32px,6vw,112px);
  align-items:start;
}

.collab-photo {
  position:sticky;
  top:96px;
}

.collab-photo .frame {
  aspect-ratio:4 / 5;
  max-height:calc(100vh - 170px);
}

.collab-copy {
  display:grid;
  gap:28px;
  padding-top:8px;
}

.collab-copy h2 {
  font-family:var(--serif);
  font-size:clamp(2.8rem,6vw,6.4rem);
  line-height:.95;
  letter-spacing:-.015em;
}

.collab-copy h2 em {
  color:var(--clay);
}

.lede {
  max-width:32em;
  font-size:clamp(1.125rem,1.5vw,1.375rem);
  line-height:1.55;
}

.focus {
  border-top:1px solid var(--line);
}

.focus-item {
  border-bottom:1px solid var(--line);
}

.focus-item summary {
  display:grid;
  grid-template-columns:7.5rem minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  padding:20px 0;
}

.focus-tag {
  color:var(--clay);
  font:600 .6875rem/1.3 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.focus-title {
  font-family:var(--serif);
  font-size:clamp(1.5rem,2.2vw,2.1rem);
  line-height:1.05;
}

.focus-item p {
  max-width:40em;
  padding:0 52px 22px calc(7.5rem + 16px);
  color:var(--muted);
}

.steps {
  position:relative;
  display:grid;
  gap:28px;
  margin:8px 0 0;
  padding:0 0 0 40px;
  list-style:none;
}

.steps::before,
.steps::after {
  content:"";
  position:absolute;
  left:7px;
  top:10px;
  bottom:10px;
  width:2px;
  border-radius:2px;
  background:var(--line);
}

.steps::after {
  background:var(--clay);
  transform:scaleY(var(--steps,1));
  transform-origin:top;
}

.steps li {
  position:relative;
  display:grid;
  grid-template-columns:2.4rem minmax(0,1fr);
  gap:6px 12px;
}

.steps li::before {
  content:"";
  position:absolute;
  left:-40px;
  top:5px;
  z-index:1;
  width:16px;
  height:16px;
  border:2px solid var(--clay);
  border-radius:50%;
  background:var(--clay);
  transition:background-color .4s,border-color .4s;
}

.step-no {
  grid-row:span 2;
  color:var(--clay);
  font:600 .75rem/2.2 var(--sans);
  letter-spacing:.1em;
}

.steps h3 {
  font-family:var(--serif);
  font-size:clamp(1.6rem,2.2vw,2.1rem);
  line-height:1.05;
}

.steps p {
  color:var(--muted);
}

.collab-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:16px 28px;
  margin-top:8px;
}

/* Outlook ------------------------------------------------------------- */

.outlook {
  z-index:5;
  padding:clamp(80px,10vw,150px) var(--pad) calc(var(--sheet-radius) + clamp(72px,9vw,130px));
  background:var(--paper-2);
}

.outlook-head {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:28px 48px;
  align-items:end;
  margin-bottom:clamp(48px,7vw,96px);
}

.outlook-head .section-label {
  grid-column:1 / -1;
}

.outlook-head h2 {
  font-family:var(--serif);
  font-size:clamp(2.8rem,6.4vw,6.8rem);
  line-height:.95;
  letter-spacing:-.015em;
}

.outlook-head h2 em {
  display:block;
  color:var(--clay);
}

.outlook-head > p:last-child {
  justify-self:end;
  max-width:26em;
  color:var(--muted);
}

.outlook-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-top:1px solid rgba(28,25,22,.32);
}

.note {
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:28px clamp(20px,2.6vw,40px) 0;
  border-left:1px solid var(--line);
}

.note:first-child {
  padding-left:0;
  border-left:0;
}

.note:last-child {
  padding-right:0;
}

.status {
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font:600 .6875rem/1 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.status-dot {
  width:9px;
  height:9px;
  border:1.5px solid var(--clay);
  border-radius:50%;
}

.status-live .status-dot {
  border-color:var(--court);
  background:var(--court);
}

.note h3 {
  font-family:var(--serif);
  font-size:clamp(1.9rem,2.6vw,2.6rem);
  line-height:1.02;
}

.note h3 em {
  color:var(--clay);
}

.note > p:not(.status):not(.handle) {
  color:var(--muted);
}

.wave {
  display:flex;
  align-items:center;
  gap:4px;
  height:132px;
}

.wave i {
  flex:1;
  max-width:6px;
  height:var(--h,50%);
  border-radius:3px;
  background:var(--ink);
  transition:transform 1s var(--ease) var(--d,0s);
}

.wave i:nth-child(4n+1) { --h:34%; }
.wave i:nth-child(4n+2) { --h:72%; }
.wave i:nth-child(4n+3) { --h:52%; }
.wave i:nth-child(4n) { --h:88%; }
.wave i:nth-child(5n) { --h:28%; }
.wave i:nth-child(7n) { --h:96%; }
.wave i:nth-child(9n) { --h:42%; }
.wave i:nth-child(n+8) { --d:.12s; }
.wave i:nth-child(n+15) { --d:.24s; }
.wave i:nth-child(n+22) { --d:.36s; }

.stamp {
  display:grid;
  place-content:center;
  width:132px;
  height:132px;
  border:1.5px solid var(--clay);
  border-radius:50%;
  color:var(--clay);
  text-align:center;
  transform:rotate(-8deg);
  transition:transform 1.1s var(--ease) .2s,opacity .8s var(--ease) .2s;
}

.stamp span {
  font-family:var(--serif);
  font-size:1.9rem;
  font-style:italic;
  line-height:1;
}

.stamp small {
  margin-top:6px;
  font:600 .625rem/1 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.handle {
  display:flex;
  align-items:center;
  min-height:132px;
  font-family:var(--serif);
  font-size:clamp(2.6rem,3.6vw,3.6rem);
  line-height:.95;
}

.note-detail {
  margin-top:auto;
  border-top:1px solid var(--line);
}

.note-detail summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  font-weight:600;
}

.note-detail ul {
  margin:0 0 14px;
  padding-left:1.1em;
  color:var(--muted);
}

.note-detail li + li {
  margin-top:6px;
}

.note-detail > p {
  padding-bottom:16px;
  color:var(--muted);
}

.note-detail .fine {
  font-size:.8125rem;
}

.note-x .text-link {
  align-self:flex-start;
  margin-top:auto;
  margin-bottom:16px;
}

/* Talks: proof from real stages, topics and an easy way to ask -------- */

.talks {
  z-index:6;
  padding:clamp(80px,10vw,150px) var(--pad) calc(var(--sheet-radius) + clamp(80px,10vw,140px));
  background:var(--espresso);
  color:var(--paper);
  --focus:var(--paper);
}

.talks .section-label span {
  color:var(--clay-bright);
}

.talks-head {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:28px 48px;
  align-items:end;
  margin-bottom:clamp(40px,6vw,80px);
}

.talks-head .section-label {
  grid-column:1 / -1;
}

.talks-head h2 {
  font-family:var(--serif);
  font-size:clamp(2.8rem,6.4vw,6.8rem);
  line-height:.95;
  letter-spacing:-.015em;
}

.talks-head h2 em {
  display:block;
  color:var(--clay-bright);
}

.talks-head > p:last-child {
  justify-self:end;
  max-width:24em;
  color:var(--muted-light);
}

.talks-gallery {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:clamp(14px,1.6vw,22px);
  max-width:1400px;
  margin:0 auto;
  padding:0;
  list-style:none;
}

.talk {
  position:relative;
  display:flex;
}

.talk figure {
  display:flex;
  flex:1;
  flex-direction:column;
  min-width:0;
  margin:0;
}

.talk-shot {
  position:relative;
  flex:1;
  min-height:0;
  overflow:hidden;
  border-radius:16px;
  background:#2a231e;
}

.talk-shot img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .7s var(--ease);
}

.talk figcaption {
  display:flex;
  align-items:baseline;
  gap:12px;
  padding:12px 2px 0;
  color:var(--muted-light);
  font:italic 400 clamp(1rem,1.25vw,1.15rem)/1.25 var(--serif);
}

.talk figcaption span {
  flex:none;
  color:var(--clay-bright);
  font:normal 700 .625rem/1 var(--sans);
  letter-spacing:.14em;
  text-transform:uppercase;
}

/* Row one: keynote and summer party in three portrait shots. Row two: the
   interview and the workshop side by side. */
.talk-third { grid-column:span 4; }
.talk-third .talk-shot { flex:none; aspect-ratio:4 / 5; }
.talk-half { grid-column:span 6; }
.talk-half .talk-shot { flex:none; aspect-ratio:3 / 2; }
.talk-third img { object-position:60% 30%; }
.talk-slide img { object-position:58% 40%; }

.talk-open {
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  padding:0;
  border:0;
  border-radius:16px;
  background:transparent;
  cursor:zoom-in;
}

.talk-open:focus-visible {
  outline:3px solid var(--clay-bright);
  outline-offset:4px;
}

.talks-offer {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,.9fr);
  gap:clamp(32px,4vw,64px);
  max-width:1400px;
  margin:clamp(56px,7vw,100px) auto 0;
  padding-top:clamp(28px,4vw,48px);
  border-top:1px solid rgba(242,237,228,.18);
}

.talks-offer h3 {
  margin-bottom:18px;
  color:var(--clay-bright);
  font:700 .75rem/1 var(--sans);
  letter-spacing:.16em;
  text-transform:uppercase;
}

.talks-topics ol,
.talks-formats ul {
  display:grid;
  gap:18px;
  margin:0;
  padding:0;
  list-style:none;
}

.talks-topics li,
.talks-formats li {
  color:var(--muted-light);
  line-height:1.5;
}

.talks-topics strong,
.talks-formats strong {
  display:block;
  margin-bottom:4px;
  color:var(--paper);
  font:400 clamp(1.3rem,1.8vw,1.6rem)/1.15 var(--serif);
}

.talks-ask {
  display:grid;
  align-content:start;
  justify-items:start;
  gap:24px;
}

.talks-ask p {
  font-size:clamp(1.05rem,1.3vw,1.2rem);
  line-height:1.55;
}

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

.lightbox {
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  overflow:hidden;
  background:transparent;
  color:var(--paper);
  transition:opacity .2s ease;
}

.lightbox::backdrop {
  background:rgba(14,11,9,.9);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  transition:opacity .2s ease;
}

.lightbox.is-closing,
.lightbox.is-closing::backdrop {
  opacity:0;
}

@starting-style {
  .lightbox[open],
  .lightbox[open]::backdrop {
    opacity:0;
  }

  .lightbox[open] .lightbox-frame {
    transform:translateY(22px) scale(.96) rotate(-1deg);
  }
}

.lightbox-stage {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  padding:72px 88px;
}

.lightbox-frame {
  display:flex;
  flex-direction:column;
  margin:0;
  padding:14px 14px 0;
  border-radius:4px;
  background:var(--paper);
  color:var(--ink);
  box-shadow:0 40px 90px rgba(0,0,0,.6),0 4px 12px rgba(0,0,0,.4);
  transition:transform .4s var(--ease);
}

.lightbox.is-closing .lightbox-frame {
  transform:translateY(12px) scale(.98);
}

/* Script sets --ar and --nw from the large file, so the frame has its final
   size before the large file arrives; the print from the table fills in. */
.lightbox-img {
  display:block;
  width:min(var(--nw,1200px),1100px,calc(100vw - 204px),calc((100dvh - 250px) * var(--ar,.75)));
  height:auto;
  aspect-ratio:var(--ar,.75);
  object-fit:cover;
  border-radius:2px;
  background:#d9cfbf;
}

.lightbox figcaption {
  display:block;
  width:0;
  min-width:100%;
  margin:0;
  padding:14px 4px 18px;
  color:var(--ink);
  font:italic 400 clamp(1.15rem,1.6vw,1.45rem)/1.2 var(--serif);
}

.lightbox-year {
  display:block;
  margin-bottom:6px;
  color:var(--clay);
  font:normal 700 .6875rem/1 var(--sans);
  letter-spacing:.14em;
}

.lightbox-text {
  color:inherit;
  font-weight:400;
}

.lightbox-close,
.lightbox-nav {
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid rgba(242,237,228,.28);
  border-radius:999px;
  background:rgba(242,237,228,.08);
  color:var(--paper);
  font:600 .9375rem/1 var(--sans);
  cursor:pointer;
  transition:background-color .25s,border-color .25s;
}

.lightbox-close {
  top:18px;
  right:18px;
  height:44px;
  padding:0 18px;
}

.lightbox-close span {
  font-size:1.35rem;
  font-weight:400;
}

.lightbox-nav {
  top:50%;
  width:54px;
  height:54px;
  translate:0 -50%;
  font-size:1.35rem;
}

.lightbox-prev { left:18px; }
.lightbox-next { right:18px; }

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline:3px solid var(--clay-bright);
  outline-offset:3px;
}

.lightbox-count {
  position:absolute;
  bottom:22px;
  left:50%;
  margin:0;
  translate:-50% 0;
  color:rgba(242,237,228,.7);
  font:600 .75rem/1 var(--sans);
  letter-spacing:.18em;
}

html.lightbox-open {
  overflow:hidden;
}

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

.contact {
  z-index:7;
  padding:clamp(80px,10vw,150px) var(--pad) clamp(64px,8vw,110px);
  background:var(--clay);
  color:var(--paper);
  --focus:var(--paper);
}

.contact .section-label span {
  color:var(--paper);
}

.contact-title {
  margin:clamp(24px,4vw,48px) 0 clamp(40px,6vw,80px);
  font-family:var(--serif);
  font-size:min(17vw,11.5rem);
  line-height:.86;
  letter-spacing:-.02em;
}

.contact-title .line {
  display:block;
  overflow:hidden;
  /* Room for the descenders below the .86 line box. */
  padding:.06em .04em .26em;
  margin:-.06em -.04em -.26em;
}

.contact-title .line > * {
  display:inline-block;
}

.contact-grid {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:28px clamp(24px,4vw,64px);
  align-items:end;
  padding-top:clamp(28px,4vw,48px);
  border-top:1px solid rgba(242,237,228,.32);
}

.contact-portrait {
  width:clamp(110px,12vw,168px);
  aspect-ratio:4 / 5;
  overflow:hidden;
  border-radius:16px;
}

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

.contact-text {
  max-width:26em;
  font-size:clamp(1.05rem,1.4vw,1.25rem);
  line-height:1.55;
}

.contact-actions {
  display:grid;
  justify-items:end;
  gap:18px;
}

.contact-mail {
  padding-bottom:6px;
  font-family:var(--serif);
  font-size:clamp(1.9rem,4vw,4rem);
  line-height:1.05;
  background:linear-gradient(currentColor,currentColor) 0 100% / 100% 1.5px no-repeat;
  transition:background-size .55s var(--ease);
}

.footer {
  position:relative;
  z-index:7;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 28px;
  padding:28px var(--pad) calc(28px + env(safe-area-inset-bottom));
  background:var(--espresso);
  color:var(--muted-light);
  font-size:.875rem;
  --focus:var(--paper);
}

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

.footer a:hover {
  text-decoration:underline;
  text-underline-offset:4px;
}

.back-top {
  display:inline-flex;
  align-items:center;
  gap:.4em;
}

/* Hover only for precise pointers ------------------------------------- */

@media (hover:hover) and (pointer:fine) {
  .btn:hover {
    transform:translateY(-2px);
  }

  .btn-clay:hover {
    background:var(--clay-deep);
  }

  .talk:hover .talk-shot img {
    transform:scale(1.035);
  }

  .lightbox-close:hover,
  .lightbox-nav:hover {
    border-color:var(--paper);
    background:rgba(242,237,228,.18);
  }

  .btn-ghost:hover {
    border-color:var(--paper);
    background:rgba(242,237,228,.08);
  }

  .btn-paper:hover {
    background:#fff;
  }

  .btn:hover .i,
  .text-link:hover .i,
  .work-inner:hover .work-url .i {
    transform:translate(2px,-2px);
  }

  .btn:hover .i-down {
    transform:translateY(3px);
  }

  .text-link:hover,
  .contact-mail:hover {
    background-position:100% 100%;
    background-size:0 1px;
  }

  .cover-products a:hover {
    border-color:var(--paper);
    background:rgba(242,237,228,.08);
  }

  .work-inner:hover .work-url {
    background:var(--card-fg);
    color:var(--card-bg);
  }

  .work-inner:hover .screen {
    transform:translate3d(0,-4px,0);
  }

  .tour-steps button:hover {
    border-color:currentColor;
  }

  .stage-mode button:hover {
    color:var(--paper);
  }

  .focus-item summary:hover .plus,
  .note-detail summary:hover .plus {
    border-color:currentColor;
  }
}

/* Motion: hidden start states exist only once script.js has confirmed
   that motion is welcome and IntersectionObserver is available. ------ */

@media (prefers-reduced-motion:no-preference) {
  html {
    scroll-behavior:smooth;
  }

  /* The logo types itself once, the cursor blinks a few times and then
     rests. Hover or keyboard focus wakes it up again. */
  .logo-mark path {
    animation:lm-key .01s step-end both;
  }

  .logo-mark path:nth-of-type(1) { animation-delay:.25s; }
  .logo-mark path:nth-of-type(2) { animation-delay:.4s; }
  .logo-mark path:nth-of-type(3) { animation-delay:.55s; }

  .logo-mark .lm-caret {
    animation:lm-walk .62s step-end .1s both, lm-blink 1.06s step-end 1s 4;
  }

  /* Same list with lm-walk kept in place, so leaving the logo does not
     restart the walk; only the blink count changes. */
  .monogram:hover .lm-caret,
  .monogram:focus-visible .lm-caret {
    animation:lm-walk .62s step-end .1s both, lm-blink 1.06s step-end 1s infinite;
  }

  .cover-photo {
    animation:frame-in 1.5s var(--ease) both;
  }

  .cover-photo img {
    animation:photo-in 2.6s var(--ease) both;
  }

  .cover-name .line > * {
    animation:rise 1.25s var(--ease) .25s both;
  }

  .cover-name .line + .line > * {
    animation-delay:.4s;
  }

  .cover-copy > * {
    animation:fade-up 1s var(--ease) both;
  }

  .cover-copy > :nth-child(1) { animation-delay:.55s; }
  .cover-copy > :nth-child(2) { animation-delay:.65s; }
  .cover-copy > :nth-child(3) { animation-delay:.75s; }
  .cover-copy > :nth-child(4) { animation-delay:.85s; }
  .cover-copy > :nth-child(5) { animation-delay:.95s; }
}

@keyframes frame-in {
  from { clip-path:inset(100% 0 0 0); }
  to { clip-path:inset(0); }
}

@keyframes photo-in {
  from { scale:1.16; }
  to { scale:1; }
}

@keyframes rise {
  from { transform:translate3d(0,110%,0); }
  to { transform:none; }
}

@keyframes fade-up {
  from { opacity:0; transform:translate3d(0,20px,0); }
  to { opacity:1; transform:none; }
}

.motion .reveal {
  opacity:0;
  transform:translate3d(0,32px,0);
  transition:opacity .9s var(--ease),transform 1.1s var(--ease);
}

.motion .reveal.is-visible {
  opacity:1;
  transform:none;
}


.motion .reveal-clip .frame {
  clip-path:inset(22% 0 0 0 round 18px);
  transition:clip-path 1.4s var(--ease);
}

.motion .reveal-clip.is-visible .frame {
  clip-path:inset(0 0 0 0 round 18px);
}

.motion .strip-images {
  flex-wrap:nowrap;
  width:max-content;
  transform:translate3d(calc(var(--drift,0) * (100vw - 100%)),0,0);
}

.motion .strip-words {
  transform:translate3d(calc((1 - var(--drift,0)) * (100vw - 100%)),0,0);
}

.motion .work-card .screen {
  opacity:0;
  transform:translate3d(0,36px,0) scale(.97);
  transition:opacity .9s var(--ease),transform 1.2s var(--ease);
}

.motion .work-card.is-visible .screen {
  opacity:1;
  transform:none;
}

.motion .stage-copy > * {
  opacity:0;
  transition:opacity 1s var(--ease);
}

.motion .stage-copy > :nth-child(2) { transition-delay:.08s; }
.motion .stage-copy > :nth-child(3) { transition-delay:.16s; }
.motion .stage-copy > :nth-child(4) { transition-delay:.24s; }
.motion .stage-copy > :nth-child(5) { transition-delay:.32s; }

.motion .stage.is-visible .stage-copy > * {
  opacity:1;
}

.motion .steps li::before {
  border-color:var(--line);
  background:var(--paper);
}

.motion .steps li.is-reached::before {
  border-color:var(--clay);
  background:var(--clay);
}

.motion .wave i {
  transform:scaleY(.12);
}

.motion .note.is-visible .wave i {
  transform:none;
}

.motion .stamp {
  opacity:0;
  transform:rotate(-40deg) scale(.8);
}

.motion .note.is-visible .stamp {
  opacity:1;
  transform:rotate(-8deg);
}

.motion .contact-title .line > * {
  transform:translate3d(0,140%,0);
  transition:transform 1.2s var(--ease);
}

.motion .contact-title .line + .line > * {
  transition-delay:.12s;
}

.motion .contact-title.is-visible .line > * {
  transform:none;
}

@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    transition-delay:0s !important;
  }
}

/* Short desktop viewports --------------------------------------------- */

@media (min-width:900px) and (max-height:760px) {
  .cover-sub {
    display:none;
  }
}

@media (max-height:620px) {
  .work-card,
  .collab-photo,
  .philosophy-head {
    position:relative;
    top:auto;
  }
}

/* Tablet and phone ---------------------------------------------------- */

@media (max-width:899px) {
  .cover {
    --name-size:min(30vw,13rem);
    height:auto;
    min-height:0;
    padding:72px 0 calc(var(--sheet-radius) + 44px);
  }

  .cover-inner {
    position:relative;
    inset:auto;
    display:flex;
    flex-direction:column;
  }

  .cover-photo {
    position:relative;
    inset:auto;
    height:clamp(380px,64svh,760px);
    margin:0 8px;
    border-radius:22px;
    transform:translate3d(0,calc(var(--hero,0) * 4vh),0);
  }

  .cover-name {
    position:relative;
    order:1;
    left:auto;
    bottom:auto;
    margin-top:-1.12em;
    padding:0 var(--gutter);
    white-space:normal;
    transform:none;
  }

  .cover-name .line {
    display:block;
    width:fit-content;
  }

  .cover-name .line + .line {
    margin-left:-.06em;
  }

  .cover-copy {
    position:relative;
    order:2;
    inset:auto;
    width:auto;
    max-width:40rem;
    padding:28px var(--gutter) 0;
    opacity:1;
    transform:none;
  }

  .cover::after {
    display:none;
  }

  .cover-lede {
    font-size:clamp(2.1rem,8.6vw,3.6rem);
  }

  .editorial-grid,
  .collab-grid,
  .philosophy-grid {
    grid-template-columns:minmax(0,1fr);
  }

  .philosophy-head {
    position:relative;
    top:auto;
  }

  .editorial-photo {
    max-width:520px;
  }

  .editorial-copy {
    padding-bottom:0;
  }

  .work-head,
  .outlook-head {
    grid-template-columns:minmax(0,1fr);
  }

  .work-intro,
  .outlook-head > p:last-child {
    justify-self:start;
  }

  .talks-head {
    grid-template-columns:minmax(0,1fr);
  }

  .talks-head > p:last-child {
    justify-self:start;
  }

  .talks-gallery {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-flow:row dense;
  }

  .talk-half { grid-column:span 2; }
  .talk-third { grid-column:span 1; }
  .talk-slide { grid-column:span 2; }
  .talk-slide .talk-shot { aspect-ratio:7 / 6; }

  .talks-offer {
    grid-template-columns:minmax(0,1fr);
  }

  .talk figcaption {
    display:block;
  }

  .talk figcaption span {
    display:block;
    margin-bottom:6px;
  }

  .lightbox-stage {
    padding:68px 14px 96px;
  }

  .lightbox-img {
    width:min(var(--nw,1200px),calc(100vw - 56px),calc((100dvh - 290px) * var(--ar,.75)));
  }

  .lightbox-nav {
    top:auto;
    bottom:16px;
    translate:none;
  }

  .lightbox-count {
    bottom:36px;
  }

  .work-card {
    position:relative;
    top:auto;
  }

  .work-inner {
    grid-template-columns:minmax(0,1fr);
    height:auto;
    min-height:0;
    border-radius:24px;
    box-shadow:none;
    transform:none;
  }

  .work-inner::after {
    display:none;
  }

  .work-link::after {
    border-radius:24px;
  }

  .work-media {
    /* Content plus a reserved caption band defines the height, so project art
       never runs into the caption on narrow screens. */
    min-height:clamp(240px,62vw,440px);
    margin:8px 8px 0;
    padding:36px 20px 60px;
    border-radius:18px;
  }

  .media-screen {
    min-height:0;
    padding:clamp(12px,3vw,22px) clamp(10px,3vw,22px) 16px;
  }

  .screen-stage {
    container-type:inline-size;
  }

  .screen {
    width:100%;
    border-radius:10px;
  }

  .tour-note {
    min-height:4.35em;
  }

  .tour {
    justify-items:stretch;
  }

  .tour-steps {
    display:grid;
    grid-auto-columns:minmax(0,1fr);
    grid-auto-flow:column;
    gap:4px;
  }

  .tour-steps button {
    padding:0 4px;
    font-size:.75rem;
    white-space:nowrap;
    text-overflow:ellipsis;
  }

  .work-body {
    gap:16px;
    padding:22px 22px 26px;
  }

  .work-meta {
    margin-bottom:8px;
  }

  /* Phone order: label and heading, then the photo, then the details. */
  .collab-copy {
    display:contents;
  }

  .collab-photo {
    position:relative;
    top:auto;
    order:1;
  }

  .collab-copy > :nth-child(n+3) {
    order:2;
  }

  .collab-photo .frame {
    max-height:none;
  }

  .outlook-grid {
    grid-template-columns:minmax(0,1fr);
  }

  .note,
  .note:first-child,
  .note:last-child {
    padding:28px 0 8px;
    border-left:0;
  }

  .note + .note {
    border-top:1px solid var(--line);
  }

  .wave,
  .stamp,
  .handle {
    height:auto;
    min-height:0;
  }

  .wave {
    height:96px;
  }

  .stamp {
    width:116px;
    height:116px;
  }

  .contact-grid {
    grid-template-columns:auto minmax(0,1fr);
  }

  .contact-actions {
    grid-column:1 / -1;
    justify-items:start;
  }
}

@media (max-width:760px) {
  .site-header {
    top:8px;
  }

  .nav {
    flex-wrap:wrap;
    justify-content:space-between;
    width:100%;
    border-radius:26px;
  }

  .js-nav .menu-toggle {
    display:inline-flex;
  }

  .nav-links {
    flex-basis:100%;
    flex-wrap:wrap;
    justify-content:center;
  }

  .js-nav .nav-links {
    display:none;
    flex-direction:column;
    align-items:stretch;
    padding:10px 2px 4px;
  }

  .js-nav .nav.is-open .nav-links {
    display:flex;
  }

  .js-nav .nav-links a {
    padding:15px 16px;
    font-size:1.0625rem;
  }

  .js-nav .nav-links .nav-contact {
    margin:6px 0 0;
    text-align:center;
  }

  .nav-progress {
    left:30px;
    right:30px;
  }

  .focus-item summary {
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px 16px;
  }

  .focus-tag {
    grid-column:1 / -1;
  }

  .focus-item p {
    padding:0 0 22px;
  }
}

@media (max-width:520px) {
  .stage:not(.is-wide) .stage-count {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .stage-sim {
    flex-wrap:wrap;
  }

  .screen-bar {
    grid-template-columns:auto minmax(0,1fr);
  }

  .screen-dots {
    display:none;
  }

  .cover-actions .btn {
    flex:1 1 auto;
  }

  .facts {
    grid-template-columns:minmax(0,1fr);
    gap:14px;
  }

  .contact-grid {
    grid-template-columns:minmax(0,1fr);
  }

  .contact-portrait {
    width:104px;
  }

  .principle {
    grid-template-columns:2.1rem minmax(0,1fr);
    gap:8px 12px;
  }

  .work-meta {
    flex-direction:column;
    gap:6px;
  }
}

@media (max-width:899px) and (prefers-reduced-motion:no-preference) {
  .motion .reveal {
    transform:translate3d(0,20px,0);
  }
}

/* Very narrow phones: four tour steps as two rows */
@media (max-width:380px) {
  .tour-steps:has(> :nth-child(4)) {
    grid-auto-flow:row;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@keyframes lm-key {
  from { opacity:0; }
  to { opacity:1; }
}

@keyframes lm-walk {
  0% { transform:translateX(-1405px); }
  25% { transform:translateX(-858px); }
  50% { transform:translateX(-258px); }
  75%, 100% { transform:none; }
}

@keyframes lm-blink {
  0% { opacity:1; }
  50% { opacity:0; }
}

/* Footer on narrow screens: two tidy columns ------------------------- */

@media (max-width: 719px) {
  .footer {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 20px;
  }
  .footer > span:first-child {
    grid-column:1 / -1;
  }
}

/* ATLAS: phone and browser on one stage ------------------------------
   The app stands in front, the clinic view behind it. The tour moves the
   device of the current step to the front. Individual translate and scale
   properties leave the reveal transform of .screen untouched. */

.card-atlas .stage-duo {
  position:relative;
  place-items:stretch;
  container-type:size;
}

.card-atlas .stage-duo > [data-device] {
  grid-area:1 / 1;
  z-index:1;
  transition:transform 1.2s var(--ease),opacity .9s var(--ease),translate 1s var(--ease),scale 1s var(--ease),filter 1s var(--ease);
}

.card-atlas .stage-duo > .is-front {
  z-index:2;
}

.card-atlas .stage-duo .device-browser {
  align-self:center;
  justify-self:start;
  width:min(84cqw,calc((92cqh - 30px) * 1.6));
}

.card-atlas .stage-duo .device-phone {
  align-self:end;
  justify-self:end;
  height:100cqh;
  aspect-ratio:540 / 896;
  margin:0 3cqw 0 0;
  overflow:hidden;
  border:6px solid #0f0d0c;
  border-bottom:0;
  border-radius:34px 34px 0 0;
  background:#0f0d0c;
  box-shadow:0 30px 60px -24px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.22);
  -webkit-mask-image:linear-gradient(#000 80%,transparent);
  mask-image:linear-gradient(#000 80%,transparent);
}

.card-atlas .phone-view {
  aspect-ratio:auto;
  height:100%;
  border-radius:28px 28px 0 0;
  background:#0f0d0c;
}

.card-atlas .phone-view .screen-focus {
  border-radius:18px;
}

.card-atlas .stage-duo > [data-device]:not(.is-front) {
  filter:brightness(.55) saturate(.8);
}

.card-atlas .stage-duo .device-browser:not(.is-front) {
  translate:0 4cqh;
  scale:.9;
  transform-origin:0 50%;
}

.card-atlas .stage-duo .device-phone:not(.is-front) {
  translate:2cqw 6cqh;
  scale:.9;
}

.motion .card-atlas .device-phone {
  opacity:0;
  transform:translate3d(0,48px,0);
}

.motion .card-atlas.is-visible .device-phone {
  opacity:1;
  transform:none;
  transition-delay:.15s;
}

@media (max-width:899px) {
  .card-atlas .stage-duo {
    container-type:size;
    aspect-ratio:5 / 4;
  }

  .card-atlas .stage-duo .device-browser {
    width:84cqw;
    border-radius:10px;
  }

  .card-atlas .stage-duo .device-phone {
    border-width:4px;
    border-radius:24px 24px 0 0;
  }

  .card-atlas .phone-view {
    border-radius:20px 20px 0 0;
  }
}


@media (max-width:599px) {
  .card-atlas .stage-duo .screen-bar {
    grid-template-columns:auto minmax(0,1fr);
  }

  .card-atlas .stage-duo .screen-url {
    display:none;
  }
}

