/* Charola landing: shared by every page (tokens, header, logo, buttons, footer). Page-specific styles stay in each page. */
:root {
  color-scheme: light;
  --paprika: #c1450f;
  --paprika-2: #a8360a;
  --paprika-soft: #ffe6d6;
  --cacao: #32110c;
  --cacao-2: #4a2219;
  --peach: #fff5ee;
  --line: #f1ded3;
  --muted: #7b5b51;
  --agave: #0e8a7b;
  --agave-soft: #dbf2ee;
  --mango: #f2a516;
  --mango-soft: #fff0cf;
  --rosa: #e0457b;
  --white: #ffffff;
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--cacao); font: 500 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--agave); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
html[data-lang="es"] [lang="en"]:not(html), html[data-lang="en"] [lang="es"]:not(html) { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logo mark (redrawn from the brand logo so it can move) ---------- */
.cloche { overflow: visible; }
.cloche .steam path { fill: none; stroke: var(--paprika); stroke-width: 5; stroke-linecap: round; animation: steam 2.8s ease-in-out infinite; }
.cloche .steam path:nth-child(2) { animation-delay: .45s; }
.cloche .steam path:nth-child(3) { animation-delay: .9s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 35%, 60% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.cloche .lid { transform-box: view-box; transform-origin: 98px 84px; transition: transform .45s var(--spring); }
.cloche .dome { fill: none; stroke: var(--paprika); stroke-width: 7; stroke-linecap: round; }
.cloche .shine { fill: none; stroke: var(--paprika); stroke-width: 4.5; stroke-linecap: round; }
.cloche .knob { fill: var(--paprika); }
.cloche .tray { fill: var(--paprika-2); }
a:hover > .cloche .lid, .cloche.lifted .lid { transform: translate(4px, -12px) rotate(-14deg); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.top.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(50, 17, 12, .4); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.6rem; letter-spacing: -.01em; color: var(--cacao); }
.brand svg { width: 46px; height: 40px; }
.links { display: flex; align-items: center; gap: 4px; }
.links a.nav { text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; color: var(--cacao-2); }
.links a.nav:hover { background: var(--peach); }
.langs { display: inline-flex; background: var(--peach); border-radius: 999px; padding: 3px; margin-inline: 6px; }
.langs button { border: 0; background: none; cursor: pointer; font-weight: 800; font-size: .85rem; padding: 6px 11px; border-radius: 999px; color: var(--muted); transition: background .2s, color .2s; }
.langs button[aria-pressed="true"] { background: var(--white); color: var(--cacao); box-shadow: 0 1px 4px rgba(50, 17, 12, .15); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--paprika); color: var(--white); box-shadow: 0 10px 24px -10px rgba(193, 69, 15, .7); }
.btn.primary:hover { background: var(--paprika-2); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(193, 69, 15, .75); }
.btn.soft { background: var(--peach); color: var(--cacao); }
.btn.soft:hover { background: var(--paprika-soft); transform: translateY(-2px); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.btn.white { background: var(--white); color: var(--paprika-2); }
.btn.white:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .45); }
.btn.outline-white { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.btn.outline-white:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }


/* ---------- Sections ---------- */
section { position: relative; padding-block: clamp(64px, 9vw, 112px); }
h2 { font-weight: 900; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 16px; text-wrap: balance; }
.sub { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--cacao-2); max-width: 36em; margin: 0; }
h3 { font-weight: 900; font-size: 1.3rem; line-height: 1.2; margin: 0 0 6px; }
p { margin: 0; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Papel picado ---------- */
.picado { display: block; width: 100%; height: 74px; overflow: visible; }
.picado .flag { transform-box: fill-box; transform-origin: 50% 0; animation: sway 4s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- Footer ---------- */
footer { background: var(--cacao); color: #e9d3c9; font-size: .97rem; }
footer .wrap { padding-block: 40px 28px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
footer .brand { color: #fff; font-size: 1.35rem; }
footer .brand svg { width: 38px; height: 32px; }
footer .cloche .steam path, footer .cloche .dome, footer .cloche .shine { stroke: #f08a5a; }
footer .cloche .knob { fill: #f08a5a; }
footer .cloche .tray { fill: #e0703f; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; font-weight: 700; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-top: 20px; font-size: .92rem; color: #c9ada2; }
.credits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.credits a { color: #fff; }
.heart { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-inline: 2px; color: #ff6b81; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 40%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.22); } 20% { transform: scale(.95); } }

/* ---------- Shared responsive ---------- */
@media (max-width: 1020px) {
  .links a.nav { display: none; }
}
@media (max-width: 560px) {
  .brand { font-size: 1.35rem; } .brand svg { width: 38px; height: 34px; }
  .langs { margin-inline: 2px; }
  .top .btn.small { padding: 0 14px; }
  .picado { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
