/* ============================================================================
   SoloFoundry — "The Foundry Floor"
   A type-foundry / casting-house identity: monochrome ink & bone canvas,
   metallic cast wordmark, ember spark for interaction. Chroma comes from the
   templates themselves.
============================================================================ */

/* ----------------------------- TOKENS ----------------------------- */
:root {
  /* Canvas */
  --ink:      #16130F;   /* warm near-black — the foundry floor */
  --ink-2:    #1D1913;   /* raised ink (cards) */
  --ink-3:    #262019;   /* hairlines on ink */
  --bone:     #E4E1DA;   /* warm concrete/plaster — the specimen sheet */
  --bone-2:   #EDEAE3;   /* raised bone */
  --bone-line:#CFC9BD;

  /* Text */
  --on-ink:      #EDE9E1;
  --on-ink-dim:  #A49E92;
  --on-ink-faint:#6C6559;
  --on-bone:      #201C16;
  --on-bone-dim:  #5F594E;

  /* Spark — used only for interactive states */
  --ember:    #F0531C;

  /* Type */
  --display: "Bricolage Grotesque", "Georgia", serif;
  --body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Rhythm */
  --pad-x: clamp(1.25rem, 5vw, 6rem);
  --sec-y: clamp(5rem, 11vw, 10rem);
  --maxw: 1440px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------- RESET ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

/* No CSS smooth-scroll: scroll-behavior:smooth animates the mouse wheel itself
   in Chrome/Firefox and feels sluggish. Native instant wheel/trackpad scroll
   is what we want. (Anchor-link smoothness is handled per-click in app.js.) */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--on-ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--ember); color: #fff; }

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Skip link */
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  background: var(--bone); color: var(--on-bone);
  padding: 10px 16px; border-radius: 2px;
  font-family: var(--mono); font-size: 0.75rem;
  transform: translateY(-160%); transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

/* Visible focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ember); outline-offset: 3px;
}

/* ----------------------------- CAST WORDMARK ----------------------------- */
/* Liquid-metal specimen — steel → bone → ember glint, sheen sweeping across */
.cast {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(
    100deg,
    #6E675E 0%, #B7AFA2 14%, #FBF8F1 30%, #CFC7B9 42%,
    #857C70 56%, var(--ember) 68%, #D8D0C2 82%, #6E675E 100%
  );
  background-size: 260% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 9s linear infinite;
}
@keyframes sheen { to { background-position: 260% 0; } }

/* ----------------------------- MOLTEN POUR (load) ----------------------------- */
.pour {
  position: fixed; inset: 0; z-index: 900;
  background: var(--ink);
  display: grid; place-items: center;
  transition: transform 1s var(--ease);
}
.pour__mark {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 3rem); letter-spacing: -0.03em;
  color: var(--on-ink-faint);
  opacity: 0; animation: pourFade 1.1s var(--ease) forwards;
}
@keyframes pourFade { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 1; } }
.pour.done { transform: translateY(-101%); }

/* ----------------------------- CUSTOM CURSOR ----------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 950;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ember);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: normal;
  transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease);
  display: none;
}
.cursor__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  color: #fff; opacity: 0; transition: opacity .2s var(--ease);
  white-space: nowrap;
}
.cursor.is-hover { width: 42px; height: 42px; background: rgba(240,83,28,0.18); border: 1px solid var(--ember); }
.cursor.is-view  { width: 72px; height: 72px; background: var(--ember); }
.cursor.is-view .cursor__label { opacity: 1; }
body.has-cursor { cursor: none; }
body.has-cursor a, body.has-cursor button { cursor: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

/* ----------------------------- NAV ----------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad-x);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(22,19,15,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--ink-3);
  padding-top: 0.8rem; padding-bottom: 0.8rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; }
.nav__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 4px;
  background: var(--bone); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  transform: rotate(0deg); transition: transform .4s var(--ease);
}
.nav__brand:hover .nav__mark { transform: rotate(-8deg); }
.nav__word { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  font-size: 0.9rem; color: var(--on-ink-dim);
  position: relative; padding: 4px 0;
  transition: color .25s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--ember); transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--on-ink); }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.7rem 1.1rem; border: 1px solid var(--ink-3); border-radius: 2px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.nav__cta:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.nav__burger { display: none; width: 40px; height: 40px; position: relative; }
.nav__burger span {
  position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--on-ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__burger span:nth-child(1) { top: 16px; }
.nav__burger span:nth-child(2) { top: 23px; }
.nav.menu-open .nav__burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav.menu-open .nav__burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 400;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad-x);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease);
  pointer-events: none;
}
.menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu__links { display: flex; flex-direction: column; gap: 0.5rem; }
.menu__links a {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 11vw, 3.5rem); letter-spacing: -0.03em;
  color: var(--on-ink); display: flex; align-items: baseline; gap: 1rem;
  padding: 0.3rem 0; border-bottom: 1px solid var(--ink-3);
}
.menu__links a span { color: var(--ember); font-size: 0.9rem; }
.menu__mail { font-family: var(--mono); font-size: 0.85rem; color: var(--on-ink-dim); margin-top: 2.5rem; }

/* ----------------------------- HERO (image-led) ----------------------------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem var(--pad-x) 5rem;
  overflow: hidden; isolation: isolate;
}

/* Full-bleed showcase render — beautiful sites floating on devices */
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 58% 48%;
  transform-origin: 58% 42%;
  will-change: transform, opacity;
}

/* Directional scrim — darkest at the lower-left where the copy sits, clearing
   toward the upper-right so the devices stay on show. Text stays readable. */
.hero__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(101deg,
      rgba(22,19,15,0.95) 0%, rgba(22,19,15,0.88) 22%, rgba(22,19,15,0.58) 42%,
      rgba(22,19,15,0.16) 62%, rgba(22,19,15,0) 80%),
    linear-gradient(to top,
      rgba(22,19,15,0.86) 0%, rgba(22,19,15,0.28) 24%, rgba(22,19,15,0) 46%),
    linear-gradient(to bottom,
      rgba(22,19,15,0.72) 0%, rgba(22,19,15,0) 20%);
}

.hero__glow {
  position: absolute; z-index: 1; width: 60vmax; height: 60vmax; border-radius: 50%;
  left: var(--gx, 62%); top: var(--gy, 46%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(240,83,28,0.16), rgba(240,83,28,0) 62%);
  filter: blur(30px); pointer-events: none; transition: opacity .6s var(--ease);
  mix-blend-mode: screen;
}
.hero__grain {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.38; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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)' opacity='0.5'/%3E%3C/svg%3E");
}

.hero__inner { position: relative; z-index: 4; max-width: 46rem; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--on-ink); margin-bottom: 1.6rem;
}
.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); }
.hero__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 6.6vw, 6rem);
  line-height: 0.98; letter-spacing: -0.035em;
  margin-bottom: 1.7rem;
  text-shadow: 0 2px 40px rgba(0,0,0,0.35);
}
.hero__title em { font-style: normal; color: var(--ember); }
/* Line masks — each line clips its inner span so it can rise in on load */
.hero__line { display: block; overflow: hidden; padding-block: 0.04em; }
.hero__line-in { display: block; will-change: transform; }
.hero__lede {
  max-width: 42ch; font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  color: var(--on-ink-dim); line-height: 1.55;
  text-shadow: 0 1px 24px rgba(0,0,0,0.45);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero__foot {
  position: absolute; z-index: 4; bottom: 2rem; left: var(--pad-x); right: var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--on-ink-faint);
}
.hero__scroll { width: 1px; height: 44px; background: linear-gradient(var(--on-ink-faint), transparent); position: relative; overflow: hidden; }
.hero__scroll::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--ember); animation: scrollCue 2s var(--ease) infinite; }
@keyframes scrollCue { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1rem 1.6rem; border-radius: 2px;
  border: 1px solid transparent;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--solid { background: var(--bone); color: var(--ink); }
.btn--solid:hover { background: var(--ember); color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink-3); color: var(--on-ink); }
.btn--ghost:hover { border-color: var(--bone); transform: translateY(-2px); }

/* ----------------------------- MARQUEE ----------------------------- */
.marquee {
  background: var(--bone); color: var(--on-bone);
  padding: 1.1rem 0; overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--bone-line); border-bottom: 1px solid var(--bone-line);
  min-height: 4.7rem; /* reserve height so the JS-filled track can't shift layout */
  display: flex; align-items: center;
}
.marquee__track { display: inline-flex; gap: 3rem; will-change: transform; flex: none; }
.marquee__item {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 3rem;
}
.marquee__item::after { content: "✦"; color: var(--ember); font-size: 0.7em; }

/* ----------------------------- SECTION HEAD ----------------------------- */
.section-head { max-width: var(--maxw); margin: 0 auto; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head__index { display: block; color: var(--on-ink-dim); margin-bottom: 1.2rem; }
.section-head__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.035em;
}
.section-head__lede { max-width: 46ch; margin-top: 1.4rem; color: var(--on-ink-dim); font-size: clamp(1rem, 1vw + 0.9rem, 1.2rem); }

/* Reveal (GSAP-driven; graceful default = visible) */
.reveal { will-change: transform, opacity; }

/* ----------------------------- GALLERY ----------------------------- */
.gallery { padding: var(--sec-y) var(--pad-x); }
.filters {
  max-width: var(--maxw); margin: 0 auto 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.filter {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.55rem 0.95rem; border: 1px solid var(--ink-3); border-radius: 999px;
  color: var(--on-ink-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.filter:hover { color: var(--on-ink); border-color: var(--on-ink-faint); }
.filter.active { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.filter__count { opacity: 0.55; margin-left: 0.4rem; }

.grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}

/* Cast card */
.cast-card {
  --a: #8a8278;
  position: relative;
  display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 6px;
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.cast-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--a) 55%, var(--ink-3));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8), 0 0 0 1px color-mix(in srgb, var(--a) 25%, transparent);
}
.cast-card__thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% 15%, color-mix(in srgb, var(--a) 55%, transparent), transparent 55%),
    radial-gradient(120% 120% at 10% 100%, color-mix(in srgb, var(--a) 35%, transparent), transparent 60%),
    var(--ink);
}
.cast-card__ghost {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.3rem, 3vw, 2rem); line-height: 0.95; letter-spacing: -0.03em;
  text-align: center;
  color: color-mix(in srgb, var(--a) 92%, #fff);
  mix-blend-mode: overlay; opacity: 0.9;
  transition: transform .6s var(--ease);
}
.cast-card:hover .cast-card__ghost { transform: scale(1.06); }
.cast-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  z-index: 1; /* sits above the ghost fallback */
  transition: transform .6s var(--ease);
}
.cast-card:hover .cast-card__img { transform: scale(1.05); }
.cast-card__accent {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; z-index: 2;
  background: var(--a); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.cast-card:hover .cast-card__accent { transform: scaleX(1); }

.cast-card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cast-card__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cast-card__idx { color: var(--on-ink-faint); }
.cast-card__badge {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid var(--ink-3); color: var(--on-ink-dim);
}
.cast-card__badge.paid { color: var(--ink); background: var(--a); border-color: var(--a); font-weight: 700; }
.cast-card__name { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.1; }
.cast-card__tag { color: var(--on-ink-dim); font-size: 0.92rem; }
.cast-card__foot { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; }
.cast-card__cat { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-faint); margin-right: auto; }
.cast-link {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.5rem 0.85rem; border-radius: 2px; border: 1px solid var(--ink-3);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.cast-link:hover { border-color: var(--on-ink-faint); color: var(--on-ink); }
.cast-link--get { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.cast-link--get:hover { background: var(--ember); color: #fff; border-color: var(--ember); }
.cast-link--soon { color: var(--on-ink-faint); border-style: dashed; cursor: not-allowed; }
.cast-card__view {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; background: rgba(22,19,15,0.6); backdrop-filter: blur(6px);
  border-radius: 2px; color: var(--on-ink);
  opacity: 0; transform: translateY(-6px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.cast-card:hover .cast-card__view { opacity: 1; transform: none; }

.grid__empty { max-width: var(--maxw); margin: 2rem auto; text-align: center; color: var(--on-ink-dim); font-family: var(--mono); }

/* Homepage featured teaser — "view all" CTA under the six cards */
.gallery__all {
  max-width: var(--maxw); margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
}
.gallery__all-note { color: var(--on-ink-faint); }

/* ----------------------------- CATALOGUE HEADER (templates.html) ----------------------------- */
/* Foundry-specimen framing for the full browsable catalogue. Extra top pad
   clears the fixed nav since there's no hero on this page. */
.catalogue-head {
  padding: clamp(8rem, 15vw, 12rem) var(--pad-x) clamp(1.5rem, 4vw, 3rem);
  position: relative; overflow: hidden;
  /* Reserve hero-like height so webfont-swap reflow of the header copy is
     absorbed here instead of pushing the grid/footer (keeps CLS near zero). */
  min-height: clamp(27rem, 68vh, 44rem);
  display: flex; flex-direction: column; justify-content: center;
}
.catalogue-head__inner { max-width: var(--maxw); margin: 0 auto; position: relative; }
.catalogue-head__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.8rem, 11vw, 7.5rem); line-height: 0.9; letter-spacing: -0.045em;
  margin-top: 0.4rem;
}
.catalogue-head__lede { max-width: 50ch; margin-top: 1.5rem; color: var(--on-ink-dim); font-size: clamp(1rem, 1vw + 0.9rem, 1.25rem); }
.catalogue-head__count { display: inline-block; min-height: 1.2em; margin-top: 1.6rem; color: var(--on-ink-faint); }
.catalogue-head__count::before { content: "◆ "; color: var(--ember); }

/* The catalogue's gallery sits directly under its header — no double top pad. */
.gallery--catalogue { padding-top: clamp(1rem, 3vw, 2rem); }

/* ----------------------------- STUDIO (bone) ----------------------------- */
.studio { background: var(--bone); color: var(--on-bone); padding: var(--sec-y) var(--pad-x); }
.studio__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end;
}
.studio .section-head__index { color: var(--on-bone-dim); }
.studio__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem); line-height: 1.02; letter-spacing: -0.035em;
  margin-top: 1rem;
}
.studio__title em { font-style: italic; color: var(--ember); }
.studio__body { display: flex; flex-direction: column; gap: 1.3rem; }
.studio__body p { color: var(--on-bone-dim); font-size: clamp(1rem, 1vw + 0.9rem, 1.2rem); line-height: 1.65; }

.stats {
  max-width: var(--maxw); margin: clamp(3rem, 7vw, 6rem) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--bone-line); border: 1px solid var(--bone-line);
}
.stat { background: var(--bone); padding: clamp(1.5rem, 3vw, 2.5rem); }
.stat__num {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 5rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--on-bone);
}
.stat__label { color: var(--on-bone-dim); margin-top: 0.7rem; display: block; }

/* ----------------------------- WHY (ink) ----------------------------- */
.why { padding: var(--sec-y) var(--pad-x); }
.why__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--ink-3); border: 1px solid var(--ink-3);
}
.feat { background: var(--ink); padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; min-height: 15rem; }
.feat__no { color: var(--ember); margin-bottom: auto; }
.feat__title { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; margin: 1.8rem 0 0.7rem; }
.feat__text { color: var(--on-ink-dim); font-size: 0.98rem; line-height: 1.55; }

/* ----------------------------- CONTACT (bone) ----------------------------- */
.contact { background: var(--bone); color: var(--on-bone); padding: var(--sec-y) var(--pad-x); }
.contact__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem);
}
.contact .section-head__index { color: var(--on-bone-dim); }
.contact__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -0.035em; margin-top: 1rem; }
.contact__lede { color: var(--on-bone-dim); font-size: clamp(1rem, 1vw + 0.9rem, 1.2rem); margin-top: 1.4rem; max-width: 40ch; }
.contact__mail {
  display: inline-block; margin-top: 2rem;
  font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 3vw, 1.8rem); letter-spacing: -0.02em;
  color: var(--on-bone); border-bottom: 2px solid transparent; transition: border-color .3s var(--ease), color .3s var(--ease);
}
.contact__mail:hover { color: var(--ember); border-bottom-color: var(--ember); }

.form { display: flex; flex-direction: column; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { color: var(--on-bone-dim); }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--on-bone);
  background: transparent; border: none; border-bottom: 1.5px solid var(--bone-line);
  padding: 0.7rem 0; resize: none;
  transition: border-color .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--on-bone-dim); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--on-bone); }
.field.invalid input, .field.invalid textarea { border-bottom-color: var(--ember); }
.field__err { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--ember); min-height: 0.9rem; }
.form__submit { align-self: flex-start; background: var(--ink); color: var(--bone); }
.form__submit:hover { background: var(--ember); color: #fff; }
.form__ok { font-family: var(--mono); font-size: 0.8rem; color: var(--on-bone); letter-spacing: 0.04em; }
.form__ok--err { color: var(--ember); }

/* ----------------------------- FOOTER (ink) ----------------------------- */
.footer { padding: var(--sec-y) var(--pad-x) 2.5rem; border-top: 1px solid var(--ink-3); }
.footer__cols {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.footer__col { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__h { color: var(--on-ink-faint); margin-bottom: 0.4rem; }
.footer__col a { color: var(--on-ink-dim); font-size: 0.95rem; width: fit-content; transition: color .25s var(--ease); }
.footer__col a:hover { color: var(--ember); }
.footer__stamp {
  max-width: var(--maxw); margin: clamp(3rem, 8vw, 6rem) auto 0;
  overflow: visible; text-align: center;
  /* Reserve the single-line height so the JS width-fit + webfont swap can't
     push the footer baseline below it (keeps CLS near zero). */
  min-height: clamp(2.5rem, 20vw, 21rem);
  display: flex; align-items: center; justify-content: center;
}
.footer__stamp .cast {
  /* Fallback size ≈ the fitted size so app.js's precise fit barely resizes it
     (keeps layout-shift near zero). app.js refines it on load/resize. */
  font-size: clamp(2rem, 17vw, 18rem); letter-spacing: -0.04em; display: block;
  white-space: nowrap; line-height: 1.04;
  padding-block: 0.06em; /* protect ascenders/descenders from clipping */
}
.footer__base {
  max-width: var(--maxw); margin: 2rem auto 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--on-ink-faint); padding-top: 1.5rem; border-top: 1px solid var(--ink-3);
}

/* ----------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .studio__grid { grid-template-columns: 1fr; align-items: start; gap: 2rem; }
}
/* Portrait-ish widths: image-led hero reframes to a full-height centre strip
   through the flagship monitor, with the copy anchored low over a bottom scrim. */
@media (max-width: 860px) {
  .hero { justify-content: flex-end; padding: 7rem var(--pad-x) 4.5rem; }
  .hero__img { object-position: 48% 50%; }
  .hero__inner { max-width: 100%; }
  .hero__scrim {
    background:
      linear-gradient(to top,
        rgba(22,19,15,0.95) 0%, rgba(22,19,15,0.82) 22%, rgba(22,19,15,0.4) 42%,
        rgba(22,19,15,0.08) 62%, rgba(22,19,15,0) 78%),
      linear-gradient(to bottom,
        rgba(22,19,15,0.62) 0%, rgba(22,19,15,0) 22%);
  }
  .hero__foot { display: none; }
}
@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .contact__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr; gap: 1.6rem; }
}
/* Phones: stack the showcase above the copy on solid ink — the image keeps its
   full impact up top and blends into the ink, while text is always crisp. */
@media (max-width: 560px) {
  .hero {
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: auto; padding: 0 0 3.5rem;
  }
  .hero__media { position: relative; inset: auto; height: 54vh; min-height: 21rem; }
  .hero__img { object-position: 50% 50%; }
  .hero__glow { height: 54vh; top: 30%; opacity: 0.9; }
  .hero__grain { height: 54vh; }
  .hero__scrim {
    inset: auto; top: 0; left: 0; right: 0; height: 54vh;
    background:
      linear-gradient(to bottom,
        rgba(22,19,15,0.5) 0%, rgba(22,19,15,0) 24%,
        rgba(22,19,15,0) 54%, rgba(22,19,15,0.85) 85%, var(--ink) 100%);
  }
  .hero__inner { max-width: 100%; padding: 2.2rem var(--pad-x) 0; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

/* ----------------------------- REDUCED MOTION ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .cast { animation: none; background-position: 30% 0; }
  .pour { display: none; }
  .cursor { display: none !important; }
  body.has-cursor { cursor: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
