/* La Plantillera: base Wise (bloques de color, titulares en bloque, cifras grandes) + actitud Gumroad (planos, borde negro, sombra dura). */
@font-face { font-family: 'Archivo'; src: url('fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --cream: #fbfaf3;
  --ink: #121410;
  --forest: #27371e;
  --lime: #c7ed70;
  --pink: #ffb4e3;
  --white: #ffffff;
  --muted: #4a5145;          /* 8:1 sobre crema */
  --b: 2px solid var(--ink);
  --sh: 5px 5px 0 var(--ink);
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --sans: 'Inter', system-ui, sans-serif;
  --gutter: clamp(18px, 3.5vw, 56px);
  --section: clamp(80px, 11vw, 160px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -80px; padding: 0.7rem 1.2rem; background: var(--ink); color: var(--white); }
.skip:focus { top: 12px; }

/* Titulares en bloque */
.big { font-family: var(--display); font-weight: 900; font-stretch: 72%; text-transform: uppercase; letter-spacing: -0.005em; line-height: 0.86; text-wrap: balance; }
.big--xl { font-size: clamp(3.6rem, 11vw, 10.5rem); }
.big--l { font-size: clamp(2.8rem, 7vw, 6.5rem); }
.big--xxl { font-size: clamp(4.5rem, 17vw, 16rem); line-height: 0.8; }
.lead { margin-top: 1.5rem; max-width: 36ch; color: var(--muted); font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.45; }

/* Botones planos con sombra dura */
.btn { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 52px; padding: 0 1.4rem; border: var(--b); border-radius: 999px; background: var(--lime); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); font-weight: 750; font-size: 1.02rem; text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn--white { background: var(--white); }
.btn--sm { min-height: 42px; padding: 0 1.1rem; font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px var(--gutter); background: var(--cream); border-bottom: var(--b); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-stretch: 80%; text-transform: uppercase; font-size: 1.3rem; letter-spacing: 0.01em; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border: var(--b); border-radius: 10px 10px 10px 3px; background: var(--lime); font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); font-weight: 600; font-size: 0.98rem; }
.nav a:not(.btn) { text-decoration: none; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { text-align: center; padding-block: clamp(56px, 8vw, 110px) 0; }
.hero .big { color: var(--forest); }
.hero .lead { margin-inline: auto; }
.hero .actions { justify-content: center; }
.stage { position: relative; max-width: 640px; margin: clamp(56px, 7vw, 96px) auto 0; padding-bottom: clamp(56px, 8vw, 110px); }

/* Hoja de ejemplo, plana */
.sheet { position: relative; text-align: left; background: var(--white); border: var(--b); border-radius: 18px; padding: clamp(18px, 2.5vw, 30px); box-shadow: 8px 8px 0 var(--ink); }
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 12px; border-bottom: var(--b); }
.sheet__title { font-family: var(--display); font-weight: 900; font-stretch: 80%; text-transform: uppercase; font-size: 1.4rem; }
.sheet__hint { color: var(--muted); font-size: 0.85rem; }
.sheet table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.sheet th { text-align: left; font-weight: 700; font-size: 0.8rem; padding: 10px 6px; color: var(--muted); }
.sheet td { padding: 11px 6px; border-top: 1px solid #e6e6dd; }
.sheet td:nth-child(2), .sheet th:nth-child(2) { text-align: right; }
.sheet tr.row-in { animation: row-in 0.45s var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); background: var(--lime); } }
.chip { display: inline-block; padding: 2px 9px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--white); }
.chip--ok { background: var(--lime); }
.sheet__foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: var(--b); font-weight: 600; }
.sheet__total { font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: clamp(2rem, 3.4vw, 2.75rem); font-variant-numeric: tabular-nums; }

/* Pegatinas */
.sticker { position: absolute; z-index: 2; display: grid; place-items: center; text-align: center; border: var(--b); box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); font-weight: 900; font-stretch: 80%; text-transform: uppercase; line-height: 0.95; }
.sticker--round { width: clamp(92px, 11vw, 124px); aspect-ratio: 1; border-radius: 50%; background: var(--pink); font-size: clamp(0.95rem, 1.3vw, 1.15rem); top: -38px; right: -34px; transform: rotate(12deg); }
.sticker--tag { padding: 0.55rem 1rem; border-radius: 999px; background: var(--lime); font-size: clamp(0.95rem, 1.3vw, 1.15rem); left: -30px; bottom: clamp(30px, 6vw, 70px); transform: rotate(-8deg); }
@media (max-width: 700px) { .sticker--round { right: -8px; top: -46px; } .sticker--tag { left: -6px; } }

/* Bandas */
.band { padding-block: var(--section); border-block: var(--b); }
.band--lime { background: var(--lime); }
.band--pink { background: var(--pink); }
.band--forest { background: var(--forest); color: var(--cream); }
.figure { display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 900px) { .figure { grid-template-columns: auto 1fr; gap: 3rem; } }
.figure__num { color: var(--forest); font-variant-numeric: tabular-nums; white-space: nowrap; }
.figure p:not(.big) { max-width: 26ch; font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 650; line-height: 1.25; }

/* Pilares en bandas */
.intro { padding-block: var(--section) clamp(48px, 6vw, 80px); text-align: center; }
.intro .big { color: var(--forest); max-width: 18ch; margin-inline: auto; }
.pillar { display: grid; gap: 1rem 3rem; align-items: center; padding-block: clamp(48px, 7vw, 96px); border-top: var(--b); }
@media (min-width: 900px) { .pillar { grid-template-columns: 1.2fr 0.8fr; } }
.pillar .big { color: var(--forest); }
.pillar.band--forest .big { color: var(--lime); }
.pillar p:not(.big) { max-width: 32ch; font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 550; line-height: 1.4; }
.pillar.band--forest p:not(.big) { color: #e9eedf; }

/* Cómo funciona */
.how { padding-block: var(--section); border-top: var(--b); }
.how .big { color: var(--forest); margin-bottom: clamp(36px, 5vw, 64px); }
.flow { display: grid; gap: 1.25rem; align-items: stretch; }
@media (min-width: 900px) { .flow { grid-template-columns: 1fr auto 1fr auto 1fr; } }
.card { padding: clamp(22px, 2.6vw, 32px); background: var(--white); border: var(--b); border-radius: 18px; box-shadow: var(--sh); }
.card:nth-of-type(2) { background: var(--pink); }
.card:nth-of-type(3) { background: var(--lime); }
.card h3 { font-family: var(--display); font-weight: 900; font-stretch: 78%; text-transform: uppercase; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 0.95; }
.card p { margin-top: 0.75rem; }
.flow__arrow { display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 2.4rem; }
@media (max-width: 899px) { .flow__arrow { transform: rotate(90deg); height: 2rem; } }

/* Lista de espera */
.join { display: grid; gap: clamp(36px, 5vw, 72px); }
@media (min-width: 980px) { .join { grid-template-columns: 1.1fr 0.9fr; align-items: end; } }
.join .big { color: var(--lime); }
.join .lead { color: #dfe7d5; }
.form { display: grid; gap: 1rem; padding: clamp(22px, 3vw, 34px); background: var(--cream); color: var(--ink); border: var(--b); border-radius: 18px; box-shadow: 8px 8px 0 var(--lime); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field input { width: 100%; min-height: 54px; padding: 0 1rem; border: var(--b); border-radius: 12px; background: var(--white); font: inherit; color: var(--ink); }
.field input:focus { outline: 3px solid var(--lime); outline-offset: 0; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--forest); flex: none; }
.hp { position: absolute; left: -9999px; }
.pending { background: #fff3c4; color: #5a4300; padding: 0 0.3em; border-radius: 4px; }

/* Pie */
.foot { background: var(--lime); border-top: var(--b); padding: 40px var(--gutter) 24px; overflow: hidden; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; font-weight: 600; }
.foot__mark { margin-top: 2.5rem; color: var(--forest); white-space: nowrap; font-size: clamp(3rem, 12.4vw, 13rem); }
.foot__copy { margin-top: 1.25rem; font-size: 0.9rem; }

/* Revelado */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .sheet tr.row-in { animation: none; }
  .btn { transition: none; }
}
.sheet td:nth-child(2), .sheet td:nth-child(3) { white-space: nowrap; }
@media (max-width: 700px) { .sheet__hint { display: none; } .sheet table { font-size: 0.9rem; } .sheet td, .sheet th { padding-inline: 4px; } }

/* ---------- Del caos al orden (ligado al scroll) ---------- */
.chaos { position: relative; height: 230vh; background: var(--cream); border-top: var(--b); }
.chaos__sticky { position: sticky; top: 64px; height: calc(100svh - 64px); display: grid; grid-template-rows: auto 1fr; padding-block: clamp(28px, 5vw, 56px); overflow: hidden; }
.chaos__title { position: relative; color: var(--forest); text-align: center; height: 1.8em; }
.chaos__title span { position: absolute; inset: 0; transition: opacity 0.35s, transform 0.35s var(--ease); }
.chaos__b { opacity: 0; transform: translateY(20px); }
.chaos.is-done .chaos__a { opacity: 0; transform: translateY(-20px); }
.chaos.is-done .chaos__b { opacity: 1; transform: none; }
.chaos__board { position: relative; }
.chaos__notes { list-style: none; padding: 0; position: absolute; inset: 0; }
.note {
  --p: 0;
  position: absolute; left: 50%; top: 50%; width: var(--w, 220px); padding: 0.85rem 1rem;
  border: var(--b); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); font-weight: 700; font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  transform: translate(calc(-50% + (var(--fx) * (1 - var(--p)) + var(--tx) * var(--p)) * 1px), calc(-50% + (var(--fy) * (1 - var(--p)) + var(--ty) * var(--p)) * 1px)) rotate(calc(var(--fr) * (1 - var(--p)) * 1deg));
  will-change: transform;
}
.note--pink { background: var(--pink); }
.note--lime { background: var(--lime); }
.note--white { background: var(--white); }

/* ---------- Mosaico ---------- */
.bento { padding-block: var(--section); border-top: var(--b); }
.bento__title { color: var(--forest); max-width: 16ch; margin-bottom: clamp(36px, 5vw, 64px); }
.bento__grid { display: grid; gap: clamp(14px, 1.6vw, 22px); }
@media (min-width: 900px) {
  .bento__grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(250px, auto); }
  .tile--tall { grid-row: span 2; }
  .tile--wide { grid-column: span 2; }
}
.tile { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: clamp(22px, 2.6vw, 34px); border: var(--b); border-radius: 22px; box-shadow: var(--sh); overflow: hidden; }
.tile--lime { background: var(--lime); }
.tile--pink { background: var(--pink); }
.tile--forest { background: var(--forest); color: var(--cream); }
.tile--img { margin: 0; padding: 0; background: var(--white); min-height: 260px; }
.tile__ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; }
.tile__k { font-size: clamp(2.6rem, 5vw, 4.5rem); color: var(--forest); }
.tile--forest .tile__k { color: var(--lime); }
.tile__num { font-size: clamp(3rem, 6vw, 5.5rem); color: var(--ink); font-variant-numeric: tabular-nums; }
.tile__d { margin-top: auto; font-weight: 600; max-width: 30ch; }

.checks { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.checks li { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; background: var(--white); border: var(--b); border-radius: 12px; font-weight: 650; }
.checks li::before { content: ''; flex: none; width: 22px; height: 22px; border: var(--b); border-radius: 6px; background: var(--white) center / 14px no-repeat; transition: background-color 0.25s; }
.checks li.is-done::before { background-color: var(--forest); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7ed70' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.checks li.is-done { text-decoration: line-through; text-decoration-thickness: 2px; }

.typer { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.15; min-height: 2.4em; }
.typer__caret { display: inline-block; width: 0.5em; height: 0.9em; margin-left: 2px; background: var(--lime); vertical-align: -0.1em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .chaos { height: auto; }
  .chaos__sticky { position: static; height: auto; min-height: 640px; }
  .typer__caret { animation: none; }
}
