/* Somar365 · landing. Dirección «Colour chapters»: cada sección es un capítulo con su campo de color plano.
   Tokens de la hoja de dirección, con los colores de la marca (verde azulado del producto) en lugar de los repartidos. */
@font-face { font-family: 'Pilcrow Rounded'; src: url('/_l/fonts/pilcrow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pilcrow Rounded'; src: url('/_l/fonts/pilcrow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Pilcrow Rounded'; src: url('/_l/fonts/pilcrow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --surface: #f2f5f4;
  --ink: #0b1f1d;
  --muted: #4a5b58;
  --accent: #a7ff9c;
  --accent-ink: #000000;
  --field-1: #2f7a74;  --field-1-ink: #ffffff;    /* verde azulado de la marca */
  --field-2: #a7ff9c;  --field-2-ink: #000000;    /* menta */
  --field-3: #ff6831;  --field-3-ink: #000000;    /* naranja */
  --field-4: #0b1f1d;  --field-4-ink: #ffffff;
  --pale: #e8f1ef;
  --grey: #c5c5c5;
  --deep: #031412;          /* tinta «sumergida» del titular bajo la costura */

  --m: clamp(16px, 2.2vw, 32px);
  --gap: 16px;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --hd: var(--ink);          /* tinta de la barra: cambia con el capítulo */
  --hd-bg: #ffffff;
  --h1: clamp(96px, 17vw, 270px);
  --display: clamp(2.5rem, 7vw, 6.5rem);
  --radius: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Pilcrow Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-body); line-height: 1.5; letter-spacing: 0;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -80px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 100; transition: top .2s; }
.skip:focus { top: 12px; }

/* ── Barra: se tiñe con el capítulo que pasa por debajo ─────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 28px;
  padding: 14px var(--m); color: var(--hd); background: var(--hd-bg); transition: color .3s ease, background-color .3s ease;
}
.mark { font-size: 28px; font-weight: 700; letter-spacing: -0.05em; text-decoration: none; margin-right: auto; }
.links { display: flex; gap: 28px; font-weight: 500; font-size: 1.0625rem; }
.links a { text-decoration: none; padding: 6px 0; }
.links a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.btn, .buy, .blank button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 22px; min-height: 46px;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); background: #bdffb4; }
.btn:active { transform: translateY(0); }

/* ── Capítulo 1: dos campos y un titular cortado por la costura ─────────────── */
.hero { position: relative; height: calc(max(50svh, 380px) + var(--h1) * 0.86 + 36px + 11rem); min-height: 640px; }
.hero-top, .hero-bot { position: absolute; left: 0; right: 0; }
.hero-top { top: 0; height: 50svh; min-height: 380px; background: var(--bg); }
.hero-bot { top: max(50svh, 380px); bottom: 0; background: var(--field-1); transform-origin: top; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { transform: scaleY(.7); } to { transform: scaleY(1); } }
.hl {
  position: absolute; left: 0; right: 0; top: max(50svh, 380px); transform: translateY(-50%); margin: 0 auto; width: 90vw;
  font-size: var(--h1); font-weight: 700; line-height: 0.86; letter-spacing: -0.05em; text-transform: lowercase; text-align: center;
}
.cp { display: flex; flex-direction: column; align-items: center; }
.cp span { display: block; white-space: nowrap; }
.cp-top { color: var(--ink); clip-path: inset(0 0 50% 0); }
.cp-bot { position: absolute; inset: 0; pointer-events: none; color: var(--deep); clip-path: inset(50% 0 0 0); }
.hero-lead {
  position: absolute; left: 0; right: 0; margin: 0 auto; width: min(32ch, 86vw); text-align: center;
  top: calc(max(50svh, 380px) + var(--h1) * 0.86 + 36px); font-size: var(--step-lead); line-height: 1.35; color: var(--field-1-ink); font-weight: 500;
}

/* ── Capítulo 2: para quién. Fotos reales, en blanco y negro sobre campo oscuro ── */
.who { background: var(--field-4); color: var(--field-4-ink); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; padding: 120px var(--m); }
.who-text { grid-column: 1 / 5; align-self: start; }
.who-text h2 { font-size: var(--step-head); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; margin-bottom: 20px; }
.who-text p { font-size: var(--step-body); max-width: 36ch; }
.ph { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ph img { display: block; width: 100%; height: 540px; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .3s ease, transform .3s ease; }
.ph:hover img { filter: grayscale(0); transform: translateY(-4px); }
.ph figcaption { font-size: var(--step-small); color: #fff; }
.p1 { grid-column: 5 / 9; } .p2 { grid-column: 9 / 11; } .p3 { grid-column: 11 / 13; }

/* ── Capítulo 2: la caja. Salida fija a la izquierda, controles a la derecha ── */
.features { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); background: var(--bg); }
.out {
  grid-column: 1 / 7; position: sticky; top: 0; align-self: start; height: 100svh; background: var(--field-2); color: var(--field-2-ink);
  display: grid; place-items: center; padding: 24px var(--m);
}
.reading { grid-column: 8 / 13; padding: 96px var(--m) 25svh 0; max-width: 46ch; }
.h-sec { font-size: var(--step-head); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; margin-bottom: 14svh; }
.block { min-height: 50svh; padding-bottom: 10svh; }
.block .lead { font-size: var(--step-lead); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.block p + p, .block .seg, .block .step { margin-top: 16px; }
.block p { max-width: 40ch; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .step button {
  border: 0; border-radius: var(--radius); background: var(--surface); padding: 12px 20px; min-height: 48px; font-weight: 500;
  transition: background-color .15s ease, transform .15s ease;
}
.seg button:hover, .step button:hover { background: var(--pale); }
.seg button:active, .step button:active { transform: scale(.97); }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.step { display: inline-flex; align-items: stretch; gap: 6px; }
.step button { width: 56px; font-size: 1.5rem; font-weight: 700; }
.step output { display: grid; place-items: center; min-width: 64px; font-size: 1.5rem; font-weight: 700; background: var(--surface); }

/* Hojas de ejemplo (fragmentos reales de la interfaz): aquí sí hay bordes y sombras propias del producto */
[data-ui] { font-size: 14px; line-height: 1.4; letter-spacing: 0; color: #111; }
.sheet, .paper { background: #fff; color: #111; padding: 22px 22px 18px; }
.boleta { width: min(400px, 100%); }
.boleta header { display: grid; text-align: center; gap: 2px; margin-bottom: 12px; }
.boleta header strong { font-size: 16px; }
.boleta .doc { display: grid; text-align: center; margin: 10px 0 6px; padding: 8px 0; border-top: 1px dashed #999; border-bottom: 1px dashed #999; } /* taste-skill-ignore: línea de la boleta (fragmento de interfaz) */
.boleta .cli { margin: 0 0 8px; color: #333; }
[data-ui] table { width: 100%; border-collapse: collapse; }
[data-ui] th { text-align: left; font-weight: 700; padding: 6px 4px; border-bottom: 1px solid #bbb; }
[data-ui] td { padding: 6px 4px; vertical-align: top; }
[data-ui] .n { text-align: right; white-space: nowrap; }
.sums { margin: 10px 0 0; display: grid; gap: 4px; }
.sums div { display: flex; justify-content: space-between; }
.sums dt, .sums dd { margin: 0; }
.sums .tot { font-weight: 700; font-size: 16px; padding-top: 6px; border-top: 1px solid #111; } /* taste-skill-ignore: total de la boleta (fragmento de interfaz) */
.pay { margin-top: 12px; color: #333; text-align: center; }

/* ── Capítulo 3: índice de documentos y la hoja sobre el escenario ──────────── */
.showcase { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); background: var(--bg); padding: 0 0 0 var(--m); }
.names { grid-column: 1 / 6; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 8svh 0; }
.names button {
  border: 0; background: none; padding: 0; text-align: left; font-size: var(--step-head); font-weight: 700; line-height: 1.1; letter-spacing: -0.05em;
  color: var(--muted); transition: color .2s ease, transform .2s ease; text-transform: lowercase;
}
.names button:hover { color: var(--ink); transform: translateX(6px); }
.names button[aria-selected="true"] { color: var(--ink); }
.stage { grid-column: 7 / 13; background: var(--pale); height: 88svh; min-height: 560px; overflow: hidden; position: relative; }
.paper { position: absolute; left: 64px; top: 72px; width: 560px; max-width: calc(100% - 64px); min-height: 80%; animation: swap .25s ease both; }
.paper[hidden] { display: none; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.paper .top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.paper .top strong { display: block; font-size: 16px; }
.paper .top span { display: block; color: #444; }
.paper .docbox { text-align: right; padding: 8px 12px; background: #eef3f2; }
.paper .docbox b { display: block; }
.paper .meta { color: #333; margin: 0 0 10px; }
.paper .foot { margin-top: 14px; color: #444; }
.paper .low td { background: #fff1ea; font-weight: 700; }

/* ── Capítulo 4: cuatro campos, la misma ficha cada vez más avanzada ────────── */
.how { display: grid; grid-template-columns: repeat(4, 1fr); }
.field { position: relative; min-height: 84svh; min-height: max(84svh, 560px); padding: 28px var(--m) 28px 28px; display: flex; flex-direction: column; color: #000; }
.f1 { background: var(--field-2); } .f2 { background: var(--field-3); } .f3 { background: var(--pale); } .f4 { background: var(--grey); }
.h-how { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; position: absolute; top: 28px; left: 28px; right: var(--m); }
.mini { margin-top: 38%; width: 260px; max-width: 100%; background: #fff; padding: 18px; display: grid; gap: 4px; transition: transform .15s ease; }
.mini b { font-size: 16px; }
.field:hover .mini { transform: translateY(-6px); }
.clause { margin-top: auto; font-size: var(--step-lead); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; max-width: 14ch; }

/* ── Capítulo 5: planes que suben como barras ───────────────────────────────── */
.plans {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; padding: 120px var(--m);
  background: var(--bg);
}
.h-plans { grid-column: 1 / 3; grid-row: 1; align-self: start; font-size: var(--step-head); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; }
.tile { grid-row: 1; display: flex; flex-direction: column; padding: 28px 28px 0; border-radius: var(--radius); position: relative; transition: transform .2s ease; }
.tile:hover { transform: translateY(-6px); }
.tile h3 { font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.tile .price { font-size: var(--step-head); font-weight: 700; letter-spacing: -0.05em; line-height: 1.05; margin: 6px 0 12px; }
.tile .price small { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; }
.tile p { font-size: var(--step-body); max-width: 34ch; }
.tile p + p { margin-top: 10px; }
.tile .buy { margin: auto -28px 0; min-height: 64px; justify-content: flex-start; padding: 0 28px; border-radius: 0; font-size: var(--step-body); background: transparent; color: inherit; }
.t1 { grid-column: 1; height: 360px; background: var(--field-2); color: var(--field-2-ink); }
.t2 { grid-column: 2; height: 480px; background: var(--field-3); color: var(--field-3-ink); }
.t3 { grid-column: 3; height: 600px; background: var(--field-1); color: var(--field-1-ink); }
.t1 .buy { background: #7fd974; color: #000; } .t2 .buy { background: #e04e18; color: #000; } .t3 .buy { background: #235e59; color: #fff; }
.tile .buy:hover { filter: brightness(1.08); }

/* ── Capítulo 6: una franja por pregunta ───────────────────────────────────── */
.faq { background: var(--bg); }
.band { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding: 56px var(--m); background: var(--bg); }
.band.alt { background: var(--surface); }
.band h3 { grid-column: 1 / 6; font-size: var(--step-lead); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.band p { grid-column: 7 / 13; max-width: 56ch; }
.band.head { background: var(--accent); min-height: 40svh; align-items: end; padding-bottom: 28px; }
.band.head h2 { grid-column: 1 / 13; font-size: var(--display); font-weight: 700; letter-spacing: -0.05em; line-height: 0.9; }

/* ── Capítulo 7: la frase con un hueco ─────────────────────────────────────── */
.cta { background: var(--field-3); color: var(--field-3-ink); min-height: 90svh; display: grid; align-content: center; gap: 28px; padding: 100px var(--m); }
.blank { display: flex; flex-wrap: wrap; align-items: center; gap: 0.18em; font-size: var(--display); font-weight: 700; letter-spacing: -0.04em; line-height: 1.12; }
.blank label { display: block; }
.blank input {
  font: inherit; letter-spacing: -0.02em; color: #000; border: 0; border-radius: var(--radius); background: rgba(255,255,255,.55);
  height: 1.12em; width: 8.5em; max-width: 100%; padding: 0 .3em; min-width: 0;
}
.blank input::placeholder { color: #3d3d3d; opacity: 1; }
.blank input:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.blank button { font: inherit; font-weight: 700; letter-spacing: -0.04em; height: 1.12em; min-height: 0; padding: 0 .4em; background: #000; color: #fff; }
.blank button:hover { background: #222; }
.after { font-size: 1rem; max-width: 56ch; }

/* ── Pie: tableros llenos ──────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; padding: 8px; background: var(--bg); }
.tile-s { background: var(--surface); padding: 20px; min-height: 220px; display: flex; flex-direction: column; text-decoration: none; }
.statement { grid-column: span 4; justify-content: space-between; font-size: var(--step-lead); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; background: var(--pale); }
.statement small { font-size: var(--step-small); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.nav { grid-column: span 3; gap: 8px; font-size: 1rem; }
.nav a { text-decoration: none; font-weight: 500; padding: 4px 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.time { grid-column: span 2; justify-content: space-between; background: var(--grey); }
.time b { font-size: var(--step-head); letter-spacing: -0.04em; }
.mail { grid-column: span 3; justify-content: flex-end; font-size: var(--step-lead); font-weight: 700; background: var(--accent); color: #000; }
.mail:hover { background: #bdffb4; }
.brand { grid-column: span 8; min-height: 320px; background: var(--field-4); color: var(--field-4-ink); align-items: center; justify-content: center; font-size: var(--display); font-weight: 700; letter-spacing: -0.06em; line-height: 1; }
.go { grid-column: span 4; min-height: 320px; background: var(--field-3); color: #000; justify-content: space-between; font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.03em; transition: filter .15s ease; }
.go svg { align-self: flex-end; }
.go:hover { filter: brightness(1.06); }

.credits { margin: 0; padding: 20px var(--m) 28px; font-size: var(--step-small); color: var(--muted); background: var(--bg); }
.credits a { color: inherit; text-underline-offset: 3px; }

/* ── Entradas ──────────────────────────────────────────────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ── Teléfono ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .links a:not(:last-child) { display: none; }
  .links { gap: 0; }
  .bar { gap: 14px; padding: 14px var(--m); }
  .mark { font-size: 24px; }
  .btn { padding: 10px 16px; min-height: 44px; }
  :root { --h1: 21vw; }
  .hero { height: calc(max(46svh, 330px) + var(--h1) * 0.86 + 28px + 10rem); min-height: 560px; }
  .hero-top { height: 46svh; min-height: 330px; } .hero-bot { top: max(46svh, 330px); }
  .hl { top: max(46svh, 330px); width: 96vw; }
  .hero-lead { top: calc(max(46svh, 330px) + var(--h1) * 0.86 + 28px); font-size: 1.0625rem; width: min(30ch, 86vw); }
  .features { display: flex; flex-direction: column; }
  .reading { display: contents; }
  .h-sec { order: -1; padding: 56px var(--m) 24px; margin: 0; }
  .block { order: 1; padding-inline: var(--m); }
  .out { position: sticky; top: 0; z-index: 2; align-self: stretch; height: 42svh; min-height: 330px; padding: 12px var(--m); overflow: hidden; align-items: start; }
  .out .boleta { transform: scale(.78); transform-origin: top center; }
      .block { min-height: 0; padding-bottom: 8svh; }
  .block:last-child { padding-bottom: 14svh; }
  .showcase { display: block; padding: 0; }
  .names { flex-direction: row; flex-wrap: wrap; gap: 6px 22px; padding: 28px var(--m); }
  .names button { font-size: var(--step-lead); }
  .who { display: block; padding: 72px var(--m); }
  .who-text { margin-bottom: 28px; }
  .ph { margin-bottom: 8px; } .ph img { height: 300px; }
  .stage { height: 70svh; min-height: 480px; }
  .paper { left: 16px; top: 16px; width: 520px; max-width: none; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .field { min-height: 64svh; min-height: max(64svh, 460px); padding: 24px var(--m); }
  .clause { max-width: 22ch; margin: 40px 0 0; }
  .h-how { position: static; margin-bottom: 8px; }
  .mini { margin-top: 24px; }
  .block p { max-width: 62ch; }
  .plans .tile p { max-width: 62ch; }
  .plans { grid-template-columns: 1fr; padding: 72px var(--m); gap: 8px; }
  .h-plans { grid-column: 1; grid-row: auto; font-size: 9vw; margin-bottom: 24px; }
  .tile { grid-column: 1 !important; grid-row: auto !important; height: auto !important; min-height: 0; padding-bottom: 28px; }
  .tile .price { font-size: 44px; }
  .tile .buy { margin-top: 24px; }
  .band { display: block; padding: 32px var(--m); }
  .band h3 { font-size: 22px; margin-bottom: 10px; }
  .band p { font-size: 17px; }
  .band.head { min-height: 30svh; }
  .band.head h2 { font-size: 13vw; }
  .cta { padding: 64px var(--m); min-height: 0; }
  .blank { font-size: 10vw; }
  .blank input { width: 100%; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px; }
  .tile-s { grid-column: span 1; min-height: 160px; padding: 20px; }
  .brand { grid-column: 1 / -1; order: -2; min-height: 160px; font-size: 16vw; }
  .go { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .statement { grid-column: 1 / -1; order: 5; }
  .mail { grid-column: span 1; } .nav { grid-column: span 1; } .time { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bot, .paper { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .bar, .btn, .tile, .names button, .mini, .go { transition: none; }
}

@media (max-width: 560px) {
  .how { grid-template-columns: 1fr; }
  .field { min-height: 0; padding: 32px var(--m); }
  .clause { max-width: 26ch; }
}
