/* ══════════════════════════════════════════════════════════
   RS Political Strategies · Intel Theme
   Shared tokens, typography, nav, footer, buttons, forms, article body.
   Load this on every page. Page-specific layout is inline per page.
   ══════════════════════════════════════════════════════════ */

:root {
  --ink:          #0D0B0A;
  --ink-raised:   #17130F;
  --ink-card:     #1C1814;
  --ash:          #2B2723;
  --stone:        #5E564E;
  --stone-lt:     #8A8273;
  --paper:        #EFE8DA;
  --paper-dim:    #D9D1BE;
  --paper-fade:   #A39C8D;
  --blood:        #B91C1C;
  --blood-deep:   #7A1010;
  --blood-bright: #DC2626;
  --blood-glow:   rgba(220,38,38,0.45);

  --serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Menlo', monospace;

  --max:    1280px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ══════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13,11,10,0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
/* Sticky squiggle under the nav. Sits flush with the bottom edge of the
   nav and scrolls with it since it is painted on the nav itself. */
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 14' preserveAspectRatio='none' fill='none' stroke='%23EFE8DA' stroke-linecap='round'><path d='M0,7 L10,10 L20,10 L30,7 L40,4 L50,4 L60,7 L70,10 L80,10 L90,7 L100,4 L110,4 L120,7 L130,10 L140,10 L150,7 L160,4 L170,4 L180,7 L190,10 L200,10 L210,7 L220,4 L230,4 L240,7 L250,10 L260,10 L270,7 L280,4 L290,4 L300,7 L310,10 L320,10 L330,7 L340,4 L350,4 L360,7 L370,10 L380,10 L390,7 L400,4' stroke-width='0.7'/><path d='M0,7 L10,4 L20,4 L30,7 L40,10 L50,10 L60,7 L70,4 L80,4 L90,7 L100,10 L110,10 L120,7 L130,4 L140,4 L150,7 L160,10 L170,10 L180,7 L190,4 L200,4 L210,7 L220,10 L230,10 L240,7 L250,4 L260,4 L270,7 L280,10 L290,10 L300,7 L310,4 L320,4 L330,7 L340,10 L350,10 L360,7 L370,4 L380,4 L390,7 L400,10' stroke-width='0.7'/></svg>");
  background-repeat: repeat-x;
  background-size: 400px 14px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.95rem; color: var(--paper); }
.brand-text {
  display: flex; flex-direction: column; line-height: 1;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(239,232,218,0.2);
}
.eagle-mark {
  position: relative;
  display: inline-block;
  aspect-ratio: 1151 / 1658;
  height: var(--mark-h, 52px);
  flex-shrink: 0;
}
.eagle-mark img {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}
.eagle-mark svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.eagle-mark svg text {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-style: italic;
  text-anchor: middle;
  font-variation-settings: 'opsz' 144;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: -0.005em;
  color: var(--paper);
}
.brand-sub {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--paper-fade);
  margin-top: 4px;
  font-style: italic;
}
.nav-links {
  display: flex; gap: 2rem; list-style: none;
  font-size: 0.88rem; font-weight: 500;
  align-items: center;
}
.nav-links a {
  color: var(--paper-dim);
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-links a.active::after {
  content:'';
  position:absolute; left:0; right:0; bottom:-8px;
  height:2px; background: var(--blood-bright);
}
.nav-dropdown { position: relative; }
.nav-dropdown > a .caret {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.2s;
}
.nav-dropdown.open > a .caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--ink-raised);
  border: 1px solid rgba(239,232,218,0.12);
  list-style: none;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; }
.dropdown-menu li a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.86rem;
  color: var(--paper-dim);
  border-left: 2px solid transparent;
}
.dropdown-menu li a:hover {
  color: var(--paper);
  border-left-color: var(--blood-bright);
  background: rgba(185,28,28,0.08);
}

.nav-cta {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--blood);
  color: var(--paper);
  background: transparent;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.nav-cta:hover { background: var(--blood); color: var(--paper); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px;
}
.hamburger span {
  width: 22px; height: 2px; background: var(--paper);
  transition: all 0.25s;
}

@media (max-width: 960px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--ink-raised);
    padding: 1rem var(--gutter);
    gap: 0;
    border-bottom: 1px solid rgba(239,232,218,0.1);
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid rgba(239,232,218,0.08); }
  .nav-links > li > a { padding: 0.85rem 0; display: block; }
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    padding: 0 0 0.5rem 1rem;
  }
  .nav-dropdown .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .nav-cta { display: none; }
}

/* ══════════════════════════════════════════════════════════
   SECTION FRAMES
   ══════════════════════════════════════════════════════════ */
section { position: relative; }
.section-pad { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ──────────────────────────────────────────────────────────
   ENGRAVING TEXTURE (shared)
   Add .textured to any dark section to overlay a low-opacity
   engraved-line field behind its content. Skip on paper
   surfaces (.dispatch, article long-read body, forms).
   Per-section strength tuned via --texture-opacity.
   ────────────────────────────────────────────────────────── */
.textured { position: relative; isolation: isolate; }
.textured::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      2deg,
      transparent 0px,
      transparent 6px,
      rgba(239,232,218,0.045) 6px,
      rgba(239,232,218,0.045) 7px
    ),
    repeating-linear-gradient(
      178deg,
      transparent 0px,
      transparent 11px,
      rgba(239,232,218,0.03) 11px,
      rgba(239,232,218,0.03) 12px
    );
  opacity: var(--texture-opacity, 1);
  pointer-events: none;
  z-index: 0;
}
.textured > * { position: relative; z-index: 1; }
/* Sections that set their own stacking with z-index still sit above the field. */
.textured > .section-inner,
.textured > .foot-inner,
.textured > .engage-inner,
.textured > .dispatch-inner,
.textured > .gauge-inner { z-index: 1; }

/* Thin hairline between adjacent dark sections so the color change
   is always anchored. Pair with the textured pattern as needed. */
.rule-top    { border-top:    1px solid rgba(239,232,218,0.10); }
.rule-bottom { border-bottom: 1px solid rgba(239,232,218,0.10); }
/* Ink-side hairline for the paper side of a paper-to-dark handoff. */
.rule-top-ink    { border-top:    1px solid rgba(13,11,10,0.12); }
.rule-bottom-ink { border-bottom: 1px solid rgba(13,11,10,0.12); }
.section-header {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; margin-bottom: 3.5rem; align-items: end;
}
.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blood-bright);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}
.section-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variation-settings: 'opsz' 144;
}
.section-title em { color: var(--blood-bright); font-weight: 700; font-style: italic; }
.section-sub {
  color: var(--paper-dim);
  font-size: 1.02rem;
  max-width: 480px;
  line-height: 1.6;
}
@media (max-width: 780px) {
  .section-header { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--blood);
  color: var(--paper);
  padding: 0.85rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--blood);
  transition: all 0.25s;
}
.btn-primary:hover { background: var(--blood-bright); transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--paper);
  padding: 0.85rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(239,232,218,0.22);
  transition: all 0.25s;
}
.btn-ghost:hover { border-color: var(--paper); background: rgba(239,232,218,0.04); }
.link-read {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--blood-bright);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 1.5px solid var(--blood);
  transition: all 0.2s;
}
.link-read:hover { color: var(--paper); border-color: var(--paper); }

/* ══════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--paper);
}
.form-label .optional {
  color: var(--paper-fade);
  font-weight: 400;
  font-size: 0.8rem;
  margin-left: 0.4rem;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--ink-raised);
  border: 1px solid rgba(239,232,218,0.18);
  border-radius: 4px;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-color: var(--blood-bright); }
.form-textarea { resize: vertical; min-height: 140px; font-family: var(--sans); }

/* ══════════════════════════════════════════════════════════
   ARTICLE BODY (for blog/article pages)
   ══════════════════════════════════════════════════════════ */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) clamp(3rem, 6vw, 5rem);
}
.article-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blood-bright);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.article-headline {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
  margin-bottom: 1.5rem;
  font-variation-settings: 'opsz' 144;
}
.article-headline em { color: var(--blood-bright); font-style: italic; font-weight: 700; }
.article-byline {
  font-size: 0.9rem;
  color: var(--paper-fade);
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(239,232,218,0.12);
}
.article-byline b { color: var(--paper); font-weight: 600; }
.article-body { font-size: 1.05rem; color: var(--paper-dim); line-height: 1.75; }
.article-body > p,
.article-body > ul,
.article-body > ol,
.article-body > blockquote,
.article-body > figure { margin-bottom: 1.4rem; }
.article-body h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.65rem;
  color: var(--paper);
  margin: 2.75rem 0 1rem;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 96;
}
.article-body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--paper);
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.article-body strong, .article-body b { color: var(--paper); font-weight: 600; }
.article-body em { font-style: italic; }
.article-body a { color: var(--blood-bright); border-bottom: 1px solid rgba(220,38,38,0.3); }
.article-body a:hover { color: var(--paper); border-bottom-color: var(--paper); }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--paper);
  border-left: 3px solid var(--blood);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 2rem 0;
  font-variation-settings: 'opsz' 72;
}
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  font-size: 0.85rem;
  color: var(--paper-fade);
  margin-top: 0.75rem;
  font-style: italic;
  text-align: center;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.75rem 0;
}
.article-body th, .article-body td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(239,232,218,0.1);
  text-align: left;
}
.article-body th {
  color: var(--paper);
  font-weight: 600;
  border-bottom: 1.5px solid rgba(239,232,218,0.2);
}
.article-body hr {
  border: 0;
  border-top: 1px solid rgba(239,232,218,0.12);
  margin: 2.5rem 0;
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
footer {
  background: #050403;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid rgba(239,232,218,0.08);
}
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(239,232,218,0.08);
}
.foot-brand { display: flex; align-items: flex-start; gap: 1.1rem; }
.foot-brand .eagle-mark { height: 80px; }
.foot-brand h4 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 0.5rem;
}
.foot-brand p {
  color: var(--paper-fade);
  font-size: 0.88rem;
  max-width: 320px;
  line-height: 1.5;
}
.foot-col h5 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.foot-col a {
  font-size: 0.88rem;
  color: var(--paper-dim);
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--blood-bright); }

.foot-bottom {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  font-size: 0.82rem;
  color: var(--paper-fade);
}
.foot-bottom a { color: var(--paper-fade); }
.foot-bottom a:hover { color: var(--blood-bright); }

@media (max-width: 800px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   REVEAL ON SCROLL
   ══════════════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.on { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }

/* Mono is earned: only for real numbers, real dates, real tickers. */
.mono { font-family: var(--mono); }
