/* Tappmedia NYC design system, V2.
   One source of truth for colour, type, spacing and motion.
   Every page links this file. No page defines its own :root. */

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
}
/* Metric-matched fallbacks so the swap does not move the layout. */
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 81%;
  ascent-override: 114%;
  descent-override: 35.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 101.5%;
  ascent-override: 105%;
  descent-override: 29.6%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0E0E0E;
  --ink-raised: #161513;
  --ink-line: rgba(245, 240, 226, 0.10);
  --ink-line-strong: rgba(245, 240, 226, 0.22);
  --cream: #F5F0E2;
  --cream-dim: rgba(245, 240, 226, 0.68);
  --gold: #C4973D;
  --gold-press: #B88E3A;
  --gold-deep: #85611C;
  --ink-on-cream: #0E0E0E;
  --ink-on-cream-dim: rgba(14, 14, 14, 0.72);
  --cream-line: rgba(14, 14, 14, 0.16);

  --font-display: "Cormorant Garamond", "Cormorant Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Manrope Fallback", Arial, Helvetica, sans-serif;

  --maxw: 1200px;
  --outer: 1440px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(64px, 6.5vw, 96px);
  --nav-h: 80px;
  --col-gap: clamp(16px, 2vw, 32px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 18px; } }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
[hidden] { display: none !important; }

/* ---------- Type scale ---------- */
.h1, h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 7.2vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h2, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h3, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.15;
}
.lead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.6;
  color: var(--cream-dim);
}
.small { font-size: 15px; line-height: 1.6; }
.label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.num {
  font-family: var(--font-body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
/* Gold italic emphasis. Budget: 4 on Home, 1 on every other page. */
.gi {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
em { font-style: italic; }
strong { font-weight: 600; }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.on-cream :focus-visible { outline-color: var(--gold-deep); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px; top: -80px;
  z-index: 200;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Motion: one pattern, once ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.in { opacity: 1; transform: none; }
/* Above-the-fold text is painted at once (LCP budget); only the 12px rise animates. */
.js #hero .reveal, .js .page-hero .reveal, .js .journal-head .reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
