/* ==========================================================================
   FORM & FRAME — base: tokens, type, nav, buttons, shared pieces
   ========================================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/instrument-sans-italic-latin.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --display: "Bricolage Grotesque", "Arial Narrow", Impact, sans-serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ink: #0e0e0d;
  --ink-2: #171716;
  --bone: #f3efe7;
  --bone-2: #e8e3d8;
  --accent: #ff4b1f;
  --accent-ink: #c92f0a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --gut: clamp(18px, 4vw, 64px);
  --nav-h: 76px;
}

.dark   { --bg: var(--ink); --fg: var(--bone); --mut: rgba(243, 239, 231, 0.6); --line: rgba(243, 239, 231, 0.16); --acc-t: var(--accent); background: var(--bg); color: var(--fg); }
.light  { --bg: var(--bone); --fg: var(--ink); --mut: rgba(14, 14, 13, 0.62); --line: rgba(14, 14, 13, 0.16); --acc-t: var(--accent-ink); background: var(--bg); color: var(--fg); }
.accent { --bg: var(--accent); --fg: var(--ink); --mut: rgba(14, 14, 13, 0.72); --line: rgba(14, 14, 13, 0.28); --acc-t: var(--ink); background: var(--bg); color: var(--fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; min-width: 320px; font-family: var(--sans); font-size: 1rem; line-height: 1.55; background: var(--ink); color: var(--bone); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, dl, dd, address { margin: 0; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.light :focus-visible, .accent :focus-visible { outline-color: var(--ink); }

/* subtle paper grain over the whole page */
body::after { content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.skip { position: fixed; left: 12px; top: -60px; z-index: 500; padding: 10px 16px; background: var(--accent); color: var(--ink); font-weight: 600; transition: top 0.2s; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* Type */
.d { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.88; }
.h2 { font-size: clamp(2.2rem, 11vw, 9.2rem); }
@media (min-width: 900px) { .h2 { font-size: clamp(2.9rem, 9.5vw, 9.2rem); } }
.lbl { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5; }
.lbl > span:first-child { color: var(--acc-t); margin-right: 0.5em; }
.acc { color: var(--acc-t); }
.acc-t { color: var(--acc-t); font-weight: inherit; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.5; color: var(--mut); max-width: 34rem; text-wrap: pretty; }
.fine { font-size: 0.82rem; color: var(--mut); max-width: 32rem; }
.note { font-size: 0.92rem; color: var(--mut); }
.ulink { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 1px; transition: background-size 0.5s var(--ease); }
.ulink:hover { background-size: 0 1px; background-position: 100% 100%; }

.sec { position: relative; padding-block: clamp(5rem, 11vw, 10rem); }
.sec-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.6rem, 6vw, 5rem); }
.sec-head .lbl { color: var(--mut); }
.sec-head__side { display: grid; gap: 0.7rem; max-width: 24rem; font-size: 1.15rem; }
.sec-head__side p:first-child { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: 1fr auto; align-items: end; }
  .sec-head .lbl { grid-column: 1 / -1; }
}

/* Masked line reveal */
.ln { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.ln > span { display: block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
[data-lines].is-in .ln > span, html:not(.js) .ln > span { transform: none; }
[data-lines].is-in .ln:nth-child(2) > span { transition-delay: 0.1s; }
[data-lines].is-in .ln:nth-child(3) > span { transition-delay: 0.2s; }
[data-lines].is-in .ln:nth-child(4) > span { transition-delay: 0.3s; }

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 100ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Image mask reveal */
.ph { position: relative; overflow: hidden; background: var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.8s var(--ease); }
.ph::after { content: ""; position: absolute; inset: -1px; z-index: 2; background: var(--bg); transform-origin: 50% 0; transition: transform 1.2s var(--ease-io); pointer-events: none; }
.ph.is-in::after, html:not(.js) .ph::after { transform: scaleY(0); }
.ph.is-in img, html:not(.js) .ph img { transform: none; }

/* Buttons */
.btn {
  --b-bg: transparent; --b-fg: currentColor; --b-bd: currentColor; --b-hbg: currentColor; --b-hfg: var(--bg);
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 1.2rem; overflow: hidden; isolation: isolate;
  min-height: 52px; padding: 0.85rem 1.3rem; border: 1.5px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; line-height: 1;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--b-hbg); transform: translateY(101%); transition: transform 0.55s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover, .btn:focus-visible { color: var(--b-hfg); border-color: var(--b-hbg); }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform 0.45s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(0.985); }
.btn--accent { --b-bg: var(--accent); --b-fg: var(--ink); --b-bd: var(--accent); --b-hbg: var(--bone); --b-hfg: var(--ink); }
.dark .btn--accent:hover, .dark .btn--accent:focus-visible { border-color: var(--bone); }
.light .btn--accent { --b-hbg: var(--ink); --b-hfg: var(--bone); }
.light .btn--accent:hover { border-color: var(--ink); }
.btn--line { --b-bd: rgba(243,239,231,0.5); --b-hbg: var(--bone); --b-hfg: var(--ink); }
.btn--line:hover { border-color: var(--bone); }
.btn--ink { --b-bg: var(--ink); --b-fg: var(--bone); --b-bd: var(--ink); --b-hbg: var(--accent); --b-hfg: var(--ink); }
.btn--ink:hover { border-color: var(--accent); }
.btn--line-dark { --b-bd: var(--ink); --b-hbg: var(--ink); --b-hfg: var(--bone); }
.btn--sm { min-height: 44px; padding: 0.6rem 1rem; font-size: 0.72rem; }
.btn--lg { min-height: 60px; padding-inline: 1.6rem; }
.btn--block { width: 100%; }

/* Navigation */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; color: var(--bone); transition: background-color 0.5s var(--ease), border-color 0.5s, transform 0.6s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(14, 14, 13, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(243,239,231,0.12); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: var(--nav-h); max-width: 1600px; margin-inline: auto; padding-inline: var(--gut); transition: height 0.5s var(--ease); }
.nav.is-solid .nav__in { height: 64px; }

.logo { display: inline-grid; gap: 1px; font-family: var(--display); font-weight: 800; font-size: 0.92rem; letter-spacing: 0.06em; line-height: 1; }
.logo i { font-style: normal; color: var(--accent); margin-right: 0.25em; }
.logo span:last-child { display: block; }

.nav__links { display: none; margin-left: auto; gap: clamp(1rem, 1.7vw, 2rem); }
.nav__links a { position: relative; padding: 0.7rem 0; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.nav__links sup { margin-right: 0.3em; font-size: 0.6rem; color: var(--accent); letter-spacing: 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: none; }

.burger { position: relative; width: 48px; height: 48px; margin-right: -12px; margin-left: auto; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; transition: transform 0.6s var(--ease), top 0.6s var(--ease); }
.burger span:first-child { top: 19px; } .burger span:last-child { top: 27px; }
.menu-open .burger span:first-child { top: 23px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 23px; transform: rotate(-45deg); }
.menu-open, .menu-open body { overflow: hidden; }
.menu-open .nav { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }

.mmenu { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: calc(var(--nav-h) + 12px) var(--gut) calc(24px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bone); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.9s var(--ease-io), visibility 0s linear 0.9s; overflow-y: auto; }
.menu-open .mmenu { clip-path: inset(0); visibility: visible; transition: clip-path 0.9s var(--ease-io), visibility 0s; }
.mmenu nav { display: grid; margin-block: auto; }
.mmenu nav a { display: flex; align-items: baseline; gap: 1rem; padding: 0.1em 0; border-bottom: 1px solid rgba(243,239,231,0.14); overflow: hidden; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.8rem, 15vw, 5.4rem); letter-spacing: -0.035em; line-height: 1.05; transform: translateY(40px); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.4s; }
.menu-open .mmenu nav a { transform: none; opacity: 1; transition: transform 1s var(--ease), opacity 0.7s; transition-delay: calc(0.35s + var(--i) * 70ms); }
.mmenu nav a sup { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent); }
.mmenu nav a:hover, .mmenu nav a:active { color: var(--accent); }
.mmenu__foot { display: grid; gap: 1.2rem; }
.mmenu__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-size: 0.9rem; color: rgba(243,239,231,0.7); }
.mmenu__links a { min-height: 32px; display: inline-flex; align-items: center; color: var(--bone); border-bottom: 1px solid var(--accent); }

@media (min-width: 1220px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .burger, .mmenu { display: none; }
  .nav__links { margin-left: auto; margin-right: 1rem; }
}

/* Cursor */
.cur { position: fixed; left: 0; top: 0; z-index: 400; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; display: none; }
.cur span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; transform: scale(0); transition: transform 0.5s var(--ease); }
.cur.is-on span { transform: scale(1); }
@media (hover: hover) and (pointer: fine) { .cur { display: block; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .cur { display: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .ln > span { transform: none; }
}
