/* ============================================================
   ACG Strategy — Brand Tokens
   Per BRAND.md. Single source of truth for color, type, layout.
   ============================================================ */

:root {
  /* Color — Navy ground */
  --acg-navy: #0A1A2F;
  --acg-navy-deep: #050E1C;
  --acg-navy-soft: #142A47;

  /* Color — Warm ink (NEVER pure white) */
  --acg-ink: #F4EFE6;
  --acg-ink-muted: rgba(244, 239, 230, 0.62);
  --acg-ink-faint: rgba(244, 239, 230, 0.28);
  --acg-rule: rgba(244, 239, 230, 0.18);

  /* Color — Accent (the only one) */
  --acg-accent: #E87722;
  --acg-accent-soft: rgba(232, 119, 34, 0.10);

  /* Color — Paper ground */
  --acg-paper: #F8F4EC;
  --acg-paper-deep: #EFE9DC;
  --acg-ink-on-paper: #0A1A2F;
  --acg-ink-on-paper-muted: rgba(10, 26, 47, 0.62);
  --acg-ink-on-paper-faint: rgba(10, 26, 47, 0.28);
  --acg-rule-on-paper: rgba(10, 26, 47, 0.14);

  /* Type families */
  --acg-display: "Newsreader", "Times New Roman", Times, serif;
  --acg-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --acg-gutter: 64px;
  --acg-inner-gutter: 32px;
  --acg-content-max: 1320px;
  --acg-hero-max: 1440px;
  --acg-section-pad: 140px;
}

/* Accent swap targets — tweak panel writes to these */
:root[data-accent="orange"] {
  --acg-accent: #E87722;
  --acg-accent-soft: rgba(232, 119, 34, 0.10);
}
:root[data-accent="brass"] {
  --acg-accent: #B8893C;
  --acg-accent-soft: rgba(184, 137, 60, 0.10);
}
:root[data-accent="signal"] {
  --acg-accent: #C4392B;
  --acg-accent-soft: rgba(196, 57, 43, 0.10);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--acg-navy);
  color: var(--acg-ink);
  font-family: var(--acg-text);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Type scale ---------- */
.t-display-xl,
.t-display-l,
.t-display-m,
.t-display-s {
  font-family: var(--acg-display);
  font-weight: 800;
  font-variation-settings: "opsz" 72;
  line-height: 0.98;
  margin: 0;
}
.t-display-xl { font-size: clamp(44px, 6.4vw, 92px); letter-spacing: -0.03em; }
.t-display-l  { font-size: clamp(32px, 3.8vw, 52px); letter-spacing: -0.025em; }
.t-display-m  { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.02em; line-height: 1.04; }
.t-display-s  { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.015em; line-height: 1.05; }

.t-lede {
  font-family: var(--acg-display);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "opsz" 72;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--acg-ink-muted);
}

.t-body-l { font-size: 19px; line-height: 1.55; }
.t-body   { font-size: 17px; line-height: 1.6; }
.t-body-s { font-size: 15px; line-height: 1.55; }

.t-label {
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1;
}
.t-micro {
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  line-height: 1;
}

/* Italic accent on display headlines */
.accent-period,
.accent-mark {
  color: var(--acg-accent);
  font-style: italic;
  font-weight: 600;
  display: inline;
  white-space: nowrap;
}
.accent-italic {
  font-style: italic;
  font-weight: 600;
  color: var(--acg-accent);
}

/* ---------- Components: eyebrow / dot / rule / mark ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--acg-accent);
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--acg-accent);
}
.eyebrow.on-paper { color: var(--acg-ink-on-paper-muted); }
.eyebrow.on-paper::before { background: var(--acg-accent); }

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acg-accent);
  vertical-align: middle;
  margin-right: 10px;
}

.hairline { height: 1px; background: var(--acg-rule); width: 100%; border: 0; margin: 0; }
.hairline.on-paper { background: var(--acg-rule-on-paper); }
.vrule { width: 1px; background: var(--acg-rule); align-self: stretch; }
.vrule.on-paper { background: var(--acg-rule-on-paper); }

.mark-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.mark-block .line-1 { color: var(--acg-ink-muted); }
.mark-block .line-2 { color: var(--acg-ink-faint); }

.cluster {
  color: var(--acg-ink-muted);
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.cluster .sep { color: var(--acg-ink-faint); margin: 0 8px; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--acg-content-max);
  margin: 0 auto;
  padding: 0 var(--acg-gutter);
}
.container.wide { max-width: var(--acg-hero-max); }

.section {
  padding: var(--acg-section-pad) 0;
}
.section.paper {
  background: var(--acg-paper);
  color: var(--acg-ink-on-paper);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--acg-ink);
  background: transparent;
  color: var(--acg-ink);
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 28px;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
  cursor: pointer;
}
.btn:hover {
  background: var(--acg-ink);
  color: var(--acg-navy);
}
.btn.on-paper {
  border-color: var(--acg-ink-on-paper);
  color: var(--acg-ink-on-paper);
}
.btn.on-paper:hover {
  background: var(--acg-ink-on-paper);
  color: var(--acg-paper);
}
.btn .arrow {
  width: 14px; height: 1px; background: currentColor; position: relative;
}
.btn .arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px; border-right: 1px solid currentColor; border-top: 1px solid currentColor;
  transform: rotate(45deg);
}

.link-underline {
  position: relative;
  border-bottom: 1px solid var(--acg-accent);
  padding-bottom: 1px;
  transition: border-width 120ms ease-out;
}
.link-underline:hover { border-bottom-width: 2px; padding-bottom: 0; }

.link-arrow {
  color: var(--acg-accent);
  font-family: var(--acg-text);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.link-arrow::after {
  content: "→";
  font-family: var(--acg-text);
  letter-spacing: 0;
  transition: transform 160ms ease-out;
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Hero textured backdrop (per §5.6 — texture, not subject) ---------- */
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--acg-navy);
  background-image:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(232, 119, 34, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(20, 42, 71, 0.9) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 100%, var(--acg-navy-deep) 0%, transparent 60%),
    /* fine grid texture */
    linear-gradient(rgba(244, 239, 230, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.025) 1px, transparent 1px);
  background-size: auto, auto, auto, 48px 48px, 48px 48px;
  background-position: center, top right, center bottom, 0 0, 0 0;
  z-index: 0;
}
.hero-bg::after {
  /* subtle noise overlay using svg fractal */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ---------- Motion (per §6) ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: 80ms; }
.fade-in.delay-2 { transition-delay: 160ms; }
.fade-in.delay-3 { transition-delay: 240ms; }
.fade-in.delay-4 { transition-delay: 320ms; }
.fade-in.delay-5 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--acg-accent);
  color: var(--acg-navy);
}

/* ---------- Utility ---------- */
.muted { color: var(--acg-ink-muted); }
.faint { color: var(--acg-ink-faint); }
.muted-on-paper { color: var(--acg-ink-on-paper-muted); }
.faint-on-paper { color: var(--acg-ink-on-paper-faint); }
.serif { font-family: var(--acg-display); }
.italic { font-style: italic; }
.center { text-align: center; }

/* ---------- Scrollbar (subtle) ---------- */
html { scrollbar-color: var(--acg-rule) transparent; scrollbar-width: thin; }
