/* ELO Site Design System
   Theme uses logo colors only, pink plus logo black
   Accent pink sampled from logo background */

:root {
  --bg: #221019;
  --bg-alt: #2c1521;
  --card: #3a1f2e;
  --card-2: #4a2a3b;
  --text: #fde9f2;
  --muted: rgba(253, 233, 242, 0.68);
  --muted-dim: rgba(253, 233, 242, 0.5);
  --accent: #f9a7d5;
  --accent-soft: rgba(249, 167, 213, 0.18);
  --accent-hover: #fcc6e4;
  --on-accent: #1f2120;
  --border: rgba(249, 167, 213, 0.3);
  --border-strong: rgba(249, 167, 213, 0.68);
  --border-subtle: rgba(249, 167, 213, 0.18);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius-card: 10px;
  --radius-btn: 8px;
  --max: 1200px;
  --nav-h: 64px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 250ms var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loaded { opacity: 1; }
body.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
body.page-enter { transform: translateY(8px); }

::selection { background: var(--accent); color: var(--on-accent); }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

section { padding-top: 64px; padding-bottom: 64px; }
.section-alt { background: var(--bg-alt); }

/* Type */
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
.page-title {
  font-size: 28px;
  font-weight: 800;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
}
.lead { color: var(--muted); max-width: 34rem; }
.label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.muted { color: var(--muted); }
.dim { color: var(--muted-dim); }
.na-value { color: var(--muted-dim); }

/* Buttons, 44px targets on mobile */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 150ms var(--ease), opacity 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn:active { transform: scale(0.97) translateZ(0); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: scale(1.02) translateY(-1px) translateZ(0);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-soft);
  transform: scale(1.02) translateY(-1px) translateZ(0);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(249,167,213,0.14); }
.btn-block { width: 100%; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(34, 16, 25, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  animation: navIn 200ms var(--ease) both;
  will-change: transform;
}
@keyframes navIn {
  from { opacity: 0; transform: translateY(-12px) translateZ(0); }
  to { opacity: 1; transform: translateY(0) translateZ(0); }
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  min-height: 44px;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 200ms var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease);
  opacity: 0;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); opacity: 1; }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); opacity: 1; }

.nav-cta { display: none; gap: 10px; align-items: center; }
.nav-cta .btn { min-height: 40px; padding: 8px 14px; }

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 84vw);
  height: 100dvh;
  background: #2c1521;
  border-left: 1px solid var(--border-subtle);
  z-index: 60;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%) translateZ(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
  will-change: transform;
}
.mobile-menu.open {
  transform: translateX(0) translateZ(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: transparent;
}
.mobile-menu a:hover { background: rgba(249,167,213,0.14); }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(34,16,25,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* Hero */
.hero {
  position: relative;
  padding-top: 72px;
  padding-bottom: 72px;
  min-height: 86vh;
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: #221019;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: translateZ(0);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34,16,25,0.62) 0%, rgba(34,16,25,0.8) 58%, var(--bg) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero h1 {
  font-size: 36px;
  font-weight: 800;
  animation: riseIn 300ms var(--ease) 100ms both;
  will-change: transform;
}
.hero .subtitle {
  color: var(--muted);
  font-size: 15px;
  max-width: 32rem;
  margin: 0;
  animation: fadeIn 250ms var(--ease) 200ms both;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  animation: btnIn 250ms var(--ease) 400ms both;
  will-change: transform;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px) translateZ(0); }
  to { opacity: 1; transform: translateY(0) translateZ(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes btnIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95) translateZ(0); }
  to { opacity: 1; transform: translateY(0) scale(1) translateZ(0); }
}

/* Cards and grids */
.grid { display: grid; gap: 16px; }
.features { grid-template-columns: 1fr; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.card:hover {
  transform: translateY(-4px) translateZ(0);
  border-color: var(--border-strong);
  background: var(--card-2);
}
.card h3 { font-size: 15px; font-weight: 700; margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; }
.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249,167,213,0.14);
  color: var(--accent);
}

/* Stats */
.stats-grid { grid-template-columns: 1fr 1fr; }
.stat-card { text-align: left; }
.stat-num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }

/* Trailer and clips */
.media-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #221019;
  position: relative;
}
.media-16x9 { aspect-ratio: 16 / 9; }
.trailer-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.play-btn {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  margin-top: -32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 200ms var(--ease);
}
.play-btn:hover { transform: scale(1.06) translateZ(0); }
.clips-grid { grid-template-columns: 1fr; }
.clip {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #3a1f2e;
  min-height: 190px;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}
.clip:hover { transform: translateY(-4px) translateZ(0); border-color: var(--border-strong); }
.clip img { width: 100%; height: 190px; object-fit: cover; }
.clip-fallback {
  height: 190px;
  background: radial-gradient(circle at 30% 20%, rgba(249,167,213,0.32), transparent 55%), linear-gradient(180deg, #4a2a3b, #221019);
}
.clip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  margin-top: -24px;
  border-radius: 50%;
  background: rgba(34,16,25,0.75);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.clip-meta { padding: 12px 14px; font-size: 13px; color: var(--muted); }

/* CTA blocks */
.cta {
  text-align: center;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(249,167,213,0.08), rgba(249,167,213,0.02)), var(--card);
  border-radius: 14px;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}
.cta h2 { font-size: 22px; font-weight: 800; }
.cta-donate {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(34,16,25,0.86), rgba(34,16,25,0.88)), url('assets/elo-donate.png');
  background-size: cover;
  background-position: center;
}
.cta-donate .lead { color: rgba(253, 233, 242, 0.8); }
.micro-note { font-size: 12px; color: var(--muted-dim); }

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
}
.foot-grid { display: flex; flex-direction: column; gap: 20px; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}
.foot-links a:hover { color: var(--text); }
.foot-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-dim);
}

/* Page head */
.page-head { padding-top: 48px; padding-bottom: 8px; text-align: left; }
.page-head p { color: var(--muted); margin: 8px 0 0; }

/* FAQ */
.faq-group { margin-top: 28px; }
.faq-group h2 { font-size: 18px; margin-bottom: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.faq-q .chev {
  flex: 0 0 auto;
  color: var(--accent);
  will-change: transform;
  transform: translateZ(0);
  transition: transform 250ms var(--ease);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg) translateZ(0); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 300ms var(--ease), opacity 250ms var(--ease);
}
.faq-item.open .faq-a { opacity: 1; }
.faq-a-inner { padding: 0 16px 16px; color: var(--muted); }
.faq-a-inner a { color: var(--accent); }

/* Supporters and status */
.supporters-grid { grid-template-columns: 1fr; }
.supporter { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}
.tier-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}
.status-grid { grid-template-columns: 1fr 1fr; }
.status-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7280; flex: 0 0 auto; }
.dot.green { background: #22c55e; }
.dot.red { background: #ef4444; }
.dot.grey { background: #6b7280; }
.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}
#pingWrap { margin-top: 16px; }
canvas#pingChart { width: 100%; height: 180px; display: block; }

/* 404 */
.center-wrap {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.big404 { font-size: 72px; font-weight: 800; letter-spacing: -0.04em; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(34,16,25,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 880px;
  background: #2c1521;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  will-change: transform;
  transform: scale(0.96) translateZ(0);
  opacity: 0;
  transition: transform 250ms var(--ease), opacity 250ms var(--ease);
}
.modal-backdrop.show .modal { transform: scale(1) translateZ(0); opacity: 1; }
.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px) translateZ(0);
  will-change: transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}

/* Focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tablet */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .hamburger { display: none; }
  .hero-actions { flex-direction: row; justify-content: center; }
  .hero-actions .btn { width: auto; }
  .btn-block { width: auto; }
  .features { grid-template-columns: 1fr 1fr; }
  .clips-grid { grid-template-columns: 1fr 1fr; }
  .supporters-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .foot-links { flex-direction: row; gap: 16px; }
  .foot-links a { min-height: 32px; }
  .foot-bottom { flex-direction: row; justify-content: space-between; }
}

/* Desktop */
@media (min-width: 1200px) {
  section { padding-top: 96px; padding-bottom: 96px; }
  .page-title { font-size: 32px; }
  .hero h1 { font-size: 48px; }
  .features { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .clips-grid { grid-template-columns: 1fr 1fr 1fr; }
  .status-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
  .supporters-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* Small mobile type scale */
@media (max-width: 767px) {
  .page-title { font-size: 28px; }
  .stat-num { font-size: 24px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  body { opacity: 1; }
}
