/* Dhaatu: shared system. Builds on tokens.css (linked first). */

:root {
  --pad: 16px;
  --gap: 16px;
  --header-h: 64px;
  --radius-control: 2px;
  --radius-media: 0px;
  --display: var(--font-display), 'Cormorant', Georgia, serif;
  --text: var(--font-text), 'Helvetica Neue', Arial, sans-serif;
  --label: var(--font-label), 'Helvetica Neue', Arial, sans-serif;
  --fs-body: 16px;
  --scrim: rgba(22, 19, 15, 0.55);
}
@media (min-width: 900px) {
  :root { --pad: 4vw; --gap: 2vw; --header-h: 76px; --fs-body: 17px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { background: var(--bg); color: var(--ink); }
body {
  margin: 0;
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-bottom: 52px;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { border-radius: var(--radius-media); }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Grain: the photos carry film grain, the ground carries it too, so nothing reads flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.d-xl { font-size: clamp(56px, 9vw, 148px); }
.d-l  { font-size: clamp(48px, 7vw, 112px); }
.d-m  { font-size: clamp(40px, 4.6vw, 64px); line-height: 1; }
.d-s  { font-size: clamp(28px, 2.4vw, 34px); line-height: 1.05; }
.d-xs { font-size: 26px; line-height: 1.05; }
.figure {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.92;
  font-variant-numeric: lining-nums;
}
.label, .eyebrow {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-stretch: 112%;
}
@media (min-width: 900px) { .label, .eyebrow { font-size: 13px; } }
.eyebrow { color: var(--accent); margin: 0 0 20px; }
.muted { color: var(--muted); }
.lede { max-width: 46ch; }
.measure { max-width: 60ch; }
.ember { color: var(--ember); }
/* Placeholders from the brief: shown as written, muted label type. */
.ph {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-stretch: 112%;
}
.ground-ash .ph { color: var(--ash-muted); }

/* ---------- Layout ---------- */
.wrap { padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.section { position: relative; padding-block: clamp(96px, 14vw, 200px); }
.ground-ash { background: var(--ash); color: var(--ash-ink); }
.ground-ash .muted { color: var(--ash-muted); }
.ground-ash .eyebrow { color: var(--ash-ink); }
.ground-surface { background: var(--surface); }
.hair { display: block; height: 1px; background: var(--rule); border: 0; margin: 0; transform-origin: 0 50%; }
.ground-ash .hair { background: var(--ash-rule); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; font: 600 13px/1 var(--label); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-stretch: 112%;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-quick) var(--ease-glow), color var(--dur-quick) var(--ease-glow), box-shadow var(--dur-quick) var(--ease-glow);
}
.btn::after { content: "→"; font-family: var(--text); letter-spacing: 0; transition: transform var(--dur-quick) var(--ease-glow); }
.btn:hover { background: #d8b25e; box-shadow: 0 0 0 6px rgba(201, 160, 74, 0.14); }
.btn:hover::after { transform: translateX(4px); }
.btn--sm { min-height: 44px; padding: 10px 16px; font-size: 12px; letter-spacing: 0.14em; }
.btn--sm::after { display: none; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-stretch: 112%;
  text-decoration: none;
  color: var(--ink);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 calc(100% - 10px);
  transition: background-size var(--dur-quick) var(--ease-glow), color var(--dur-quick) var(--ease-glow);
}
.link::after { content: "→"; font-family: var(--text); letter-spacing: 0; color: var(--accent); }
.link:hover { color: var(--accent); background-size: 0% 1px; }
.ground-ash .link { color: var(--ash-ink); }
.ground-ash .link::after { color: var(--ash-ink); }
.mail {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  display: inline-block;
  padding-block: 12px 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--pad);
  background: linear-gradient(rgba(22, 19, 15, 0.82), rgba(22, 19, 15, 0));
  transition: background var(--dur-standard) var(--ease-settle), color var(--dur-quick) var(--ease-glow);
}
.site-header.is-scrolled { background: linear-gradient(rgba(22, 19, 15, 0.94), rgba(22, 19, 15, 0.6)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.site-header__logo { display: flex; align-items: center; min-height: 44px; }
.site-header__logo img { height: 30px; width: auto; }
@media (min-width: 900px) { .site-header__logo img { height: 36px; } }
.site-nav { display: none; }
@media (min-width: 1100px) {
  .site-nav { display: flex; gap: 28px; align-items: center; }
}
.site-nav a {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-stretch: 112%;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  opacity: 0.86;
  transition: opacity var(--dur-quick) var(--ease-glow), color var(--dur-quick) var(--ease-glow);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; color: var(--accent); }
.site-header__end { display: flex; align-items: center; gap: 10px; }
.menu-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (min-width: 1100px) { .menu-btn { display: none; } }
@media (max-width: 420px) { .site-header .btn--sm { padding: 10px 12px; letter-spacing: 0.1em; } .site-header__logo img { height: 24px; } }
/* Over an Ash ground the header turns to soot ink. */
html.header-ash .site-header { background: linear-gradient(rgba(237, 230, 216, 0.92), rgba(237, 230, 216, 0)); }
html.header-ash .site-nav a, html.header-ash .menu-btn { color: var(--ash-ink); }
html.header-ash .site-nav a[aria-current="page"] { color: #8a6a24; }
html.header-ash .menu-btn { border-color: var(--ash-rule); }
html.header-ash .site-header__logo img { filter: brightness(0.35) saturate(1.2); }

/* ---------- Menu (phones and tablets) ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--pad) 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__close { position: absolute; top: 10px; right: var(--pad); }
.menu ol { counter-reset: m; }
.menu li { border-top: 1px solid var(--rule); }
.menu li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 9vw, 64px);
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.menu li a::before { counter-increment: m; content: "0" counter(m); font: 600 12px/1 var(--label); letter-spacing: .18em; color: var(--muted); }
.menu li a[aria-current="page"] { color: var(--accent); }
.menu__foot { display: grid; gap: 12px; margin-top: 32px; }

/* Without script the menu cannot open: its list shows inline under the header at every width,
   and the Menu and Close buttons, the header links it repeats and its foot go. */
html:not(.js) .menu-btn,
html:not(.js) .site-nav,
html:not(.js) .menu__foot { display: none; }
html:not(.js) .menu[hidden] {
  display: block;
  position: relative;
  inset: auto;
  z-index: 1;
  overflow: visible;
  padding: calc(var(--header-h) + 4px) var(--pad) 8px;
  border-bottom: 1px solid var(--rule);
}
html:not(.js) .menu ol { display: flex; flex-wrap: wrap; gap: 0 24px; }
html:not(.js) .menu li { border-top: 0; }
html:not(.js) .menu li a {
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding-block: 0;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-stretch: 112%;
}

/* ---------- The gauge ---------- */
.gauge {
  position: fixed;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  color: var(--accent);
  background: rgba(22, 19, 15, 0.94);
  border-top: 1px solid var(--rule);
  height: 52px;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  transition: color var(--dur-quick) var(--ease-glow), background var(--dur-quick) var(--ease-glow), border-color var(--dur-quick) var(--ease-glow);
}
.gauge__rule { display: none; }
.gauge__face { position: relative; flex: 1; height: 100%; }
.gauge__rows, .gauge__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: opacity 420ms var(--ease-settle), transform 420ms var(--ease-settle);
}
.gauge__row { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.gauge__k { font: 600 12px/1 var(--label); letter-spacing: 0.08em; text-transform: uppercase; }
.gauge__v { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.gauge__v small { font: 600 12px/1 var(--label); letter-spacing: 0.08em; color: var(--accent); margin-left: 3px; }
.gauge .long { display: none; }
.gauge__stage { opacity: 0; transform: translateY(12px); justify-content: flex-start; }
.gauge__stage .gauge__v { font-size: 17px; }
.gauge.is-stage .gauge__rows { opacity: 0; transform: translateY(-12px); }
.gauge.is-stage .gauge__stage { opacity: 1; transform: none; }
.gauge__v.is-strike { animation: strike 420ms var(--ease-settle); }
@keyframes strike { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .gauge {
    left: 24px;
    right: auto;
    bottom: 24px;
    height: auto;
    width: 248px;
    padding: 0 0 0 14px;
    background: none;
    border: 0;
    mix-blend-mode: normal;
    align-items: stretch;
  }
  .gauge__rule { display: block; position: absolute; left: 0; top: 2px; bottom: 2px; width: 1px; background: rgba(201, 160, 74, 0.28); }
  .gauge__rule i { display: block; position: absolute; inset: 0; background: currentColor; transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
  .gauge__face { height: 104px; }
  .gauge__rows, .gauge__stage { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; }
  .gauge__row { gap: 10px; }
  .gauge__k { font-size: 12px; letter-spacing: 0.18em; min-width: 92px; font-stretch: 112%; }
  .gauge__v { font-size: 26px; text-shadow: 0 1px 12px rgba(22, 19, 15, 0.7); }
  .gauge__stage .gauge__v { font-size: 24px; max-width: 230px; line-height: 1.05; white-space: normal; }
  .gauge .long { display: inline; }
  .gauge .short { display: none; }
  html.gauge-ash .gauge { color: var(--ash-ink); }
  html.gauge-ash .gauge__v { color: var(--ash-ink); text-shadow: none; }
  html.gauge-ash .gauge__v small { color: var(--ash-ink); }
  html.gauge-ash .gauge__rule { background: rgba(22, 19, 15, 0.2); }
}
@media (max-width: 899px) {
  html.gauge-ash .gauge { background: rgba(237, 230, 216, 0.96); color: var(--ash-ink); border-color: var(--ash-rule); }
  html.gauge-ash .gauge__v, html.gauge-ash .gauge__v small { color: var(--ash-ink); }
}
@media (max-width: 370px) { .gauge__v { font-size: 15px; } .gauge__k { letter-spacing: 0.04em; } }

/* ---------- Closing ask (every page) ---------- */
.ask { position: relative; display: grid; min-height: 100svh; background: var(--bg); }
@media (min-width: 900px) { .ask { grid-template-columns: 1fr 1fr; } }
.ask__copy { padding: clamp(96px, 12vw, 180px) var(--pad) 64px; display: flex; flex-direction: column; justify-content: center; gap: 28px; position: relative; z-index: 2; }
.ask__copy .lede { color: var(--ink); }
.ask__actions { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; }
.ask__media { position: relative; overflow: hidden; min-height: 70svh; }
.ask__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 40%; }
.ask__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(22, 19, 15, 0) 28%); pointer-events: none; }
@media (max-width: 899px) { .ask__media::after { background: linear-gradient(180deg, var(--bg) 0%, rgba(22, 19, 15, 0) 30%); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); color: var(--ink); border-top: 1px solid var(--rule); padding: 56px var(--pad) 40px; position: relative; z-index: 2; }
.site-footer__mark { display: block; width: 100%; max-width: 1400px; height: auto; margin: 0 0 48px; }
.site-footer__grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .site-footer { padding-bottom: 168px; }
  .site-footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .site-footer__addr { grid-column: 4 / span 4; }
  .site-footer__nav { grid-column: 8 / span 3; }
  .site-footer__trade { grid-column: 11 / span 2; }
}
.site-footer address { font-style: normal; }
.site-footer h2 { font: 600 12px/1.4 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer__nav ul { display: grid; gap: 0; }
.site-footer__nav a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-family: var(--display); font-size: 24px; font-weight: 600; }
.site-footer__nav a:hover, .site-footer__nav a[aria-current="page"] { color: var(--accent); }
.site-footer__legal { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); }

/* ---------- Media helpers ---------- */
.frame { position: relative; overflow: hidden; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim-left::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,19,15,.86) 0%, rgba(22,19,15,.35) 55%, rgba(22,19,15,0) 100%); pointer-events: none; }

/* ---------- Hairline rows (numbered lists, terms, facts) ---------- */
.rows > li { position: relative; padding-block: 22px; display: grid; gap: 8px; }
.rows > li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule); transform-origin: 0 50%; transform: scaleX(var(--draw, 1)); }
.ground-ash .rows > li::before { background: var(--ash-rule); }
@media (min-width: 900px) { .rows--split > li { grid-template-columns: 1fr 1fr; align-items: baseline; gap: var(--gap); } }

/* ---------- Print and reduced motion ---------- */
@media print {
  .site-header, .gauge, .menu, body::after { display: none !important; }
  * { opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
