/* === Lec.2 Deck — Warm Paper Aesthetic === */
:root {
  --bg: #f4ebd9;
  --bg-soft: #ebe0c8;
  --paper: #faf3e3;
  --ink: #2b2419;
  --ink-soft: #5a4f3e;
  --ink-faint: #8b7e68;
  --accent-red: #b6432a;
  --accent-green: #3f5d3a;
  --accent-mustard: #c98e2b;
  --accent-blue: #2f5b75;
  --accent-pink: #d28a8a;
  --line: #c8b896;
  --line-strong: #8b7e68;
  --shadow: 6px 6px 0 #2b2419;
  --shadow-soft: 3px 3px 0 #8b7e68;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: 'Lora', 'Noto Sans TC', Georgia, serif; }
body {
  background:
    radial-gradient(ellipse at top left, rgba(255,250,235,0.7), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(201,142,43,0.06), transparent 50%),
    var(--bg);
}

/* ===== deck-stage slides — each is 1920x1080 ===== */
deck-stage > section {
  width: 1920px;
  height: 1080px;
  padding: 80px 110px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}
deck-stage > section, deck-stage > section * { color: var(--ink); }
/* Allow inline color overrides + explicit color classes to win */
deck-stage > section [style*="color"],
deck-stage > section .hl-r, deck-stage > section .hl-g, deck-stage > section .hl-b,
deck-stage > section .slide-tag, deck-stage > section .slide-foot, deck-stage > section .slide-num,
deck-stage > section .tagline, deck-stage > section .body-m,
deck-stage > section svg text, deck-stage > section .shimmer-text { color: revert; }

/* ===== Typography ===== */
.h-disp { font-family: 'Fraunces', serif; font-weight: 800; font-size: 130px; line-height: 1; letter-spacing: -0.04em; color: var(--ink); margin: 0; }
.h-1 { font-family: 'Fraunces', serif; font-weight: 800; font-size: 84px; line-height: 1.05; letter-spacing: -0.025em; color: var(--ink); margin: 0; }
.h-2 { font-family: 'Fraunces', serif; font-weight: 700; font-size: 56px; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.h-3 { font-family: 'Fraunces', serif; font-weight: 700; font-size: 38px; line-height: 1.2; color: var(--ink); margin: 0; }
.body-l { font-family: 'Lora', 'Noto Sans TC', serif; font-size: 32px; line-height: 1.55; color: var(--ink); }
.body-m { font-family: 'Lora', 'Noto Sans TC', serif; font-size: 26px; line-height: 1.6; color: var(--ink); }
.mono { font-family: 'JetBrains Mono', monospace; }
.italic { font-style: italic; }

/* ===== Slide chrome ===== */
.slide-tag {
  position: absolute;
  top: 60px; left: 110px;
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent-red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.slide-tag::before {
  content: '';
  display: inline-block;
  width: 36px; height: 4px;
  background: var(--accent-red);
  margin-right: 12px;
  vertical-align: middle;
}
.slide-num {
  position: absolute;
  bottom: 60px; right: 110px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.slide-foot {
  position: absolute;
  bottom: 60px; left: 110px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-faint);
}

/* ===== Tagline / quote ===== */
.tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 36px;
  color: var(--accent-green);
  border-left: 6px solid var(--accent-mustard);
  padding-left: 28px;
  line-height: 1.4;
  max-width: 1500px;
}

/* ===== Cards / boxes ===== */
.card {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 34px 40px;
}
.card-label {
  display: inline-block;
  background: var(--accent-mustard);
  color: var(--ink);
  font-weight: 800;
  padding: 6px 16px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
  border: 2px solid var(--ink);
  margin-bottom: 16px;
}
.card.red .card-label { background: var(--accent-red); color: var(--paper); }
.card.green .card-label { background: var(--accent-green); color: var(--paper); }
.card.blue .card-label { background: var(--accent-blue); color: var(--paper); }

/* ===== Eq block ===== */
.eq-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 22px 34px;
  display: inline-block;
  box-shadow: var(--shadow);
  position: relative;
}
.eq-big div, .eq-big span { color: var(--ink); }
.eq-big span[style*="color"] { color: inherit; }
.eq-big .eq-tag {
  position: absolute;
  top: -16px; left: 18px;
  background: var(--accent-red);
  color: var(--paper);
  padding: 2px 12px;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--ink);
}

/* ===== Animations: entrance ===== */
deck-stage > section[data-deck-active] .anim-slide-up { animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
deck-stage > section[data-deck-active] .anim-slide-right { animation: slideRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
deck-stage > section[data-deck-active] .anim-fade { animation: fadeIn 1s ease both; }
deck-stage > section[data-deck-active] .anim-pop { animation: popIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
deck-stage > section[data-deck-active] .anim-draw { animation: drawIn 1.2s ease forwards; }

.anim-d1 { animation-delay: 0.1s !important; }
.anim-d2 { animation-delay: 0.25s !important; }
.anim-d3 { animation-delay: 0.4s !important; }
.anim-d4 { animation-delay: 0.55s !important; }
.anim-d5 { animation-delay: 0.7s !important; }
.anim-d6 { animation-delay: 0.85s !important; }
.anim-d7 { animation-delay: 1.0s !important; }
.anim-d8 { animation-delay: 1.15s !important; }

@keyframes slideUp {
  0% { opacity: 0; transform: translate3d(0, 40px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes slideRight {
  0% { opacity: 0; transform: translate3d(-40px, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes drawIn {
  to { stroke-dashoffset: 0; }
}

/* ===== Floating decorations ===== */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
.float-slow { animation: float 6s ease-in-out infinite; }
.float-fast { animation: float 4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}
.pulse-slow { animation: pulse 3s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin-slow { animation: spin 20s linear infinite; transform-origin: center; }

@keyframes flowDash {
  to { stroke-dashoffset: -40; }
}
.flow-line { stroke-dasharray: 12 8; animation: flowDash 1.4s linear infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg, var(--ink) 30%, var(--accent-red) 50%, var(--ink) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}

/* ===== Stamp ===== */
.stamp {
  position: absolute;
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--accent-red);
  border: 4px solid var(--accent-red);
  padding: 8px 18px;
  transform: rotate(-8deg);
  opacity: 0.75;
  letter-spacing: 0.12em;
  pointer-events: none;
}

/* ===== Decorative pattern (paper bg dots) ===== */
.dot-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(139, 126, 104, 0.12) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Hidden helpers ===== */
.hidden-deck { display: none !important; }

/* ===== Token chips ===== */
.token-chip-big {
  display: inline-block;
  padding: 12px 22px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 28px;
  box-shadow: 4px 4px 0 var(--line-strong);
}
.token-chip-big.active { background: var(--accent-red); color: var(--paper); }
.token-chip-big.past { background: var(--accent-mustard); }

/* ===== Math / inline ===== */
.kbd {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  border-radius: 4px;
}

/* highlight text */
.hl-y { background: linear-gradient(transparent 60%, rgba(201,142,43,0.45) 60%); padding: 0 4px; }
.hl-r { color: var(--accent-red); font-weight: 700; }
.hl-g { color: var(--accent-green); font-weight: 700; }
.hl-b { color: var(--accent-blue); font-weight: 700; }

/* arrow flow particles for SVG */
@keyframes flow-particle {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
</content>
