/* ==========================================================================
   Ishizaki Heritage Project — site styles
   Extends Boonie Dog Studios tokens. Prestige editorial dialect:
   - Flame is rare (one per page, the headline period)
   - Newsreader italic + roman lead. Inter Tight only for nav eyebrows.
   - Hairline rules, deep margins, old-style figures everywhere.
   ========================================================================== */

@import url('tokens.css');

/* ---------- Override: shift the studio voice toward editorial prestige ---------- */
:root {
  --fs-display: 92px;
  --fs-h1: 64px;
  --fs-h2: 40px;
  --fs-h3: 30px;
  --fs-h4: 22px;
  --fs-body: 18px;
  --fs-lede: 22px;

  --measure-body: 60ch;
  --measure-wide: 72ch;

  --gutter: clamp(24px, 5vw, 96px);
  --page-max: 1360px;

  /* Editorial type overrides — serif leads, sans is rare */
  --font-editorial: 'Newsreader', 'Iowan Old Style', 'Georgia', serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-editorial);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg-soft);
  background: var(--bg);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1, "dlig" 1;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Page frame ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.shell {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Top nav ---------- */
.nav {
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  border: 0;
}
.brand-line-1 {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--stone);
}
.brand-line-2 {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 4px;
}
.brand-line-2 .dot { color: var(--flame); }

.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ash);
  border: 0;
  padding-bottom: 2px;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.foot {
  margin-top: auto;
  padding: 56px 0 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
  letter-spacing: 0.04em;
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: baseline; }
.foot a { color: var(--stone); border: 0; }
.foot a:hover { color: var(--ink); }

/* ---------- Editorial type primitives ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--stone);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--stone);
}
.section-label .num {
  color: var(--ink);
  font-weight: 500;
  margin-right: 10px;
}

h1, h2, h3, h4 {
  font-family: var(--font-editorial);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h1 { font-size: clamp(44px, 6vw, var(--fs-h1)); line-height: 1.04; }
h2 { font-size: clamp(30px, 3.8vw, var(--fs-h2)); line-height: 1.12; font-weight: 500; }
h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 500; }
h4 { font-size: var(--fs-h4); line-height: 1.3; font-weight: 500; }

.display-serif {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
}

.flag-period::after { content: "."; color: var(--flame); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: var(--measure-wide);
  font-weight: 400;
}

.pull-quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 32ch;
  text-wrap: balance;
}
.pull-quote::before { content: "\201C"; color: var(--stone); margin-right: 2px; }
.pull-quote::after  { content: "\201D"; color: var(--stone); margin-left: 2px; }

.attrib {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 18px;
}

.rule { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }
.rule-tight { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- Button-ish (rare) ---------- */
.inq {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink);
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  transition: gap var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.inq:hover { gap: 22px; }
.inq .arrow { display: inline-block; transition: transform var(--dur-base) var(--ease-out); }
.inq:hover .arrow { transform: translateX(2px); }

/* ---------- Generic section rhythm ---------- */
.section {
  padding: clamp(64px, 10vh, 128px) 0;
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr);
  gap: var(--s-7);
  margin-bottom: var(--s-7);
  align-items: start;
}
.section-head .label { padding-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-meta { display: none; }
  .nav-links { gap: 18px; }
  .section-head { grid-template-columns: 1fr; gap: var(--s-3); }
  .section-head .label { padding-top: 0; }
}
@media (max-width: 560px) {
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-links { flex-wrap: wrap; }
  h1 { font-size: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Small utilities ---------- */
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--stone); }
.ink-invert { background: var(--ink); color: var(--paper); }
.ink-invert h1, .ink-invert h2, .ink-invert h3, .ink-invert h4 { color: var(--paper); }
.ink-invert .eyebrow, .ink-invert .mono, .ink-invert .section-label { color: var(--bone); }
.ink-invert .eyebrow::before { background: var(--bone); }
.ink-invert .lede { color: var(--linen); }
.ink-invert .rule, .ink-invert hr { border-color: #2B2A27; }

/* Printable old-style figures in mono blocks — keep lining for legibility */
.mono, .meta { font-feature-settings: "tnum" 1, "lnum" 1; }
