:root {
  --sage: #cfe3da;
  --sage-2: #bcd6cb;
  --sand: #f2f4e8;
  --forest: #0f2f2a;
  --ink: #0f2f2a;
  --ink-2: #355248;
  --coral: #e8574f;
  --coral-d: #cf443d;
  --pad: clamp(16px, 4vw, 40px);
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--sage); color: var(--ink); font: 400 16px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
::selection { background: var(--coral); color: #fff; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--pad); background: var(--sage); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand canvas { width: 18px; height: 22px; image-rendering: pixelated; }
.nav nav { display: flex; gap: clamp(16px, 4vw, 40px); font-size: 14px; font-weight: 500; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { color: var(--coral-d); }

/* botones */
.btn { display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px; font: 700 14px/1 var(--mono); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-d); }
.btn-soft { background: var(--sand); color: var(--ink); }

/* hero */
.hero { position: relative; min-height: calc(100svh - 62px); display: flex; flex-direction: column; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; text-align: center; max-width: 980px; margin: 0 auto; padding: clamp(20px, 4vh, 56px) var(--pad) 0; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); text-wrap: balance; }
.lead { margin: 22px auto 0; max-width: 62ch; color: var(--ink-2); }
.actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.scene { position: relative; margin-top: auto; height: clamp(260px, 42svh, 480px); overflow: hidden; z-index: 1; }
.scene canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
#clouds { position: absolute; bottom: 35%; left: -3%; width: 106%; animation: drift 70s ease-in-out infinite alternate; }
#land { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
@keyframes drift { to { transform: translateX(4%); } }
@media (max-width: 700px) {
  .scene { height: 300px; }
  #land { inset: auto auto 0 -60%; width: 220%; max-width: none; height: auto; }
  #clouds { left: 0; }
  .nav nav { display: none; }
}

/* secciones */
.block { padding: clamp(80px, 14vw, 180px) var(--pad); }
.block h2 { font-size: clamp(2rem, 4.8vw, 3.8rem); max-width: 20ch; }
.block-sand { background: var(--sand); }
.block-forest { background: var(--forest); color: var(--sand); }
.grid4 { margin-top: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(24px, 4vw, 56px); }
.grid4 h3 { font-size: 1.3rem; margin-bottom: 10px; }
.grid4 p { color: var(--ink-2); }
.steps { margin: clamp(32px, 5vw, 64px) 0 0; padding: 0; list-style: none; display: grid; gap: 28px; max-width: 70ch; }
.steps li { font-size: 1.05rem; }
.steps strong { display: block; font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.note { margin-top: 40px; font-weight: 700; color: var(--coral-d); }

/* formulario */
.form-wrap { max-width: 720px; margin: 0 auto; }
.block-forest .lead { color: #bcd6cb; margin-left: 0; }
.track { position: relative; height: 44px; margin: 36px 0 8px; }
.trail { position: absolute; left: 0; right: 24px; bottom: 6px; border-bottom: 3px dotted var(--sage-2); }
#walker { position: absolute; left: 0; bottom: 6px; width: 30px; height: 36px; image-rendering: pixelated; transition: left .5s cubic-bezier(.3, .7, .2, 1); }
.flag { position: absolute; right: 0; bottom: 4px; color: var(--coral); font-size: 22px; line-height: 1; }
.stepcount { margin: 20px 0 8px; color: var(--sage-2); font-size: 14px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; }
fieldset[hidden] { display: none; }
legend { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 18px; padding: 0; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--sage-2); }
input:not([type=checkbox]):not([type=radio]), select, textarea { font: 400 16px/1.4 var(--mono); color: var(--ink); background: var(--sand); border: 0; border-radius: 10px; padding: 13px 14px; width: 100%; }
textarea { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.gl { font-size: 14px; color: var(--sage-2); margin-bottom: 10px; }
.group { display: flex; flex-wrap: wrap; gap: 8px; }
.group .gl { flex-basis: 100%; }
.chip { display: block; position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: block; padding: 9px 14px; border-radius: 999px; background: #1d4a41; color: var(--sand); font-size: 14px; transition: background .15s, transform .15s; }
.chip:hover span { background: #26584d; }
.chip input:checked + span { background: var(--coral); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--sand); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--sand); font-size: 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--coral); flex: none; }
.hp { position: absolute; left: -9999px; }
.msg { min-height: 24px; margin-top: 12px; color: #ffb3ae; font-size: 14px; }
.nav-btns { display: flex; gap: 12px; margin-top: 12px; }
.done h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }

/* pie */
.foot { background: var(--forest); color: var(--sage-2); padding: 0 var(--pad) 24px; overflow: hidden; }
.foot .big { font-size: clamp(5rem, 28vw, 24rem); font-weight: 700; letter-spacing: -0.06em; line-height: .85; color: var(--sand); margin-bottom: 20px; }
.foot p:not(.big) { font-size: 14px; }

/* entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #clouds { animation: none; }
  .btn, #walker { transition: none; }
}
