@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #1c1c1c;
  --surface: #262626;
  --ink: #f1f1ef;
  --muted: #a6a7a2;
  --accent: #8fa68e;
  --accent-ink: #1c1c1c;
  --field: #c8c5ba;
  --field-ink: #1c1c1c;
  --field-muted: #4a4a45;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 8vw, 7.5rem);

  --m: clamp(1rem, 0.4rem + 1.6vw, 1.5rem);
  --gap-section: clamp(6rem, 12vw, 12rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bar-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #55564f var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-body);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mirror :focus-visible, .contact :focus-visible, .run :focus-visible, .bar :focus-visible { outline-color: currentColor; }

.skip { position: absolute; left: var(--m); top: -4rem; z-index: 20; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; }
.skip:focus { top: 0.5rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: var(--step-small);
  line-height: 1;
  padding: 0.85rem 1.15rem;
  transition: transform 160ms var(--ease), background-color 160ms ease;
}
.btn:hover { background: var(--ink); }
.btn:active { transform: scale(0.96); }

/* ---------- Bar ---------- */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  height: var(--bar-h);
  padding: 0 var(--m);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  color: #16181a;
  font-size: var(--step-small);
  font-weight: 500;
}
.bar__mark { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.03em; }
.bar__nav { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
.bar__nav a, .lang button, .foot a, .contact__yt, .formats a { transition: opacity 160ms ease; }
.bar__nav a:hover, .foot a:hover, .contact__yt:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
.bar__end { display: flex; align-items: center; gap: 1rem; }
.lang { display: flex; gap: 0.15rem; }
.lang button { padding: 0.6rem 0.45rem; font-weight: 500; }
.lang button[aria-pressed="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; }
.bar .btn { background: #16181a; color: #f1f1ef; }
.bar .btn:hover { background: #3a3d40; }

/* ---------- The pinned run ---------- */
.run {
  --plate-w: min(37vw, calc((100svh - 9.5rem) * 0.75));
  --wing: min(19svh, 12vw);
}
.run { position: relative; color: #16181a; }
.panel {
  position: sticky; top: 0;       /* each drawing slides over the last; the name above them never moves */
  height: 100svh;
  min-height: 34rem;
  background: var(--ground);
  display: grid;
  place-items: center;
  padding-top: var(--bar-h);
}
.wings-track { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.wings {
  position: sticky; top: 0;
  height: 100svh; min-height: 34rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-size: var(--wing);
}
.wing {
  position: absolute;
  top: calc(50% + var(--bar-h) / 2);
  writing-mode: vertical-rl;
  white-space: nowrap;
}
.wing--l { right: calc(50% + var(--plate-w) / 2 + 0.14em); transform: translateY(-50%) rotate(180deg); }
.wing--r { left: calc(50% + var(--plate-w) / 2 + 0.14em); transform: translateY(-50%); }

.plate {
  width: var(--plate-w);
  aspect-ratio: 3 / 4;
}
.plate img { width: 100%; height: 100%; object-fit: contain; }

.panel__l, .panel__r { position: absolute; bottom: 2rem; width: 15rem; max-width: 22vw; }
.panel__l { left: var(--m); }
.panel__r { right: var(--m); text-align: right; }
.panel h2 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.lede { font-size: var(--step-body); font-weight: 500; line-height: 1.35; margin-bottom: 1.5rem; text-wrap: pretty; }
.formats { font-size: var(--step-body); }
.formats a { display: inline-flex; gap: 0.6em; padding: 0.3rem 0; }
.formats a span { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1.5px; }
.formats a:hover span { text-decoration-thickness: 3px; }
.formats b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Look closer ---------- */
.closer { position: relative; height: 300svh; background: var(--bg); }
.closer__stage {
  position: sticky; top: 0; height: 100svh; min-height: 34rem;
  display: grid; place-items: center;
  overflow: hidden;
}
.closer__frame {
  width: min(30vw, calc((100svh - 2 * var(--step-display) - 6rem) * 0.75));
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d7dad2;
}
.closer__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 21%;
  transition: transform 900ms var(--ease);
}
.closer__h { position: absolute; inset: 0; pointer-events: none; font-size: var(--step-display); font-weight: 600; letter-spacing: -0.04em; line-height: 0.92; }
.closer__a, .closer__b { position: absolute; left: 0; right: 0; text-align: center; z-index: 2; }
.closer__a { top: calc(50% - min(20vw, (100svh - 2 * var(--step-display) - 6rem) * 0.5) - 1.12em); }
.closer__b { top: calc(50% + min(20vw, (100svh - 2 * var(--step-display) - 6rem) * 0.5) + 0.2em); }
.closer__cap {
  position: absolute; top: calc(50% - min(20vw, (100svh - 2 * var(--step-display) - 6rem) * 0.5));
  left: calc(50% + min(15vw, (100svh - 2 * var(--step-display) - 6rem) * 0.375) + 2rem);
  max-width: 28ch;
  font-size: var(--step-body);
}
.closer__marks { position: absolute; inset: 0; pointer-events: none; }
.closer__marks i { display: block; height: 100svh; }
.js .closer__b, .js .closer__cap { opacity: 0; transform: translateY(1.5rem); transition: opacity 500ms ease, transform 700ms var(--ease); }
.js [data-stage="2"] .closer__b, .js [data-stage="3"] .closer__b, .js [data-stage="3"] .closer__cap { opacity: 1; transform: none; }
.js [data-stage="2"] .closer__frame img { transform: scale(2.3); }
.js [data-stage="3"] .closer__frame img { transform: scale(3.6); transform-origin: 13% 46%; }

/* ---------- Move the mirror ---------- */
.mirror {
  background: var(--field); color: var(--field-ink);
  padding: var(--gap-section) var(--m);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); align-items: end;
}
.mirror__pane { grid-column: 1 / span 6; }
.mirror__canvas, .mirror__still {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  background: #d7dad2;
  touch-action: pan-y;
  cursor: ew-resize;
}
html:not(.js) .mirror__canvas { display: none; }
.mirror__text { grid-column: 8 / span 5; padding-bottom: 0.25rem; }
.mirror h2 { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; margin-bottom: 1.25rem; }
.mirror__text > p { max-width: 34ch; text-wrap: pretty; }
.mirror__controls { margin-top: 2.5rem; display: grid; gap: 1.5rem; max-width: 26rem; }
.field { display: grid; gap: 0.6rem; font-size: var(--step-small); font-weight: 600; }
.field input[type="range"] { width: 100%; accent-color: var(--field-ink); height: 2rem; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 500; cursor: pointer; }
.check input { width: 1.4rem; height: 1.4rem; accent-color: var(--field-ink); margin: 0; }
.pick { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pick button {
  font-size: var(--step-small); font-weight: 600; line-height: 1;
  padding: 0.8rem 0.95rem;
  background: #b4b1a5; color: var(--field-ink);
  transition: transform 160ms var(--ease), background-color 160ms ease, color 160ms ease;
}
.pick button:hover { background: #a3a093; }
.pick button:active { transform: scale(0.96); }
.pick button[aria-pressed="true"] { background: var(--field-ink); color: var(--field); }

/* ---------- The collection ---------- */
html:not(.js) .shop { display: none; }
.shop {
  padding: var(--gap-section) var(--m);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); align-items: start;
}
.shop__photo {
  grid-column: 1 / span 5; grid-row: 1 / span 2;
  position: sticky; top: 9svh;
  height: 82svh; max-height: 46rem;
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
.shop__photo img {
  grid-area: 1 / 1;
  width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: left top;
  opacity: 0; transition: opacity 320ms ease;
}
.shop__photo img.is-on { opacity: 1; }
.shop__list { grid-column: 7 / span 6; grid-row: 2; }
.shop h2 { grid-column: 7 / span 6; grid-row: 1; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; margin-bottom: 3rem; }
.row__head {
  width: 100%; min-height: 3.75rem; padding: 0.7rem 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  text-align: left; color: var(--muted);
  font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.01em;
  transition: color 200ms ease, transform 300ms var(--ease);
}
.row__name i { font-style: normal; font-size: var(--step-body); margin-left: 0.4em; letter-spacing: 0; }
.row__price { font-size: var(--step-body); font-variant-numeric: tabular-nums; }
.row.is-on .row__head { color: var(--ink); font-weight: 500; }
.row__head:hover { color: var(--ink); transform: translateX(0.4rem); }
.row__more { display: grid; grid-template-rows: 1fr; }
.js .row__more { grid-template-rows: 0fr; transition: grid-template-rows 380ms var(--ease); }
.js .row.is-on .row__more { grid-template-rows: 1fr; }
.row__more > div { overflow: hidden; }
.js .row:not(.is-on) .row__more > div { visibility: hidden; }
.row__more p { max-width: 44ch; font-size: var(--step-body); color: var(--ink); text-wrap: pretty; }
.row__more .row__spec { color: var(--muted); margin-top: 0.5rem; font-variant-numeric: tabular-nums; }
.row__more .btn { margin: 1.1rem 0 1.75rem; }

/* ---------- Orders ---------- */
.orders {
  background: var(--surface);
  padding: var(--gap-section) var(--m);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); row-gap: 3.5rem;
}
.step h2, .step h3 { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.step p { margin-top: 0.85rem; max-width: 38ch; color: var(--ink); text-wrap: pretty; }
.step:nth-child(1) { grid-column: 1 / -1; }
.step:nth-child(2) { grid-column: 3 / -1; }
.step:nth-child(3) { grid-column: 5 / -1; }
.step:nth-child(4) { grid-column: 7 / -1; }
.step--last h3 { color: var(--accent); }

/* ---------- Contact ---------- */
.contact {
  background: var(--field); color: var(--field-ink);
  min-height: 100svh;
  padding: clamp(2rem, 5vw, 4rem) var(--m) 2rem;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; row-gap: 2rem;
}
.contact__say { grid-column: 1 / -1; font-size: var(--step-lead); font-weight: 500; max-width: 18ch; line-height: 1.2; }
.contact__mail {
  grid-column: 1 / -1; align-self: end;
  font-size: calc((100vw - 2 * var(--m)) / 10.35);
  font-weight: 400; letter-spacing: -0.045em; line-height: 0.95; white-space: nowrap;
  transition: color 200ms ease;
}
.contact__mail:hover { color: #46604a; }
.contact__place, .contact__yt { font-size: var(--step-body); font-weight: 500; align-self: end; }
.contact__yt { justify-self: end; text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Footer ---------- */
.foot {
  padding: clamp(5rem, 12vw, 10rem) var(--m) 1.5rem;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--m); row-gap: 4.5rem;
  overflow: hidden;
}
.foot__name {
  grid-column: 1 / -1;
  font-size: calc((100vw - 2 * var(--m)) / 6.9);
  font-weight: 600; letter-spacing: -0.045em; line-height: 0.9; white-space: nowrap;
}
.foot__places { grid-column: 1 / span 6; font-size: var(--step-lead); line-height: 1.35; font-weight: 500; }
.foot__places a { color: var(--accent); }
.foot__links { grid-column: span 3; font-size: var(--step-small); line-height: 2.2; }
.foot__legal { grid-column: 1 / span 8; font-size: var(--step-small); color: var(--muted); }
.foot__top { grid-column: span 4; justify-self: end; font-size: var(--step-small); }

/* ---------- Entrances (content is visible without script) ---------- */
.js .rise { opacity: 0; transform: translateY(1.75rem); }
.js .rise.is-in { opacity: 1; transform: none; transition: opacity 600ms ease, transform 900ms var(--ease); transition-delay: var(--d, 0ms); }

@keyframes unfold-l { from { clip-path: inset(0 100% 0 0); translate: 0.5em 0; } to { clip-path: inset(0); translate: 0 0; } }
@keyframes unfold-r { from { clip-path: inset(0 100% 0 0); translate: -0.5em 0; } to { clip-path: inset(0); translate: 0 0; } }
@keyframes plate-in { from { opacity: 0; scale: 0.94; } to { opacity: 1; scale: 1; } }
@keyframes drift { from { scale: 1.06; } to { scale: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .panel--first .plate { animation: plate-in 900ms var(--ease) both; }
  @media (min-width: 1100px) {
    #drawings .wing--l { animation: unfold-l 1100ms var(--ease) 250ms both; }
    #drawings .wing--r { animation: unfold-r 1100ms var(--ease) 250ms both; }
  }
  @supports (animation-timeline: view()) {
    .panel:not(.panel--first) .plate img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .js .rise { opacity: 1; transform: none; }
  .js .closer__b, .js .closer__cap { opacity: 1; transform: none; }
}

/* ---------- Below 1100px: the name lies flat across the top ---------- */
@media (max-width: 1099px) {
  .bar__nav { display: none; }
  .run {
    --wing: calc((100vw - 2 * var(--m)) / 7.75);
    --title-top: calc(var(--bar-h) - 0.25rem);
    --plate-w: min(calc(100vw - 2 * var(--m)), calc((100svh - var(--bar-h) - var(--wing) - 13rem) * 0.75));
  }
  .wings { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--title-top) var(--m) 0; }
  .wing { position: static; writing-mode: horizontal-tb; transform: none; }
  .panel {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: calc(var(--title-top) + var(--wing) + 0.75rem) var(--m) 1.25rem;
  }
  .plate { align-self: center; flex: none; }
  .panel__l, .panel__r { position: static; width: auto; max-width: none; text-align: left; }
  .panel__l { margin-top: 1rem; display: flex; flex-direction: column-reverse; }
  .lede { margin: 0.5rem 0 0; }
  .panel__r { margin-top: 0.35rem; display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
  .formats a { padding: 0.45rem 0; }

  .closer__frame { width: min(70vw, calc((100svh - 2 * var(--step-display) - 11rem) * 0.75)); }
  .closer__a { top: calc(50% - min(46.7vw, (100svh - 2 * var(--step-display) - 11rem) * 0.5) - 1.12em); }
  .closer__b { top: calc(50% + min(46.7vw, (100svh - 2 * var(--step-display) - 11rem) * 0.5) + 0.2em); }
  .closer__cap {
    left: var(--m); right: var(--m); max-width: none; text-align: center;
    top: calc(50% + min(46.7vw, (100svh - 2 * var(--step-display) - 11rem) * 0.5) + 0.2em + var(--step-display) + 0.75rem);
  }

  .mirror { display: flex; flex-direction: column; align-items: stretch; gap: 2rem; }
  .mirror__text { order: -1; display: contents; }
  .mirror h2 { order: -2; margin: 0; }
  .mirror__text > p { order: -1; }
  .mirror__controls { margin-top: 0; max-width: none; }

  .shop { display: block; }
  .shop__photo { top: 0; height: 40svh; z-index: 2; background: var(--bg); margin: 0 calc(-1 * var(--m)); padding: 0.75rem var(--m); }
  .shop__photo img { object-position: center; }
  .shop h2 { margin: 0 0 1.25rem; }
  .rows { margin-top: 0.75rem; }

  .orders { row-gap: 2.5rem; }
  .step h2, .step h3 { white-space: normal; }
  .step:nth-child(n) { grid-column: 1 / -1; }
  .step:nth-child(2) { margin-left: 6vw; }
  .step:nth-child(3) { margin-left: 12vw; }
  .step:nth-child(4) { margin-left: 18vw; }

  .contact { min-height: 86svh; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; row-gap: 0.75rem; }
  .contact__mail { font-size: calc((100vw - 2 * var(--m)) / 8.6); white-space: normal; align-self: center; }
  .contact__mail span { display: block; }
  .contact__yt { justify-self: start; }

  .foot { row-gap: 2.5rem; }
  .foot__places { grid-column: 1 / -1; }
  .foot__links { grid-column: span 6; }
  .foot__legal { grid-column: 1 / span 8; }
}
