/* Self-hosted type (SIL Open Font License; licenses alongside the files). */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-full-normal.woff2) format("woff2-variations"), url(fonts/fraunces-latin-full-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-full-italic.woff2) format("woff2-variations"), url(fonts/fraunces-latin-full-italic.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/outfit-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/outfit-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/permanent-marker-latin-400-normal.woff2) format("woff2"); }

/* chefpaolofontana.com — layout and type
   Palette: ink (the scene's own clear color), ivory type, steel buttons, one brass signal.
   Type: Fraunces for display, Outfit for everything else. */

:root {
  color-scheme: dark;
  --bg: #0c0e11;
  --bg-elevated: #15181d;
  --fg: #f3f1ec;
  --muted: #a7abb3;
  --subtle: #7e838c;
  --line: #2a2e35;
  --steel: #d7dbe2;
  --steel-fg: #0c0e11;
  --brass: #c9a24d;
  --brass-soft: #e3c57a;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
  --gutter: max(16px, 6vw);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--fg);
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--steel); color: var(--steel-fg); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Header ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 41;
  width: 100%; height: 2px;
  background: var(--brass);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(.85rem, env(safe-area-inset-top, 0px)) var(--gutter) .85rem;
  background: rgba(12, 14, 17, .94);
  border-bottom: 1px solid var(--line);
}

.wordmark { display: flex; flex-direction: column; line-height: 1; color: var(--fg); text-decoration: none; flex: none; }
.wordmark strong { font-family: var(--font-display); font-weight: 560; font-size: 1.15rem; letter-spacing: -.02em; white-space: nowrap; }
.wordmark span { margin-top: .28rem; font-size: .72rem; color: var(--subtle); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

.nav-links {
  display: flex; gap: .35rem 1.1rem; overflow-x: auto; scrollbar-width: none;
  max-width: min(68vw, 40rem);
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; text-decoration: none; white-space: nowrap; padding: .25rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="true"] { color: var(--fg); border-color: var(--brass); }
.nav-sound { display: inline-flex; align-items: center; gap: .45rem; flex: none; padding: .38rem .8rem; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 500; letter-spacing: .02em; cursor: pointer; transition: color .2s, border-color .2s; }
.nav-sound svg { width: 16px; height: 16px; }
.nav-sound .nav-sound__wave { opacity: .35; transition: opacity .2s; }
.nav-sound:hover { color: var(--fg); }
.nav-sound[aria-pressed="true"] { color: var(--fg); border-color: var(--brass); }
.nav-sound[aria-pressed="true"] .nav-sound__wave { opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .65rem 1.15rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 560 .95rem/1 var(--font-sans); text-decoration: none;
  transition: transform .15s cubic-bezier(.22, 1, .36, 1), background-color .15s, color .15s, border-color .15s;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--steel); color: var(--steel-fg); }
.btn-primary:hover { background: var(--fg); }
.btn-ghost { color: var(--fg); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-text { min-height: 44px; padding: .4rem 0; background: none; border: 0; color: var(--muted); font: 500 .95rem/1 var(--font-sans); text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.btn-text:hover { color: var(--fg); }
.btn-text svg { width: 15px; height: 15px; }

/* ---------- Headline type (used by the opening chapter) ---------- */
.kicker {
  margin: 0 0 .85rem; color: var(--subtle);
  font-size: .78rem; font-weight: 560; letter-spacing: .18em; text-transform: uppercase;
}
.kicker em { font-style: normal; color: var(--brass); }

.display {
  font-family: var(--font-display); font-weight: 560; letter-spacing: -.035em; line-height: 1.02;
  font-size: clamp(2.5rem, 1.1rem + 4vw, 5rem); text-wrap: balance;
}
.display em { font-style: italic; font-weight: 500; }

.subhead { max-width: 40rem; margin: 1.25rem 0 0; color: var(--muted); font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1.75rem; }

.hero-ledger {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.25rem;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.ledger-num { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); line-height: 1.05; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.ledger-num small { font-size: .6em; color: var(--muted); font-family: var(--font-sans); font-weight: 500; letter-spacing: 0; }
.ledger-label { margin-top: .4rem; color: var(--subtle); font-size: .8rem; line-height: 1.35; }

/* Opening chapter entrance: one orchestrated moment, content visible at rest */
@media (prefers-reduced-motion: no-preference) {
  html.js .chapter--hero > * { animation: rise .9s cubic-bezier(.22, 1, .36, 1) both; }
  html.js .chapter--hero > :nth-child(1) { animation-delay: .1s; }
  html.js .chapter--hero > :nth-child(2) { animation-delay: .18s; }
  html.js .chapter--hero > :nth-child(3) { animation-delay: .26s; }
  html.js .chapter--hero > :nth-child(4) { animation-delay: .34s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- The figure ---------- */
.viewer-col { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.viewer-frame {
  position: relative; overflow: hidden;
  height: min(68svh, 720px); min-height: 440px;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(201, 162, 77, .12), rgba(21, 24, 29, 0) 60%),
    var(--bg-elevated);
  border: 1px solid var(--line); border-radius: var(--radius-xl);
}
.viewer-frame model-viewer {
  display: block; width: 100%; height: 100%;
  background: transparent; --poster-color: transparent; --progress-bar-color: transparent;
  touch-action: pan-y;
}
.viewer-status {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem; margin: 0;
  color: var(--subtle); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; pointer-events: none;
}
.mv-progress { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity .5s; }
.mv-progress.is-done { opacity: 0; }
.mv-progress__card { width: min(240px, 70%); text-align: center; }
.mv-progress__card p { font-family: var(--font-display); font-size: 1.1rem; }
.mv-progress__track { height: 2px; margin: 12px 0 8px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.mv-progress__bar { width: 0; height: 100%; background: var(--brass); transition: width .25s; }
.mv-progress__pct { font-family: var(--font-sans) !important; font-size: .78rem !important; color: var(--subtle); }
.figure-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.figure-fallback .monogram { font-family: var(--font-display); font-size: 4.5rem; line-height: 1; color: var(--brass); letter-spacing: .04em; }
.figure-fallback .figure-still { display: block; width: auto; height: min(70vh, 34rem); max-width: 100%; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }
.figure-fallback p { max-width: 28ch; margin: 1rem auto 0; color: var(--subtle); font-size: .92rem; }
.viewer-frame.is-error .figure-fallback { display: flex; }
.viewer-frame.is-error model-viewer, .viewer-frame.is-error .mv-progress { visibility: hidden; }

.dock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.dock button, .dock-tools button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .12rem;
  min-height: 52px; padding: .45rem .4rem;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-md);
  color: var(--fg); font: 500 .86rem/1.15 var(--font-sans);
  transition: transform .15s cubic-bezier(.22, 1, .36, 1), background-color .15s, color .15s, border-color .15s;
}
.dock button:active, .dock-tools button:active { transform: scale(.96); }
.dock button:hover, .dock-tools button:hover { border-color: var(--muted); }
.dock button:disabled { opacity: .45; cursor: not-allowed; }
.dock-id { max-width: 100%; overflow-wrap: anywhere; color: var(--subtle); font-size: .62rem; font-weight: 500; letter-spacing: .01em; line-height: 1.2; }
.dock button[aria-pressed="true"] { background: var(--steel); color: var(--steel-fg); border-color: transparent; }
.dock button[aria-pressed="true"] .dock-id { color: inherit; opacity: .72; }
.dock-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.dock-tools button { min-height: 40px; font-size: .8rem; flex-direction: row; gap: .4rem; }
.dock-tools button[aria-pressed="true"] { border-color: var(--brass); color: var(--brass-soft); }
.dock-tools svg { width: 14px; height: 14px; flex: none; }
.dock-tools svg[hidden] { display: none; }
.viewer-note { margin: 0; color: var(--subtle); font-size: .8rem; }

/* ---------- The portrait (the refrigerator) ---------- */
.portrait { position: relative; height: 2200vh; }
.portrait-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--bg); }
.portrait-sticky canvas, .portrait-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the poster is a still of the scene's own first frame: the live render fades in over it once that frame lands,
   and only then does the poster step out underneath, so the picture never dips or blinks on the way */
.portrait-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait-sticky canvas { opacity: 0; }
.portrait.is-ready canvas { opacity: 1; transition: opacity .6s ease-out; }
.portrait-poster.is-hidden { opacity: 0; transition: opacity .3s .7s; }
.portrait-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, var(--bg) 0%, transparent 48%); }
.portrait-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; min-height: 13rem; padding: 0 var(--gutter) 6.5rem; pointer-events: none; }
.chapter {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s cubic-bezier(.22, 1, .36, 1), transform .4s cubic-bezier(.22, 1, .36, 1);
}
.chapter.is-on { opacity: 1; transform: none; }
/* the headline comes up with the room lights, then steps aside as the doors swing */
.portrait .chapter--hero.is-on { opacity: calc((0.62 + 0.38 * var(--lights, 1)) * (1 - var(--doors, 0))); }
.portrait .chapter--hero.is-on .hero-actions { opacity: calc(0.35 + 0.65 * var(--lights, 1)); }
.chapter .kicker { margin-bottom: 0; }
.chapter h2 { margin: .35rem 0 .6rem; font-family: var(--font-display); font-weight: 560; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(2rem, 1.2rem + 2vw, 3.4rem); text-wrap: balance; }
.chapter p:not(.kicker) { max-width: 34rem; color: var(--muted); }
/* on wide screens the product stands right of centre; the copy keeps to the left two-fifths so the two never cross */
@media (min-width: 900px) {
  .chapter:not(.chapter--hero) h2, .chapter:not(.chapter--hero) p:not(.kicker) { max-width: min(34rem, 40vw); }
}
.portrait-hint { position: absolute; right: var(--gutter); bottom: 1.25rem; z-index: 2; margin: 0; color: var(--subtle); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; transition: opacity .4s; }
.portrait.is-scrolled .portrait-hint { opacity: 0; }

/* Chapter rail: where you are in the portrait, and a way to jump */
.portrait-rail {
  position: absolute; right: var(--gutter); top: 50%; z-index: 3;
  display: flex; flex-direction: column; gap: .15rem;
  transform: translateY(-50%);
}
.portrait-rail__tick {
  display: flex; align-items: center; justify-content: flex-end; gap: .55rem;
  padding: .32rem 0; background: none; border: 0; color: var(--subtle);
  font: 500 .7rem/1 var(--font-sans); letter-spacing: .08em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  transition: color .25s;
}
.portrait-rail__name {
  order: -1; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  padding: .3rem 0; border-radius: 999px;
  font-size: .78rem; letter-spacing: 0; color: var(--fg);
  transition: max-width .35s cubic-bezier(.22, 1, .36, 1), opacity .25s, padding .35s;
}
.portrait-rail__num { display: inline-block; width: 1.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.portrait-rail__bar { display: inline-block; width: .5rem; height: 1px; background: currentColor; transition: width .3s cubic-bezier(.22, 1, .36, 1); }
.portrait-rail__tick.is-on { color: var(--brass); }
.portrait-rail__tick.is-on .portrait-rail__bar { width: 1.25rem; }
.portrait-rail__tick:hover, .portrait-rail__tick:focus-visible { color: var(--fg); }
.portrait-rail__tick:hover .portrait-rail__name, .portrait-rail__tick:focus-visible .portrait-rail__name {
  max-width: 14rem; opacity: 1; padding: .3rem .6rem; background: rgba(12, 14, 17, .78);
}
.portrait.is-flat .portrait-rail { display: none; }

/* No WebGL: a flat fallback that still reads */
.portrait.is-flat { height: auto; }
.portrait.is-flat .portrait-sticky { position: relative; height: auto; min-height: 0; padding: 6rem var(--gutter) 3rem; }
.portrait.is-flat canvas { display: none; }
.portrait.is-flat .portrait-poster { opacity: .25; }
.portrait.is-flat .portrait-copy { position: relative; display: grid; gap: 2rem; padding: 0; }
.portrait.is-flat .chapter, .portrait.is-flat .chapter.is-on { position: relative; inset: auto; width: auto; opacity: 1; transform: none; }
.portrait.is-flat .portrait-hint { display: none; }

/* ---------- Sections ---------- */
.section { padding: 6.5rem var(--gutter); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(2.2rem, 1.3rem + 2.4vw, 3.8rem); text-wrap: balance; }
.lede { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); font-size: 1.15rem; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; gap: 1.5rem 3rem; }
.bio { display: grid; gap: 1.1rem; max-width: 62ch; font-size: 1.12rem; line-height: 1.6; }
.bio p { color: var(--fg); }
.bio p + p { color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.about-aside { display: grid; gap: 2rem; padding-left: 2.5rem; border-left: 1px solid var(--line); }
.portrait-figure { margin: 0; }
.portrait-figure img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-xl); border: 1px solid var(--line); }
.portrait-figure figcaption { margin-top: .7rem; color: var(--subtle); font-size: .85rem; letter-spacing: .04em; }
.about-aside h3 { font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; letter-spacing: -.02em; }
.about-aside ul { display: grid; gap: .8rem; margin-top: .9rem; font-size: .95rem; color: var(--muted); line-height: 1.4; }
.about-aside li strong { display: block; color: var(--fg); font-weight: 500; }

/* Record */
.record { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.15rem 1.2rem 1.25rem; flex: 1; }
.card h3, .card-title-btn { margin: 0; padding: 0; background: none; border: 0; text-align: left; color: inherit; font-family: var(--font-display); font-weight: 560; font-size: 1.6rem; letter-spacing: -.03em; line-height: 1.15; }
.card-title-btn { text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: .16em; transition: text-decoration-color .2s; }
.card-title-btn:hover { text-decoration-color: currentColor; }
.card .years { color: var(--brass); font-size: .8rem; font-weight: 560; letter-spacing: .1em; text-transform: uppercase; }
.card .role { color: var(--steel); font-size: .95rem; font-weight: 560; }
.card .place { color: var(--subtle); font-size: .9rem; }
.card p { color: var(--muted); }
.card ul { display: grid; gap: .45rem; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.card li { position: relative; padding-left: 1rem; }
.card li::before { content: ""; position: absolute; left: 0; top: .68em; width: 5px; height: 1px; background: var(--brass); }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.card-ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.card-ledger .ledger-num { font-size: 1.35rem; }
.card-ledger .ledger-label { font-size: .75rem; }
.card-ledger.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-earlier { display: flex; gap: 2.5rem; align-items: flex-start; margin-top: .75rem; padding: 1.5rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.record-earlier h3 { flex: none; width: 9rem; font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; letter-spacing: -.02em; }
.record-earlier p { color: var(--muted); font-size: .98rem; }
.record-request { display: flex; gap: 2.5rem; align-items: center; margin-top: .75rem; padding: 1.5rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2, rgba(255,255,255,.02)); }
.record-request h3 { flex: none; width: 9rem; font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; letter-spacing: -.02em; }
.record-request p { flex: 1; color: var(--muted); font-size: .98rem; }
.record-request .btn { flex: none; }
.record-request__body { flex: 1; display: grid; gap: .9rem; }
.record-unlock { display: grid; grid-template-columns: minmax(0, 18rem) auto auto; gap: .6rem; align-items: end; }
.record-unlock .field { margin: 0; }
.record-unlock .field input { font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: .06em; }
.record-unlock__msg { grid-column: 1 / -1; margin: 0; min-height: 1.2em; color: var(--subtle); font-size: .85rem; }
.record-unlock__msg.is-bad { color: #e0a08a; }
.record-unlock__unlocked { margin: 0; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; color: var(--brass-soft, inherit); font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.record-request[data-state="unlocked"] { border-color: var(--brass, var(--line)); }
@media (max-width: 760px) { .record-unlock { grid-template-columns: 1fr; align-items: stretch; } }
@media (max-width: 760px) { .record-request { flex-direction: column; align-items: flex-start; gap: 1rem; } }

/* Ventures */
.ventures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.card.wide { grid-column: 1 / -1; }
.card.wide img { aspect-ratio: 21 / 9; max-height: 28rem; }
.card-media { position: relative; }
.card-media > img:first-child { display: block; aspect-ratio: 3 / 2; }
.card-media > .card-figure { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: radial-gradient(ellipse at 50% 70%, #262a31 0%, #15171b 70%); --poster-color: transparent; cursor: grab; }
.card .card-badge--wide { height: 2.8rem; padding: .45rem .8rem; background: rgba(21, 18, 15, .9); }
.card .card-badge { position: absolute; left: .9rem; bottom: .9rem; width: auto; max-width: 60%; height: 3rem; aspect-ratio: auto; object-fit: contain; padding: .35rem .5rem; background: rgba(12, 14, 17, .78); border: 1px solid var(--line); border-radius: .6rem; backdrop-filter: blur(6px); }
.card .card-badge--round { width: 3rem; padding: 0; border-radius: 50%; object-fit: cover; }
.card.venture .role { color: var(--fg); font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.05rem; }

/* Inquiry */
.inquiry { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 2rem; }
.contact-list { display: grid; gap: .9rem; margin-top: 2rem; font-size: .98rem; }
.contact-list li { display: flex; align-items: center; gap: .75rem; }
.contact-list svg { width: 18px; height: 18px; flex: none; color: var(--brass); }
.contact-list a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-list a:hover { border-color: var(--brass); }
.form { display: grid; gap: .9rem; padding: 1.15rem; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field { display: grid; gap: .4rem; }
.field span { color: var(--muted); font-size: .82rem; font-weight: 560; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem .85rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--fg); font: 400 1rem/1.4 var(--font-sans);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.field textarea { resize: vertical; min-height: 9rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--subtle); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a7abb3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; }
.field select option { background: var(--bg-elevated); color: var(--fg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4rem; margin: 0; color: var(--muted); font-size: .95rem; }
.form-success { display: none; padding: 2rem; border: 1px solid rgba(201, 162, 77, .45); border-radius: var(--radius-xl); background: rgba(201, 162, 77, .06); }
.form-success h3 { font-family: var(--font-display); font-weight: 560; font-size: 1.6rem; letter-spacing: -.02em; }
.form-success p { margin-top: .5rem; color: var(--muted); }
.form.is-sent { display: none; }
.form.is-sent + .form-success { display: block; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding: 2rem var(--gutter) 3rem; border-top: 1px solid var(--line); color: var(--subtle); font-size: .92rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }


/* The opening chapter carries the headline */
.chapter--hero .kicker { margin-bottom: .9rem; }
.chapter--hero .display { font-size: clamp(2.3rem, 1rem + 3.3vw, 4.3rem); }
.chapter--hero .subhead { max-width: 34rem; margin-top: 1.1rem; font-size: clamp(1rem, .95rem + .3vw, 1.12rem); }
.chapter--hero .hero-actions { margin-top: 1.5rem; pointer-events: auto; }
.portrait-copy .chapter--hero.is-on { pointer-events: none; }

/* The figure's own section */
.studio { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.5rem 3.5rem; align-items: center; }
.studio-copy .section-head { margin-bottom: 0; }
.studio-copy h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(2.2rem, 1.3rem + 2.4vw, 3.8rem); text-wrap: balance; }
.studio-copy .lede { margin-top: 1.25rem; }

/* Numbers row at the top of the record */
.record-ledger { margin: 1.75rem 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .studio, .about-grid, .ventures, .inquiry { grid-template-columns: 1fr; }
  .hero-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter--hero .display { font-size: clamp(2rem, 1rem + 4.5vw, 3rem); }
  .chapter--hero .subhead { font-size: .95rem; line-height: 1.45; }
  .chapter--hero .hero-actions { margin-top: 1rem; gap: .5rem; }
  .portrait-copy { padding-bottom: 4.5rem; }
  .viewer-frame { height: 72vw; min-height: 420px; }
  .about-aside { padding-left: 0; border-left: 0; padding-top: 2rem; border-top: 1px solid var(--line); }
  .ventures { grid-template-columns: 1fr; }
  .record-earlier { flex-direction: column; gap: .75rem; }
  .record-earlier h3 { width: auto; }
  .portrait-scrim { background: linear-gradient(to top, var(--bg) 8%, transparent 52%); }
  .nav-links { max-width: 56vw; }
}

@media (max-width: 640px) {
  .record { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait-hint { top: calc(5.5rem + env(safe-area-inset-top, 0px)); bottom: auto; }
  .portrait-rail { display: none; }
  .wordmark span { display: none; }
  .nav { gap: .75rem; }
  .nav-sound span { display: none; }
  .nav-sound { padding: .38rem .5rem; }
  .nav-links { max-width: 60vw; gap: .35rem .9rem; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 1.5rem; }
}

@media (min-width: 901px) {
  .portrait-scrim { background: linear-gradient(to right, var(--bg) 0%, rgba(12, 14, 17, .72) 28%, transparent 52%); }
  .portrait-copy { top: 0; bottom: 0; display: flex; align-items: center; width: min(34rem, 46vw); padding: 6rem 0 4rem var(--gutter); }
  .chapter, .chapter.is-on { left: var(--gutter); right: auto; width: min(32rem, 42vw); top: 50%; bottom: auto; }
  .chapter { transform: translateY(calc(12px - 50%)); }
  .chapter.is-on { transform: translateY(-50%); }
}
