/* Piñata Prix — pinataprix.com
   Palette from scripts/ui/ui_kit.gd. Cel-shaded feel: thick ink outlines,
   hard offset shadows, saturated fiesta colours. */

:root {
  --plum: #6B0F5C;
  --plum-2: #4A0B45;
  --deep: #0F294D;
  --panel: #2B0B33;
  --ink: #1A031A;
  --cream: #FFF8EE;
  --paper: #FFF1DA;
  --paper-2: #FFE6BF;
  --text: #FFF8EE;
  --text-dim: #EADCEA;
  --marigold: #FFBD1F;
  --rosa: #FF338C;
  --naranja: #FF8C1A;
  --gold: #FFDB29;
  --lime: #59D94D;
  --turq: #1AC7D1;
  --violet: #8052F2;
  --ink-text: #2A0B2B;
  --ink-dim: #5B3A5A;
  --radius: 20px;
  --line: 3px;
  --shadow: 6px 6px 0 var(--ink);
  --display: "Lilita One", "Arial Rounded MT Bold", "Arial Black", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-text);
  background: var(--paper);
  overflow-x: clip;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 4px solid var(--turq); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--marigold); color: var(--ink); padding: 8px 14px; border: var(--line) solid var(--ink); border-radius: 12px; font-weight: 800; }
.skip:focus { top: 12px; }
.muted { opacity: .75; }

/* ---------- fiesta title letters (echo of UiKit.fiesta_title) ---------- */
.fiesta-title { display: inline-flex; flex-wrap: wrap; align-items: baseline; font-family: var(--display); line-height: 1; margin: 0; }
.fl {
  display: inline-block;
  color: var(--c);
  transform: rotate(var(--r));
  -webkit-text-stroke: .1em var(--ink);
  paint-order: stroke fill;
  text-shadow: .045em .085em 0 var(--ink), .02em .11em 0 rgba(26,3,26,.45);
  margin-right: -.01em;
}
.fl-word { display: inline-flex; white-space: nowrap; }
.fl-gap { display: inline-block; width: .3em; }
.fiesta-title-xl { font-size: clamp(3.2rem, 7.6vw, 6.6rem); margin: .1em 0 .2em; }
@media (max-width: 900px) { .fiesta-title-xl { font-size: clamp(3rem, 15vw, 6.6rem); } }
.fiesta-title-xl .fl { animation: bob 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.27s); }
.fiesta-title-sm { font-size: 1.6rem; }
.fiesta-title-sm .fl { -webkit-text-stroke-width: .12em; text-shadow: .04em .08em 0 var(--ink); }
@keyframes bob {
  0%, 100% { transform: rotate(var(--r)) translateY(0); }
  50% { transform: rotate(calc(var(--r) * -.4)) translateY(-.06em); }
}

/* ---------- buttons: chunky, squash on hover ---------- */
.btn {
  --bg: var(--marigold);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); font-size: 1.25rem; letter-spacing: .02em;
  text-decoration: none; color: var(--ink);
  background: var(--bg);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  padding: .55em 1.3em .5em;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { animation: squash .45s cubic-bezier(.3,1.6,.5,1); background: #FFD04F; }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); animation: none; }
@keyframes squash {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.1, .88) translateY(2px); }
  60% { transform: scale(.95, 1.06) translateY(-3px); }
  100% { transform: scale(1, 1); }
}
.btn .ico { width: 1em; height: 1em; fill: currentColor; }
.btn-xl { font-size: clamp(1.35rem, 3.4vw, 1.8rem); padding: .55em 1.4em .5em; box-shadow: 0 7px 0 var(--ink), 0 7px 0 3px var(--rosa); }
.btn-sm { font-size: 1.05rem; padding: .35em .95em .3em; box-shadow: 0 4px 0 var(--ink); }
.btn-dl { --bg: var(--rosa); color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.btn-dl:hover { background: #FF5CA3; }
.btn-xl.btn-dl { box-shadow: 0 7px 0 var(--ink), 0 7px 0 3px var(--marigold); }
.btn-ghost { --bg: transparent; color: inherit; border-color: currentColor; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.section:not(.dark) .btn-ghost { color: var(--ink); border-color: var(--ink); box-shadow: 0 5px 0 var(--ink); }
.section:not(.dark) .btn-ghost:hover { background: var(--paper-2); }

/* ---------- papel picado ---------- */
.picado { position: relative; height: 62px; overflow: hidden; pointer-events: none; }
.picado-svg { display: block; width: 100%; height: 62px; }
.picado-string { stroke: rgba(26,3,26,.65); stroke-width: 2; fill: none; }
.flag-sway { transform-box: fill-box; transform-origin: 50% 0; animation: sway var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
.flag path { stroke: rgba(26,3,26,.25); stroke-width: .8; }
@keyframes sway {
  from { transform: rotate(-4deg) skewX(-2deg); }
  to { transform: rotate(4deg) skewX(2deg); }
}

/* ---------- header ---------- */
.site-header { background: var(--plum); color: var(--text); position: relative; z-index: 5; }
.site-header .picado { background: linear-gradient(#5a0c4e, var(--plum)); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 14px; }
.logo { text-decoration: none; display: inline-flex; padding: 4px 2px; }
.nav-links { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 26px); list-style: none; margin: 0; padding: 0; font-weight: 800; }
.nav-links a:not(.btn) { text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current] { border-bottom-color: var(--marigold); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(255,51,140,.35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(26,199,209,.22), transparent 60%),
    linear-gradient(180deg, var(--plum) 0%, #3D0E52 50%, var(--deep) 100%);
  padding: clamp(24px, 5vw, 64px) 0 clamp(64px, 9vw, 120px);
}
.hero::after { /* scalloped bottom edge into the paper sections */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px;
  background: radial-gradient(circle at 18px 0, transparent 17px, var(--paper) 18px) 0 0 / 36px 28px repeat-x;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.eyebrow { font-weight: 800; letter-spacing: .02em; margin: 0; display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 1.15rem; }
.badge { display: inline-block; font-family: var(--display); font-size: .95rem; letter-spacing: .04em; padding: .18em .7em .12em; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--c, var(--marigold)); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); text-transform: uppercase; }
.badge-beta { background: var(--turq); transform: rotate(-4deg); }
.tagline { font-size: clamp(1.2rem, 2.3vw, 1.5rem); font-weight: 800; line-height: 1.4; max-width: 36ch; }
.tagline strong { color: var(--marigold); }
.hero-sub { color: var(--text-dim); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: center; margin: 26px 0 18px; }
.hero-note { font-size: .95rem; color: var(--text-dim); margin: 0; }
.hero-note a { color: var(--gold); font-weight: 800; }

.shot-stack { position: relative; padding-bottom: 26%; }
.shot { margin: 0; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.shot img { width: 100%; }
.shot-main { transform: rotate(-2deg); box-shadow: 10px 10px 0 var(--ink), 10px 10px 0 4px var(--rosa); }
.shot-b, .shot-c { position: absolute; width: 50%; bottom: 0; }
.shot-b { left: -4%; transform: rotate(4deg); box-shadow: 6px 6px 0 var(--ink), 6px 6px 0 3px var(--turq); }
.shot-c { right: -3%; bottom: -6%; transform: rotate(-5deg); box-shadow: 6px 6px 0 var(--ink), 6px 6px 0 3px var(--gold); }

/* hanging star piñata */
.hero-pinata { position: absolute; z-index: 1; top: -20px; right: clamp(-40px, 2vw, 40px); width: clamp(90px, 13vw, 170px); transform-origin: 50% 0; animation: swing 4.5s ease-in-out infinite alternate; opacity: .95; }
@keyframes swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* confetti */
.confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cf {
  position: absolute; top: -24px; left: var(--x);
  width: calc(10px * var(--s)); height: calc(10px * var(--s));
  background: var(--c); border: 1.5px solid rgba(26,3,26,.5);
  animation: fall var(--t) linear infinite; animation-delay: var(--d);
  opacity: .9;
}
.cf-rect { height: calc(16px * var(--s)); width: calc(7px * var(--s)); }
.cf-circ { border-radius: 50%; }
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0) rotateY(0); }
  50% { transform: translate3d(var(--sw), 55vh, 0) rotate(260deg) rotateY(180deg); }
  100% { transform: translate3d(0, 115vh, 0) rotate(520deg) rotateY(360deg); }
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.kicker {
  display: inline-block; margin: 0 0 12px; font-family: var(--display); font-size: 1.2rem; letter-spacing: .03em;
  background: var(--rosa); color: #fff; padding: .15em .75em .1em; border: var(--line) solid var(--ink); border-radius: 10px;
  transform: rotate(-3deg); box-shadow: 4px 4px 0 var(--ink);
  -webkit-text-stroke: 0; text-shadow: 1px 1px 0 var(--ink);
}
.lead { font-size: clamp(1.08rem, 1.9vw, 1.22rem); color: var(--ink-dim); font-weight: 700; }
.dark .lead { color: var(--text-dim); }

.card {
  --c: var(--marigold);
  position: relative; background: #fff; border: var(--line) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 18px;
  transition: transform .2s cubic-bezier(.3,1.5,.5,1);
}
.card::before { /* coloured cap, like a cel-shaded rim */
  content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 14px;
  background: var(--c); border: var(--line) solid var(--ink); border-radius: var(--radius) var(--radius) 0 0;
}
.card > *:first-child { margin-top: 8px; }

/* intro */
.section-intro { background: var(--paper) radial-gradient(rgba(107,15,92,.08) 2px, transparent 2.5px) 0 0 / 22px 22px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pillar:nth-child(1) { transform: rotate(-1.2deg); }
.pillar:nth-child(2) { transform: rotate(.8deg); }
.pillar:nth-child(3) { transform: rotate(-.6deg); }
.pillar:hover { transform: rotate(0) translateY(-4px); }
.pillar-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--c); border: var(--line) solid var(--ink); display: grid; place-items: center; color: var(--ink); margin: 10px 0 14px; box-shadow: 3px 3px 0 var(--ink); }
.pillar-icon svg { width: 44px; height: 44px; }
.pillar p { margin: 0; color: var(--ink-dim); }

/* features */
.section-features { background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature h3 { font-size: 1.4rem; }
.feature p { margin: 0; color: var(--ink-dim); }
.feature:hover { transform: translateY(-4px) rotate(-.6deg); }
.feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: var(--panel); color: var(--text); }
.feature-wide p { color: var(--text-dim); font-size: 1.1rem; }
.feature-wide h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--marigold); }
.feature-shot { margin: 8px 0 0; border: var(--line) solid var(--ink); border-radius: 14px; overflow: hidden; transform: rotate(-1.5deg); box-shadow: 5px 5px 0 var(--ink), 5px 5px 0 3px var(--turq); }
.spark { font-weight: 900; padding: 0 .35em; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.spark-1 { background: #35E0F0; }
.spark-2 { background: #FFB21F; }
.spark-3 { background: #FF4FD8; }
q { quotes: "“" "”"; font-weight: 800; color: var(--ink-text); }
.dark q { color: var(--gold); }

/* tracks */
.section-tracks { background: var(--deep) radial-gradient(rgba(255,255,255,.06) 2px, transparent 2.5px) 0 0 / 26px 26px; color: var(--text); }
.section-tracks .lead { color: var(--text-dim); }
.section-tracks .lead strong { color: var(--marigold); }
.track-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.track { padding: 0; overflow: visible; background: var(--panel); color: var(--text); }
.track::before { display: none; }
.track figure { margin: 0; border-bottom: var(--line) solid var(--ink); border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0; overflow: hidden; }
.track figure img { transition: transform .5s ease; }
.track:hover figure img { transform: scale(1.04); }
.track-body { padding: 18px 22px 20px; border-top: 8px solid var(--c); }
.track-body h3 { font-size: 1.8rem; margin-bottom: .1em; color: var(--c); -webkit-text-stroke: 0; text-shadow: 2px 2px 0 var(--ink); }
.track-tag { font-weight: 800; color: var(--text); margin-bottom: .5em; }
.track-body p:last-child { margin: 0; color: var(--text-dim); }
.track-body em { color: var(--gold); font-style: normal; font-weight: 800; }
.track:nth-child(odd) { transform: rotate(-.6deg); }
.track:nth-child(even) { transform: rotate(.6deg) translateY(18px); }

/* legend */
.section-legend {
  color: var(--text);
  background:
    radial-gradient(700px 400px at 20% 50%, rgba(255,219,41,.28), transparent 70%),
    linear-gradient(135deg, #0B4A3A 0%, #0F294D 60%, #3D0E52 100%);
  overflow: hidden;
}
.legend-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.legend-art { transform: rotate(-2.5deg); box-shadow: 10px 10px 0 var(--ink), 10px 10px 0 4px var(--gold); }
.legend-copy h2 { color: var(--gold); text-shadow: 3px 3px 0 var(--ink); }
.legend-copy p { color: var(--text-dim); }
.legend-copy strong { color: #fff; }
.legend-copy em { color: var(--gold); font-style: normal; font-weight: 800; }
.section-legend .kicker { background: var(--gold); color: var(--ink); text-shadow: none; }
.legend-prize { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-weight: 800; color: var(--text) !important; }

/* cast */
.section-cast { background: var(--paper) radial-gradient(rgba(255,51,140,.12) 2px, transparent 2.5px) 0 0 / 24px 24px; }
.cast-art { margin: 0 0 34px; box-shadow: 10px 10px 0 var(--ink), 10px 10px 0 4px var(--turq); transform: rotate(-.6deg); }
.cast-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cast-list li { background: #fff; border: var(--line) solid var(--ink); border-radius: 16px; padding: 12px 14px 12px; box-shadow: 4px 4px 0 var(--ink); border-left: 12px solid var(--c); transition: transform .2s cubic-bezier(.3,1.5,.5,1); }
.cast-list li:nth-child(odd) { transform: rotate(-1deg); }
.cast-list li:nth-child(even) { transform: rotate(1deg); }
.cast-list li:hover { transform: rotate(0) scale(1.03); }
.cast-list strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.cast-list span { display: block; font-size: .95rem; color: var(--ink-dim); line-height: 1.45; }

/* cars */
.section-cars { background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.car-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.car header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.car h3 { font-size: 1.9rem; margin: 0; }
.car-kind { font-weight: 900; color: var(--plum); margin: 2px 0 2px; }
.car-blurb { color: var(--ink-dim); font-size: .98rem; min-height: 3em; }
.tag { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper-2); white-space: nowrap; }
.tag-garage { background: var(--gold); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stats li { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; font-size: .9rem; font-weight: 800; }
.stat-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stat-bar i { height: 12px; border: 2px solid var(--ink); border-radius: 4px; background: #F1E4D0; }
.stat-bar i:nth-child(-n + 1) { background: var(--c); }
.stat-bar[style*="--v:2"] i:nth-child(-n + 2),
.stat-bar[style*="--v:3"] i:nth-child(-n + 3),
.stat-bar[style*="--v:4"] i:nth-child(-n + 4),
.stat-bar[style*="--v:5"] i:nth-child(-n + 5) { background: var(--c); }
.car:hover { transform: translateY(-5px) rotate(.8deg); }

/* modes */
.section-modes { background: linear-gradient(160deg, var(--plum) 0%, #3D0E52 55%, var(--deep) 100%); color: var(--text); overflow: hidden; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.modes-art { transform: rotate(2deg); box-shadow: 10px 10px 0 var(--ink), 10px 10px 0 4px var(--rosa); position: sticky; top: 24px; }
.mode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.mode { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; background: rgba(26,3,26,.45); border: var(--line) solid var(--ink); border-radius: 18px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--ink); border-left: 10px solid var(--c); }
.mode-ico { width: 56px; height: 56px; color: var(--c); }
.mode h3 { margin: 2px 0 4px; font-size: 1.4rem; color: #fff; }
.mode p { margin: 0; color: var(--text-dim); }

/* download (home) */
.section-download { background: var(--paper-2) radial-gradient(rgba(255,51,140,.12) 2.5px, transparent 3px) 0 0 / 26px 26px; border-bottom: var(--line) solid var(--ink); }
.section-download .dl-grid { margin-bottom: 22px; }
.dl-help { text-align: center; color: var(--ink-dim); font-weight: 700; margin: 8px auto 0; max-width: 70ch; }
.dl-help .badge { margin-right: 8px; font-size: .8rem; vertical-align: 2px; }
.dl-help a { color: var(--plum); }
.platform span a { color: var(--plum); font-weight: 800; }

/* platforms */
.section-platforms { background: var(--paper); }
.platforms { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.platform { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 28px; }
.platform svg { width: 60px; height: 60px; color: var(--ink); }
.platform strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.platform span { color: var(--ink-dim); font-size: .92rem; line-height: 1.4; }
.platform-note { color: var(--ink-dim); max-width: 70ch; }

/* gallery */
.section-gallery { background: var(--panel) radial-gradient(rgba(255,255,255,.05) 2px, transparent 2.5px) 0 0 / 24px 24px; color: var(--text); }
.section-gallery .kicker { background: var(--turq); color: var(--ink); text-shadow: none; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.zoom { display: block; border: var(--line) solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); cursor: zoom-in; transition: transform .2s cubic-bezier(.3,1.5,.5,1); background: var(--ink); }
.gallery .zoom:nth-child(3n+1) { transform: rotate(-1.2deg); }
.gallery .zoom:nth-child(3n+2) { transform: rotate(.9deg); }
.gallery .zoom:nth-child(3n) { transform: rotate(-.5deg); }
.gallery .zoom:hover, .zoom:focus-visible { transform: rotate(0) scale(1.03); }
.shot .zoom, .track .zoom { border: 0; border-radius: 0; box-shadow: none; }

/* news */
.section-news { background: var(--paper-2); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; }
.post-card::before { display: none; }
.post-card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: var(--line) solid var(--ink); }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.45rem; margin: 0; }
.post-card time { font-size: .88rem; font-weight: 900; color: var(--plum); text-transform: uppercase; letter-spacing: .05em; }
.post-card p { margin: 0; color: var(--ink-dim); font-size: .98rem; }
.post-card .more { margin-top: auto; padding-top: 8px; font-weight: 900; color: var(--rosa); }
.post-card:hover { transform: translateY(-5px) rotate(-.6deg); }
.post-card:hover h2, .post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--marigold); }

/* final CTA */
.section-cta { background: var(--marigold) radial-gradient(rgba(255,255,255,.35) 3px, transparent 3.5px) 0 0 / 30px 30px; text-align: center; border-top: var(--line) solid var(--ink); }
.section-cta h2 { color: var(--ink); }
.cta-inner p { font-size: 1.2rem; font-weight: 800; color: var(--ink-text); }
.cta-btns { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.section-cta .btn-xl.btn-play { --bg: #fff; box-shadow: 0 7px 0 var(--ink), 0 7px 0 3px var(--rosa); }
.section-cta .btn-xl.btn-play:hover { background: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--text-dim); padding-bottom: 28px; }
.site-footer .picado { background: var(--plum-2); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 30px 0 10px; }
.footer-brand p { max-width: 44ch; margin: 8px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 800; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--marigold); text-decoration: underline; }
.footer-small { font-size: .88rem; opacity: .75; margin-top: 18px; }

/* ---------- blog ---------- */
.page-head { background: linear-gradient(180deg, var(--plum), #3D0E52); color: var(--text); padding: clamp(36px, 6vw, 72px) 0 clamp(52px, 7vw, 86px); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px; background: radial-gradient(circle at 18px 0, transparent 17px, var(--paper) 18px) 0 0 / 36px 28px repeat-x; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); text-shadow: 3px 4px 0 var(--ink); }
.page-head p { color: var(--text-dim); font-size: 1.15rem; max-width: 60ch; margin: 0; }
.page-head .kicker { margin-bottom: 16px; }
.blog-list { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.blog-list .post-grid { grid-template-columns: repeat(2, 1fr); }
.post { padding: clamp(36px, 6vw, 64px) 0 clamp(56px, 8vw, 96px); }
.post-wrap { width: min(100% - 32px, 760px); margin-inline: auto; }
.post-meta { font-weight: 900; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; font-size: .92rem; }
.post-cover { margin: -16px 0 34px; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 8px 8px 0 var(--ink), 8px 8px 0 4px var(--turq); transform: rotate(-.8deg); }
.prose { font-size: 1.12rem; line-height: 1.75; }
.prose h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); margin-top: 1.5em; }
.prose h3 { margin-top: 1.4em; }
.prose a { color: #B5126A; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 800; }
.prose a:hover { color: var(--plum); background: rgba(255,189,31,.35); }
.prose figure { margin: 1.8em 0; }
.prose figure img, .prose p img { border: var(--line) solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); }
.prose figcaption { font-size: .95rem; color: var(--ink-dim); margin-top: 12px; text-align: center; }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px; background: #fff; border: var(--line) solid var(--ink); border-left: 12px solid var(--rosa); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: rgba(107,15,92,.1); padding: .1em .35em; border-radius: 6px; }
.prose pre { background: var(--ink); color: #FFE9C4; padding: 16px 18px; border-radius: 14px; overflow-x: auto; border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--plum); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; height: 14px; margin: 2.4em 0; background: repeating-linear-gradient(90deg, var(--rosa) 0 24px, var(--naranja) 24px 48px, var(--gold) 48px 72px, var(--lime) 72px 96px, var(--turq) 96px 120px, var(--violet) 120px 144px); border: 2px solid var(--ink); border-radius: 8px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--rosa); font-weight: 900; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 48px; }
.post-nav-link { display: block; background: #fff; border: var(--line) solid var(--ink); border-radius: 16px; padding: 14px 18px; box-shadow: 4px 4px 0 var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.15rem; line-height: 1.25; }
.post-nav-link span { display: block; font-family: var(--body); font-weight: 900; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--plum); margin-bottom: 4px; }
.post-nav-link.newer { text-align: right; grid-column: 2; }
.post-nav-link:hover { background: var(--paper-2); }
.post-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 404 ---------- */
.notfound { position: relative; overflow: hidden; color: var(--text); text-align: center; background: linear-gradient(180deg, var(--plum), var(--deep)); padding: clamp(60px, 10vw, 130px) 0; min-height: 60vh; }
.notfound .wrap { position: relative; z-index: 2; }
.notfound .big { font-family: var(--display); font-size: clamp(6rem, 22vw, 12rem); line-height: 1; margin: 0; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0 12px; }
.notfound p { color: var(--text-dim); max-width: 46ch; margin: 0 auto 28px; font-size: 1.15rem; }
.notfound .btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- downloads (beta) ---------- */
.dl-hero { position: relative; color: var(--text); background: radial-gradient(800px 400px at 80% 0%, rgba(255,51,140,.3), transparent 60%), linear-gradient(180deg, var(--plum), #3D0E52 70%, var(--deep)); padding: clamp(32px, 6vw, 72px) 0 clamp(60px, 8vw, 96px); overflow: hidden; }
.dl-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px; background: radial-gradient(circle at 18px 0, transparent 17px, var(--paper) 18px) 0 0 / 36px 28px repeat-x; }
.dl-hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); text-shadow: 3px 4px 0 var(--ink); margin-bottom: .25em; }
.dl-hero p { color: var(--text-dim); font-size: 1.15rem; max-width: 62ch; }
.build-pill { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: rgba(26,3,26,.5); border: var(--line) solid var(--ink); border-radius: 16px; padding: 10px 16px; margin-top: 10px; font-weight: 800; box-shadow: 4px 4px 0 var(--ink); }
.build-pill code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--gold); font-size: .95rem; word-break: break-all; }
.build-pill .lbl { color: var(--text-dim); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.dl-main { padding: clamp(40px, 6vw, 72px) 0; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 30px; }
.dl-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 30px 22px 24px; }
.dl-card svg.os { width: 72px; height: 72px; color: var(--ink); margin: 6px 0 6px; }
.dl-card h2 { font-size: 2rem; margin: 0; }
.dl-card .note { color: var(--ink-dim); margin: 0; font-weight: 800; }
.dl-card .size { color: var(--ink-dim); font-size: .92rem; margin: 0 0 16px; }
.dl-card .btn { margin-top: auto; }
.dl-card.recommended { outline: 4px dashed var(--rosa); outline-offset: 6px; }
.dl-card .yours { display: none; position: absolute; top: -16px; right: 14px; transform: rotate(4deg); }
.dl-card.recommended .yours { display: inline-block; }
.dl-card .file { font-size: .8rem; color: var(--ink-dim); word-break: break-all; margin-top: 10px; font-family: ui-monospace, Menlo, monospace; }
.dl-play { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--panel); color: var(--text); margin-bottom: 44px; }
.dl-play h2 { font-size: 1.7rem; margin: 0 0 4px; color: var(--marigold); }
.dl-play p { margin: 0; color: var(--text-dim); }
.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.notes .card h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.notes .card h3 svg { width: 30px; height: 30px; flex: none; }
.notes ol, .notes ul { padding-left: 1.25em; margin: 0 0 .6em; }
.notes li { margin: .25em 0; }
.notes li::marker { color: var(--rosa); font-weight: 900; }
.notes p { color: var(--ink-dim); margin: .4em 0 0; }
.notes code, .kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: rgba(107,15,92,.1); padding: .1em .35em; border-radius: 6px; word-break: break-word; }
.notes .wide { grid-column: 1 / -1; }
.update-card { background: #EFFFF0; }
.placeholder-note { background: var(--gold); color: var(--ink); display: inline-block; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 10px; font-weight: 900; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(15,3,20,.92); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.lightbox.open { opacity: 1; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 110px); width: auto; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 8px 8px 0 var(--rosa); background: var(--ink); }
.lightbox figcaption { color: var(--text); text-align: center; margin-top: 12px; font-weight: 700; max-width: 70ch; margin-inline: auto; }
.lightbox figure { margin: 0; }
.lb-btn { position: absolute; background: var(--marigold); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 999px; width: 52px; height: 52px; font: 400 1.6rem/1 var(--display); cursor: pointer; box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; }
.lb-next { right: 12px; top: 50%; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .feature-grid, .car-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .cast-list { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner, .legend-inner, .modes, .feature-wide { grid-template-columns: 1fr; }
  .hero-art { max-width: 640px; margin: 8px auto 0; width: 100%; }
  .modes-art { position: static; }
  .dl-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .notes { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 700px) {
  .pillars, .feature-grid, .track-grid, .car-grid, .post-grid, .blog-list .post-grid, .gallery { grid-template-columns: 1fr; }
  .track:nth-child(even) { transform: rotate(.6deg); }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.newer { grid-column: auto; text-align: left; }
  .dl-play { grid-template-columns: 1fr; }
  body { font-size: 1rem; }
}
@media (max-width: 480px) {
  .cast-list { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr 1fr; gap: 14px; }
  .platform { padding: 22px 10px 14px; }
  .platform strong { font-size: 1.25rem; }
  .picado, .picado-svg { height: 46px; }
  .hero-pinata { width: 64px; top: -44px; right: -10px; }
  .fiesta-title-sm { font-size: 1.3rem; }
  .nav-links { gap: 12px; }
  .hide-xs { display: none; }
  .btn-xl { width: 100%; }
  .hero-ctas .btn-ghost, .hero-ctas .btn-play { width: 100%; }
  .card { padding: 20px 18px 16px; }
  .car-blurb { min-height: 0; }
  .mode { grid-template-columns: 44px 1fr; padding: 14px; gap: 12px; }
  .mode-ico { width: 42px; height: 42px; }
  .shot-stack { padding-bottom: 30%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .cf { top: var(--y); transform: rotate(var(--r)); }
}

/* blog index: the newest post gets the full width */
@media (min-width: 701px) {
  .blog-list .post-card:first-child { grid-column: 1 / -1; flex-direction: row; }
  .blog-list .post-card:first-child .post-card-img { width: 56%; aspect-ratio: 16 / 9; border-bottom: 0; border-right: var(--line) solid var(--ink); }
  .blog-list .post-card:first-child .post-card-body { justify-content: center; padding: 26px 30px; }
  .blog-list .post-card:first-child h2 { font-size: 2rem; }
}
