:root {
  --paper: #f3ece0;
  --paper-2: #e9dfcf;
  --ink: #17130f;
  --ink-soft: #5a5148;
  --rojo: #e63b2e;
  --sol: #f2b33d;
  --azul: #2f5da8;
  --verde: #2e7d4f;
  --rosa: #d9487a;
  --line: 3px;
  --shadow: 8px 8px 0 var(--ink);
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --text: 'Archivo', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120f;
    --paper-2: #211c17;
    --ink: #f3ece0;
    --ink-soft: #b3a899;
    --shadow: 8px 8px 0 var(--rojo);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
}
main { overflow-x: clip; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }

/* ---------- top bar ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--line) solid var(--ink);
}
.logo {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: .02em;
  text-decoration: none;
  line-height: 1;
}
.logo span { color: var(--rojo); }
.top nav { display: flex; gap: clamp(12px, 3vw, 28px); font-weight: 700; font-size: 15px; }
.top nav a { text-decoration: none; position: relative; }
.top nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 3px;
  background: var(--rojo); transition: right .25s ease;
}
.top nav a:hover::after { right: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(48px, 8vw, 96px);
  max-width: 1400px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  font-weight: 800; letter-spacing: .12em; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.eyebrow .dot { color: var(--rojo); font-size: 9px; }
.mega {
  font-family: var(--display);
  font-size: clamp(88px, 21vw, 300px);
  line-height: .86;
  letter-spacing: -.01em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}
.mega span { display: block; }
.mega .l1 { color: var(--rojo); animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.mega .l2 {
  color: transparent;
  -webkit-text-stroke: clamp(2px, .5vw, 5px) var(--ink);
  padding-left: .55em;
  animation: rise .8s .12s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.lede {
  max-width: 30em;
  margin: 28px 0 28px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
}
.lede em { font-style: normal; background: var(--sol); color: #17130f; padding: 0 .2em; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 800;
  border: var(--line) solid var(--ink);
  box-shadow: 5px 5px 0 var(--rojo);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--rojo); }

.badge {
  position: absolute;
  right: clamp(12px, 5vw, 80px);
  top: clamp(24px, 6vw, 80px);
  width: clamp(120px, 18vw, 220px);
  transform: rotate(-8deg);
}
.badge-bg { fill: var(--sol); stroke: var(--ink); stroke-width: 3; }
.badge text { fill: #17130f; }
.badge textPath { font: 700 14px var(--text); }
.badge-spin { transform-origin: 100px 100px; animation: spin 22s linear infinite; }
.badge-k { font: 22px var(--display); text-anchor: middle; letter-spacing: .1em; }
.badge-n { font: 50px var(--display); text-anchor: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  background: var(--rojo);
  color: #fff;
  border-block: var(--line) solid var(--ink);
  transform: rotate(-1.2deg);
  margin: 0 -20px;
}
.track {
  display: flex; width: max-content;
  animation: marquee 30s linear infinite;
}
.track span {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(22px, 3vw, 34px);
  padding: 10px 0;
  white-space: nowrap;
}
.track span::after { content: '✦'; margin: 0 .8em; color: var(--sol); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.reto, .racha, .manifesto {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 48px) 0;
}
.sec-head { margin-bottom: 28px; }
.sec-head h2 {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 84px);
  line-height: .95;
}
.sec-head p { margin: 6px 0 0; color: var(--ink-soft); font-weight: 600; }

/* ---------- card ---------- */
.card {
  --accent: var(--rojo);
  position: relative;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card[data-cat='cuerpo'] { --accent: var(--rojo); }
.card[data-cat='mente'] { --accent: var(--azul); }
.card[data-cat='manos'] { --accent: var(--sol); }
.card[data-cat='gente'] { --accent: var(--rosa); }
.card[data-cat='mundo'] { --accent: var(--verde); }

.card-band {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border-bottom: var(--line) solid var(--ink);
  font-weight: 800; letter-spacing: .1em; font-size: 14px;
}
.card[data-cat='manos'] .card-band { color: #17130f; }
.lvl { display: inline-flex; align-items: center; gap: 5px; }
.lvl i { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.lvl i.on { background: currentColor; }
.lvl b { margin-left: 6px; font-weight: 800; }

.card-main {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: clamp(16px, 4vw, 40px);
  padding: clamp(24px, 5vw, 48px) clamp(20px, 5vw, 48px) 8px;
}
.card-num {
  grid-row: span 2;
  font-family: var(--display);
  font-size: clamp(72px, 14vw, 160px);
  line-height: .85;
  color: var(--accent);
  -webkit-text-stroke: 2px var(--ink);
}
.title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
  align-self: end;
}
.body { margin: 12px 0 0; font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); text-wrap: pretty; }

.card-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px clamp(20px, 5vw, 48px) clamp(24px, 5vw, 40px);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  cursor: pointer;
  padding: 14px 26px;
  border: var(--line) solid var(--ink);
  font-weight: 800; font-size: 17px;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn.primary {
  font-family: var(--display);
  font-size: 24px; letter-spacing: .04em; font-weight: 400;
  padding: 10px 30px;
  background: var(--ink); color: var(--paper);
  box-shadow: 5px 5px 0 var(--accent);
}
.btn.ghost { background: transparent; }
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); }
.btn.primary:hover:not(:disabled) { box-shadow: 7px 7px 0 var(--accent); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
.btn:disabled { cursor: default; opacity: .55; }
.card[data-state='accepted'] .btn.primary { background: var(--accent); color: #fff; }
.card[data-cat='manos'][data-state='accepted'] .btn.primary { color: #17130f; }
.card[data-state='done'] .btn.primary { opacity: 1; background: transparent; color: var(--ink); box-shadow: none; }

.count { margin: 0; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.count strong { color: var(--ink); font-size: 1.25em; }

.stamp {
  position: absolute;
  right: clamp(12px, 5vw, 56px);
  top: 50%;
  padding: 6px 18px;
  font-family: var(--display);
  font-size: clamp(36px, 7vw, 72px);
  color: var(--rojo);
  border: 6px double var(--rojo);
  border-radius: 10px;
  transform: translateY(-50%) rotate(-14deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) { .stamp { mix-blend-mode: normal; } }
.card[data-state='done'] .stamp { opacity: .9; transform: translateY(-50%) rotate(-14deg) scale(1); }
.card.just-done .stamp { animation: stamp .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes stamp {
  from { opacity: 0; transform: translateY(-50%) rotate(-14deg) scale(2.4); }
  to { opacity: .9; transform: translateY(-50%) rotate(-14deg) scale(1); }
}
.card.just-done { animation: shake .35s .3s; }
@keyframes shake { 30% { transform: translate(3px, 2px); } 60% { transform: translate(-2px, -1px); } }

.card[data-state='loading'] .title { opacity: .4; }
.card[data-state='error'] .title { font-size: clamp(24px, 4vw, 36px); }

.next {
  margin: 28px 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
}
.next span {
  font-family: var(--display);
  font-size: 1.6em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  margin-left: 6px;
}

/* ---------- racha ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: var(--line) solid var(--ink);
  margin-bottom: 28px;
}
.stats div { padding: 18px 20px; display: flex; flex-direction: column; }
.stats div + div { border-left: var(--line) solid var(--ink); }
.stats strong { font-family: var(--display); font-size: clamp(44px, 8vw, 80px); line-height: 1; font-weight: 400; }
.stats div:first-child strong { color: var(--rojo); }
.stats span { font-weight: 700; color: var(--ink-soft); font-size: 14px; }

.cal { max-width: 520px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.cal-grid i {
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.cal-grid i.done { background: var(--rojo); color: #fff; border-color: var(--ink); }
.cal-grid i.today { outline: 3px solid var(--sol); outline-offset: 2px; }
.cal-grid i.future { border-style: dashed; opacity: .3; }

/* ---------- manifesto ---------- */
.manifesto ol { list-style: none; margin: 0; padding: 0; border-top: var(--line) solid var(--ink); }
.manifesto li {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 48px);
  align-items: baseline;
  padding: 28px 0;
  border-bottom: var(--line) solid var(--ink);
}
.manifesto .n { font-family: var(--display); font-size: clamp(48px, 8vw, 96px); line-height: 1; color: var(--rojo); }
.manifesto h3 { font-family: var(--display); font-size: clamp(32px, 5vw, 56px); line-height: 1.05; text-transform: uppercase; }
.manifesto p { margin: 6px 0 0; color: var(--ink-soft); max-width: 34em; }

/* ---------- footer ---------- */
.foot {
  margin-top: clamp(80px, 12vw, 140px);
  padding: 40px clamp(16px, 4vw, 48px) 48px;
  background: var(--ink); color: var(--paper);
  text-align: center;
  font-weight: 600;
}
.foot .big {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(80px, 22vw, 280px);
  line-height: .9;
  color: var(--rojo);
}
.foot p:last-child { margin: 12px 0 0; opacity: .8; }

/* ---------- toast / confetti ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  padding: 12px 20px;
  background: var(--ink); color: var(--paper);
  font-weight: 700;
  border: var(--line) solid var(--ink);
  box-shadow: 5px 5px 0 var(--rojo);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s;
  max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .top nav a:nth-child(3) { display: none; }
  .badge { top: auto; bottom: 20px; right: 16px; width: 110px; }
  .mega .l2 { padding-left: .3em; }
  .card-main { grid-template-columns: 1fr; }
  .card-num { grid-row: auto; margin-bottom: 8px; }
  .stats div { padding: 14px 12px; }
  .btn.primary { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
