@font-face {
  font-family: 'Inter Tight';
  src: url('/static/fonts/inter-tight.woff2') format('woff2-variations'), url('/static/fonts/inter-tight.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/static/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f1efe9;
  --ink: #1a1a18;
  --muted: #6d6b64;
  --line: rgb(26 26 24 / 0.13);
  --dark: #22231f;
  --dark-ink: #ecebe5;
  --dark-muted: #9c9b93;
  --lav: #dcd9ee;
  --accent: #6f63c9;
  --sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --pad: clamp(18px, 4vw, 56px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
::selection { background: var(--lav); color: var(--ink); }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px;
  transition: top 200ms var(--ease-out);
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.row { display: flex; justify-content: space-between; gap: 16px; }
.display {
  margin: 0;
  font-weight: 400;
  font-size: clamp(3.3rem, 11.2vw, 10.6rem);
  line-height: 0.9;
  letter-spacing: -0.058em;
}
.display em, .display-2 em { letter-spacing: -0.03em; padding-right: 0.04em; }
.display-2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.8rem, 7.4vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.052em;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.3; letter-spacing: -0.015em; margin: 0; max-width: 22ch; }
.lead-lg { font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.35; letter-spacing: -0.018em; margin: 0 0 36px; max-width: 34ch; }
.body { font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 40ch; margin: 22px 0; }
.num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- split-word reveal ---------- */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.split .w > span { display: inline-block; }
.js .hero .split .w > span { animation: rise 1100ms var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 120ms); }
/* Content is visible by default; the reveal only animates elements as they enter (backwards fill = no flash, no hidden state). */
.js .split.in .w > span { animation: rise 1100ms var(--ease-out) calc(var(--i) * 60ms + 80ms) backwards; }
@keyframes rise { from { transform: translate3d(0, 108%, 0); } to { transform: none; } }

.js .fade { opacity: 0; animation: fadeUp 900ms var(--ease-out) var(--d, 0s) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

.js [data-reveal].in { animation: revealUp 1000ms var(--ease-out) var(--d, 0s) backwards; }
@keyframes revealUp { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--pad);
  transition: background-color 400ms var(--ease-soft), color 400ms var(--ease-soft), transform 500ms var(--ease-out), box-shadow 400ms;
}
.nav.scrolled { background: rgb(241 239 233 / 0.78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav.on-dark { color: var(--dark-ink); background: rgb(34 35 31 / 0.72); box-shadow: 0 1px 0 rgb(255 255 255 / 0.06); }
.nav.hide { transform: translate3d(0, -100%, 0); }
.brand { font-size: 15px; letter-spacing: -0.03em; font-weight: 500; }
.brand sup { font-size: 9px; margin-left: 1px; }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; font-size: 12.5px; }
.nav ul a { position: relative; padding: 6px 0; }
.nav ul a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 350ms var(--ease-out);
}
@media (hover: hover) { .nav ul a:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav .pill { justify-self: end; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 8px 15px; font-size: 12.5px; background: transparent;
  transition: background-color 250ms var(--ease-soft), color 250ms var(--ease-soft), transform 160ms var(--ease-out), border-color 250ms;
}
.pill:active { transform: scale(0.97); }
@media (hover: hover) { .pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); } .on-dark .pill:hover { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); } }
.pill.small { padding: 6px 12px; font-size: 11.5px; }
.dark-pill { background: var(--ink); color: var(--bg); border-color: var(--ink); padding: 14px 22px; font-size: 14px; }
@media (hover: hover) { .dark-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; } }

/* ---------- sections ---------- */
main > section { padding: clamp(80px, 11vw, 150px) var(--pad); }
.hero { padding-top: 84px !important; padding-bottom: 28px !important; min-height: 100svh; display: flex; flex-direction: column; }
.hero .eyebrow.row:first-child { margin-bottom: clamp(18px, 3vw, 34px); }
.hero h1 { margin-bottom: clamp(28px, 4vw, 46px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.15fr); gap: clamp(20px, 3vw, 44px); align-items: start; flex: 1; }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; height: 100%; gap: 32px; }
.explore { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.explore .circle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); transition: transform 400ms var(--ease-out), background-color 300ms, color 300ms;
}
@media (hover: hover) { .explore:hover .circle { transform: rotate(-45deg); background: var(--ink); color: var(--bg); } }
.hero-media { margin: 0; position: relative; border-radius: 4px; overflow: hidden; background: #dcd9d1; aspect-ratio: 1200 / 700; }
.media-inner { position: absolute; inset: -6% 0; will-change: transform; }
.media-inner img { width: 100%; height: 100%; object-fit: cover; }
.js .hero-media { clip-path: inset(100% 0 0 0); animation: wipe 1300ms var(--ease-io) 250ms forwards; }
.js .hero-media img { transform: scale(1.18); animation: settle 1800ms var(--ease-out) 250ms forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { to { transform: scale(1); } }
.hero-media figcaption {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between;
  padding: 12px 14px; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(26 26 24 / 0.7);
}
.hero-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
.bob { display: inline-block; animation: bob 2.4s var(--ease-io) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

/* work */
.work .eyebrow:first-child { margin-bottom: 18px; }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 7px 14px; font-size: 12px;
  transition: background-color 250ms var(--ease-soft), color 250ms var(--ease-soft), border-color 250ms, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) { .chip:not([aria-pressed='true']):hover { border-color: var(--ink); } }
.count { margin: 34px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count .eyebrow { margin: 0; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 22px); }
.card.is-hidden { display: none; }
.card-link { display: block; }
.card-media {
  position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 900 / 660; background: #e4e1d8;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 600ms var(--ease-out);
}
.card-media.tilting { transition: transform 120ms linear; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1000ms var(--ease-out); }
.card-empty { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #e4e1d8 0 12px, #dedbd1 12px 24px); }
.card-arrow {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(255 255 255 / 0.92); color: var(--ink);
  transition: transform 450ms var(--ease-out), background-color 300ms, color 300ms;
}
@media (hover: hover) and (pointer: fine) {
  .card-link:hover .card-media img { transform: scale(1.045); }
  .card-link:hover .card-arrow { transform: rotate(45deg); background: var(--ink); color: #fff; }
}
.card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 14px; }
.card-meta h3 { margin: 0; font-weight: 400; font-size: 17px; letter-spacing: -0.02em; }
.card-meta p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.empty-note { color: var(--muted); }

::view-transition-group(*) { animation-duration: 520ms; animation-timing-function: var(--ease-out); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 320ms; }

/* practice */
.dark { background: var(--dark); color: var(--dark-ink); }
.dark .eyebrow, .dark .num { color: var(--dark-muted); }
.practice .eyebrow:first-child { margin-bottom: 26px; }
.practice-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.acc-item { border-top: 1px solid rgb(255 255 255 / 0.13); }
.acc-item:last-child { border-bottom: 1px solid rgb(255 255 255 / 0.13); }
.acc h3 { margin: 0; font: inherit; }
.acc-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; background: none; border: 0; text-align: left; font-size: 15px; letter-spacing: -0.01em;
}
.acc-btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; transition: transform 400ms var(--ease-out); }
.acc-btn svg .v { transform-origin: center; transition: transform 400ms var(--ease-out), opacity 300ms; }
.acc-item.open .acc-btn svg .v { transform: rotate(90deg); opacity: 0; }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 500ms var(--ease-out); }
.acc-panel > div { overflow: hidden; }
.acc-panel p { margin: 0; padding: 0 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--dark-muted); max-width: 46ch; opacity: 0; transform: translateY(-6px); transition: opacity 350ms var(--ease-soft), transform 450ms var(--ease-out); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-item.open .acc-panel p { opacity: 1; transform: none; transition-delay: 80ms; }

/* play */
.play-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.play .eyebrow:first-child { margin-bottom: 22px; }
.lab { position: relative; background: #e6e3da; border-radius: 4px; aspect-ratio: 5 / 4; overflow: hidden; }
.lab canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.lab-ui { position: absolute; inset: auto 14px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.density { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.density input { width: clamp(90px, 14vw, 150px); accent-color: var(--accent); }
.lab .pill { background: rgb(241 239 233 / 0.85); backdrop-filter: blur(6px); }

/* contact */
.contact { background: var(--lav); }
.contact .eyebrow:first-child { margin-bottom: 22px; }
.contact-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-top: clamp(36px, 5vw, 64px); }
.contact .body { color: #4f4d5c; margin-top: 0; }
.mail { font-size: clamp(1.2rem, 2.2vw, 1.6rem); letter-spacing: -0.03em; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 500ms var(--ease-out); padding-bottom: 2px; }
@media (hover: hover) { .mail:hover { background-size: 100% 1px; } }
.socials { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 18px; font-size: 13px; }
.socials a { opacity: 0.75; transition: opacity 200ms; }
.socials a:hover { opacity: 1; }
.magnet { transition: transform 400ms var(--ease-out), background-color 250ms, border-color 250ms, color 250ms, opacity 900ms; }

/* footer */
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px var(--pad); font-size: 11.5px; color: var(--muted); background: var(--lav); border-top: 1px solid rgb(26 26 24 / 0.08);
}
.totop { display: inline-flex; gap: 6px; }
.totop span { transition: transform 300ms var(--ease-out); }
@media (hover: hover) { .totop:hover span { transform: translateY(-3px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .hero { min-height: auto; }
  .hero-grid, .practice-grid, .play-grid { grid-template-columns: 1fr; }
  .hero-copy { gap: 22px; }
  .lead { max-width: 30ch; }
  .hero-foot span:last-child { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .row span:last-child { text-align: right; }
  .hero .eyebrow.row:first-child span:last-child { display: none; }
}

/* ---------- phone (<720px) ---------- */
.menu-btn, .sheet, .view-toggle { display: none; }
.idx-cat, .idx-n { display: none; }
@media (max-width: 720px) {
  .nav { grid-template-columns: 1fr auto 1fr; }
  .nav-cta { justify-self: center !important; padding: 8px 16px; white-space: nowrap; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; justify-self: end; border: 1px solid currentColor; background: transparent;
    border-radius: 999px; padding: 7px 14px; font-size: 12.5px; color: inherit;
    transition: background-color 250ms, color 250ms, transform 160ms var(--ease-out);
  }
  .menu-btn:active { transform: scale(0.96); }
  .menu-btn i { width: 10px; height: 10px; position: relative; }
  .menu-btn i::before, .menu-btn i::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 350ms var(--ease-out), top 350ms var(--ease-out); }
  .menu-btn i::before { top: 2px; } .menu-btn i::after { top: 7px; }
  .menu-btn[aria-expanded='true'] i::before { top: 4.5px; transform: rotate(45deg); }
  .menu-btn[aria-expanded='true'] i::after { top: 4.5px; transform: rotate(-45deg); }
  .menu-open .nav { background: transparent; backdrop-filter: none; box-shadow: none; color: var(--dark-ink); transform: none; }
  .menu-open { overflow: hidden; }
  .sheet {
    display: flex; flex-direction: column; justify-content: space-between; position: fixed; inset: 0; z-index: 40; background: var(--dark); color: var(--dark-ink);
    padding: 96px var(--pad) 32px; clip-path: inset(0 0 100% 0); transition: clip-path 500ms var(--ease-io);
  }
  .sheet[hidden] { display: none; }
  .sheet.open { clip-path: inset(0); }
  .sheet ul { list-style: none; margin: 0; padding: 0; }
  .sheet li { border-bottom: 1px solid rgb(255 255 255 / 0.12); opacity: 0; transform: translateY(18px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--i) * 70ms + 200ms); }
  .sheet.open li { opacity: 1; transform: none; }
  .sheet li a { display: flex; align-items: baseline; gap: 14px; padding: 18px 0; font-size: clamp(1.9rem, 9vw, 2.6rem); letter-spacing: -0.03em; }
  .sheet .num { font-size: 11px; opacity: 0.55; }
  .sheet .pill { align-self: flex-start; background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }

  .hero-copy { flex-direction: row; align-items: center; justify-content: space-between; height: auto; gap: 16px; }
  .hero-copy .lead { flex: 1; max-width: 24ch; margin: 0; }
  .explore { flex: none; flex-direction: column; gap: 6px; text-align: center; font-size: 12px; }
  .explore .circle { width: 76px; height: 76px; font-size: 22px; }

  .view-toggle { display: inline-flex; gap: 4px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
  .count { padding-bottom: 14px; }
  .hero-media { aspect-ratio: 350 / 298; }
  .vt { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 12px; transition: background-color 250ms, color 250ms; }
  .vt[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
  .work-head { align-items: flex-start; }

  .card-arrow { opacity: 1; top: 10px; right: 10px; width: 44px; height: 44px; z-index: 2; }
  .card-link:active .card-arrow { transform: rotate(45deg); background: var(--ink); color: #fff; }

  .grid.as-index { gap: 0; }
  .grid.as-index .card-media { display: none; }
  .grid.as-index .card { border-bottom: 1px solid var(--line); }
  .grid.as-index .card-meta { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 16px 0; }
  .grid.as-index .card-meta p { display: none; }
  .grid.as-index .card-meta h3 { font-size: 1.25rem; }
  .grid.as-index .num { display: none; }
  .grid.as-index .idx-cat { display: block; font-size: 11.5px; color: var(--muted); }
  .grid.as-index .idx-n { display: block; font-size: 11px; color: var(--muted); }

  .contact-row { flex-direction: column; align-items: flex-start; }
  .contact .pill { align-self: flex-start; }

  .foot { flex-direction: row; flex-wrap: nowrap; align-items: center; font-size: 11px; }
  .foot .f-center { display: none; }
  .foot .f-left { flex: 1; }
}

/* ---------- preview frame ---------- */
.is-preview .nav { position: absolute; }

/* ---------- reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .split.in .w > span, .js .hero .split .w > span { transform: none !important; animation: none !important; transition: none !important; }
  .js [data-reveal].in { animation: fadeIn 400ms ease backwards; }
  .js .hero-media, .js .hero-media img { clip-path: none; transform: none; animation: none; }
  .js .fade { animation: fadeIn 400ms ease forwards; }
  .bob { animation: none; }
  .card-media, .card-media img, .acc-panel, .acc-panel p { transition-duration: 0ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
