/* ============================================================
   AIC Intelligence Training Center — Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --bg:          #07090f;
  --bg2:         #0b0f1c;
  --bg3:         #0f1626;
  --card:        #111827;
  --navy:        #152040;
  --gold:        #c9a84c;
  --gold-lt:     #e8c96d;
  --gold-dk:     #a07830;
  --text:        #dde1ec;
  --text2:       #8a93ad;
  --text3:       #4e5668;
  --border:      rgba(201,168,76,0.22);
  --border-lt:   rgba(255,255,255,0.07);
  --white:       #ffffff;
  --red:         #9b2335;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; max-width: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); color: var(--white); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--white); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; color: var(--white); font-weight: 600; margin-bottom: .9rem; }
h4 { font-size: .8rem; color: var(--gold); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6rem; }
p  { color: var(--text2); margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }
em { color: var(--text); font-style: italic; }
strong { color: var(--text); font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.gold-bar {
  width: 50px; height: 3px;
  background: var(--gold);
  margin-bottom: 2rem;
}

a { color: var(--gold); }
a:hover { color: var(--gold-lt); }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 5.5rem 2rem; }
section.alt { background: var(--bg2); }
section.dark { background: var(--bg3); }

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: rgba(7,9,15,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 2rem;
}

.nav-brand {
  text-decoration: none;
  display: flex; flex-direction: column;
}
.nav-brand .name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; color: var(--gold); font-weight: 700;
  letter-spacing: .04em; line-height: 1.1;
}
.nav-brand .sub {
  font-size: .6rem; color: var(--text3);
  letter-spacing: .2em; text-transform: uppercase;
}

.nav-links {
  display: flex; list-style: none; align-items: center; gap: .25rem;
}
.nav-links a {
  color: var(--text2); text-decoration: none;
  padding: .4rem .85rem;
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 500;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--gold); background: rgba(201,168,76,.08); }
.nav-links a.active { color: var(--gold); background: rgba(201,168,76,.12); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: .4rem;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; transition: .3s; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 9rem 2rem 5rem;
  position: relative; overflow: hidden;
}
.hero-home   { min-height: 100vh; }

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(7,9,15,.6) 0%, rgba(7,9,15,.88) 100%);
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 860px;
}

.hero h1 { margin-bottom: 1.25rem; text-shadow: 0 2px 40px rgba(0,0,0,.6); }
.hero h1 .g { color: var(--gold); }
.hero p.lead { font-size: 1.1rem; color: var(--text2); max-width: 620px; margin: 0 auto 2.5rem; }

.hero-rule {
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── SEAL SVG ───────────────────────────────────────────────── */
.seal { margin: 0 auto 2.5rem; display: block; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem;
  border: 1px solid var(--gold);
  color: var(--gold); background: transparent;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 4px; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--gold); color: var(--bg); }
.btn-solid { background: var(--gold); color: var(--bg); }
.btn-solid:hover { background: var(--gold-lt); color: var(--bg); }

/* ── MODULE CARDS (Home) ────────────────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.5rem; margin-top: 3.5rem;
}

.module-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 10px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.module-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(201,168,76,.1);
}

.module-thumb {
  height: 190px; position: relative; overflow: hidden;
}
.module-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.module-card:hover .module-thumb img { transform: scale(1.04); }

.module-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,9,15,.85) 0%, transparent 60%);
}

.module-num {
  position: absolute; top: 1rem; left: 1rem;
  font-size: .6rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); background: rgba(7,9,15,.7);
  padding: .25rem .6rem; border-radius: 100px;
  border: 1px solid var(--border);
}

.module-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.module-body h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.module-body p { font-size: .88rem; flex: 1; }

.module-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.25rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); transition: gap .2s;
}
.module-card:hover .module-cta { gap: .7rem; }

/* Gradient fallback thumbs */
.thumb-ic   { background: linear-gradient(135deg,#0a1f50,#1a3d7c); }
.thumb-cyc  { background: linear-gradient(135deg,#0a2a3a,#0e4a5e); }
.thumb-trad { background: linear-gradient(135deg,#1a0e40,#2e1d70); }
.thumb-fail { background: linear-gradient(135deg,#2e0a0a,#4a1010); }

.thumb-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: .18;
}

/* ── HOW-TO TABLE ───────────────────────────────────────────── */
.how-table {
  width: 100%; border-collapse: collapse; margin-top: 2rem;
}
.how-table th {
  text-align: left; padding: .75rem 1.25rem;
  background: var(--navy); color: var(--gold);
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.how-table td {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-lt);
  font-size: .9rem; color: var(--text2); vertical-align: top;
}
.how-table td:first-child { color: var(--white); font-weight: 500; }
.how-table tr:last-child td { border-bottom: none; }
.how-table tr:hover td { background: rgba(255,255,255,.02); }

/* ── CALLOUT / BLOCKQUOTE ───────────────────────────────────── */
.callout {
  border-left: 4px solid var(--gold);
  background: rgba(201,168,76,.06);
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 2rem; margin: 2.5rem 0;
}
.callout p { color: var(--text); font-style: italic; margin: 0; font-size: 1.05rem; }

/* ── AGENCIES TABLE ─────────────────────────────────────────── */
.agency-table {
  width: 100%; border-collapse: collapse; margin-top: 2rem;
  font-size: .88rem;
}
.agency-table thead th {
  text-align: left; padding: .75rem 1rem;
  background: var(--navy); color: var(--gold);
  font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.agency-table tbody td {
  padding: .9rem 1rem; border-bottom: 1px solid var(--border-lt);
  vertical-align: top; color: var(--text2);
}
.agency-table tbody td:first-child { color: var(--white); font-weight: 500; white-space: nowrap; }
.agency-table tbody tr:last-child td { border-bottom: none; }
.agency-table tbody tr:hover td { background: rgba(255,255,255,.025); }

.group-header td {
  background: rgba(21,32,64,.6) !important;
  color: var(--gold) !important;
  font-size: .68rem !important;
  letter-spacing: .2em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  padding: .5rem 1rem !important;
  border-top: 1px solid var(--border) !important;
}

/* ── PRODUCER / CONSUMER ────────────────────────────────────── */
.pc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.5rem;
}
.pc-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-top: 4px solid var(--gold); border-radius: 10px; padding: 2.5rem;
}
.pc-list { list-style: none; margin-top: 1rem; }
.pc-list li {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .65rem 0; border-bottom: 1px solid var(--border-lt);
  font-size: .88rem; color: var(--text2);
}
.pc-list li:last-child { border-bottom: none; }
.pc-list li::before { content: '▸'; color: var(--gold); flex-shrink: 0; margin-top: .15rem; }

/* ── TIMELINE (Cycle) ───────────────────────────────────────── */
.timeline { position: relative; padding-left: 3rem; }
.timeline::before {
  content: ''; position: absolute; left: .85rem; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(var(--gold), transparent);
}

.tl-item {
  position: relative; padding-bottom: 3.5rem;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute; left: -2.15rem; top: .3rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
}

.tl-label {
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .3rem;
}

.tl-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 2rem; margin-top: .75rem;
  transition: border-color .3s;
}
.tl-card:hover { border-color: var(--border); }

.discipline-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 1rem; margin-top: 1.25rem;
}
.disc-chip {
  background: var(--navy); border: 1px solid var(--border);
  border-radius: 6px; padding: .9rem 1rem;
  font-size: .82rem; color: var(--text2);
}
.disc-chip strong { color: var(--gold); display: block; margin-bottom: .2rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }

/* ── ICD STANDARDS GRID ─────────────────────────────────────── */
.standards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(175px,1fr));
  gap: 1.25rem; margin-top: 2.5rem;
}
.std-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 1.75rem; text-align: center;
  transition: border-color .3s;
}
.std-card:hover { border-color: var(--border); }
.std-icon { font-size: 2rem; margin-bottom: .75rem; }
.std-card h4 { margin-bottom: .4rem; }
.std-card p { font-size: .82rem; margin: 0; }

/* ── BIAS CARDS ─────────────────────────────────────────────── */
.bias-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr));
  gap: 1.25rem; margin-top: 2.5rem;
}
.bias-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-top: 3px solid var(--gold); border-radius: 8px; padding: 1.75rem;
  transition: transform .25s, border-top-color .25s;
}
.bias-card:hover { transform: translateY(-3px); border-top-color: var(--gold-lt); }
.bias-icon { font-size: 1.75rem; margin-bottom: .75rem; }

/* ── SAT ACCORDION ──────────────────────────────────────────── */
.sat-wrap { margin-top: 2.5rem; }
.sat-item {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; margin-bottom: .9rem; overflow: hidden;
}
.sat-btn {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.4rem 1.75rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .2s;
}
.sat-btn:hover { background: rgba(201,168,76,.05); }
.sat-btn-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--white); }
.sat-btn-icon { color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
.sat-btn.open .sat-btn-icon { transform: rotate(45deg); }
.sat-body {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  padding: 0 1.75rem;
}
.sat-body.open { max-height: 700px; padding: 0 1.75rem 1.75rem; }
.sat-body p { font-size: .9rem; }

.steps-list { list-style: none; margin-top: 1rem; }
.steps-list li {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: .65rem 0; border-bottom: 1px solid var(--border-lt);
  font-size: .88rem; color: var(--text2);
}
.steps-list li:last-child { border-bottom: none; }
.step-num {
  min-width: 26px; height: 26px;
  background: var(--gold); color: var(--bg);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
}

/* ── WRITING PRINCIPLES ─────────────────────────────────────── */
.principle-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1.25rem; margin-top: 2.5rem;
}
.principle-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 1.75rem;
}
.principle-card h4 { margin-bottom: .6rem; }

/* ── FAILURE TYPES ──────────────────────────────────────────── */
.fail-type-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1rem; margin-top: 2.5rem;
}
.fail-type-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 1.5rem;
  border-left: 3px solid var(--gold);
}
.fail-type-card h4 { color: var(--gold); margin-bottom: .4rem; }

/* ── CASE STUDIES ───────────────────────────────────────────── */
.case-study {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 12px; overflow: hidden; margin-bottom: 3rem;
}
.cs-banner {
  padding: 2.5rem 3rem; position: relative; overflow: hidden;
}
.cs-banner-1 { background: linear-gradient(135deg, #0d1a2e 0%, #1a2a3e 100%); }
.cs-banner-2 { background: linear-gradient(135deg, #0f0d20 0%, #1f1a2e 100%); }
.cs-banner-3 { background: linear-gradient(135deg, #1a0d0d 0%, #2e1a0d 100%); }

.cs-year {
  font-family: 'Playfair Display', serif;
  font-size: 6rem; font-weight: 700; line-height: 1;
  color: var(--white); opacity: .06;
  position: absolute; right: 2rem; top: .5rem; pointer-events: none;
}
.cs-tags { margin-bottom: 1rem; }
.cs-tag {
  display: inline-block;
  background: rgba(201,168,76,.1); border: 1px solid var(--border);
  color: var(--gold); font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
  padding: .2rem .7rem; border-radius: 100px; margin-right: .5rem; margin-bottom: .5rem;
}
.cs-body { padding: 2rem 3rem 2.5rem; }
.cs-body p { font-size: .95rem; }

.findings { list-style: none; margin: 1.5rem 0; }
.findings li {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: .75rem 0; border-bottom: 1px solid var(--border-lt);
  font-size: .9rem; color: var(--text2);
}
.findings li:last-child { border-bottom: none; }
.find-icon { color: var(--gold); flex-shrink: 0; font-size: 1rem; margin-top: .1rem; }

/* ── LESSON GRID ────────────────────────────────────────────── */
.lesson-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.lesson-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 2rem;
}
.lesson-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; font-weight: 700; color: var(--gold); opacity: .25;
  line-height: 1; margin-bottom: .5rem;
}

/* ── BIBLIOGRAPHY ───────────────────────────────────────────── */
.bib-list { margin-top: 1.5rem; }
.bib-entry {
  padding: 1.25rem 0; border-bottom: 1px solid var(--border-lt);
  font-size: .92rem; color: var(--text2); line-height: 1.75;
}
.bib-entry:last-child { border-bottom: none; }
.bib-entry em { color: var(--text); font-style: italic; }

.reading-card {
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 2rem; margin-bottom: 1.25rem;
  display: grid; grid-template-columns: 3rem 1fr; gap: 1.5rem; align-items: start;
}
.reading-icon { font-size: 2.5rem; line-height: 1; }

.source-link {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card); border: 1px solid var(--border-lt);
  border-radius: 8px; padding: 1.25rem 1.75rem; margin-bottom: .75rem;
  text-decoration: none; color: var(--text2); font-size: .9rem;
  transition: border-color .2s, color .2s;
}
.source-link:hover { border-color: var(--gold); color: var(--text); }
.source-link .src-icon { font-size: 1.2rem; flex-shrink: 0; }
.source-link .src-name { color: var(--gold); font-weight: 600; font-size: .85rem; }
.source-link .src-desc { font-size: .82rem; }

/* ── FOOTNOTES ──────────────────────────────────────────────── */
.footnotes-section {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}
.fn-inner { max-width: 1180px; margin: 0 auto; }
.fn-title {
  font-size: .68rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.25rem; font-weight: 600;
}
.fn-list { list-style: decimal; padding-left: 1.5rem; }
.fn-list li { font-size: .78rem; color: var(--text3); line-height: 1.7; margin-bottom: .4rem; }
.fn-list li em { color: var(--text2); }

/* ── SITE FOOTER ────────────────────────────────────────────── */
footer {
  background: #03050b; border-top: 1px solid var(--border-lt);
  padding: 2.5rem 2rem; text-align: center;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  color: var(--gold); font-size: .9rem; margin-bottom: .4rem; font-weight: 700;
}
footer p { font-size: .75rem; color: var(--text3); margin-bottom: .2rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: .8rem; flex-wrap: wrap; }
.footer-links a { font-size: .72rem; color: var(--text3); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }

/* ── STAT ROW ───────────────────────────────────────────────── */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1.5rem; margin: 3rem 0;
}
.stat-box {
  text-align: center; padding: 2rem 1rem;
  background: var(--card); border: 1px solid var(--border-lt); border-radius: 8px;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; font-weight: 700; color: var(--gold);
  line-height: 1; margin-bottom: .4rem;
}
.stat-label { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text3); }

/* ── TWO-COL ────────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.two-col img { border-radius: 8px; border: 1px solid var(--border); width: 100%; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: rgba(7,9,15,.98); border-top: 1px solid var(--border); padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem 2rem; border-radius: 0; }
  .nav-toggle { display: flex; }
  .two-col, .pc-grid { grid-template-columns: 1fr; gap: 2rem; }
  section { padding: 3.5rem 1.5rem; }
  .hero { padding: 8rem 1.5rem 4rem; }
  .cs-body, .cs-banner { padding: 1.5rem; }
  .cs-year { font-size: 4rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
