/* ==========================================================================
   Vuelve a Ti — Shia's Fitness
   ========================================================================== */
:root {
  --ink: #0b0f0e;
  --ink-soft: #121817;
  --ink-raise: #19211f;
  --line: rgba(47, 217, 194, 0.16);
  --line-strong: rgba(47, 217, 194, 0.38);
  --teal: #1f9c8a;
  --teal-bright: #2fd9c2;
  --pink: #ff3d7f;
  --pink-soft: rgba(255, 61, 127, 0.14);
  --cream: #f3efe6;
  --muted: #9fada9;
  --radius: 20px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; background: var(--ink); color: var(--cream); }
body { font-family: var(--body); line-height: 1.55; overflow-x: hidden; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 1; }
h2 { text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grain over everything (texture, not decoration) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  background: linear-gradient(90deg, var(--teal-bright), var(--pink));
  transform-origin: 0 50%; transform: scaleX(var(--scroll, 0));
}

/* ---------- Splash (double safety: CSS hides it at 3.2s even if JS fails) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center;
  animation: splashSafety .01s 3.2s forwards;
  transition: clip-path .9s var(--ease-out), opacity .6s ease;
  clip-path: inset(0 0 0 0);
}
.splash.is-out { clip-path: inset(0 0 100% 0); pointer-events: none; }
@keyframes splashSafety { to { clip-path: inset(0 0 100% 0); pointer-events: none; } }
.splash-word { font-family: var(--display); font-size: clamp(44px, 11vw, 120px); text-transform: uppercase; letter-spacing: .02em; display: flex; overflow: hidden; }
.splash-word span { display: inline-block; transform: translateY(110%); animation: rise .8s var(--ease-out) forwards; }
.splash-word span:nth-child(odd) { color: var(--teal-bright); }
.splash-count { position: absolute; bottom: 32px; right: 32px; font-family: var(--display); font-size: 14px; letter-spacing: .3em; color: var(--muted); }
@keyframes rise { to { transform: translateY(0); } }

/* ---------- Nav ---------- */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
nav.site-nav.is-solid { background: rgba(11, 15, 14, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
nav .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(from 0deg, var(--teal-bright), var(--pink), var(--teal-bright)); animation: spin 8s linear infinite; }
.brand-mark::after { content: "30"; font-family: var(--display); font-size: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; animation: spin 8s linear infinite reverse; }
.brand-name { display: block; font-family: var(--display); font-size: 18px; margin: 0; line-height: 1.1; }
.brand-tag { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .28em; color: var(--teal-bright); margin: 2px 0 0; }
.nav-links { display: none; gap: 28px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--muted); position: relative; transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--teal-bright); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; border: none; cursor: pointer; font-family: var(--display); letter-spacing: .04em;
  text-decoration: none; text-transform: uppercase; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s;
  will-change: transform;
}
.btn-pink { background: var(--pink); color: var(--cream); padding: 18px 36px; font-size: 15px; box-shadow: 0 10px 30px -10px rgba(255, 61, 127, .7); }
.btn-pink::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--teal-bright), var(--pink)); transform: translateX(-101%); transition: transform .55s var(--ease-out); }
.btn-pink:hover { box-shadow: 0 18px 40px -12px rgba(47, 217, 194, .6); }
.btn-pink:hover::before { transform: translateX(0); }
.btn-pink:disabled { opacity: .7; cursor: progress; }
.btn-outline { background: transparent; color: var(--cream); border: 1px solid var(--pink); padding: 10px 22px; font-size: 13px; }
.btn-outline:hover { background: var(--pink); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 10px 18px; font-size: 12px; }
.btn-ghost:hover { color: var(--cream); border-color: var(--line-strong); }
.btn .arrow { display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }
.btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(243, 239, 230, .35); border-top-color: var(--cream); animation: spin .8s linear infinite; }
.pulse-ring { position: absolute; inset: -6px; border-radius: 999px; border: 1px solid var(--pink); opacity: 0; animation: pulseRing 2.6s ease-out infinite; pointer-events: none; }
@keyframes pulseRing { 0% { transform: scale(.92); opacity: .8; } 100% { transform: scale(1.25); opacity: 0; } }
.cta-wrap { position: relative; display: inline-block; }

/* ---------- Ambient background (blobs + cursor glow) ---------- */
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.blob.b1 { width: 46vmax; height: 46vmax; background: radial-gradient(circle at 30% 30%, var(--teal), transparent 65%); top: -18vmax; left: -12vmax; animation: drift1 22s ease-in-out infinite alternate; }
.blob.b2 { width: 40vmax; height: 40vmax; background: radial-gradient(circle at 60% 40%, var(--pink), transparent 62%); bottom: -20vmax; right: -14vmax; opacity: .38; animation: drift2 26s ease-in-out infinite alternate; }
.blob.b3 { width: 26vmax; height: 26vmax; background: radial-gradient(circle, var(--teal-bright), transparent 60%); top: 30%; left: 55%; opacity: .22; animation: drift3 18s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, -8vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-20vmax, 12vmax) scale(.85); } }
.cursor-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; left: 0; top: 0; background: radial-gradient(circle, rgba(47, 217, 194, .16), transparent 60%); transform: translate(calc(var(--mx, 50vw) - 260px), calc(var(--my, 40vh) - 260px)); transition: transform .6s var(--ease-out); opacity: 0; }
.has-pointer .cursor-glow { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; min-height: 92svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 24px 80px; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; max-width: 980px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); color: var(--teal-bright); font-size: 11px; text-transform: uppercase; letter-spacing: .3em; padding: 8px 18px; border-radius: 999px; background: rgba(11, 15, 14, .5); backdrop-filter: blur(6px); }
.eyebrow .live { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(255, 61, 127, .7); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(255, 61, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 127, 0); } }
.hero h1 { font-size: clamp(60px, min(17vw, 21vh), 200px); text-transform: uppercase; line-height: .86; margin: 26px 0 18px; letter-spacing: -.005em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero h1 .accent { color: transparent; -webkit-text-stroke: 2px var(--teal-bright); }
.hero h1 .ch { display: inline-block; }
.js .hero h1 .ch { transform: translateY(105%); animation: showSafety .01s 3.6s forwards; }
@keyframes showSafety { to { transform: none; opacity: 1; } }
.js.is-loaded .hero h1 .ch { transform: translateY(0); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 150ms); }
.rotator { font-size: clamp(18px, 2.4vw, 24px); color: var(--muted); margin: 0 auto; max-width: 560px; }
.rotator .swap { display: inline-grid; vertical-align: bottom; height: 1.4em; overflow: hidden; color: var(--cream); font-weight: 700; }
.rotator .swap span { grid-area: 1 / 1; transition: transform .7s var(--ease-out), opacity .7s; transform: translateY(100%); opacity: 0; }
.rotator .swap span.on { transform: translateY(0); opacity: 1; }
.rotator .swap span.off { transform: translateY(-100%); opacity: 0; }
.hero-cta { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; }
.js .hero .fade-up { opacity: 0; transform: translateY(24px); animation: showSafety .01s 3.8s forwards; }
.js.is-loaded .hero .fade-up { opacity: 1; transform: none; transition: opacity 1s ease, transform 1s var(--ease-out); transition-delay: var(--d, .6s); }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
@media (max-height: 780px) { .scroll-cue { display: none; } }
.scroll-cue .track { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue .track::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--teal-bright); animation: cue 2s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- Stats band ---------- */
.stats { position: relative; z-index: 2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-soft); }
.stats .row { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); }
.stat-big { padding: 34px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.stat-big:nth-child(odd) { border-right: 1px solid var(--line); }
.stat-big b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 72px); line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; }
.stat-big b em { font-style: normal; color: var(--teal-bright); }
.stat-big > span { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-bottom: 1px solid var(--line); background: var(--ink); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee.rev .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee-track span { font-family: var(--display); font-size: clamp(34px, 6vw, 72px); text-transform: uppercase; padding: 0 28px; white-space: nowrap; }
.marquee-track span.o { color: transparent; -webkit-text-stroke: 1px var(--cream); opacity: .55; }
.marquee-track span.s { color: var(--pink); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section.section { position: relative; padding: 110px 24px; max-width: 1180px; margin: 0 auto; }
.section-head { max-width: 720px; }
.section-head.center { text-align: center; margin: 0 auto; }
.eyebrow-txt { font-size: 12px; text-transform: uppercase; letter-spacing: .3em; color: var(--teal-bright); margin: 0; }
.section-head h2 { font-size: clamp(38px, 6vw, 68px); text-transform: uppercase; margin: 14px 0 0; }
.section-head h2 .accent { color: var(--pink); }
.section-head p { color: var(--muted); margin: 16px 0 0; font-size: 17px; }

/* ---------- Reveal (only hidden when JS runs; 6s safety in JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .9s ease, transform 1.1s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
.js .reveal[data-split] { opacity: 1; transform: none; }

/* ---------- Pillars ---------- */
.pillars { display: grid; gap: 16px; margin-top: 56px; grid-template-columns: 1fr; }
.pillar { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; background: var(--ink-soft); transition: border-color .4s, transform .5s var(--ease-out); }
.pillar:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.pillar svg { width: 42px; height: 42px; color: var(--teal-bright); }
.pillar h3 { font-size: 26px; text-transform: uppercase; margin: 22px 0 8px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }
.pillar::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 127, .22), transparent 70%); transition: transform .8s var(--ease-out); }
.pillar:hover::after { transform: translate(-30px, -30px) scale(1.4); }

/* ---------- Prizes ---------- */
.prizes { background: var(--ink-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.prize-grid { display: grid; gap: 22px; margin-top: 56px; grid-template-columns: 1fr; perspective: 1200px; }
.prize {
  position: relative; border-radius: var(--radius); padding: 1px; background: var(--line);
  transform-style: preserve-3d;
}
.prize.gold { background: conic-gradient(from var(--angle, 0deg), var(--teal-bright), var(--pink), var(--teal-bright)); animation: angle 5s linear infinite; }
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes angle { to { --angle: 360deg; } }
.prize-inner { position: relative; height: 100%; border-radius: calc(var(--radius) - 1px); background: var(--ink); padding: 32px 28px 30px; overflow: hidden; }
.prize-inner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(243, 239, 230, .08) 50%, transparent 65%); transform: translateX(-100%); transition: transform .9s var(--ease-out); pointer-events: none; }
.prize:hover .prize-inner::before { transform: translateX(100%); }
.prize .rank { position: absolute; top: -8px; right: 14px; font-family: var(--display); font-size: 130px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(47, 217, 194, .22); pointer-events: none; }
.prize .place { font-size: 11px; text-transform: uppercase; letter-spacing: .28em; color: var(--pink); margin: 0; }
.prize h3 { font-size: 30px; text-transform: uppercase; margin: 12px 0 0; max-width: 80%; }
.prize ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.prize li { display: flex; gap: 10px; align-items: flex-start; }
.tick { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; color: var(--teal-bright); }
.tick path { stroke-dasharray: 24; stroke-dashoffset: 0; }
.js .reveal .tick path { stroke-dashoffset: 24; }
.js .reveal.is-in .tick path { stroke-dashoffset: 0; transition: stroke-dashoffset .7s var(--ease-out) .5s; }
.prize .badge { display: inline-block; margin-top: 18px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; background: var(--pink-soft); color: var(--pink); padding: 6px 12px; border-radius: 999px; }

/* ---------- Requirements ---------- */
.req-list { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.req-list li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 26px 4px; border-bottom: 1px solid var(--line); font-size: clamp(17px, 2.2vw, 22px); transition: padding .5s var(--ease-out), color .3s; }
.req-list li:hover { padding-left: 16px; color: var(--teal-bright); }
.req-list .tick-big { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; }
.req-list .tick-big svg { width: 20px; height: 20px; color: var(--teal-bright); }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 60px; display: grid; gap: 26px; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: 11px; top: 8px; width: 2px; height: calc((100% - 16px) * var(--fill, 0)); background: linear-gradient(var(--teal-bright), var(--pink)); transition: height .2s linear; }
.step { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--ink-soft); }
.step::before { content: ""; position: absolute; left: -34px; top: 32px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 2px solid var(--line-strong); transition: background .4s, border-color .4s, box-shadow .4s; }
.step.is-in::before { background: var(--teal-bright); border-color: var(--teal-bright); box-shadow: 0 0 0 6px rgba(47, 217, 194, .15); }
.step-num { font-family: var(--display); font-size: 15px; letter-spacing: .2em; color: var(--pink); }
.step h3 { font-size: 28px; text-transform: uppercase; margin: 10px 0 8px; }
.step p { margin: 0; color: var(--muted); }
.already { margin-top: 36px; display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.already a { color: var(--teal-bright); font-weight: 700; }

/* ---------- Registration ---------- */
.registration { position: relative; overflow: hidden; border-top: 1px solid var(--line); background: var(--ink-soft); }
.registration .inner { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 110px 24px; }
.form-card { margin-top: 40px; border: 1px solid var(--line); border-radius: 24px; padding: 30px; background: rgba(11, 15, 14, .75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
form.grid { display: grid; gap: 18px; }
.two-col { display: grid; gap: 18px; grid-template-columns: 1fr; }
.field { display: grid; gap: 8px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
input, textarea, select { width: 100%; border-radius: 12px; border: 1px solid rgba(47, 217, 194, .25); background: var(--ink); color: var(--cream); padding: 14px 16px; font-family: inherit; font-size: 16px; transition: border-color .3s, box-shadow .3s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal-bright); box-shadow: 0 0 0 4px rgba(47, 217, 194, .12); }
textarea { resize: vertical; min-height: 90px; }
.range-field { display: grid; gap: 12px; }
.range-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.range-value { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--teal-bright); font-variant-numeric: tabular-nums; transition: color .3s; }
.range-value small { font-size: 18px; color: var(--muted); }
.range-label { font-size: 13px; color: var(--cream); }
input[type=range] { -webkit-appearance: none; appearance: none; padding: 0; height: 8px; border: none; border-radius: 999px; background: linear-gradient(90deg, var(--teal-bright) 0%, var(--pink) var(--pct, 78%), rgba(159, 173, 169, .2) var(--pct, 78%)); box-shadow: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--cream); border: 4px solid var(--pink); cursor: grab; transition: transform .2s; }
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--cream); border: 4px solid var(--pink); cursor: grab; }
.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-top: 16px; animation: shake .45s; }
.alert-error { border: 1px solid rgba(255, 61, 127, .45); background: rgba(255, 61, 127, .1); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.done-box { text-align: center; padding: 18px 0 6px; animation: popIn .8s var(--ease-out); }
@keyframes popIn { from { opacity: 0; transform: scale(.92) translateY(20px); } to { opacity: 1; transform: none; } }
.done-box h3 { font-size: 36px; text-transform: uppercase; margin: 12px 0 0; }
.done-box p { color: var(--muted); margin: 12px 0 0; }
.code-box { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 26px auto 0; border: 1px dashed var(--line-strong); border-radius: 16px; padding: 18px 22px; max-width: 360px; }
.code-box .code { font-family: var(--display); font-size: 40px; letter-spacing: .28em; color: var(--teal-bright); font-variant-numeric: tabular-nums; }
.copy-btn { font-size: 12px; }

/* ---------- Footer ---------- */
footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: 60px 24px 30px; text-align: center; }
.footer-giant { font-family: var(--display); font-size: clamp(60px, 16vw, 220px); line-height: .85; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1px rgba(243, 239, 230, .18); margin: 0; user-select: none; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1180px; margin: 36px auto 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.footer-meta a { color: var(--muted); text-decoration: none; }
.footer-meta a:hover { color: var(--teal-bright); }
.fname { font-family: var(--display); letter-spacing: .25em; text-transform: uppercase; color: var(--cream); }

/* ---------- Confetti canvas ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }

/* ==========================================================================
   App pages (check-in / admin)
   ========================================================================== */
.app-page { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; }
.app-page .ambient { position: fixed; }
.app-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 48px 20px 80px; }
.app-top { width: 100%; max-width: 1100px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.app-title { text-align: center; margin-bottom: 34px; }
.app-title h1 { font-size: clamp(44px, 9vw, 84px); text-transform: uppercase; margin: 12px 0 0; }
.app-title h1 .accent { color: transparent; -webkit-text-stroke: 1.5px var(--teal-bright); }
.panel { position: relative; width: 100%; max-width: 460px; border: 1px solid var(--line); border-radius: 24px; padding: 30px; background: rgba(18, 24, 23, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: popIn .7s var(--ease-out); }
.panel + .panel { margin-top: 18px; }
.muted { color: var(--muted); }

/* Progress ring */
.ring-wrap { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: rgba(159, 173, 169, .15); }
.ring .fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease-out); }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; display: block; }
.ring-center span { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hello { margin: 0; font-size: 14px; color: var(--muted); }
.hello-name { font-family: var(--display); font-size: 28px; text-transform: uppercase; margin: 4px 0 12px; line-height: 1.05; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini { border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; background: var(--ink); }
.mini b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--teal-bright); font-variant-numeric: tabular-nums; }
.mini span { font-size: 10px; color: var(--muted); letter-spacing: .06em; }

/* 30-day calendar */
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cal-head h3 { font-size: 20px; text-transform: uppercase; margin: 0; }
.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.day {
  position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
  animation: dayIn .5s var(--ease-out) both; animation-delay: calc(var(--i) * 22ms);
}
@keyframes dayIn { from { opacity: 0; transform: scale(.6); } }
.cal.no-anim .day { animation: none; }
.day.half { background: linear-gradient(135deg, rgba(47, 217, 194, .55) 50%, var(--ink) 50%); color: var(--cream); border-color: var(--line-strong); }
.day.full { background: linear-gradient(135deg, var(--teal-bright), var(--teal)); color: var(--ink); border-color: transparent; }
.day.missed { opacity: .45; }
.day.future { border-style: dashed; opacity: .5; }
.day.today { border: 2px solid var(--pink); color: var(--cream); }
.day.today::after { content: ""; position: absolute; inset: -5px; border-radius: 13px; border: 1px solid var(--pink); animation: pulseRing 2.2s ease-out infinite; }
button.day { cursor: pointer; font-family: inherit; transition: transform .2s var(--ease-out), border-color .2s; }
button.day:hover:not(:disabled) { transform: scale(1.08); border-color: var(--teal-bright); }
button.day:disabled { cursor: default; }
button.day.selected { outline: 2px solid var(--cream); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--line); }
.legend .l-full { background: var(--teal-bright); border-color: transparent; }
.legend .l-half { background: linear-gradient(135deg, rgba(47, 217, 194, .55) 50%, var(--ink) 50%); }
.legend .l-today { border: 2px solid var(--pink); }

/* Toggle cards */
.toggle {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--ink); color: var(--cream);
  font-size: 15px; font-weight: 600; transition: border-color .3s, background .3s, transform .2s var(--ease-out);
}
.toggle:active { transform: scale(.98); }
.toggle .box { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line-strong); display: grid; place-items: center; transition: background .35s var(--ease-out), border-color .35s; }
.toggle .box svg { width: 18px; height: 18px; color: var(--ink); }
.toggle .box path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s var(--ease-out) .05s; }
.toggle small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.toggle[aria-pressed="true"] { border-color: var(--teal-bright); background: rgba(31, 156, 138, .12); }
.toggle[aria-pressed="true"] .box { background: var(--teal-bright); border-color: var(--teal-bright); }
.toggle[aria-pressed="true"] .box path { stroke-dashoffset: 0; }
.success-panel { text-align: center; }
.success-panel .big-check { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: linear-gradient(135deg, var(--teal-bright), var(--pink)); display: grid; place-items: center; animation: popIn .7s var(--ease-out); }
.success-panel .big-check svg { width: 40px; height: 40px; color: var(--ink); }
.success-panel .big-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s var(--ease-out) .35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-panel h3 { font-size: 30px; text-transform: uppercase; margin: 18px 0 6px; }
.streak { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: var(--pink-soft); color: var(--pink); font-size: 13px; font-weight: 700; }

/* ---------- Admin ---------- */
.dash { width: 100%; max-width: 1100px; animation: popIn .7s var(--ease-out); }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.dash-head h1 { font-size: clamp(38px, 6vw, 58px); text-transform: uppercase; margin: 8px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--ink-soft); position: relative; overflow: hidden; }
.kpi b { display: block; font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.kpi.accent b { color: var(--teal-bright); }
.kpi.pink b { color: var(--pink); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; }
.search input { padding-left: 42px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: rgba(18, 24, 23, .8); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid rgba(47, 217, 194, .08); vertical-align: middle; }
thead th { border-top: none; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--ink-soft); }
tbody tr { cursor: pointer; transition: background .25s; animation: rowIn .5s var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
tbody tr:hover { background: rgba(47, 217, 194, .06); }
tbody tr.empty { cursor: default; }
@keyframes rowIn { from { opacity: 0; transform: translateY(12px); } }
.who b { display: block; font-weight: 700; }
.who span { font-size: 12px; color: var(--muted); }
.bar { width: 120px; height: 8px; border-radius: 999px; background: rgba(159, 173, 169, .15); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 10px; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--teal-bright), var(--pink)); transition: width 1.2s var(--ease-out); }
.pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.pct.high { color: var(--teal-bright); }
.pct.mid { color: var(--pink); }
.pct.low { color: var(--muted); }
.edit-chip { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-bright); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(560px, 100%); background: var(--ink-soft); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .55s var(--ease-out); overflow-y: auto; padding: 26px 24px 60px; }
.drawer.open { transform: none; }
.drawer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer h2 { font-size: 36px; text-transform: uppercase; margin: 6px 0 0; }
.close-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--cream); font-size: 20px; cursor: pointer; flex-shrink: 0; transition: transform .3s, border-color .3s; }
.close-x:hover { transform: rotate(90deg); border-color: var(--pink); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.info { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--ink); min-width: 0; }
.info span { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.info b { display: block; margin-top: 4px; font-weight: 700; overflow-wrap: anywhere; }
.info.wide { grid-column: 1 / -1; }
.info .code { font-family: var(--display); font-weight: 400; letter-spacing: .25em; color: var(--teal-bright); font-size: 22px; }
.day-editor { margin-top: 18px; border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px; background: var(--ink); animation: popIn .45s var(--ease-out); }
.day-editor h4 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; }
.day-editor .toggle { margin-bottom: 10px; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.saved-flash { font-size: 13px; color: var(--teal-bright); opacity: 0; transition: opacity .3s; }
.saved-flash.on { opacity: 1; }
.danger-zone { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--pink); border: 1px solid rgba(255, 61, 127, .5); padding: 10px 18px; font-size: 12px; }
.btn-danger:hover { background: var(--pink); color: var(--cream); }
.confirm-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .stats .row { grid-template-columns: repeat(4, 1fr); }
  .stat-big { border-bottom: none; border-right: 1px solid var(--line); }
  .stat-big:last-child { border-right: none; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .prize-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
  .timeline { padding-left: 0; grid-template-columns: repeat(3, 1fr); }
  .timeline::before, .timeline::after { left: 8px; right: 8px; top: -30px; bottom: auto; height: 2px; width: auto; }
  .timeline::after { right: auto; width: calc((100% - 16px) * var(--fill, 0)); height: 2px; }
  .step::before { left: 26px; top: -37px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .cal { grid-template-columns: repeat(10, 1fr); }
  .form-card { padding: 38px; }
}
@media (max-width: 420px) {
  .ring-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .code-box .code { font-size: 32px; }
}

/* Only the truly intrusive motion is reduced (Windows ships this ON by default). */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .marquee-track { animation-duration: 90s; }
}
