/* subpages.css — shared chrome for who-we-are.html, what-we-do.html,
   why-we-do-it.html, coverage.html, our-team.html.
   The home page (index.html) has its own inline CSS; the subpages share
   this file so we don't maintain five copies of the same nav and footer. */

/* ─── Palette ─── matches BRAND_PALETTE.md */
:root {
  --black:    #0d0f12;
  --dark:     #15181d;
  --card:     #1a1e25;
  --border:   #232831;
  --scarlet:        #c8102e;
  --scarlet-bright: #e3142d;
  --scarlet-dim:    rgba(200,16,46,0.10);
  --fa-yellow:      #ffcd00;
  --steel:          #8b959e;
  --gold:           #c9a86b;
  --stem-blue:      #0b3d91;
  --stem-blue-bright: #2864c8;
  --white:    #f5f3ee;
  --muted:    #6f7280;
  --soft:     #a8abb3;
  color-scheme: dark;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--scarlet);
  z-index: 200;
}

/* ─── Brand-term colorization (filled at runtime by js/brand-color.js) ─── */
.fa-text   { color: var(--scarlet); }
.stem-text { color: var(--stem-blue-bright); }
.rfs-brand { font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.rfs-for {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-style: italic !important;
  text-transform: lowercase !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
.rfs-acronym { font-weight: 800; letter-spacing: 0.06em; }
.rfs-acronym .r,
.rfs-acronym .l { color: var(--scarlet); }
.rfs-acronym .f { color: currentColor; }
.rfs-acronym .s { color: var(--stem-blue-bright); }

/* ─── NAV ─── identical to home */
nav {
  position: fixed;
  top: 2px; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  background: rgba(13,15,18,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark img.mark {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}
.wordmark-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.0;
}
.wordmark-line-1 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wordmark-line-2 {
  font-size: 14px;
  margin-top: 2px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  display: block;
  text-align: right;
  align-self: stretch;
}
.wordmark-line-2 .stem-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: none;
  transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-home { font-weight: 800 !important; color: var(--white) !important; letter-spacing: 0.20em; }

/* Team-access-only nav link */
.nav-link-restricted {
  color: var(--scarlet) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link-restricted:hover { color: var(--scarlet-bright) !important; }
.nav-link-restricted .team-tag {
  font-size: 8px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--scarlet);
  background: var(--scarlet-dim);
  padding: 2px 5px;
  vertical-align: 1px;
  border: 1px solid var(--scarlet);
}

.nav-signin {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 9px 14px;
  background: var(--scarlet);
  border: 1px solid var(--scarlet);
  transition: all .2s;
}
.nav-signin:hover {
  background: var(--scarlet-bright);
  border-color: var(--scarlet-bright);
  color: var(--white);
}
/* Override the runtime brand-colorizer so "Redleg" inside the login button
   stays white against the scarlet fill instead of going scarlet-on-scarlet. */
.nav-signin .fa-text,
.nav-signin .stem-text { color: var(--white) !important; }

.nav-cta {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--stem-blue);
  text-decoration: none;
  border: 1px solid var(--stem-blue);
  padding: 9px 18px;
  font-weight: 700;
  transition: all .2s;
}
.nav-cta:hover {
  background: var(--stem-blue-bright);
  border-color: var(--stem-blue-bright);
}

/* ─── Subpage header ─── small hero with breadcrumb + title + lead */
.subpage-header {
  padding: 130px 56px 60px;
  max-width: 1180px;
  margin: 0 auto;
}

.breadcrumb {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--scarlet);
}
.breadcrumb a {
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid var(--scarlet-dim);
  transition: color .2s, border-color .2s;
}
.breadcrumb a:hover { color: var(--white); border-bottom-color: var(--scarlet); }
.breadcrumb .sep { color: var(--border); }

.subpage-header h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  max-width: 26ch;
}
.subpage-header h1 em {
  font-style: italic;
  color: var(--scarlet);
}

.subpage-lead {
  font-size: 1.2rem;
  color: var(--soft);
  max-width: 64ch;
  line-height: 1.65;
}

/* ─── Sections ─── */
.sec {
  padding: 60px 56px 80px;
  max-width: 1180px;
  margin: 0 auto;
}

.label {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 64px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.label::before {
  content: '';
  width: 36px;
  height: 3px;
  background: var(--scarlet);
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .label { margin-bottom: 40px; }
}

.sec h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 32px;
  max-width: 30ch;
}
.sec h2 em {
  color: var(--scarlet);
  font-style: italic;
}

.body-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--soft);
  max-width: 64ch;
  margin-bottom: 1.4em;
}
.body-text strong { color: var(--white); font-weight: 600; }
.body-text a {
  color: var(--scarlet);
  text-decoration: none;
  border-bottom: 1px solid var(--scarlet-dim);
  transition: border-color .2s;
}
.body-text a:hover { border-bottom-color: var(--scarlet); }

/* ─── HERITAGE callout — same as home page ─── */
.heritage-callout {
  position: relative;
  margin: 32px 0;
  padding: 36px 40px 32px 56px;
  background:
    linear-gradient(115deg, rgba(200,16,46,0.06) 0%, transparent 45%),
    var(--card);
  border-left: 3px solid var(--scarlet);
  box-shadow: inset 3px 0 0 var(--fa-yellow);
  max-width: 80ch;
}
.heritage-callout::before {
  content: 'HERITAGE';
  position: absolute;
  top: -8px;
  left: 56px;
  padding: 2px 10px;
  background: var(--black);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 9px;
  letter-spacing: 0.30em;
  font-weight: 700;
  color: var(--fa-yellow);
}
.heritage-callout .heritage-mark {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  color: var(--scarlet);
  margin-bottom: 14px;
  line-height: 1;
}
.heritage-callout p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--soft);
  line-height: 1.65;
  margin: 0 0 1em;
}
.heritage-callout p:last-child { margin-bottom: 0; }
.heritage-callout p em { font-style: italic; color: var(--scarlet); }
.heritage-callout p strong { color: var(--white); font-weight: 600; }

/* ─── Photo frame (reusable double-stripe) ─── */
.pic-frame {
  position: relative;
  overflow: visible;
  border-left: 3px solid var(--scarlet);
  box-shadow: inset 3px 0 0 var(--fa-yellow);
}
.pic-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: contrast(1.04) saturate(0.94);
}

/* ─── Back-to-home link at bottom of every subpage ─── */
.back-row {
  max-width: 1180px;
  margin: 40px auto;
  padding: 32px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.back-link {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 12px 22px;
  transition: all .2s;
}
.back-link:hover {
  border-color: var(--scarlet);
  color: var(--scarlet);
}
.back-row .siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.back-row .siblings a {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  transition: all .2s;
}
.back-row .siblings a:hover {
  border-color: var(--steel);
  color: var(--white);
}

/* ─── FOOTER ─── three-up: brand mark · copy · slogan */
footer {
  padding: 40px 56px;
  border-top: 1px solid var(--border);
  background: var(--black);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.footer-brand .wordmark { gap: 10px; }
.footer-brand .wordmark img.mark { height: 32px; }
.footer-copy {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--muted);
}
.footer-meta {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-meta .stripe {
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--scarlet);
  vertical-align: middle;
  margin: 0 10px;
}

/* ─── Mobile hamburger (CSS-only, checkbox toggle pattern) ─── */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn {
  display: none;
  cursor: pointer;
  width: 32px; height: 26px;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
  z-index: 110;
}
.nav-toggle-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform .24s, opacity .24s;
  transform-origin: center;
}

@media (max-width: 720px) {
  nav { padding: 0 24px; backdrop-filter: none; }
  .nav-toggle-btn { display: flex; }
  .nav-right {
    position: fixed;
    top: 66px; right: 0; bottom: 0;
    width: min(78vw, 300px);
    background: var(--black);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 48px;
    transform: translateX(110%);
    transition: transform .28s ease;
    z-index: 95;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav-right .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--white);
    letter-spacing: 0.16em;
  }
  .nav-link.hide-mobile { display: block; }
  .nav-toggle-input:checked ~ .nav-right { transform: translateX(0); }
  .nav-toggle-input:checked ~ .nav-toggle-btn span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .nav-toggle-input:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }
  .nav-cta, .nav-signin { align-self: flex-start; margin-top: 16px; }

  .subpage-header { padding: 96px 24px 36px; }
  .sec { padding: 40px 24px 48px; }
  .back-row { padding-left: 24px; padding-right: 24px; }
  footer { padding: 32px 24px; gap: 16px; }
  .footer-meta { font-size: 9px; }
  .label { margin-bottom: 40px; font-size: clamp(1.2rem, 5.2vw, 1.6rem); }
  .subpage-header h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .subpage-lead { font-size: 1rem; line-height: 1.55; }
  /* Heritage callouts on mobile — the HERITAGE chip on top of every box is
     redundant when each box already has its own italic heritage-mark heading
     ("A Redleg.", "A quantitative branch.", etc.). Hide the chip and tighten
     the padding/margins so a stack of 4 callouts reads cleanly on a phone. */
  .heritage-callout {
    padding: 22px 22px 20px 28px;
    margin: 18px 0;
  }
  .heritage-callout::before { display: none; }
  .heritage-callout .heritage-mark {
    font-size: clamp(1.2rem, 6vw, 1.5rem);
    margin-bottom: 10px;
  }
  .heritage-callout p { font-size: 0.98rem; line-height: 1.6; }
  .sec h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .body-text { font-size: 1rem; line-height: 1.6; }
}

/* ─── Extra-narrow phones (iPhone SE, Galaxy S20, foldables ≤ 380px) ─── */
@media (max-width: 380px) {
  .subpage-header { padding: 88px 16px 28px; }
  .sec { padding: 32px 16px 40px; }
  .back-row { padding-left: 16px; padding-right: 16px; }
  footer { padding: 28px 16px; gap: 12px; }
  .footer-meta { font-size: 8px; letter-spacing: 0.16em; }
  .label { font-size: clamp(1.05rem, 5vw, 1.3rem); margin-bottom: 32px; }
  .subpage-header h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); max-width: 22ch; }
  .subpage-lead { font-size: 0.95rem; line-height: 1.5; }
  .heritage-callout { padding: 18px 18px 16px 24px; margin: 14px 0; }
  .heritage-callout .heritage-mark {
    font-size: clamp(1.05rem, 5.5vw, 1.3rem);
    margin-bottom: 8px;
  }
  .heritage-callout p { font-size: 0.94rem; line-height: 1.55; }
  .sec h2 { font-size: clamp(1.3rem, 6.5vw, 1.7rem); }
  .body-text { font-size: 0.95rem; line-height: 1.55; }
}
