/* ============================================================
   Dream Day V5 — styles
   Palette and type are taken from the V5 poster pack:
   black + crimson liquid marble, white geometric wordmark,
   Cinzel serif subheads.
   ============================================================ */

:root {
  --bg: #07070a;
  --ink: #f7f2f2;
  --muted: #bcaaad;
  --dim: #85747a;
  --red: #d4151f;
  --red-hi: #ef2a33;
  --red-deep: #8b1a1f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --glass: rgba(14, 7, 9, 0.62);
  --glass-hi: rgba(28, 12, 15, 0.72);
  --field: rgba(255, 255, 255, 0.05);

  --font-display: "Syncopate", "Michroma", system-ui, sans-serif;
  --font-serif: "Cinzel", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------- Background ---------------- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(212, 21, 31, 0.45), transparent 70%),
    radial-gradient(50% 60% at 10% 80%, rgba(139, 26, 31, 0.5), transparent 70%),
    var(--bg);
}
.bg canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.bg canvas.is-ready { opacity: 1; }
.bg::after {
  /* Darken as the page scrolls past the hero so content stays readable. */
  content: ""; position: absolute; inset: 0;
  background: rgba(5, 3, 4, var(--bg-dim, 0));
  transition: background 0.3s linear;
}
.bg-grain {
  position: absolute; inset: 0; opacity: 0.07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------------- Type helpers ---------------- */
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red-hi);
}
.section-title {
  margin: 0;
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: 0.01em;
  text-wrap: balance;
}
.section-title.sm { font-size: clamp(26px, 3.6vw, 38px); }
.section-lead { margin: 14px auto 0; max-width: 560px; color: var(--muted); font-size: 17px; }
.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.left { text-align: left; margin-bottom: 28px; }
.muted { color: var(--muted); }

.section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---------------- Buttons & chips ---------------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, var(--red-hi), var(--red));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(239, 42, 51, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(239, 42, 51, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: var(--ink); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn i { font-size: 0.9em; transition: transform 0.25s var(--ease); }
.btn:hover i.fa-arrow-right { transform: translateX(3px); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 500; color: var(--ink);
  backdrop-filter: blur(10px);
}
.chip i { color: var(--red-hi); }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 5, 6, 0.72);
  border-color: var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { height: 38px; width: auto; }
.brand-fallback { font-family: var(--font-serif); font-weight: 800; letter-spacing: 0.08em; font-size: 14px; }
.brand-divider { width: 1px; height: 22px; background: var(--line-strong); }
.brand-name { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-name em { font-style: normal; color: var(--red-hi); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav.is-open .nav-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { top: 20px; transform: rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px var(--gutter) 20px;
}
.mobile-menu a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
.mobile-menu .btn { margin-top: 12px; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-right { margin-left: auto; }
  .nav.is-open { background: rgba(7, 5, 6, 0.95); backdrop-filter: blur(16px); border-color: var(--line); }
  .nav.is-open .mobile-menu { display: flex; }
}
@media (max-width: 420px) {
  .brand-divider, .brand-name { display: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  min-height: 100svh; display: grid; place-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px; position: relative; text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 28px; }

.wordmark {
  margin: 0; display: grid; justify-items: center; line-height: 0.92;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  text-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
}
.wm-line { display: block; font-size: clamp(54px, 13.5vw, 176px); letter-spacing: -0.02em; }
.wm-version {
  justify-self: end; margin-top: 6px;
  font-family: var(--font-serif); font-weight: 600; text-transform: none;
  font-size: clamp(20px, 3vw, 36px); letter-spacing: 0.04em; line-height: 1;
}
.wm-version b { font-weight: 800; color: var(--red-hi); }

.hero-tag {
  margin: 22px 0 0;
  font-family: var(--font-serif); font-weight: 700; font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink);
}
.hero-copy { max-width: 580px; margin: 16px auto 0; color: var(--muted); font-size: clamp(16px, 2vw, 18px); }
.hero-copy strong { color: var(--ink); }

.countdown { display: flex; gap: clamp(8px, 2vw, 14px); margin-top: 34px; }
.cd-cell {
  min-width: clamp(68px, 17vw, 96px); padding: 14px 8px 10px; border-radius: 16px;
  background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cd-cell span {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 5vw, 38px); line-height: 1; font-variant-numeric: tabular-nums;
}
.cd-cell small { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.countdown.is-live .cd-cell { display: none; }
.countdown .live-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: rgba(212, 21, 31, 0.18); border: 1px solid rgba(239, 42, 51, 0.5); font-weight: 600;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 0 0 rgba(239, 42, 51, 0.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(239, 42, 51, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 42, 51, 0); } }

.hero-ctas { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--line-strong);
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--ink); animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 520px) {
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------------- Goal ---------------- */
.goal { padding-top: 0; }
.goal-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 48px; align-items: center;
  padding: clamp(24px, 4vw, 48px);
}
.goal-number {
  margin: 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(44px, 8vw, 92px); line-height: 0.95; letter-spacing: -0.02em;
}
.goal-sub { margin: 10px 0 0; font-family: var(--font-serif); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; color: var(--muted); }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); }
.progress-meta b { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; }
#apd-percent { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.progress { height: 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; border: 1px solid var(--line); }
.progress-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-hi));
  box-shadow: 0 0 24px rgba(239, 42, 51, 0.6);
  transition: width 1.6s var(--ease);
}
.goal-stats {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line);
}
.goal-stats div { background: rgba(8, 4, 5, 0.75); padding: 18px 12px; text-align: center; }
.goal-stats b { display: block; font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 30px); font-variant-numeric: tabular-nums; }
.goal-stats span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .goal-card { grid-template-columns: 1fr; }
  .goal-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- Bento ---------------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { padding: 28px; position: relative; overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.3s; }
.tile::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(239, 42, 51, 0.16), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(239, 42, 51, 0.35); }
.tile:hover::before { opacity: 1; }
.tile h3 { margin: 18px 0 8px; font-family: var(--font-serif); font-size: 22px; font-weight: 700; }
.tile p { margin: 0; color: var(--muted); }
.tile-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: rgba(212, 21, 31, 0.15); color: var(--red-hi); font-size: 19px;
  border: 1px solid rgba(239, 42, 51, 0.3);
}
.tile-xl { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px;
  background: linear-gradient(160deg, rgba(212, 21, 31, 0.28), rgba(14, 7, 9, 0.7) 55%);
}
.tile-xl h3 { font-size: clamp(26px, 3vw, 34px); }
.tile-wide { grid-column: span 2; }
.tile-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; color: var(--ink); font-weight: 600; }
.tile-link i { color: var(--red-hi); transition: transform 0.25s var(--ease); }
.tile-link:hover i { transform: translateX(4px); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-xl { grid-column: span 2; grid-row: auto; min-height: 260px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .tile-xl, .tile-wide { grid-column: auto; }
}

/* ---------------- Timeline ---------------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 118px; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(var(--line-strong), var(--red), var(--line-strong));
}
.tl-item { display: grid; grid-template-columns: 100px 36px 1fr; gap: 0 0; align-items: center; padding: 8px 0; }
.tl-time { text-align: right; padding-right: 18px; font-variant-numeric: tabular-nums; }
.tl-time b { display: block; font-weight: 700; font-size: 16px; }
.tl-time small { color: var(--dim); font-size: 13px; }
.tl-dot {
  width: 13px; height: 13px; border-radius: 50%; justify-self: center;
  background: var(--bg); border: 2px solid var(--red-hi); position: relative; z-index: 1;
}
.tl-card {
  display: flex; align-items: center; gap: 14px; margin-left: 12px; padding: 16px 20px;
  border-radius: 16px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.tl-card:hover { transform: translateX(4px); border-color: var(--line-strong); }
.tl-card i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: var(--muted); flex-shrink: 0; }
.tl-card h3 { margin: 0; font-family: var(--font-serif); font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.tl-item.is-highlight .tl-card i { background: rgba(212, 21, 31, 0.18); color: var(--red-hi); }
.tl-item.is-now .tl-card { border-color: var(--red-hi); background: linear-gradient(90deg, rgba(212, 21, 31, 0.3), var(--glass)); }
.tl-item.is-now .tl-dot { background: var(--red-hi); box-shadow: 0 0 0 6px rgba(239, 42, 51, 0.25); }
.tl-item.is-past { opacity: 0.45; }
.now-badge { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: #fff; background: var(--red); padding: 4px 10px; border-radius: 99px; }
@media (max-width: 560px) {
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 14px 1fr; grid-template-areas: "dot time" "dot card"; row-gap: 6px; padding: 10px 0; }
  .tl-dot { grid-area: dot; align-self: start; margin-top: 5px; }
  .tl-time { grid-area: time; text-align: left; padding: 0 0 0 16px; display: flex; gap: 8px; align-items: baseline; }
  .tl-card { grid-area: card; margin-left: 16px; }
}

/* ---------------- Points ---------------- */
.points-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pt-card { padding: 0; overflow: hidden; }
.pt-card header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 16px 22px; background: linear-gradient(90deg, var(--red-deep), rgba(139, 26, 31, 0.4));
  border-bottom: 1px solid rgba(239, 42, 51, 0.35);
}
.pt-card h3 { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.04em; }
.pt-card header small { color: rgba(255, 255, 255, 0.75); font-size: 12px; }
.pt-card ul { list-style: none; margin: 0; padding: 8px 22px 14px; }
.pt-card li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pt-card li:last-child { border-bottom: 0; }
.pt-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-val span { color: var(--dim); font-weight: 500; font-size: 13px; margin-left: 4px; }
.pt-card.is-bd { grid-column: span 2; }
.pt-card.is-bd ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
@media (max-width: 580px) {
  .pt-card.is-bd { grid-column: auto; }
  .pt-card.is-bd ul { grid-template-columns: 1fr; }
}

/* ---------------- Leaderboard ---------------- */
.tabs {
  display: flex; gap: 6px; padding: 6px; margin: 0 auto 18px; width: max-content; max-width: 100%;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); border-radius: 999px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs button {
  border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background 0.25s, color 0.25s;
}
.tabs button[aria-selected="true"] { background: var(--red); color: #fff; box-shadow: 0 6px 20px -8px rgba(239, 42, 51, 0.8); }

.board { padding: clamp(20px, 4vw, 40px); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; max-width: 640px; margin: 0 auto 28px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-width: 0; }
.pod-name { font-family: var(--font-serif); font-weight: 700; font-size: clamp(14px, 2vw, 18px); line-height: 1.2; overflow-wrap: anywhere; }
.pod-val { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pod-bar {
  width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 14px;
  background: linear-gradient(180deg, #fff, #e8e0e1); color: var(--red-deep);
  font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 4vw, 34px);
  transform-origin: bottom; animation: rise 1s var(--ease) both;
}
.pod.p1 .pod-bar { height: 180px; }
.pod.p2 .pod-bar { height: 130px; animation-delay: 0.1s; }
.pod.p3 .pod-bar { height: 96px; animation-delay: 0.2s; }
.pod.p1 .pod-name::before { content: "\f521"; font-family: "Font Awesome 6 Free"; font-weight: 900; display: block; color: #f5c451; margin-bottom: 6px; }
@keyframes rise { from { transform: scaleY(0.2); opacity: 0; } to { transform: none; opacity: 1; } }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03);
}
.rank-n { font-weight: 700; color: var(--dim); text-align: center; font-variant-numeric: tabular-nums; }
.rank-name { font-weight: 600; position: relative; min-width: 0; }
.rank-name span { position: relative; z-index: 1; }
.rank-meter { height: 4px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.rank-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red-hi)); border-radius: inherit; transition: width 1s var(--ease); }
.rank-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-val small { color: var(--dim); font-weight: 500; margin-left: 4px; }
.skeleton { height: 44px; border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.board-empty { text-align: center; color: var(--muted); padding: 30px 0; }
.demo-note { color: var(--dim); }

/* ---------------- Achievers + Guest ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.achievers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.polaroid {
  background: #f1eeea; color: var(--red-deep); border-radius: 6px; padding: 10px 10px 14px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.9); transition: transform 0.4s var(--ease);
}
.polaroid:nth-child(1) { transform: rotate(-3deg); }
.polaroid:nth-child(2) { transform: rotate(2deg) translateY(14px); }
.polaroid:nth-child(3) { transform: rotate(-1deg); }
.polaroid:hover { transform: rotate(0) translateY(-6px) scale(1.03); }
.polaroid-img {
  aspect-ratio: 4 / 5; border-radius: 3px; overflow: hidden;
  background: linear-gradient(160deg, #2a0a0d, #8b1a1f 60%, #d4151f);
  display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); font-family: var(--font-display); font-size: 22px;
}
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; }
.polaroid b { display: block; margin-top: 10px; text-align: center; font-family: var(--font-serif); font-weight: 800; font-size: clamp(14px, 2vw, 20px); }
.polaroid .rank-tag { display: block; text-align: center; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a7a78; }

.guest { padding: clamp(24px, 4vw, 40px); }
.tips { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 10px; }
.tip {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line);
}
.tip-n { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-weight: 700; font-family: var(--font-serif); }
.tip.is-locked { color: var(--dim); }
.tip.is-locked .tip-n { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.tip small { display: block; font-size: 12px; color: var(--dim); }

/* ---------------- Forms ---------------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field { margin-bottom: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

input, select {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 12px;
  background: var(--field); border: 1px solid var(--line-strong); color: var(--ink);
  font-size: 16px; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
}
input::placeholder { color: var(--dim); }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23bcaaad' stroke-width='1.8'><path d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer;
}
select option { background: #140a0c; color: var(--ink); }
input:hover, select:hover { border-color: rgba(255, 255, 255, 0.28); }
input:focus, select:focus { outline: none; border-color: var(--red-hi); background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 0 4px rgba(239, 42, 51, 0.18); }
.was-validated input:invalid, .was-validated select:invalid { border-color: #ff6b72; }

.guess-form .field-row { margin-bottom: 10px; }
.guess-form .field-row input, .guess-form .field-row select { margin-bottom: 0; }
.guess-form .btn { height: 50px; }
@media (max-width: 560px) { .guess-form .field-row { gap: 10px; } }

.form-msg { margin: 12px 0 0; min-height: 1.4em; font-size: 14px; }
.form-msg.is-error { color: #ff8a90; }
.form-msg.is-ok { color: #8be0a4; }

.register { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.register-copy .section-lead { margin-left: 0; }
.register-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.register-points li { display: flex; gap: 12px; align-items: baseline; }
.register-points i { color: var(--red-hi); }
.reg-form { padding: clamp(22px, 4vw, 36px); }
@media (max-width: 900px) { .register { grid-template-columns: 1fr; } }

.dropzone {
  display: grid; justify-items: center; gap: 4px; padding: 22px 16px; margin: 4px 0 18px;
  border: 1.5px dashed var(--line-strong); border-radius: 14px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--red-hi); background: rgba(212, 21, 31, 0.08); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { border-color: var(--red-hi); box-shadow: 0 0 0 4px rgba(239, 42, 51, 0.18); }
.dropzone i { font-size: 24px; color: var(--red-hi); margin-bottom: 4px; }
.dz-title { font-weight: 600; }
.dz-title small { color: var(--dim); font-weight: 500; }
.dz-hint { font-size: 13px; color: var(--dim); }
.dropzone.has-file .dz-title { color: #8be0a4; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin 0.8s linear infinite; display: none; }
.is-loading .spinner { display: inline-block; }
.is-loading { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Countries marquee ---------------- */
.countries .section-head { margin-bottom: 36px; }
.x { color: var(--red-hi); }
.marquee {
  overflow: hidden; padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.country {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.country img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.country span { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0.04em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- Location ---------------- */
.location { display: grid; grid-template-columns: 1fr 1.2fr; overflow: hidden; }
.location-info { padding: clamp(24px, 4vw, 44px); }
.location-city { margin: 6px 0 22px; color: var(--muted); font-size: 17px; }
.location-facts { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 12px; }
.location-facts i { width: 22px; color: var(--red-hi); }
.location-map { min-height: 340px; position: relative; }
.location-map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: invert(0.92) hue-rotate(180deg) saturate(0.6) contrast(0.95);
}
@media (max-width: 820px) { .location { grid-template-columns: 1fr; } .location-map { min-height: 280px; } }

/* ---------------- Memorial ---------------- */
.memorial-inner {
  display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); max-width: 760px; margin: 0 auto;
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.55);
}
.memorial-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; filter: grayscale(1); border: 3px solid var(--line-strong); flex-shrink: 0; }
.memorial-name { margin: 0; font-family: var(--font-serif); font-size: clamp(26px, 4vw, 38px); }
.memorial-years { margin: 4px 0 12px; color: var(--dim); letter-spacing: 0.12em; }
.memorial-msg { margin: 0; color: var(--muted); font-style: italic; }
@media (max-width: 560px) { .memorial-inner { flex-direction: column; text-align: center; } }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--line); background: rgba(5, 3, 4, 0.8); padding: 36px 0 44px; }
.footer-inner { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--dim); font-size: 14px; }
.footer-logos { display: flex; gap: 24px; align-items: center; margin-bottom: 10px; }
.footer-logos img { height: 44px; width: auto; opacity: 0.9; }
.footer p { margin: 0; }
.footer a { color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.footer a:hover { color: var(--ink); }

/* ---------------- Modal ---------------- */
.modal {
  border: 1px solid var(--line-strong); border-radius: 24px; padding: 0; width: min(420px, calc(100% - 32px));
  background: #120a0c; color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); }
.modal[open] { animation: pop 0.45s var(--ease); }
@keyframes pop { from { transform: scale(0.94) translateY(10px); opacity: 0; } }
.modal-body { padding: 32px 28px 26px; text-align: center; }
.modal-body h3 { margin: 16px 0 6px; font-family: var(--font-serif); font-size: 28px; }
.modal-body p { margin: 0 0 8px; color: var(--muted); }
.modal-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--red); box-shadow: 0 0 0 10px rgba(212, 21, 31, 0.2); }
.ticket { margin: 20px 0 12px; padding: 16px; border-radius: 14px; border: 1.5px dashed rgba(239, 42, 51, 0.6); background: rgba(212, 21, 31, 0.08); }
.ticket small { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ticket b { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.06em; }
.modal .btn { margin-top: 12px; }

/* ---------------- Reveal on scroll ---------------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@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; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
