/* ============================================
   Maia Workshop — Light & Elegant Theme
   For Reveal.js 5.x + Hub landing
   ============================================ */

:root {
  --bg: #faf8f3;
  --bg-alt: #f4efe5;
  --bg-card: #ffffff;
  --ink: #1a1f2e;
  --ink-soft: #4a5060;
  --muted: #8a8275;
  --line: #e5dfd2;
  --gold: #8b6f3f;
  --gold-soft: #c4a572;
  --emerald: #2d4a3e;
  --emerald-soft: #5a7568;
  --rose: #b86450;
  --shadow-sm: 0 1px 3px rgba(26,31,46,0.06), 0 1px 2px rgba(26,31,46,0.04);
  --shadow-md: 0 4px 16px rgba(26,31,46,0.08), 0 2px 4px rgba(26,31,46,0.04);
  --shadow-lg: 0 12px 40px rgba(26,31,46,0.10), 0 4px 12px rgba(26,31,46,0.06);
  --radius: 14px;
  --radius-lg: 22px;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================
   REVEAL.JS OVERRIDES — Light & Elegant
   ============================================ */

.reveal {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.reveal .slides {
  text-align: left;
}

.reveal .slides > section,
.reveal .slides > section > section {
  padding: 50px 60px;
  height: 100%;
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-transform: none;
}

.reveal h1 { font-size: 2.8em; }
.reveal h2 { font-size: 1.9em; }
.reveal h3 { font-size: 1.35em; }
.reveal h4 { font-size: 1.1em; color: var(--gold); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7em; }

.reveal p { line-height: 1.55; margin: 0.5em 0; }
.reveal strong { color: var(--ink); font-weight: 700; }
.reveal em { color: var(--gold); font-style: italic; }

.reveal a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-soft); }
.reveal a:hover { color: var(--emerald); border-color: var(--emerald); }

.reveal ul, .reveal ol { margin: 0.5em 0 0.5em 1.2em; line-height: 1.6; }
.reveal li { margin: 0.35em 0; }
.reveal ul li::marker { color: var(--gold); }

.reveal blockquote {
  background: var(--bg-alt);
  border: none;
  border-left: 4px solid var(--gold);
  padding: 1em 1.5em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--ink-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: none;
  width: 90%;
  margin: 1em auto;
}

.reveal code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: var(--bg-alt);
  color: var(--emerald);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

.reveal pre {
  background: var(--ink);
  color: #f4efe5;
  border-radius: var(--radius);
  padding: 1.2em 1.4em;
  font-size: 0.7em;
  box-shadow: var(--shadow-md);
  width: 90%;
  margin: 1em auto;
}
.reveal pre code { background: transparent; color: inherit; padding: 0; }

.reveal table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.7em;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0.6em 0;
  width: 100%;
}
.reveal table th {
  background: var(--ink);
  color: #faf8f3;
  font-weight: 600;
  padding: 0.7em 1em;
  text-align: left;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}
.reveal table td {
  padding: 0.6em 1em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.reveal table tr:last-child td { border-bottom: none; }
.reveal table tr:nth-child(even) td { background: var(--bg-alt); }

.reveal section img {
  border: none;
  background: transparent;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
}

/* Reveal nav arrows */
.reveal .controls { color: var(--gold); }
.reveal .controls button { opacity: 0.5; transition: opacity 0.2s; }
.reveal .controls button:hover { opacity: 1; }

.reveal .progress {
  color: var(--gold);
  height: 3px;
  background: var(--line);
}

/* ============================================
   CUSTOM SLIDE COMPONENTS
   ============================================ */

/* Title slide */
.slide-title {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative;
}
.slide-title::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, var(--emerald) 100%);
}
.slide-title .eyebrow {
  font-size: 0.55em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6em;
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.slide-title .eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 200px;
}
.slide-title h1 {
  font-size: 3.2em;
  margin-bottom: 0.3em;
}
.slide-title .subtitle {
  font-size: 0.95em;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-style: italic;
  max-width: 80%;
}
.slide-title .meta {
  margin-top: 2em;
  display: flex;
  gap: 2em;
  font-size: 0.55em;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.slide-title .meta span strong { color: var(--ink); display: block; font-size: 1.4em; font-family: var(--font-serif); margin-top: 0.2em; }

/* Section divider */
.slide-section {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center !important;
  text-align: center;
  height: 100%;
  background: var(--ink);
  color: #faf8f3 !important;
}
.slide-section h2, .slide-section h1 { color: #faf8f3 !important; }
.slide-section .number {
  font-family: var(--font-serif);
  font-size: 6em;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.1em;
  font-style: italic;
}
.slide-section .label {
  font-size: 0.6em;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1em;
}

/* Quote slide */
.slide-quote {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center !important;
  text-align: center;
  height: 100%;
  padding: 60px 100px !important;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.slide-quote .quote-mark {
  font-family: var(--font-serif);
  font-size: 6em;
  color: var(--gold);
  line-height: 0.3;
  margin-bottom: 0.3em;
}
.slide-quote blockquote {
  background: transparent;
  border: none;
  font-size: 1.5em;
  font-family: var(--font-serif);
  line-height: 1.4;
  color: var(--ink);
  padding: 0;
  max-width: 900px;
  font-style: italic;
}
.slide-quote .attribution {
  margin-top: 1.2em;
  color: var(--gold);
  font-size: 0.7em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Cards grid */
.cards {
  display: grid;
  gap: 1em;
  margin: 0.8em 0;
}
.cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2em 1.3em;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .card-icon {
  font-size: 1.4em;
  margin-bottom: 0.4em;
}
.card .card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 0.3em;
  color: var(--ink);
}
.card .card-body {
  font-size: 0.7em;
  color: var(--ink-soft);
  line-height: 1.5;
}
.card.accent-gold { border-top: 4px solid var(--gold); }
.card.accent-emerald { border-top: 4px solid var(--emerald); }
.card.accent-rose { border-top: 4px solid var(--rose); }

/* Pill / tag */
.pill {
  display: inline-block;
  padding: 0.25em 0.8em;
  border-radius: 100px;
  font-size: 0.6em;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.pill.gold { background: var(--gold); color: white; border-color: var(--gold); }
.pill.emerald { background: var(--emerald); color: white; border-color: var(--emerald); }
.pill.rose { background: var(--rose); color: white; border-color: var(--rose); }

/* WRONG vs RIGHT */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin: 0.8em 0;
}
.compare .col {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.2em;
  box-shadow: var(--shadow-sm);
}
.compare .wrong { border-left: 4px solid var(--rose); }
.compare .right { border-left: 4px solid var(--emerald); }
.compare .col-title {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6em;
}
.compare .wrong .col-title { color: var(--rose); }
.compare .right .col-title { color: var(--emerald); }
.compare .col-body { font-size: 0.7em; line-height: 1.5; color: var(--ink-soft); font-family: 'JetBrains Mono', monospace; }

/* Big number / stat */
.stat-row { display: flex; gap: 2em; margin: 0.6em 0; flex-wrap: wrap; }
.stat {
  flex: 1;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.4em 1em;
  box-shadow: var(--shadow-sm);
  min-width: 180px;
}
.stat .num {
  font-family: var(--font-serif);
  font-size: 3em;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat .label {
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-top: 0.5em;
  letter-spacing: 0.05em;
}

/* Pillars (5 trụ cột) */
.pillars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8em;
  margin: 1em 0;
}
.pillar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.2em 0.8em;
  text-align: center;
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease);
}
.pillar:hover { transform: translateY(-4px); }
.pillar .num {
  font-family: var(--font-serif);
  font-size: 1.8em;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  font-style: italic;
}
.pillar .title {
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.4em;
  color: var(--ink);
}
.pillar .desc {
  font-size: 0.5em;
  color: var(--ink-soft);
  margin-top: 0.4em;
  line-height: 1.4;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin: 0.6em 0;
}
.tl-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  gap: 1em;
  align-items: center;
  padding: 0.6em 0.9em;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
  font-size: 0.65em;
}
.tl-row .time { font-weight: 700; color: var(--gold); font-family: 'JetBrains Mono', monospace; }
.tl-row .activity { color: var(--ink); font-weight: 500; }
.tl-row .lead { font-size: 0.85em; color: var(--ink-soft); font-style: italic; }

/* Workshop bar (footer in slides) */
.slide-footer {
  position: absolute;
  bottom: 16px;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  font-size: 0.45em;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.slide-footer a { color: var(--muted); border: none; }
.slide-footer a:hover { color: var(--gold); }

/* CRAFT framework */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6em;
  margin: 0.8em 0;
}
.craft-letter {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1em 0.6em;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--gold);
}
.craft-letter .big {
  font-family: var(--font-serif);
  font-size: 2.5em;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}
.craft-letter .name {
  font-size: 0.55em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 0.3em;
}
.craft-letter .desc {
  font-size: 0.5em;
  color: var(--ink-soft);
  margin-top: 0.3em;
}

/* Bigsplit two-column */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  align-items: center;
  height: 100%;
}
.split.left-heavy { grid-template-columns: 2fr 1fr; }
.split.right-heavy { grid-template-columns: 1fr 2fr; }

/* Responsive — 19:6 (ultrawide) and 6:19 (vertical phone) */
@media (max-aspect-ratio: 1/1) {
  /* Vertical / mobile-portrait */
  .reveal .slides > section { padding: 30px 24px !important; }
  .reveal { font-size: 24px; }
  .cards.cols-3, .cards.cols-4 { grid-template-columns: 1fr; }
  .cards.cols-2 { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .craft-grid { grid-template-columns: repeat(2, 1fr); }
  .compare { grid-template-columns: 1fr; }
  .split, .split.left-heavy, .split.right-heavy { grid-template-columns: 1fr; gap: 1em; }
  .stat-row { gap: 0.6em; }
  .tl-row { grid-template-columns: 80px 1fr; }
  .tl-row .lead { display: none; }
  .slide-title h1 { font-size: 2em; }
  .slide-section .number { font-size: 4em; }
  .slide-quote { padding: 30px 24px !important; }
  .slide-quote blockquote { font-size: 1.1em; }
  .slide-footer { left: 24px; right: 24px; font-size: 0.4em; }
}

@media (min-aspect-ratio: 5/2) {
  /* Ultrawide 19:6 — give more breathing room */
  .reveal .slides > section { padding: 60px 140px !important; }
  .split { gap: 4em; }
}

/* Fragment animations */
.reveal .fragment.fade-up {
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s var(--ease);
}
.reveal .fragment.fade-up.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Print background fix */
.reveal .slide-background.present { background: var(--bg) !important; }

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: white;
  padding: 1.2em 1.4em;
  border-radius: var(--radius);
  margin: 0.8em 0;
  box-shadow: var(--shadow-md);
}
.highlight-box.emerald { background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-soft) 100%); }
.highlight-box .label {
  font-size: 0.55em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.4em;
  font-weight: 600;
}
.highlight-box .text {
  font-family: var(--font-serif);
  font-size: 1.05em;
  font-style: italic;
  line-height: 1.4;
}

/* Donut / progress visual */
.donut {
  --pct: 64;
  --size: 200px;
  --thickness: 24px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--gold) calc(var(--pct) * 1%), var(--bg-alt) 0);
  display: grid;
  place-items: center;
  position: relative;
}
.donut::before {
  content: '';
  position: absolute;
  inset: var(--thickness);
  background: var(--bg-card);
  border-radius: 50%;
}
.donut .donut-label {
  position: relative;
  font-family: var(--font-serif);
  font-size: 1.6em;
  font-weight: 700;
  color: var(--gold);
}
