/* ---------- Tokens ---------- */
:root {
  --paper: #EDECE1;
  --paper-2: #E5E3D6;
  --paper-3: #D8D5C5;
  --ink: #1A1916;
  --ink-2: rgba(26, 25, 22, .72);
  --ink-3: rgba(26, 25, 22, .5);
  --line: rgba(26, 25, 22, .13);
  --line-2: rgba(26, 25, 22, .26);
  --brick: #A8462A;
  --brick-2: #C9653F;
  --night: #161512;
  --night-2: #201F1B;
  --on-night: #EDECE1;
  --on-night-2: rgba(237, 236, 225, .7);
  --on-night-3: rgba(237, 236, 225, .42);
  --line-night: rgba(237, 236, 225, .13);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --out: cubic-bezier(.16, 1, .3, 1);
  --io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 72px;
  --radius: 14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--brick); color: var(--paper); }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
em { font-style: italic; }
.section { padding: clamp(96px, 14vw, 180px) var(--gutter); }
.h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6.4vw, 96px); line-height: .98; letter-spacing: -.025em; font-variation-settings: "opsz" 144; }
.h2 em, .work__title em, .contact__title em, .frame__caption h2 em, .hero__title em { font-weight: 300; color: var(--brick); }

.section-head { display: flex; gap: 14px; align-items: center; color: var(--ink-3); margin-bottom: clamp(32px, 5vw, 64px); }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Split-text helpers (filled in by JS) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; will-change: transform; }

/* ---------- Buttons & links ---------- */
.btn {
  --b: var(--ink); --f: var(--paper);
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 22px 0 24px; border-radius: 999px;
  background: var(--b); color: var(--f);
  font-weight: 500; font-size: 15px; overflow: hidden; isolation: isolate;
  transition: color .5s var(--out);
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--brick); border-radius: inherit; transform: translateY(101%); transition: transform .55s var(--out); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--out); }
.btn:hover svg { transform: translateX(3px); }
.btn--light { --b: var(--paper); --f: var(--ink); }
.btn--light:hover { color: var(--paper); }
.btn--ghost { --b: transparent; --f: var(--on-night); box-shadow: inset 0 0 0 1px var(--line-night); }
.link { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; position: relative; padding-bottom: 4px; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: right; transition: transform .6s var(--out); }
.link:hover::after { transform: scaleX(0); }
.link span { transition: transform .5s var(--out); }
.link:hover span { transform: translateX(4px); }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 200; background: var(--paper); display: none; place-items: center; }
.js .loader { display: grid; }
.loader.is-skipped { display: none !important; }
.loader__inner { width: min(420px, 78vw); }
.loader__draw { width: 100%; height: auto; overflow: visible; }
.loader__draw path { stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.loader__row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 26px; }
.loader__name { font-family: var(--serif); font-size: 26px; font-weight: 300; letter-spacing: -.01em; }
.loader__count { color: var(--ink-3); }
.loader__bar { height: 1px; background: var(--line); margin-top: 12px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; background: var(--brick); transform-origin: left; transform: scaleX(0); }

/* ---------- Cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--brick); }
.cursor__ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1px solid var(--ink-3); display: grid; place-items: center;
  transition: width .45s var(--out), height .45s var(--out), margin .45s var(--out), background-color .3s, border-color .3s, opacity .3s;
}
.cursor__label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); opacity: 0; transition: opacity .25s; }
.cursor.is-label .cursor__ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--ink); border-color: var(--ink); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor.is-hover .cursor__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--brick); }
.cursor.is-hidden { opacity: 0; }
.cursor.on-dark .cursor__ring { border-color: var(--on-night-3); }
.cursor.on-dark.is-label .cursor__ring { background: var(--paper); border-color: var(--paper); }
.cursor.on-dark.is-label .cursor__label { color: var(--ink); }

/* ---------- Progress ---------- */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--brick); transform-origin: left; transform: scaleX(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: transform .6s var(--out), background-color .4s, color .4s;
}
.nav.is-scrolled { background: rgba(237, 236, 225, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.on-dark { color: var(--on-night); }
.nav.on-dark.is-scrolled { background: rgba(22, 21, 18, .78); box-shadow: 0 1px 0 var(--line-night); }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; letter-spacing: -.01em; margin-right: auto; }
.nav__logo svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linejoin: round; }
.nav__logo svg .accent { stroke: var(--brick-2); }
.nav__links { display: flex; gap: 6px; }
.nav__links a { position: relative; padding: 8px 14px; font-size: 15px; font-weight: 500; border-radius: 999px; transition: background-color .3s; }
.nav__links a:hover { background: var(--line); }
.nav.on-dark .nav__links a:hover { background: var(--line-night); }
.nav__links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brick-2); }
.nav__meta { display: flex; gap: 10px; color: var(--ink-3); min-width: 136px; justify-content: flex-end; }
.nav.on-dark .nav__meta { color: var(--on-night-3); }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px var(--line-2); }
.nav__burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .5s var(--out); }
.nav__burger span:nth-child(1) { top: 18px; }
.nav__burger span:nth-child(2) { top: 25px; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 90; background: var(--paper); padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu[hidden] { display: none; }
.menu__links a { display: flex; align-items: baseline; gap: 16px; font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 12vw, 72px); line-height: 1.1; letter-spacing: -.02em; border-bottom: 1px solid var(--line); padding: 10px 0; }
.menu__links .mono { color: var(--brick); }
.menu__foot { color: var(--ink-3); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: calc(var(--nav-h) + 28px) var(--gutter) 0; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.hero__grid { position: absolute; inset: 0; pointer-events: none; }
.hero__grid i { position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * var(--x) / 6); width: 1px; background: var(--line); transform-origin: top; }
.hero__grid b { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); transform-origin: left; top: calc(var(--nav-h) + 12px); }
.hero__grid b + b { top: auto; bottom: 26svh; }
.hero__top { position: relative; display: flex; justify-content: space-between; gap: 16px; color: var(--ink-3); }
.hero__title {
  position: relative; align-self: center; margin-top: 4vh;
  font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(96px, min(17vw, 30svh), 300px); line-height: .82; letter-spacing: -.05em;
  display: flex; flex-direction: column;
}
.hero__line { display: block; }
.hero__line--2 { padding-left: 14vw; }
.hero__title .char { display: inline-block; will-change: transform; }
.hero__intro { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 22vh); width: min(360px, 30vw); display: grid; gap: 22px; justify-items: start; }
.hero__intro p { font-size: 18px; color: var(--ink-2); }
.hero__sketch { position: relative; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.hero__dim { display: flex; align-items: center; gap: 12px; color: var(--ink-3); margin-bottom: 14px; margin-left: 38%; }
.hero__dim i { flex: 1; height: 1px; background: var(--ink-3); position: relative; }
.hero__dim i::before, .hero__dim i::after { content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--ink-3); }
.hero__dim i::before { left: 0; } .hero__dim i::after { right: 0; }
.hero__sketch-img { position: relative; margin-left: 38%; }
.hero__sketch-img img { width: 100%; mix-blend-mode: multiply; }
.hero__sketch-img::after { content: ""; position: absolute; left: -100vw; right: calc(var(--gutter) * -1); bottom: 0; height: 1.5px; background: var(--ink); }
.hero__pencil { position: absolute; top: 0; bottom: 0; left: 0; width: 1.5px; background: var(--brick); opacity: 0; }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 22px; display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.hero__scroll i { width: 1px; height: 36px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--brick); animation: drip 2.2s var(--io) infinite; }
@keyframes drip { to { top: 100%; } }

.crosshair { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; }
.crosshair.is-on { opacity: 1; }
.crosshair__x, .crosshair__y { position: absolute; left: 0; top: 0; background: rgba(168, 70, 42, .35); }
.crosshair__x { width: 100%; height: 1px; }
.crosshair__y { width: 1px; height: 100%; }
.crosshair__label { position: absolute; left: 0; top: 0; color: var(--brick); font-size: 10.5px; white-space: nowrap; }

/* ---------- Expanding frame ---------- */
.frame { position: relative; }
.frame__pin { position: relative; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.frame__media { position: absolute; inset: 0; clip-path: inset(22% 30% 22% 30% round 16px); will-change: clip-path; }
.frame__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); transform-origin: 50% 60%; will-change: transform; }
.frame__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 8, .15) 0%, rgba(10, 10, 8, 0) 35%, rgba(10, 10, 8, .55) 100%); opacity: 0; }
.frame__word { position: absolute; top: 50%; font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(30px, 5.4vw, 88px); letter-spacing: -.02em; line-height: 1; transform: translateY(-50%); white-space: nowrap; z-index: 1; }
.frame__word--l { right: 71%; }
.frame__word--r { left: 71%; }
.frame__caption { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 64px); color: var(--on-night); display: grid; gap: 14px; justify-items: start; z-index: 2; }
.frame__caption .mono { color: var(--on-night-2); }
.frame__caption h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 9vw, 150px); line-height: .9; letter-spacing: -.04em; }
.frame__caption h2 em { color: var(--brick-2); }
.frame__labels { position: absolute; top: calc(var(--nav-h) + 8px); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; color: var(--on-night-2); z-index: 2; opacity: 0; }

/* ---------- About ---------- */
.about__statement { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 4.3vw, 66px); line-height: 1.12; letter-spacing: -.02em; max-width: 22ch; max-width: 1180px; }
.about__statement .hw { transition: none; }
.about__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 8vw, 140px); margin-top: clamp(64px, 9vw, 128px); align-items: start; }
.about__bio { display: grid; gap: 18px; color: var(--ink-2); max-width: 520px; }
.about__bio .link { justify-self: start; color: var(--ink); margin-top: 6px; }
.pillars { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillar { display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--out); }
.pillar:hover { padding-left: 10px; }
.pillar svg { width: 44px; height: 44px; fill: none; stroke: var(--brick); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -.01em; margin-bottom: 6px; }
.pillar p { color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.stat { padding: 26px 22px 0 0; display: flex; flex-direction: column-reverse; gap: 10px; border-right: 1px solid var(--line); padding-left: 22px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat dt { color: var(--ink-3); }
.stat dd { font-family: var(--serif); font-weight: 300; font-size: clamp(64px, 8vw, 128px); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat sup { font-size: .4em; color: var(--brick); vertical-align: top; position: relative; top: .15em; }

/* Reveal default state (JS only) */
.js [data-reveal] { opacity: 0; transform: translateY(36px); }
.reduced [data-reveal], .no-gsap [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Hero is hidden until its intro plays; fallbacks keep it visible */
.js .hero__title, .js [data-hero-fade], .js .hero__sketch-img, .js .hero__grid { visibility: hidden; }
.no-gsap .hero__title, .no-gsap [data-hero-fade], .no-gsap .hero__sketch-img, .no-gsap .hero__grid { visibility: visible !important; }
.no-gsap .loader { display: none !important; }
.no-gsap .frame__media, .reduced .frame__media { clip-path: none; }
.no-gsap .frame__media img { transform: none; }
.no-gsap .frame__shade, .no-gsap .frame__labels { opacity: 1; }
.no-gsap .frame__word { display: none; }
.no-gsap .work__viewport, .reduced .work__viewport { overflow-x: auto; scrollbar-width: thin; }
.hero__line { overflow: hidden; padding-top: .06em; padding-bottom: .3em; margin-top: -.06em; margin-bottom: -.3em; }

/* Menu open: nav sits on paper */
.menu-open .nav { color: var(--ink) !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none; transform: none !important; }
.pv-open .nav, .pv-open .progress { visibility: hidden; }

@media (max-width: 860px) {
  .frame__word { left: var(--gutter) !important; right: auto !important; transform: none; font-size: clamp(34px, 10vw, 56px); }
  .frame__word--l { top: calc(var(--nav-h) + 6vh); }
  .frame__word--r { top: auto; bottom: 10vh; left: auto !important; right: var(--gutter) !important; }
  .frame__labels span:last-child { display: none; }
}
