/* Arrimo · sitio público. Capítulos de color plano (los colores de la app), uno por sección,
   unidos sin línea ni espacio. Tipos de la marca: Bricolage Grotesque (títulos) y DM Sans (texto). */
:root {
  --paper: #FFFFFF;
  --blue: #2D3BFF;
  --blue-2: #3D4AFF;
  --ink: #141B8C;
  --deep: #0E1240;
  --soft: #4B5199;
  --yellow: #FFE14D;
  --green: #1FB574;
  --pink: #FF5FA2;
  --red: #E0241A;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --text: 'DM Sans', system-ui, sans-serif;
  /* Cinco tamaños en toda la página. */
  --s1: clamp(56px, 9.4vw, 148px);
  --s2: clamp(30px, 4.6vw, 72px);
  --s3: clamp(22px, 2.4vw, 34px);
  --s4: 18px;
  --s5: 15px;
  --m: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--s4)/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: .95; }
p, ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--deep); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Botones: una forma (píldora), un color de relleno ── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; font: 700 var(--s5)/1 var(--text); text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--yellow); color: var(--deep); }
.btn-ink { background: var(--deep); color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--deep); }
.btn-danger { background: var(--red); color: var(--paper); }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ── Barra: toma el color del capítulo que tiene debajo ── */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 var(--m); background: var(--hb, var(--paper)); color: var(--hi, var(--ink)); transition: background-color .3s, color .3s; }
.bar[data-on="paper"] { --hb: var(--paper); --hi: var(--ink); }
.bar[data-on="yellow"] { --hb: var(--yellow); --hi: var(--deep); }
.bar[data-on="green"] { --hb: var(--green); --hi: var(--deep); }
.bar[data-on="pink"] { --hb: var(--pink); --hi: var(--deep); }
.bar[data-on="blue"] { --hb: var(--blue); --hi: var(--paper); }
.bar[data-on="ink"] { --hb: var(--ink); --hi: var(--paper); }
.wordmark { font: 800 var(--s3)/1 var(--display); letter-spacing: -0.04em; text-decoration: none; }
.links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.links a, .foot a, .toc a { text-decoration: underline 2px transparent; text-underline-offset: 5px; transition: text-decoration-color .2s; }
.links a:hover, .foot a:hover, .toc a:hover, .toc a.active { text-decoration-color: currentColor; }
.links a { font: 500 var(--s5)/1 var(--text); padding: 6px 0; }
.langs { display: flex; gap: 2px; }
.langs button { min-width: 40px; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: 700 var(--s5)/1 var(--text); cursor: pointer; opacity: .7; transition: opacity .2s, background-color .2s; }
.langs button:hover { opacity: 1; }
.langs button[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.menu { display: none; border: 0; background: transparent; color: inherit; font: 700 var(--s5)/1 var(--text); min-height: 44px; cursor: pointer; }

/* ── Capítulos ── */
.chapter { position: relative; padding: 0 var(--m); }

/* Portada: papel arriba, azul abajo; el titular cruza la costura y cambia de tinta. */
.hero { --seam: 50svh; --hs: var(--s1); background: var(--blue); min-height: calc(100svh + 30svh); padding-bottom: 96px; overflow: hidden; }
.hero-fields { position: absolute; inset: 0; }
.field-top { position: absolute; inset: 0 0 auto; height: var(--seam); background: var(--paper); }
.field-bottom { position: absolute; inset: var(--seam) 0 0; background: var(--blue); }
.hero-title { position: absolute; left: 0; right: 0; top: var(--seam); transform: translateY(-50%); font-size: var(--hs); line-height: .86; letter-spacing: -0.05em; text-transform: uppercase; text-align: center; }
.hero-title .ink-top, .hero-title .ink-bottom { display: block; }
.hero-title .ink-top span, .hero-title .ink-bottom span { display: block; }
.ink-top { color: var(--blue); clip-path: inset(0 0 50% 0); }
.ink-bottom { position: absolute; inset: 0; color: var(--paper); clip-path: inset(50% 0 0 0); }
.hero-lead { position: relative; max-width: 34ch; margin: calc(var(--seam) + var(--hs) * .86 + 40px) auto 0; text-align: center; color: var(--paper); font-size: var(--s4); }
.hero-film { position: relative; width: min(1100px, 100%); margin: 48px auto 0; aspect-ratio: 16 / 9; background: var(--blue-2); overflow: hidden; }
.hero-film video { width: 100%; height: 100%; object-fit: cover; }
.contact-photo { height: 56svh; }

/* Cómo funciona: cuatro campos, la misma tarjeta cada vez más cerca de arrancar. */
.steps { padding: 0; background: var(--yellow); color: var(--deep); }
.steps-title { position: absolute; z-index: 2; top: 104px; left: var(--m); width: calc(25vw - var(--m) * 2); font-size: var(--s3); line-height: 1.05; }
.step-row { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; }
.step { position: relative; min-height: 84svh; padding: 0 var(--m) 28px; display: flex; flex-direction: column; justify-content: flex-end; }
.step:nth-child(1) { background: var(--yellow); }
.step:nth-child(2) { background: var(--green); }
.step:nth-child(3) { background: var(--pink); }
.step:nth-child(4) { background: var(--blue); color: var(--paper); }
.step .card { position: absolute; top: 56%; left: 50%; width: min(260px, 80%); transform: translate(-50%, -50%); transition: transform .15s var(--ease); }
.step:hover .card { transform: translate(-50%, calc(-50% - 6px)); }
.step p { font: 700 var(--s3)/1.15 var(--display); letter-spacing: -0.02em; max-width: 14ch; }

/* La tarjeta de un parche, como en la app (fragmento de interfaz). */
.card { background: var(--paper); color: var(--deep); border-radius: 22px; padding: 10px 10px 14px; font-family: var(--text); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.card b { display: block; margin: 10px 4px 0; font: 800 18px/1.1 var(--display); letter-spacing: -0.02em; }
.card small { display: block; margin: 4px 4px 0; font-size: 13px; color: var(--soft); }
.card .tag { position: absolute; right: -10px; top: 46%; padding: 4px 12px; border-radius: 10px; border: 3px solid var(--deep); background: var(--yellow); color: var(--deep); font: 800 18px/1.1 var(--display); transform: rotate(-5deg); }
.card .tag.go { background: var(--green); }
.card .faces { display: flex; margin: 8px 4px 0; }
.card .faces i { width: 26px; height: 26px; margin-right: -8px; border: 3px solid var(--paper); border-radius: 50%; background: center / cover; }
.card .place { display: block; margin: 8px 4px 0; padding: 8px 10px; border-radius: 12px; background: var(--yellow); font: 700 13px/1.2 var(--text); }

/* Confianza: frases con interruptor; encendida, la franja se llena de color. */
.trust { padding: 0; background: var(--paper); }
.trust-head { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: end; padding: 120px var(--m) 64px; }
.trust-title { font-size: var(--s1); max-width: 11ch; }
.trust-head img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.band { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; min-height: max(20vh, 132px); padding: 24px var(--m); background: var(--paper); color: var(--ink); transition: background-color .35s var(--ease), color .35s; cursor: pointer; }
.band h3 { font: 700 var(--s3)/1.15 var(--display); letter-spacing: -0.02em; }
.band .why { max-height: 0; overflow: hidden; margin-top: 0; font-size: var(--s4); transition: max-height .35s var(--ease), margin-top .35s; }
.band.on { color: var(--deep); }
.band.on .why { max-height: 4em; margin-top: 10px; }
.band.on:nth-child(5n+1) { background: var(--yellow); }
.band.on:nth-child(5n+2) { background: var(--green); }
.band.on:nth-child(5n+3) { background: var(--pink); }
.band.on:nth-child(5n+4) { background: var(--blue); color: var(--paper); }
.band.on:nth-child(5n+5) { background: var(--ink); color: var(--paper); }
.band:not(.on):nth-child(even) { background: #F2F3FA; }
.switch { position: relative; width: 2.2em; height: 1.2em; font-size: var(--s3); border: 0; border-radius: 999px; background: #D5D8EE; cursor: pointer; transition: background-color .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: .12em; left: .12em; width: .96em; height: .96em; border-radius: 50%; background: var(--paper); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] { background: var(--deep); }
.switch[aria-checked="true"]::after { transform: translateX(1em); }
.band.on:nth-child(5n+4) .switch[aria-checked="true"], .band.on:nth-child(5n+5) .switch[aria-checked="true"] { background: var(--yellow); }

/* "Voy" en grande: se toca, baja el contador y cambia el campo de color. */
.voy { min-height: 92svh; overflow: hidden; background: var(--green); color: var(--deep); transition: background-color .4s var(--ease); }
.voy.done { background: var(--pink); }
.voy-copy { position: relative; z-index: 2; padding-top: 120px; max-width: 30ch; }
.voy-copy h2 { font-size: var(--s1); max-width: 8ch; }
.voy-copy p { margin-top: 20px; font-size: var(--s4); }
.voy-status { min-height: 1.5em; font-weight: 700; }
.voy-control { position: absolute; right: -6vw; bottom: -4vw; font-size: clamp(36px, 9vw, 150px); display: flex; flex-direction: column; align-items: flex-start; gap: .25em; }
.voy-sticker { padding: .08em .35em; border: .07em solid var(--deep); border-radius: .22em; background: var(--yellow); color: var(--deep); font: 800 .8em/1.05 var(--display); letter-spacing: -0.03em; transform: rotate(-5deg); transition: transform .2s var(--ease); white-space: nowrap; }
.voy-sticker.bump { transform: rotate(-5deg) scale(1.12); }
.voy-button { width: 5.6em; height: 1.9em; border: 0; border-radius: 999px; background: var(--deep); color: var(--paper); font: 800 1em/1 var(--display); letter-spacing: -0.03em; cursor: pointer; transition: transform .12s var(--ease), background-color .2s; }
.voy-button:hover { background: var(--ink); }
.voy-button:active { transform: scale(.94); }

/* Centro legal: los documentos como una carta, con una foto por viñeta. */
.legal-index { padding-top: 120px; padding-bottom: 120px; background: var(--pink); color: var(--deep); }
.legal-head { display: grid; grid-template-columns: 7fr 4fr; gap: 48px; align-items: start; }
.legal-head img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.legal-index h2 { font-size: var(--s1); max-width: 12ch; }
.legal-lead { margin-top: 24px; max-width: 46ch; font-size: var(--s3); font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 32px; padding: 0; list-style: none; font-weight: 700; }
.menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; margin-top: 24px; }
.menu-cat { display: flex; justify-content: space-between; align-items: baseline; margin: 96px 0 40px; }
.menu-cat h3 { font-size: var(--s2); }
.menu-cat span { font-size: var(--s5); font-weight: 700; }
.menu-items { display: grid; gap: 36px; padding: 0; list-style: none; }
.menu-item { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; text-decoration: none; }
.menu-item img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; transition: transform .2s var(--ease); }
.menu-item:hover img { transform: scale(1.08); }
.menu-item .top { display: flex; justify-content: space-between; gap: 16px; font-size: 18px; }
.menu-item .top b { font-weight: 700; }
.menu-item .top em { font-style: normal; font-weight: 700; white-space: nowrap; }
.menu-item p { margin-top: 4px; max-width: 38ch; font-size: var(--s5); color: var(--deep); }
.menu-item.danger .top em { color: var(--paper); background: var(--deep); padding: 2px 10px; border-radius: 999px; }

/* Documentos completos: lectura cómoda, índice fijo. */
.docs { display: grid; grid-template-columns: minmax(200px, 3fr) 8fr; gap: 64px; padding-top: 120px; padding-bottom: 120px; background: var(--paper); color: var(--deep); }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 16px; font-size: var(--s5); }
.toc-title { font: 800 var(--s4)/1 var(--display); }
.toc nav { display: grid; gap: 10px; }
.toc a { justify-self: start; font-weight: 500; }
.toc-owner { color: var(--ink); }
.docs-body { max-width: 66ch; }
.doc { padding-bottom: 96px; }
.doc + .doc { padding-top: 32px; }
.doc h2 { font-size: var(--s3); line-height: 1.05; }
.doc .intro { margin-top: 20px; font-weight: 700; }
.doc .updated { margin-top: 40px; font-size: var(--s5); color: var(--soft); }
.doc h3 { margin-top: 40px; font-size: var(--s4); letter-spacing: -0.01em; line-height: 1.2; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; display: grid; gap: 10px; }
.doc mark { background: var(--yellow); color: var(--deep); }
.owner { font-weight: 500; }

/* Eliminar cuenta. */
.delete { padding-top: 120px; padding-bottom: 120px; background: var(--ink); color: var(--paper); }
.delete h2 { font-size: var(--s1); max-width: 12ch; }
.delete-intro { margin-top: 24px; max-width: 46ch; font-size: var(--s3); font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.in-app { margin-top: 20px; max-width: 60ch; }
.delete-grid { display: grid; grid-template-columns: 6fr 5fr; gap: 64px; margin-top: 64px; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.label { font-weight: 700; }
.field input, .nick { width: 100%; min-height: 56px; border: 2px solid transparent; border-radius: 16px; background: var(--paper); color: var(--deep); font: 500 var(--s4)/1 var(--text); padding: 0 16px; }
.nick { display: flex; align-items: center; gap: 6px; }
.nick input { border: 0; padding: 0; min-height: 52px; background: transparent; }
.field input:focus, .nick:focus-within { outline: 3px solid var(--yellow); outline-offset: 2px; }
.help { color: #C9CCF2; font-size: var(--s5); }
.error { color: var(--yellow); font-size: var(--s5); font-weight: 700; }
.field.invalid input, .field.invalid .nick { border-color: var(--yellow); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--yellow); }
.form .submit { justify-self: start; min-height: 56px; padding: 0 32px; font-size: var(--s4); }
.form-error { color: var(--yellow); font-weight: 700; }
.hp { position: absolute; left: -9999px; }
.done { display: grid; gap: 16px; justify-items: start; padding: 32px; border-radius: 24px; background: var(--green); color: var(--deep); }
.done h3 { font-size: var(--s3); }
.delete-side { display: grid; gap: 40px; align-content: start; }
.delete-steps { display: grid; gap: 12px; padding: 0; list-style: none; counter-reset: s; }
.delete-steps li { font: 700 var(--s3)/1.15 var(--display); letter-spacing: -0.02em; }
.list h3 { font-size: var(--s4); }
.list ul { margin-top: 12px; padding-left: 1.2em; display: grid; gap: 8px; }

/* Contacto en filas grandes. */
.contact { padding: 0; background: var(--blue); color: var(--paper); }
.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 150px; padding: 0 var(--m) 26px; font: 400 var(--s2)/1 var(--display); letter-spacing: -0.04em; text-decoration: none; overflow-wrap: anywhere; }
.row-a { background: var(--blue); }
.row-b { background: var(--blue-2); }
a.row { transition: background-color .2s; }
a.row:hover { background: var(--ink); }
.contact-photo { width: 100%; object-fit: cover; }
.row-greet { justify-content: flex-start; align-items: center; min-height: 170px; padding-bottom: 0; background: var(--blue); }
.round { display: inline-grid; place-items: center; width: .9em; height: .9em; margin-left: 24px; border-radius: 50%; background: var(--yellow); transition: transform .2s var(--ease); }
.round svg { width: 50%; fill: none; stroke: var(--deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.row-greet:hover .round { transform: translateX(8px); }

/* Pie: el nombre construido con bloques. */
.foot { padding-top: 80px; padding-bottom: 32px; background: var(--yellow); color: var(--deep); }
.blocks { display: flex; gap: 4px; align-items: flex-end; height: 34svh; min-height: 200px; }
.blocks span { flex: 1; height: var(--h); display: flex; align-items: flex-end; justify-content: center; background: var(--c); color: var(--yellow); font: 800 clamp(64px, 15vw, 240px)/.8 var(--display); letter-spacing: -0.05em; overflow: hidden; }
.foot-links { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 32px; margin-top: 56px; font-size: var(--s5); }
.foot-links nav { display: grid; gap: 10px; align-content: start; }
.foot-links a { justify-self: start; }
.foot-last { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; font-size: var(--s5); }
.credits { max-width: 60ch; }

/* ── Entradas: cada parte de la sección sube un poco al aparecer (sin JS, todo visible) ── */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .rise.in { opacity: 1; transform: none; }

/* ── Teléfono ── */
@media (max-width: 900px) {
  .links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--m) 20px; background: var(--hb, var(--paper)); }
  .links.open { display: flex; }
  .links a { padding: 14px 0; font-size: 18px; }
  .menu { display: inline-flex; align-items: center; }
  .bar-cta { margin-left: auto; }
  .bar { gap: 12px; }
  .bar-cta { min-height: 40px; padding: 0 16px; white-space: nowrap; }
  .links { align-items: flex-start; }
  .links .langs { margin-top: 8px; }
  .langs button { min-width: 34px; }
  .hero { --seam: 46svh; --hs: 12.6vw; }
  .hero-lead { max-width: 28ch; font-size: 16px; }
  .step-row { grid-template-columns: 1fr; }
  .step { min-height: 64svh; justify-content: flex-start; padding-top: 28px; }
  .step .card { position: relative; top: auto; left: auto; transform: none; margin-top: 32px; width: 260px; }
  .step:hover .card { transform: none; }
  .step p { font-size: var(--s3); order: -1; }
  .steps-title { position: static; width: auto; padding: 104px var(--m) 0; background: var(--yellow); font-size: var(--s3); }
  .band { min-height: 132px; }
  .band h3 { font-size: var(--s3); }
  .band .why { font-size: var(--s5); }
  .switch { width: 64px; height: 36px; font-size: 30px; }
  .voy { min-height: 86svh; }
  .voy-copy { padding-top: 104px; }
  .voy-control { right: auto; left: var(--m); bottom: -8vw; font-size: 22vw; }
  .menu-cols { grid-template-columns: 1fr; }
  .menu-cat { margin-top: 64px; }
  .menu-cat h3 { font-size: 8.5vw; }
  .menu-item { grid-template-columns: 52px 1fr; }
  .menu-item img { width: 52px; height: 52px; }
  .docs { grid-template-columns: 1fr; gap: 40px; padding-top: 104px; }
  .toc { position: static; }
  .delete-grid { grid-template-columns: 1fr; gap: 48px; }
  .row { min-height: 84px; padding-bottom: 16px; font-size: 9.6vw; }
  .contact-photo { height: 40svh; }
  .trust-head, .legal-head { grid-template-columns: 1fr; gap: 32px; }
  .trust-head { padding-top: 104px; }
  .row-greet { background: var(--yellow); color: var(--deep); justify-content: space-between; }
  .row-greet .round { width: 56px; height: 56px; background: var(--deep); }
  .row-greet .round svg { stroke: var(--yellow); }
  .blocks { height: 22svh; min-height: 140px; }
  .foot-links { grid-template-columns: 1fr 1fr; }
  .foot-owner { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .rise { transform: none; }
}
