/* ==========================================================================
   PLI — base.css
   Design tokens, reset, typography, buttons, shared utilities.
   Palette: deep navy / aged gold / warm off-white. System fonts only.
   No external fonts, no CDNs, no network dependencies.
   ========================================================================== */

:root {
  /* ---- Color tokens ---- */
  --navy:        #15243d;   /* brand navy */
  --navy-deep:   #0e1a30;
  --navy-abyss:  #0a1526;   /* deepest, for footer / overlays */
  --navy-mid:    #1b2f52;
  --navy-soft:   #2a3d5e;
  --navy-line:   #33466b;   /* hairlines on dark */

  --gold:        #d4af5a;   /* brand gold */
  --gold-bright: #e6c877;
  --gold-deep:   #a8843a;
  --gold-ink:    #7d6126;   /* gold dark enough for text on light bg */

  --cream:       #f3ead2;
  --paper:       #f7f2e7;   /* page background */
  --paper-raised:#fffdf8;   /* card background */
  --paper-sunk:  #efe7d4;   /* inset / alt band on light */
  --ink:         #17233a;   /* body text on light */
  --ink-strong:  #10192b;
  --muted:       #4d5c75;   /* secondary text on light */
  --muted-soft:  #6b7890;
  --hairline:    #ddd2b8;   /* warm rule lines on light */
  --hairline-soft:#e7ddc6;
  --on-navy:     #e9e2cf;   /* body text on navy */
  --on-navy-muted:#aab3c6;

  /* ---- Type ---- */
  --serif: Georgia, "Times New Roman", "Liberation Serif", "Nimbus Roman", serif;
  --sans:  "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "SFMono-Regular", "Cascadia Code", "Consolas", "Liberation Mono", Menlo, monospace;

  /* ---- Rhythm ---- */
  --measure: 66ch;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
  --space-6: 7rem;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-sm: 4px;

  /* ---- Depth ---- */
  --shadow-1: 0 1px 2px rgba(14, 26, 48, 0.06), 0 1px 3px rgba(14, 26, 48, 0.05);
  --shadow-2: 0 4px 10px rgba(14, 26, 48, 0.08), 0 2px 4px rgba(14, 26, 48, 0.05);
  --shadow-3: 0 14px 34px rgba(14, 26, 48, 0.14), 0 4px 10px rgba(14, 26, 48, 0.08);
  --shadow-gold: 0 8px 26px rgba(168, 132, 58, 0.22);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast: 130ms;
  --t-med: 220ms;
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* sticky header offset for anchors */
}

body {
  margin: 0;
  background-color: var(--paper);
  /* Barely-there warm texture: two faint radial washes. No image files. */
  background-image:
    radial-gradient(48rem 40rem at 108% -8%, rgba(212, 175, 90, 0.06), transparent 60%),
    radial-gradient(40rem 34rem at -12% 4%, rgba(21, 36, 61, 0.035), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.16;
  margin: 0 0 var(--space-2);
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.35rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.48rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 var(--space-2); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.4rem; max-width: var(--measure); }
li { margin-bottom: 0.5rem; }

a {
  color: var(--navy-mid);
  text-decoration-color: var(--gold-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--gold-ink); }

strong { color: var(--navy); font-weight: 700; }
em { color: inherit; }

/* Letter-spaced small-caps eyebrow above headings */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 0.85rem;
}
.kicker::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.on-dark .kicker { color: var(--gold-bright); }
.on-dark .kicker::before { background: var(--gold); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--cream); }
.on-dark p, .on-dark li { color: var(--on-navy); }
.on-dark a { color: var(--cream); text-decoration-color: var(--gold); }
.on-dark a:hover { color: var(--gold-bright); }
.on-dark strong { color: var(--cream); }

.lede {
  font-size: clamp(1.15rem, 1.9vw, 1.3rem);
  line-height: 1.58;
  color: var(--muted);
  max-width: 60ch;
}
.on-dark .lede { color: var(--on-navy); }

/* Section heading intro block */
.section-head { max-width: 54ch; margin-bottom: var(--space-4); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.section-head.center .rule-gold { margin-inline: auto; }
.section-head p { color: var(--muted); }
.on-dark .section-head p { color: var(--on-navy); }

/* ---------- Focus visibility (accessibility) ---------- */

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-dark :focus-visible, .site-header :focus-visible { outline-color: var(--gold-bright); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform var(--t-med) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-mid); color: #fff; box-shadow: var(--shadow-2); }

.btn-gold { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-bright); color: var(--navy-abyss); box-shadow: var(--shadow-gold); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy-soft); }
.btn-outline:hover { border-color: var(--gold-deep); color: var(--gold-ink); }

.on-dark .btn-outline { color: var(--cream); border-color: var(--navy-line); }
.on-dark .btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(212,175,90,0.06); }

.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.9rem; }

/* Plain text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  font-family: var(--sans);
  font-size: 0.98rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.link-arrow .arrow { transition: transform var(--t-med) var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---------- Layout primitives ---------- */

.container { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, 52rem); margin-inline: auto; }
.container-wide { width: min(100% - 2.5rem, 78rem); margin-inline: auto; }

.section { padding-block: var(--space-5); }
.section-tight { padding-block: var(--space-4); }

.rule-gold {
  border: 0;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 2px;
  margin: 0 0 var(--space-3);
}

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: var(--space-2); }
.eyebrow-muted { color: var(--muted-soft); font-size: 0.9rem; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 0.6rem 1rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn:hover, [data-reveal] { transform: none !important; }
}
