/* ========================================
   SUBPAGE.CSS — Shared styles for all TLC subpages
   Extracted from style.css to provide consistent
   nav, footer, typography, colors, and layout
   across every page outside the homepage.
   ======================================== */

/* ----------------------------------------
   CSS CUSTOM PROPERTIES
   ---------------------------------------- */
:root {
  --nav-accent: #0f4c81;
  --nav-hover-accent: #FF2042;
  --title-link: #0f4c81;
  --hover-link: #d94545;
  --muted-text: #ce0a0a;
  --body-text: #111;
  --footer-link: #0f4c81;
  --card-bg: #fff;
  --card-border: #ccc;
  --site-background-image: url('media/site-background-desktop.png');
  --site-background-image-mobile: url('media/site-background-mobile.png');
}

/* ----------------------------------------
   FONT FACE
   ---------------------------------------- */
@font-face {
  font-family: 'Modern Typewriter';
  src: url('media/MODERN_TYPEWRITER.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------
   GLOBAL / BASE
   ---------------------------------------- */
html {
  background-color: #000;
}

/* Shared site background for subpages */
body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin: 0;
  min-height: 100vh;
  background-image: var(--site-background-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 0;
  color: #000;
}

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

/* ----------------------------------------
   NAV BAR — sticky top navigation
   ---------------------------------------- */
.nav-cards {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-content: stretch;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin: 0;
  width: auto;
  padding-top: 6px;
  padding-bottom: 6px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
}

.nav-cards > .nav-card,
.nav-cards > .dropdown-container {
  flex: 0 0 auto;
}

.nav-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #010102;
  color: #fff;
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid #fff;
  box-shadow: 0 6px 14px rgba(15,76,129,0.18);
  text-align: center;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.nav-card:hover {
  background: #121417;
  border-color: var(--nav-hover-accent);
  box-shadow: 0 0 0 1px rgba(255,32,66,0.18), 0 10px 22px rgba(255,32,66,0.22);
  color: var(--nav-hover-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.nav-card:focus { outline: 2px solid #1f33ea; outline-offset: 0; }
.nav-card .nav-title { letter-spacing: 0.02em; }
.nav-card--active,
.nav-card--active:visited {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}

/* ----------------------------------------
   NAV — Site identity home link
   ---------------------------------------- */
.nav-home {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: #fff;
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 140ms ease, text-shadow 140ms ease, transform 140ms ease;
}
.nav-home:hover {
  color: var(--nav-hover-accent);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255,32,66,0.28);
  transform: translateY(-1px);
}

/* ----------------------------------------
   NAV DROPDOWN — flyout menus
   ---------------------------------------- */
.dropdown-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dropdown-container > .nav-card {
  flex: 0 0 auto;
  overflow: hidden;
}

.dropdown-links {
  display: none;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  margin-top: 1px;
  padding: 8px;
  background: #252121f3;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
}

.dropdown-links.open {
  display: flex;
}

.sub-nav-card {
  padding: 8px 14px;
  border-radius: 2px;
  box-shadow: 0 10px 25px rgba(15, 76, 129, 0.12);
  border: 1px solid #012366;
  background: linear-gradient(30deg, #0a0b0c, #0909099b, #20040441);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: 13px;
  white-space: nowrap;
}

.sub-nav-card:hover {
  background: #0a0b0b;
  color: var(--nav-hover-accent);
  text-decoration: underline;
}

/* ----------------------------------------
   HAMBURGER — mobile nav toggle
   ---------------------------------------- */
.hamburger {
  display: none;
  background: none;
  border: 2px solid #fff;
  color: #fff;
  font-size: 24px;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;
  border-radius: 4px;
  margin-left: auto;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }

/* ----------------------------------------
   SUBPAGE LAYOUT — main content area
   ---------------------------------------- */
.subpage-main {
  max-width: 900px;
  margin: 16px auto;
  padding: 0 16px;
}

.subpage-heading {
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 8px 0;
  padding: 0;
  letter-spacing: 0.02em;
}

.subpage-lead {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body-text);
  margin: 0 0 6px 0;
}

.subpage-pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}

.subpage-pill-list li {
  margin: 0;
  padding: 0;
}

.subpage-pill-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  background: #010102;
  color: #fff;
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid #fff;
}

.subpage-pill-list a:visited {
  color: #fff;
}

.subpage-pill-list a:hover {
  background: #0a0b0d;
  color: #fff;
}

/* ----------------------------------------
   BACK LINK — return to parent page
   ---------------------------------------- */
.back-link {
  display: inline-block;
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: 13px;
  color: #8ab4f8;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  max-width: 800px;
}
.back-link::before {
  content: "← ";
  font-family: Arial, 'Helvetica Neue', sans-serif;
}
/* Arrow glyphs — Modern Typewriter lacks these */
.arrow {
  font-family: Arial, 'Helvetica Neue', sans-serif;
}
.back-link:visited { color: #8ab4f8; }
.back-link:hover { color: #fff; text-decoration: underline; }

/* ----------------------------------------
   SUBPAGE INTRO — lead paragraph on dark bg
   ---------------------------------------- */
.subpage-intro {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #fff;
  max-width: 800px;
  margin: 0 auto 20px auto;
}

/* ----------------------------------------
   SOURCE NOTE — attribution line
   ---------------------------------------- */
.source-note {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #fff;
}
.source-note a { color: #8ab4f8; text-decoration: underline; border-bottom: none; }
.source-note a:visited { color: #8ab4f8; }
.source-note a:hover { color: #fff; }

/* ----------------------------------------
   SECTION NOTE — footer attribution on subpages
   ---------------------------------------- */
.section-note {
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  max-width: 800px;
  margin: 24px auto 0 auto;
  font-style: italic;
}
.section-note a { color: #8ab4f8; text-decoration: none; }
.section-note a:visited { color: #8ab4f8; }
.section-note a:hover { text-decoration: underline; color: #fff; }

/* ----------------------------------------
   CONTENT CARDS — white blocks for content
   ---------------------------------------- */
.summary-block {
  padding: 14px 22px;
  margin: 0 auto 10px auto;
  line-height: 1.5;
  color: #000;
  max-width: 800px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-block p {
  margin: 0 0 12px;
  text-align: left;
}
.summary-block p:last-child { margin-bottom: 0; }

/* ----------------------------------------
   REFERENCE LIST — document index cards
   ---------------------------------------- */
.reference-list {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--card-bg);
  border: 1px solid #000;
  padding: 10px;
}

.ref-heading {
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  font-size: clamp(15px, 1.8vw, 20px);
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  width: 100%;
  max-width: 800px;
  margin: 16px auto 0 auto;
  padding: 0 10px;
  text-align: left;
}

/* ----------------------------------------
   FOOTER
   ---------------------------------------- */
.site-footer {
  background: #000;
  color: #ccc;
  padding: 24px 20px;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.6;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-col {
  flex: 1 1 200px;
  min-width: 180px;
}

.footer-col h3 {
  font-family: 'Modern Typewriter', 'Courier New', monospace;
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: 0.04em;
}

.footer-col a {
  color: var(--footer-link);
  text-decoration: none;
}
.footer-col a:visited { color: var(--footer-link); }
.footer-col a:hover { text-decoration: underline; color: #fff; }

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col ul li { margin-bottom: 6px; }

.footer-bottom {
  max-width: 800px;
  margin: 20px auto 0 auto;
  padding-top: 16px;
  border-top: 1px solid #333;
  text-align: center;
  color: #888;
  font-size: 12px;
}

@media (max-width: 980px) {
  /* Fixed nav on mobile so hamburger menu overlays content */
  body { padding-top: 52px; }
  .hamburger { display: block; }
  .nav-cards {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    min-height: 52px;
    background: transparent;
  }
  .nav-home {
    position: absolute;
    top: 6px;
    left: 10px;
  }
  .hamburger {
    position: absolute;
    top: 6px;
    right: 10px;
  }
  .nav-cards .nav-card,
  .nav-cards .dropdown-container {
    display: none;
  }
  .nav-cards.menu-open {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 4px;
    padding-top: 52px;
    padding-bottom: 10px;
    padding-right: 10px;
  }
  .nav-cards.menu-open .nav-card,
  .nav-cards.menu-open .dropdown-container {
    display: flex;
    width: min(60vw, 280px);
    justify-content: center;
  }
  .nav-cards.menu-open .nav-card {
    box-sizing: border-box;
  }
  .nav-cards.menu-open .dropdown-container {
    flex-direction: column;
    align-items: center;
  }
  .dropdown-links {
    position: static;
    min-width: 100%;
    margin-top: 4px;
  }
}

/* ----------------------------------------
   MOBILE RESPONSIVE — 768px breakpoint
   ---------------------------------------- */
@media (max-width: 768px) {
  /* Fix mobile background: iOS breaks background-attachment:fixed, and
     background-size:cover + scroll sizes to the full body height (zoom).
     Use a position:fixed pseudo-element instead — iOS handles this fine. */
  body {
    background-image: none;
    background-attachment: scroll;
  }
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: var(--site-background-image-mobile);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
  }

  .subpage-main {
    margin: 12px auto;
    padding: 0 12px;
  }

  .summary-block {
    padding: 12px 14px;
  }
}
