/* ═══════════════════════════════════════════
   Google Antigravity Training Deck
   Theme: Google Gemini colours + dark mode
   Azhan-style — CSS custom properties, accessible
   ═══════════════════════════════════════════ */

/* ── Google colour palette ── */
:root {
  --google-blue: #4285F4;
  --google-red: #EA4335;
  --google-yellow: #FBBC04;
  --google-green: #34A853;
  
  --navy: #1a237e;
  --deep-blue: #174ea6;
  --ink: #202124;
  --muted: #5f6368;
  --light-muted: #9aa0a6;
  --bg: #ffffff;
  --paper: #f8f9fa;
  --card-bg: #ffffff;
  --line: #dadce0;
  --shadow: 0 1px 3px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.3);
  --shadow-lg: 0 4px 12px rgba(60,64,67,.2);
  --radius: 12px;
  
  --font-body: 'Google Sans', 'Public Sans', 'Inter', -apple-system, sans-serif;
  --font-heading: 'Google Sans Display', 'Fraunces', 'Playfair Display', serif;
  --font-mono: 'Google Sans Mono', 'JetBrains Mono', monospace;
}

/* ── Dark mode ── */
html.dark {
  --ink: #e8eaed;
  --muted: #9aa0a6;
  --bg: #202124;
  --paper: #292a2d;
  --card-bg: #303134;
  --line: #3c4043;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow: hidden;
  height: 100vh;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--google-blue), var(--google-green));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a11y-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.a11y-btn:hover { background: var(--paper); }
.a11y-btn.active { background: var(--google-blue); color: white; border-color: var(--google-blue); }

/* ── Progress bar ── */
.progress-wrap {
  height: 3px;
  background: var(--line);
  position: sticky;
  top: 49px;
  z-index: 99;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--google-blue), var(--google-red), var(--google-yellow), var(--google-green));
  transition: width 0.3s;
}

/* ── Stage ── */
.stage {
  flex: 1;
  overflow-y: auto;
  padding: 48px 24px 120px;
  display: flex;
  justify-content: center;
}

.slide {
  max-width: 800px;
  width: 100%;
  animation: fadeSlide 0.35s ease;
}

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

/* ── Slide kinds ── */

/* Title slide */
.slide-title {
  text-align: center;
  padding-top: 80px;
}

.slide-title .eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: var(--google-blue);
  font-weight: 600;
  margin-bottom: 16px;
}

.slide-title h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--google-blue), var(--google-red), var(--google-yellow), var(--google-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.slide-title .subtitle {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.slide-title .meta {
  font-size: 0.9rem;
  color: var(--light-muted);
}

/* Content slide */
.slide-content h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--navy);
}

html.dark .slide-content h2 { color: var(--google-blue); }

.slide-content h3 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
  color: var(--ink);
}

.slide-content p { margin-bottom: 12px; color: var(--ink); }
.slide-content ul, .slide-content ol { margin: 8px 0 16px 20px; }
.slide-content li { margin-bottom: 6px; }
.slide-content code {
  background: var(--paper);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.slide-content a { color: var(--google-blue); text-decoration: none; }
.slide-content a:hover { text-decoration: underline; }

/* Table */
.slide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

.slide-content th {
  text-align: left;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 2px solid var(--google-blue);
  font-weight: 600;
}

.slide-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card.accent {
  border-left: 4px solid var(--google-blue);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

/* Grid layouts */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.mt { margin-top: 16px; }

/* Steps */
.steps {
  list-style: none;
  margin-left: 0 !important;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
}

.steps li::before {
  content: counter(step);
  background: var(--google-blue);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Note */
.note {
  background: #e8f0fe;
  border-left: 4px solid var(--google-blue);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-top: 16px;
}

html.dark .note {
  background: #1a3a5c;
}

/* Divider */
.slide-divider {
  text-align: center;
  padding: 100px 0;
}

.slide-divider .divider-num {
  font-size: 5rem;
  font-weight: 900;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--google-blue), var(--google-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.slide-divider h2 {
  font-size: 2rem;
  margin: 8px 0;
}

.slide-divider .divider-lead {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Day cover */
.slide-daycover {
  text-align: center;
  padding: 120px 0;
  background: linear-gradient(135deg, #174ea6, #4285F4, #34A853);
  color: white;
  border-radius: 16px;
  margin: 40px 0;
}

.slide-daycover .daycover-num {
  font-size: 4rem;
  margin-bottom: 8px;
}

.slide-daycover h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.slide-daycover .daycover-lead {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Checklist */
.slide-checklist h2 { margin-bottom: 20px; }
.checklist { list-style: none; margin-left: 0 !important; }
.checklist li {
  padding: 14px 18px;
  margin-bottom: 6px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  user-select: none;
}
.checklist li:hover { border-color: var(--google-blue); }
.checklist li .ck {
  width: 24px; height: 24px;
  border: 2px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}
.checklist li.done { background: #e6f4ea; border-color: var(--google-green); }
.checklist li.done .ck { background: var(--google-green); border-color: var(--google-green); color: white; }
.checklist li.done span:last-child { text-decoration: line-through; color: var(--muted); }

/* Quiz */
.slide-quiz h2 { margin-bottom: 20px; }
.quiz-q { font-size: 1.1rem; margin-bottom: 16px; font-weight: 500; }
.quiz-opts { list-style: none; margin-left: 0 !important; }
.quiz-opts li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--card-bg);
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.quiz-opts li:hover { border-color: var(--google-blue); }
.quiz-opts li.sel { border-color: var(--google-blue); background: #e8f0fe; }
.quiz-opts li.ok { border-color: var(--google-green); background: #e6f4ea; }
.quiz-opts li.wrong { border-color: var(--google-red); background: #fce8e6; }
.quiz-opts li.missed { border-color: var(--google-green); background: #e6f4ea; opacity: 0.7; }
.quiz-feedback { margin-top: 12px; font-weight: 600; }

/* ── Nav ── */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 100;
}

.nav-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover { background: var(--google-blue); color: white; border-color: var(--google-blue); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn:disabled:hover { background: var(--paper); color: var(--ink); border-color: var(--line); }

.nav-info {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Accessibility ── */
html.dyslexia { --font-body: 'Lexend', sans-serif; --font-heading: 'Lexend', sans-serif; }
html.large-text { font-size: 120%; }
html.xlarge-text { font-size: 140%; }
html.high-contrast { filter: contrast(160%); }
html.reduced-motion * { animation: none !important; transition: none !important; }

/* Protanopia */
html.protanopia { filter: url('#protanopia'); }
/* Deuteranopia */
html.deuteranopia { filter: url('#deuteranopia'); }
/* Tritanopia */
html.tritanopia { filter: url('#tritanopia'); }

/* ── Responsive ── */
@media (max-width: 700px) {
  .slide-title h1 { font-size: 2rem; }
  .cols, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stage { padding: 32px 16px 120px; }
  .topbar { padding: 10px 16px; }
}
