/* Mentemapa: la web toma el lenguaje visual de los propios mapas (tinta azul marino, rotulador amarillo, ramas de colores). */
:root {
  --ink: #1f2a44;
  --ink-soft: #4a5672;
  --paper: #f6f7fb;
  --sheet: #ffffff;
  --marker: #ffe45c;
  --blue: #4f7fe0;
  --pink: #d9547f;
  --green: #3fa45f;
  --orange: #e57f36;
  --line: #d7dbe7;
  --display: "Shantell Sans", "Comic Sans MS", cursive;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper) radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 22px 22px;
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* Cabecera */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font: 700 1.5rem/1 var(--display); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand svg { width: 30px; height: 30px; }
.top nav a { font-weight: 700; text-decoration: none; margin-left: 20px; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Tipografía */
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 62ch; }
.mark { background: linear-gradient(transparent 55%, var(--marker) 55%); padding: 0 .1em; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* Botones */
.btn {
  display: inline-block; font: 700 1.15rem/1 var(--display);
  background: var(--marker); color: var(--ink); text-decoration: none;
  padding: 16px 26px; border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.small { font-size: .95rem; color: var(--ink-soft); }

/* Hero: el mapa es la portada */
.hero { padding: 24px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.hero .buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 8px; }
.price { font: 800 2.2rem/1 var(--display); }
.map-svg { width: 100%; height: auto; overflow: visible; }
.map-svg text { font-family: var(--display); fill: var(--ink); }
.map-svg .branch { fill: none; stroke-width: 5; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .map-svg .branch { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1s ease-out .2s forwards; }
  .map-svg .node { opacity: 0; animation: pop .4s ease-out forwards; }
  .map-svg .n1 { animation-delay: .7s; } .map-svg .n2 { animation-delay: .85s; }
  .map-svg .n3 { animation-delay: 1s; } .map-svg .n4 { animation-delay: 1.15s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* Secciones */
section { padding: 64px 0; }
.sheet { background: var(--sheet); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }

/* Muestras */
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.samples figure { margin: 0; }
.samples a { display: block; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--sheet); }
.samples figcaption { font-weight: 700; margin-top: 10px; }

/* Temario: cada grupo lleva el color de su rama */
.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.group { border: 3px solid var(--c); border-radius: 18px; padding: 18px 20px; background: var(--sheet); }
.group h3 { color: var(--c); }
.group ol { margin: 0; padding-left: 1.6em; }
.group li { margin: 2px 0; }
.g1 { --c: var(--blue); } .g2 { --c: var(--pink); } .g3 { --c: var(--green); } .g4 { --c: var(--orange); }

/* Pasos (es una secuencia real) */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px;
  font: 800 1.3rem/1 var(--display); border: 3px solid var(--ink); border-radius: 50%; background: var(--marker);
}

/* Compra */
.offer { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.card { background: var(--sheet); border: 3px solid var(--ink); border-radius: 22px; padding: 28px; box-shadow: 8px 8px 0 var(--ink); }
.card ul { padding-left: 1.2em; margin: 0 0 22px; }
.card li { margin: 6px 0; }
.card .price { font-size: 3rem; margin-bottom: 4px; }

/* Preguntas */
details { border-bottom: 2px solid var(--line); padding: 14px 0; max-width: 760px; }
summary { font: 700 1.15rem/1.3 var(--display); cursor: pointer; }
details p { margin: 10px 0 0; }

/* Pie */
footer { padding: 36px 0 48px; font-size: .95rem; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer nav a { margin-right: 18px; }

/* Páginas de texto (legales) */
.doc { padding: 24px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }

@media (max-width: 900px) {
  .hero .wrap, .offer { grid-template-columns: minmax(0, 1fr); }
  .units { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .samples, .units, .steps { grid-template-columns: minmax(0, 1fr); }
  .top nav a:first-child { display: none; }
  section { padding: 48px 0; }
}
