/* ═══════════════════════════════════════════
   AACORE SUPPLY — Industrial Obsidian Design System
   Navy #061423 × Gold #F5A623 × White
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── Tokens ── */
:root {
  --navy: #061423;
  --navy-light: #0c2340;
  --navy-mid: #1a3352;
  --gold: #F5A623;
  --gold-dim: #c78a1e;
  --gold-glow: #ffc94d;
  --white: #f4f4f6;
  --gray-100: #e8e8ec;
  --gray-200: #d0d0d8;
  --gray-400: #8a8a9a;
  --gray-600: #4a4a5a;
  --red-alert: #ff4d4d;
  --green-ok: #2ecc71;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --sidebar-width: 280px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #040e1a 0%, var(--navy) 100%);
  border-right: 1px solid rgba(245, 166, 35, 0.15);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--gray-400);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(245, 166, 35, 0.1);
}

.sidebar-nav { list-style: none; flex: 1; }
.sidebar-nav li { margin-bottom: 0.25rem; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--gray-200);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-nav a:hover {
  background: rgba(245, 166, 35, 0.08);
  color: var(--gold);
}

.sidebar-nav a.active {
  background: rgba(245, 166, 35, 0.12);
  color: var(--gold);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-nav .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

.sidebar-badge {
  font-size: 0.6rem;
  background: var(--gold);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: auto;
}

.sidebar-footer {
  font-size: 0.65rem;
  color: var(--gray-400);
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 166, 35, 0.1);
}

/* ── Mobile Toggle ── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 1rem; left: 1rem;
  z-index: 200;
  background: var(--navy-light);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: var(--gold);
  width: 44px; height: 44px;
  border-radius: 10px;
  font-size: 1.4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ── Main Content ── */
.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 3rem 4rem;
  max-width: 1100px;
}

/* ── Hero (Index only) ── */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 166, 35, 0.1);
  color: var(--gold);
  border: 1px solid rgba(245, 166, 35, 0.25);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 .gold { color: var(--gold); }

.hero p {
  font-size: 1.1rem;
  color: var(--gray-200);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.card {
  background: linear-gradient(145deg, rgba(12, 35, 64, 0.8), rgba(6, 20, 35, 0.9));
  border: 1px solid rgba(245, 166, 35, 0.12);
  border-radius: 16px;
  padding: 2rem;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--white);
  display: block;
}

.card:hover {
  border-color: rgba(245, 166, 35, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(245, 166, 35, 0.08);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.card p {
  font-size: 0.85rem;
  color: var(--gray-400);
  line-height: 1.5;
}

.card-arrow {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(245, 166, 35, 0.1);
}

.page-header .breadcrumb {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.page-header .breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  font-size: 1rem;
  color: var(--gray-400);
}

/* ── Content Prose ── */
.prose h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 166, 35, 0.08);
  color: var(--gold);
}

.prose h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--white);
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--gray-200);
}

.prose p {
  margin-bottom: 1rem;
  color: var(--gray-200);
}

.prose strong { color: var(--white); font-weight: 600; }

.prose ul, .prose ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--gray-200);
}

.prose li { margin-bottom: 0.4rem; }

.prose blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(245, 166, 35, 0.05);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--gray-200);
}

/* ── Tables ── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  overflow-x: auto;
}

.prose thead th {
  background: var(--navy-light);
  color: var(--gold);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(245, 166, 35, 0.2);
  white-space: nowrap;
}

.prose tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--gray-200);
}

.prose tbody tr:hover { background: rgba(245, 166, 35, 0.03); }

/* ── Alert Boxes ── */
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.alert-critical {
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.25);
  color: #ff8080;
}

.alert-warning {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
  color: var(--gold);
}

.alert-success {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: #5dda9e;
}

.alert-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--navy-light);
  border: 1px solid rgba(245, 166, 35, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(245, 166, 35, 0.05));
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.cta-banner p { color: var(--gray-200); margin-bottom: 1.5rem; }

.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-gold:hover {
  background: var(--gold-glow);
  box-shadow: 0 8px 30px rgba(245, 166, 35, 0.3);
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-toggle { display: flex; }
  .main { margin-left: 0; padding: 2rem 1.5rem; padding-top: 4rem; }
  .hero h1 { font-size: 2rem; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── Overlay for mobile ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

.overlay.active { display: block; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--navy-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Reading Progress Bar ── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-glow));
  z-index: 999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(245,166,35,0.5);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ── Page Navigation ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 4rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(245,166,35,0.1);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  background: var(--navy-light);
  border: 1px solid rgba(245,166,35,0.15);
  border-radius: 12px;
  color: var(--gray-200);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  max-width: 48%;
}
.page-nav-btn:hover {
  border-color: rgba(245,166,35,0.4);
  color: var(--gold);
  background: rgba(245,166,35,0.05);
}
.page-nav-btn.next { margin-left: auto; text-align: right; flex-direction: row-reverse; }
.page-nav-label { font-size: 0.7rem; color: var(--gray-400); display: block; text-align: left; }
.page-nav-btn.next .page-nav-label { text-align: right; }
.page-nav-title { font-weight: 600; display: block; }
.page-nav-arrow { font-size: 1.1rem; flex-shrink: 0; color: var(--gold); }

/* ── Phase Badge ── */
.phase-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phase-badge.urgent { background: rgba(255,77,77,0.15); color: #ff8080; }
.phase-badge.important { background: rgba(245,166,35,0.15); color: var(--gold); }
.phase-badge.opportunity { background: rgba(46,204,113,0.15); color: #5dda9e; }
