/* Coba cinematic redesign — shared base styles.
   Loaded by every redesigned page. Palette accents (--c1/--c2/--c3) default
   to Emerald and are re-applied live by site.js (which also drives the
   per-chapter background + glow). All cross-page keyframes are consolidated
   here so individual pages only carry their own markup. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root { --c1: #2FE08A; --c2: #19C9C2; --c3: #A8E84A; }

html, body {
  background: #06080F;
  color: #EAF0F6;
  font-family: 'Hanken Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

::selection { background: var(--c1); color: #06080F; }
a { color: inherit; text-decoration: none; }
input::placeholder, textarea::placeholder { color: #5b6477; }

/* ---- Ambient + entrance keyframes (consolidated from all pages) ---- */
@keyframes coba-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes coba-float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes coba-pulse   { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: .85; transform: scale(1.14); } }
@keyframes coba-cue     { 0% { opacity: 0; transform: translateY(-6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes coba-travel  { 0% { left: -2%; } 100% { left: 101%; } }
@keyframes coba-blink   { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes coba-ping    { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
/* Organic homepage: morphing/drifting blob field */
@keyframes coba-morph   { 0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; } 33% { border-radius: 62% 38% 41% 59% / 56% 63% 37% 44%; } 66% { border-radius: 38% 62% 56% 44% / 63% 41% 59% 37%; } }
@keyframes coba-drift   { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 50% { transform: translate(4%,-3%) rotate(8deg) scale(1.06); } }
@keyframes coba-drift2  { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 50% { transform: translate(-5%,4%) rotate(-10deg) scale(1.08); } }

/* Respect reduced motion: kill ambient loops (entrance tweens are handled in site.js). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
