/* ============================================================
   Genesis & Mozilla — Document Design System
   Dark cinematic theme: #0a0a0f base, cyan/gold/orange accents,
   Playfair Display + Inter typography
   Day 7 consistency: always "Day 7" never "Day Seven"
   ============================================================ */

:root {
  --cyan: #00D9FF;
  --cyan-dim: rgba(0,217,255,0.15);
  --gold: #FFD700;
  --gold-dim: rgba(255,215,0,0.15);
  --moz-orange: #FF4F1F;
  --moz-dim: rgba(255,79,31,0.15);
  --d7-green: #22c55e;
  --d7-dim: rgba(34,197,94,0.15);
  --dark: #0a0a0f;
  --surface: #12121a;
  --card: #1a1a2e;
  --text: #e2e8f0;
  --text-dim: rgba(226,232,240,0.5);
  --text-muted: rgba(226,232,240,0.25);
  --sidebar-w: 280px;
  --toolbar-h: 64px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.8;
  color: var(--text);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: rgba(0,217,255,0.3); border-radius: 3px; }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; }

a { color: var(--cyan); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold); }

/* ============ LAYOUT ============ */
.doc-layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.doc-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(0,217,255,0.08);
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease;
}

.doc-sidebar .sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(0,217,255,0.08);
}

.doc-sidebar .sidebar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; display: block; margin-bottom: 0.25rem;
}
.doc-sidebar .sidebar-brand span { color: var(--moz-orange); }

.doc-sidebar .sidebar-back {
  font-size: 0.75rem; color: var(--text-dim);
  text-decoration: none; letter-spacing: 1px;
}
.doc-sidebar .sidebar-back:hover { color: var(--cyan); }

.doc-sidebar .sidebar-nav { padding: 1rem 0; flex: 1; }

.doc-sidebar .sidebar-section {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted); padding: 1.25rem 1.25rem 0.5rem;
}

.doc-sidebar .sidebar-nav a {
  display: block; padding: 0.6rem 1.25rem;
  font-size: 1rem; color: var(--text-dim);
  text-decoration: none; transition: all 0.2s;
  border-left: 2px solid transparent;
}
.doc-sidebar .sidebar-nav a:hover {
  color: var(--cyan); background: rgba(0,217,255,0.04);
  border-left-color: rgba(0,217,255,0.3);
}
.doc-sidebar .sidebar-nav a.active {
  color: var(--cyan); background: rgba(0,217,255,0.06);
  border-left-color: var(--cyan); font-weight: 600;
}

/* ============ MAIN CONTENT ============ */
.doc-main {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  padding: 3rem 4rem 6rem;
  max-width: 900px;
}

/* ============ TOOLBAR ============ */
.doc-toolbar {
  position: fixed; top: 0;
  left: var(--sidebar-w); right: 0;
  height: var(--toolbar-h);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center;
  padding: 0 2rem; z-index: 90;
}
.doc-toolbar .toolbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem; color: var(--text-dim);
}
.doc-toolbar .toolbar-actions { margin-left: auto; display: flex; gap: 0.75rem; }
.doc-toolbar .toolbar-btn {
  font-size: 0.75rem; padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; color: var(--text-dim);
  cursor: pointer; transition: all 0.2s;
}
.doc-toolbar .toolbar-btn:hover {
  background: rgba(0,217,255,0.08);
  border-color: rgba(0,217,255,0.2);
  color: var(--cyan);
}

/* ============ TYPOGRAPHY ============ */
.doc-main h1 {
  font-size: 3rem; line-height: 1.2;
  margin-bottom: 1.5rem; color: #fff;
}
.doc-main h2 {
  font-size: 2.8rem; line-height: 1.25;
  margin: 3.5rem 0 1.25rem; color: #fff;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.doc-main h3 {
  font-size: 2rem; margin: 2.5rem 0 1rem;
  color: rgba(255,255,255,0.85);
}
.doc-main h4 {
  font-size: 1.15rem; margin: 1.5rem 0 0.5rem;
  color: var(--cyan);
}
.doc-main p { margin-bottom: 1.25rem; color: var(--text-dim); }
.doc-main strong { color: rgba(255,255,255,0.8); }
.doc-main em { color: rgba(255,255,255,0.6); }

/* ============ CARDS ============ */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.25rem; padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  margin-bottom: 1.5rem;
}
.glass-card:hover {
  border-color: rgba(0,217,255,0.15);
  box-shadow: 0 20px 60px -15px rgba(0,217,255,0.06);
  transform: translateY(-3px);
}

.accent-card-cyan { border-left: 3px solid var(--cyan); }
.accent-card-orange { border-left: 3px solid var(--moz-orange); }
.accent-card-green { border-left: 3px solid var(--d7-green); }
.accent-card-gold { border-left: 3px solid var(--gold); }

/* ============ STATS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-box { text-align: center; padding: 1.5rem; }
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--d7-green), var(--gold));
  background-size: 200% 200%;
  animation: shimmer 6s ease infinite;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============ BLOCKQUOTES ============ */
.doc-main blockquote {
  border-left: none !important;
  border-image: none !important;
  position: relative;
  font-style: italic;
  padding: 2rem 2rem 2rem 3rem;
  margin: 2rem 0;
  background: rgba(255,255,255,0.02);
  border-radius: 1rem;
}
.doc-main blockquote::before {
  content: '“';
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  line-height: 1;
  font-family: Georgia, serif;
}
.doc-main blockquote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-style: italic;
  color: rgba(255,255,255,0.65); margin-bottom: 0;
}
.doc-main blockquote cite {
  display: block; margin-top: 0.75rem;
  font-size: 0.8rem; font-style: normal;
  color: var(--text-muted);
}

/* ============ TABLES ============ */
.doc-main table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: 0.85rem;
}
.doc-main th {
  text-align: left; padding: 0.75rem 1rem;
  background: rgba(0,217,255,0.06);
  color: var(--cyan); font-weight: 600;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid rgba(0,217,255,0.15);
}
.doc-main td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-dim);
}
.doc-main tr:hover td { background: rgba(255,255,255,0.02); }

/* ============ LISTS ============ */
.doc-main ul, .doc-main ol { margin: 1rem 0 1.5rem 1.5rem; }
.doc-main li { margin-bottom: 0.5rem; color: var(--text-dim); }

/* ============ DIVIDER ============ */
.divider {
  height: 1px; margin: 3rem 0;
  background: linear-gradient(90deg, transparent, rgba(0,217,255,0.15), rgba(255,215,0,0.15), transparent);
}

/* ============ VIDEO SECTION ============ */
.video-section {
  position: relative; margin: 3rem 0;
  border-radius: 1.25rem; overflow: hidden;
  background: rgba(0,217,255,0.03);
  min-height: 400px;
  display: flex; align-items: center; justify-content: center;
}
.video-section .play-btn {
  width: 80px; height: 80px; border-radius: 50%;
  border: 2px solid rgba(0,217,255,0.4);
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.4s;
}
.video-section .play-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 60px rgba(0,217,255,0.3);
  border-color: var(--cyan);
}
.video-section .play-btn svg { width: 32px; height: 32px; fill: var(--cyan); margin-left: 4px; }

/* ============ GRADIENT TEXT ============ */
.genesis-gradient {
  background: linear-gradient(135deg, #0066ff, #00cc88);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mozilla-gradient {
  background: linear-gradient(135deg, #ff4500, #ff8c00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan), var(--d7-green), var(--gold));
  background-size: 200% 200%;
  animation: shimmer 6s ease infinite;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ LABEL / TAG ============ */
.label {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 0.75rem; display: block;
}
.label-cyan { color: rgba(0,217,255,0.5); }
.label-orange { color: rgba(255,79,31,0.5); }
.label-green { color: rgba(34,197,94,0.5); }
.label-gold { color: rgba(255,215,0,0.5); }

/* ============ FLAGS & COUNTRIES ============ */
.flag { font-size: 2rem; line-height: 1.2; }
.country-name {
  font-size: 1.1rem; font-weight: 600;
  color: rgba(255,255,255,0.8);
}

/* ============ HUMAN IMAGERY ============ */
.human-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
}
.human-image img {
  width: 100%; height: auto; display: block;
  object-fit: cover;
}
.human-image-round {
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  border: 2px solid rgba(197,162,88,0.2);
}
.human-image-round img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
}

/* ============ SECTION SPACING ============ */
section { padding: 5rem 0; }

/* ============ MOBILE ============ */
.sidebar-toggle {
  display: none; position: fixed; top: 1rem; left: 1rem;
  z-index: 200; width: 40px; height: 40px;
  background: rgba(10,10,15,0.95); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; cursor: pointer;
  color: var(--cyan); font-size: 1.25rem;
  align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .doc-sidebar { transform: translateX(-100%); }
  .doc-sidebar.open { transform: translateX(0); }
  .doc-main { margin-left: 0; padding: 2rem 1.5rem 4rem; }
  .doc-toolbar { left: 0; }
  .doc-main h1 { font-size: 2rem; }
  .doc-main h2 { font-size: 1.75rem; }
  .doc-main h3 { font-size: 1.35rem; }
  .stat-value { font-size: 1.75rem; }
}

@media print {
  .doc-sidebar, .doc-toolbar, .sidebar-toggle { display: none; }
  .doc-main { margin-left: 0; padding: 2rem; }
  body { background: #fff; color: #000; }
}
