/* ============================================
   Crisis Briefing — Scrollable Storytelling
   Mobile-first | Glassmorphism | Dark
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #06080e;
  --bg-2: #0c1018;
  --surface: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.055);
  --glass-hover: rgba(255,255,255,0.09);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-b: rgba(255,255,255,0.14);
  --text: #f0f2f5;
  --text-2: rgba(255,255,255,0.55);
  --text-3: rgba(255,255,255,0.3);
  --red: #ff4d4f;
  --red-g: rgba(255,77,79,0.12);
  --orange: #fa8c16;
  --orange-g: rgba(250,140,22,0.12);
  --green: #52c41a;
  --green-g: rgba(82,196,26,0.12);
  --blue: #4096ff;
  --blue-g: rgba(64,150,255,0.10);
  --purple: #b37feb;
  --purple-g: rgba(179,127,235,0.10);
  --cyan: #36cfc9;
  --grad: linear-gradient(135deg, #4096ff 0%, #b37feb 100%);
  --grad-warm: linear-gradient(135deg, #fa8c16 0%, #ff4d4f 100%);
  --grad-cool: linear-gradient(135deg, #36cfc9 0%, #4096ff 100%);
  --r: 14px;
  --r-sm: 10px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--blue); text-decoration: none; }

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6,8,14,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}

.nav-brand {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(3px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(3px, -5px); }

.nav-links {
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  background: rgba(6,8,14,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22,1,0.36,1), padding 0.3s;
}

.nav-links.open {
  max-height: 320px;
  padding: 12px 0;
}

.nav-links a {
  display: block;
  padding: 10px 24px;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--glass);
}

/* --- Side dots (desktop) --- */
.side-dots {
  display: none;
}

/* --- Section base --- */
.sect {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px 20px 60px;
  position: relative;
}

.sect-half {
  padding: 48px 20px;
}

.sect-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px 24px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at 30% 20%, rgba(64,150,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(179,127,235,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero .sub {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 400px;
  margin-bottom: 24px;
  position: relative;
}

.hero .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
  position: relative;
}

.hero .meta {
  font-size: 0.75rem;
  color: var(--text-3);
  position: relative;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: bounce 2s infinite;
}

.scroll-hint span {
  font-size: 0.65rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-hint svg {
  opacity: 0.4;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Typography --- */
h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

h2 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sect-lead {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 24px;
  max-width: 500px;
}

/* --- Tags --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-red { background: var(--red-g); color: var(--red); border: 1px solid rgba(255,77,79,0.2); }
.tag-orange { background: var(--orange-g); color: var(--orange); border: 1px solid rgba(250,140,22,0.2); }
.tag-green { background: var(--green-g); color: var(--green); border: 1px solid rgba(82,196,26,0.2); }
.tag-blue { background: var(--blue-g); color: var(--blue); border: 1px solid rgba(64,150,255,0.2); }
.tag-purple { background: var(--purple-g); color: var(--purple); border: 1px solid rgba(179,127,235,0.2); }

/* --- Glass card --- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), border-color 0.3s;
}

.card:hover {
  border-color: var(--glass-border-b);
}

.card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 6px;
}

.card-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.card-note {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.4;
}

/* --- Card grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}

.card-grid-2 { grid-template-columns: 1fr; gap: 12px; margin: 16px 0; display: grid; }
.card-grid-3 { grid-template-columns: 1fr; gap: 12px; margin: 16px 0; display: grid; }

/* --- Stat row (horizontal on mobile) --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.stat-row .card {
  text-align: center;
  padding: 16px 10px;
}

.stat-row .card-num {
  font-size: 1.5rem;
}

/* --- Glow card with top gradient --- */
.glow-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 20px;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
}

/* --- Icon-stat: icon + number side by side --- */
.icon-stat {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-stat svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--red), var(--orange), var(--blue));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding: 8px 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-2);
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue-g);
  border: 2px solid var(--bg);
}

.tl-item.tl-red::before { background: var(--red); box-shadow: 0 0 10px var(--red-g); }
.tl-item.tl-orange::before { background: var(--orange); box-shadow: 0 0 10px var(--orange-g); }

.tl-date {
  font-weight: 700;
  color: var(--blue);
}

.tl-item.tl-red .tl-date { color: var(--red); }
.tl-item.tl-orange .tl-date { color: var(--orange); }

/* --- Highlight / callout box --- */
.callout {
  background: var(--blue-g);
  border: 1px solid rgba(64,150,255,0.15);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}

.callout.c-red { background: var(--red-g); border-color: rgba(255,77,79,0.15); }
.callout.c-green { background: var(--green-g); border-color: rgba(82,196,26,0.15); }

.callout p {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.callout .c-sub {
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 400;
  margin-top: 6px;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  white-space: nowrap;
}

.tab-btn:hover { border-color: var(--glass-border-b); color: var(--text); }

.tab-btn.active {
  background: var(--blue-g);
  border-color: var(--blue);
  color: var(--blue);
}

.tab-btn.active[data-color="green"] { background: var(--green-g); border-color: var(--green); color: var(--green); }
.tab-btn.active[data-color="orange"] { background: var(--orange-g); border-color: var(--orange); color: var(--orange); }
.tab-btn.active[data-color="red"] { background: var(--red-g); border-color: var(--red); color: var(--red); }
.tab-btn.active[data-color="purple"] { background: var(--purple-g); border-color: var(--purple); color: var(--purple); }

.tab-panel {
  display: none;
  animation: fadeUp 0.35s cubic-bezier(0.22,1,0.36,1);
}

.tab-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Expandable / accordion --- */
.expand-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 10px;
  transition: border-color 0.3s;
}

.expand-card.open { border-color: var(--glass-border-b); }

.expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.2s;
  gap: 12px;
}

.expand-header:hover { background: var(--glass-hover); }

.expand-header h4 {
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.expand-chevron {
  transition: transform 0.3s;
  flex-shrink: 0;
  opacity: 0.4;
}

.expand-card.open .expand-chevron { transform: rotate(180deg); }

.expand-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22,1,0.36,1);
}

.expand-body-inner {
  padding: 0 18px 18px;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

.expand-body-inner ul {
  list-style: none;
  padding: 0;
}

.expand-body-inner li {
  padding: 4px 0 4px 18px;
  position: relative;
}

.expand-body-inner li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

/* --- Table (responsive) --- */
.r-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: var(--r);
  border: 1px solid var(--glass-border);
}

.r-table table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.r-table th {
  background: var(--glass);
  color: var(--blue);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border-b);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.r-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
}

.r-table tr:last-child td { border-bottom: none; }

/* --- Dashboard grid --- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.dash-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 14px;
  text-align: center;
}

.dash-label {
  font-size: 0.6rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.dash-val {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 4px 0;
  letter-spacing: -0.02em;
}

.dash-sub {
  font-size: 0.6rem;
}

.dash-sub .watch { color: var(--orange); }
.dash-sub .crisis { color: var(--red); margin-left: 8px; }

/* --- Scroll animations --- */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up.d1 { transition-delay: 0.1s; }
.reveal-up.d2 { transition-delay: 0.2s; }
.reveal-up.d3 { transition-delay: 0.3s; }
.reveal-up.d4 { transition-delay: 0.4s; }

/* --- Divider --- */
.sect-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border-b), transparent);
  margin: 0 auto;
  max-width: 200px;
}

/* --- Section header with icon --- */
.sect-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.sect-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sect-icon.si-red { background: var(--red-g); }
.sect-icon.si-orange { background: var(--orange-g); }
.sect-icon.si-green { background: var(--green-g); }
.sect-icon.si-blue { background: var(--blue-g); }
.sect-icon.si-purple { background: var(--purple-g); }

/* --- Color helpers --- */
.c-red { color: var(--red) !important; }
.c-orange { color: var(--orange) !important; }
.c-green { color: var(--green) !important; }
.c-blue { color: var(--blue) !important; }
.c-purple { color: var(--purple) !important; }
.c-dim { color: var(--text-2) !important; }

strong { color: var(--blue); }
em { color: var(--orange); font-style: normal; font-weight: 600; }

/* --- Closing --- */
.closing {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 60px 24px;
}

.closing h2 {
  font-size: 1.8rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.closing .quote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--green);
  max-width: 480px;
  line-height: 1.55;
  margin-bottom: 28px;
}

.closing .steps p {
  font-size: 0.9rem;
  margin: 4px 0;
  color: var(--text-2);
}

.closing .footer-note {
  margin-top: 40px;
  font-size: 0.7rem;
  color: var(--text-3);
}

/* --- Visual: scenario visual --- */
.scenario-vis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.scenario-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--glass);
  overflow: hidden;
  position: relative;
}

.scenario-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22,1,0.36,1);
  width: 0;
}

.scenario-bar-fill.animated { width: var(--w); }

.scenario-pct {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

/* ============================================
   TABLET (600px+)
   ============================================ */
@media (min-width: 600px) {
  body { font-size: 17px; }

  .sect { padding: 100px 32px 60px; }
  .sect-half { padding: 60px 32px; }
  .sect-inner { max-width: 860px; }

  h2 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.8rem; }

  .card-grid-2 { grid-template-columns: 1fr 1fr; }
  .card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }

  .stat-row .card-num { font-size: 1.8rem; }

  .dash-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links a { padding: 10px 32px; }
}

/* ============================================
   DESKTOP (960px+)
   ============================================ */
@media (min-width: 960px) {
  body { font-size: 18px; }

  .sect { padding: 120px 48px 80px; }
  .sect-inner { max-width: 920px; }

  h2 { font-size: 2.1rem; }
  .hero h1 { font-size: 3.2rem; }

  .stat-row .card-num { font-size: 2.1rem; }
  .card-num { font-size: 2.2rem; }

  .nav-toggle { display: none; }

  .nav-links {
    position: static;
    max-height: none;
    background: none;
    backdrop-filter: none;
    border: none;
    display: flex;
    gap: 0;
    padding: 0;
    overflow: visible;
  }

  .nav-links a {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  /* Side dots */
  .side-dots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99;
  }

  .side-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
  }

  .side-dot:hover { background: var(--text-2); }
  .side-dot.active { background: var(--blue); transform: scale(1.4); }
}

/* ============================================
   Print
   ============================================ */
@media print {
  .nav, .side-dots, .scroll-hint { display: none; }
  .sect { min-height: auto; page-break-after: always; }
  body { background: #fff; color: #111; }
}
