/*
 * Landing de Zen Wallet. La paleta, la cabecera, el pie y la marca viven en `site/site.css` (compartidos con la política
 * de privacidad); aquí solo lo propio de la landing. Sin fuentes externas: todo con la sans del sistema (rediseño «Aro»).
 * Movimiento: el ensō se dibuja y la moneda cae en su abertura al cargar; las barras se llenan una vez al entrar en pantalla.
 */
:root {
  --track: light-dark(#d5d8dc, #333336);
  --on-accent: #ffffff;
  --deep: #10261a;
  --deep-text: #c3d3c7;
  --deep-accent: #8bd18e;
}

html { scroll-behavior: smooth; }

body { font: 1.0625rem/1.6 var(--sans); }

section[id] { scroll-margin-top: 4.5rem; }

h1, h2, h3 { font-family: var(--sans); font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 1.625rem; line-height: 1.2; }
p { margin: 0; }

.fine { color: var(--muted); font-size: 0.9375rem; }
.copy p { margin-top: 1.25rem; color: var(--muted); max-width: 34rem; }
.copy h2 + p { margin-top: 1.5rem; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 3.5rem; padding-block: 4.5rem 7rem; }
.hero-copy { flex: 1 1 28rem; min-width: 0; }
.lead { margin-top: 1.75rem; max-width: 34rem; font-size: 1.25rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.5rem; }
.soon {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 3.5rem;
  padding: 0.75rem 1.75rem; border-radius: 999px; line-height: 1.25;
  background: light-dark(#1a1a1a, #ffffff); color: light-dark(#ffffff, #1a1a1a);
}
.soon span { font-size: 0.8125rem; opacity: 0.85; }
.soon strong { font-size: 1.25rem; }
.see {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0.75rem 1.75rem;
  font-weight: 600; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.see:hover { border-color: var(--accent); color: var(--accent); }
.hero-copy .fine { margin-top: 1.25rem; }

.hero-visual { position: relative; flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-block: 1.5rem; }
.hero-mark { --mark: #43a047; position: absolute; width: min(32rem, 120%); top: 50%; left: 50%; translate: -50% -50%; opacity: 0.2; }

.phone {
  position: relative; width: 17.5rem; height: 35rem; padding: 1.5rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: #0d0d0d; border: 0.625rem solid #050505; border-radius: 2.5rem; color: #ffffff;
  font-size: 0.875rem; line-height: 1.35;
}
.phone-top { display: flex; justify-content: space-between; color: #b4b4b9; font-size: 0.8125rem; }
.phone-top .hide { color: #6fcf73; }
.phone-title { font: 700 1.625rem var(--sans); letter-spacing: -0.02em; }
.phone-sub { margin-top: 0.25rem; color: #b4b4b9; font-size: 0.8125rem; }
.acct { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; background: #1a1a1a; border-radius: 1.5rem; }
.acct span { font-weight: 500; }
.acct strong { font-weight: 600; text-align: right; }
.acct small { display: block; color: #6fcf73; font-size: 0.75rem; font-weight: 500; }
.acct.goal { justify-content: flex-start; gap: 0.75rem; }
.goal-row { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 500; }
.goal-row small { display: inline; }
.phone-tabs { display: flex; justify-content: space-around; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid #2c2c2e; }
.phone-tabs i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3a3a3c; }
.phone-tabs i.on { background: #43a047; outline: 2px solid #43a047; outline-offset: 3px; }
.caption { text-align: center; }

/* Pantallas del teléfono: una tira que se desliza con el dedo, la rueda o las flechas; cada pantalla encaja en su sitio. */
.phone-screens {
  flex: 1; min-height: 0; display: flex; margin-inline: -1rem;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.phone-screens::-webkit-scrollbar { display: none; }
.phone-screens:focus-visible { outline: 3px solid #6fcf73; outline-offset: 2px; }
.phone-screen { flex: 0 0 100%; min-width: 0; padding-inline: 1rem; display: flex; flex-direction: column; gap: 0.75rem; scroll-snap-align: start; scroll-snap-stop: always; }
.balance { position: relative; width: 11rem; height: 11rem; margin-inline: auto; }
.balance-ring { width: 100%; height: 100%; }
.balance-ring .r-track, .balance-ring .r-fill { stroke-width: 6; }
.balance-ring .r-coin { r: 4.5px; }
.balance-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.balance-in span { color: #b4b4b9; font-size: 0.75rem; }
.balance-in strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.pair { display: flex; gap: 0.5rem; }
.mini, .budget { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0.7rem 0.8rem; background: #1a1a1a; border: 1px solid #2c2c2e; border-radius: 1.25rem; }
.mini span, .budget small { color: #b4b4b9; font-size: 0.75rem; }
.mini strong { font-weight: 700; }
.in { color: #6fcf73; }
.out { color: #ffa657; }
.feed { background: #1a1a1a; border: 1px solid #2c2c2e; border-radius: 1.25rem; }
.mov { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 0.9rem; }
.mov + .mov { border-top: 1px solid #2c2c2e; }
.mov span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mov strong { flex: none; font-weight: 600; }
.budget { align-items: center; gap: 0.15rem; text-align: center; }
.budget > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.budget-ring { position: relative; width: 4.5rem; height: 4.5rem; margin-bottom: 0.35rem; }
.b-ring { width: 100%; height: 100%; }
.b-ring .r-track, .b-ring .r-fill { stroke-width: 9; }
.budget-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.875rem; font-weight: 700; }
.phone-pager { display: flex; gap: 0.25rem; }
.phone-pager a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.phone-pager a::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--track); transition: background-color 0.2s ease, scale 0.2s ease; }
.phone-pager a.on::before { background: var(--accent-fill); scale: 1.3; }

/* Aros de progreso: el ensō del logo como medidor. Los porcentajes (p33, p54, p62) son clases: el CSP no deja `style` en línea. */
.ring-meter { flex: none; display: block; }
.r-track, .r-fill { fill: none; stroke-linecap: round; }
.r-track { stroke: var(--ring-track, var(--track)); }
.r-fill { stroke: var(--accent-fill); stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.r-coin { fill: var(--accent-fill); }
.p33 { --p: 33; }
.p54 { --p: 54; }
.p62 { --p: 62; }
.js .reveal:not(.is-in) .r-fill { stroke-dashoffset: 100; }
.vis-ring { width: 5rem; height: 5rem; --ring-track: var(--border); }
.vis-ring .r-track, .vis-ring .r-fill { stroke-width: 9; }
.phone .ring-meter { --ring-track: #333336; }
.phone-head { display: flex; align-items: center; gap: 0.75rem; }
.phone-ring { width: 3.25rem; height: 3.25rem; }
.phone-ring .r-track, .phone-ring .r-fill, .goal-ring .r-track, .goal-ring .r-fill { stroke-width: 9; }
.goal-ring { width: 2.75rem; height: 2.75rem; }

/* Barras de progreso y cuotas */
.bar { --fill: 62%; }
.bar .fill { display: block; height: 100%; width: var(--fill); background: var(--accent-fill); border-radius: inherit; }
.acct .bar { height: 0.625rem; margin-top: 0.75rem; background: #333336; border-radius: 0.3125rem; }
.vis .bar { flex: 1; height: 0.875rem; background: var(--surface); border-radius: 0.4375rem; }
.fill { transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal:not(.is-in) .vis .fill { width: 0; }

.segs { display: flex; gap: 0.5rem; }
.seg { flex: 1; height: 0.875rem; border-radius: 0.25rem; background: var(--track); transition: background-color 0.5s ease; }
.seg.paid { background: var(--accent-fill); }
.js .reveal:not(.is-in) .seg.paid { background: var(--track); }
.seg.paid:nth-child(2) { transition-delay: 0.35s; }

/* Monedas */
.band { background: var(--surface); border-block: 1px solid var(--border); }
.two { display: flex; flex-wrap: wrap; align-items: center; gap: 3.5rem; padding-block: 6rem; }
.two > * { flex: 1 1 24rem; min-width: 0; }

.rate { margin: 0; padding: 0; border: 0; min-width: 0; }
.rate label {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem;
  border: 1px solid var(--border); font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--text);
}
.rate label[for="rate-on"] { border-radius: 0.625rem 0 0 0.625rem; }
.rate label[for="rate-off"] { border-radius: 0 0.625rem 0.625rem 0; margin-left: -1px; }
.rate input:checked + label { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.rate-card { margin-top: 1.25rem; padding: 1.75rem 2rem; border-radius: 1.5rem; background: var(--bg); }
.amount { font: 700 clamp(2rem, 5vw, 2.75rem)/1.1 var(--sans); }
.eq { color: var(--accent); transition: opacity 0.35s ease, translate 0.35s ease; }
.msgs { display: grid; margin-top: 1rem; }
.msg { grid-area: 1 / 1; color: var(--muted); transition: opacity 0.35s ease; }
.msg.off { opacity: 0; }
.rate-demo:has(#rate-off:checked) .eq { opacity: 0; translate: -0.5rem 0; }
.rate-demo:has(#rate-off:checked) .msg.on { opacity: 0; }
.rate-demo:has(#rate-off:checked) .msg.off { opacity: 1; }
.rate-demo .fine { margin-top: 1rem; }

/* Funciones */
.features { padding-block: 7.5rem 2.5rem; }
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2.5rem 4rem; margin-top: 3.5rem; }
.split > * { flex: 1 1 22rem; min-width: 0; }
.rules { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.rule, .row { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.rule strong { display: block; font-weight: 600; }
.rule span { color: var(--muted); }
.split.more { margin-top: 6rem; }
.split.more h3 { flex: 1 1 14rem; }
.split.more .rules { flex: 3 1 30rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; margin: 0; }
.row dt { flex: 1 1 11rem; font-weight: 600; }
.row dd { flex: 3 1 17rem; margin: 0; color: var(--muted); }

.duo { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 6rem; align-items: stretch; }
.tile { flex: 3 1 26rem; min-width: 0; padding: 2.5rem; border-radius: 1.5rem; background: var(--surface); }
.plain { flex: 2 1 18rem; min-width: 0; padding: 2.5rem 0 0; }
.tile, .plain { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.vis { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; font-weight: 600; }

/* Privacidad */
.deep { position: relative; overflow: hidden; margin-top: 5rem; background: var(--deep); color: #ffffff; }
.deep > .wrap { position: relative; }
.deep .copy p { color: var(--deep-text); }
.deep .rules { border-top-color: #2a5238; }
.deep .rule { border-bottom-color: #2a5238; padding-block: 1.25rem; }
.deep .rule strong { font-size: 1.1875rem; }
.deep .rule span { color: var(--deep-text); }
.deep-link {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0.5rem 1.5rem;
  color: var(--deep-accent); font-weight: 600; text-decoration: none;
  border: 1px solid #2a5238; border-radius: 999px; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.deep-link:hover { border-color: var(--deep-accent); background: rgb(139 209 142 / 12%); }
.deep-mark { --mark: #1f6b2a; position: absolute; width: 44rem; left: -13rem; bottom: -14rem; opacity: 0.55; }

/* Planes */
.plans { padding-block: 7rem 6rem; }
.plans .duo { margin-top: 3.5rem; }
.free { flex: 2 1 20rem; align-self: flex-start; display: block; }
.free h3, .premium h3 { margin-bottom: 1.25rem; }
.free ul { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.free li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.free li:last-child { border-bottom: 0; }
.premium { flex: 3 1 24rem; min-width: 0; padding: 2.5rem 3rem; border-radius: 1.5rem; background: var(--deep); color: #ffffff; }
.premium h3 { font-size: 2.25rem; color: var(--deep-accent); }
.premium p + p { margin-top: 1rem; color: var(--deep-text); }
.premium p:first-of-type { font-size: 1.1875rem; }

/* Movimiento: solo si la persona no pidió reducirlo. El aro se dibuja y la moneda cae en la abertura. */
@media (prefers-reduced-motion: no-preference) {
  /* Al deslizar: cada bloque sube y aparece una vez; las listas entran una fila tras otra. Sin JS todo se ve. */
  .js .rise, .js .stagger > * {
    transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .rise:not(.is-in), .js .stagger:not(.is-in) > * { opacity: 0; transform: translateY(1.75rem); }
  .js .stagger > :nth-child(2) { transition-delay: 0.08s; }
  .js .stagger > :nth-child(3) { transition-delay: 0.16s; }
  .js .stagger > :nth-child(4) { transition-delay: 0.24s; }
  .js .stagger > :nth-child(5) { transition-delay: 0.32s; }
  .js .stagger > :nth-child(6) { transition-delay: 0.4s; }
  .js .stagger > :nth-child(n+7) { transition-delay: 0.48s; }
  /* El teléfono entra un poco después del texto del hero. */
  .js .phone.rise { transition-delay: 0.2s; }
  .phone-screens { scroll-behavior: smooth; }
  /* El aro de la sección de privacidad se dibuja al llegar a ella, y la moneda cae en su abertura. */
  .deep-mark .ring { stroke-dasharray: 1; transition: stroke-dashoffset 2s cubic-bezier(0.4, 0.1, 0.2, 1); }
  .deep-mark .coin { transform-box: fill-box; transform-origin: center; transition: opacity 0.5s ease 1.6s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.25) 1.6s; }
  .js .deep:not(.is-in) .deep-mark .ring { stroke-dashoffset: 1; }
  .js .deep:not(.is-in) .deep-mark .coin { opacity: 0; transform: translateY(-1.5rem) scale(0.6); }
  .hero-mark .ring { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(0.4, 0.1, 0.2, 1) 0.15s forwards; }
  .hero-mark .coin { opacity: 0; transform-box: fill-box; transform-origin: center; animation: land 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.25) 1.4s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes land {
    from { opacity: 0; transform: translateY(-1.5rem) scale(0.6); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill, .seg, .r-fill, .eq, .msg, .phone-pager a::before, .rise, .stagger > *, .deep-mark .ring, .deep-mark .coin { transition: none; }
}

main { overflow-x: clip; }

@media (max-width: 40rem) {
  .hero { padding-block: 2.5rem 4rem; }
  .two { padding-block: 4rem; }
  .tile, .premium { padding: 1.75rem; }
  .plain { padding-top: 0; }
  .features { padding-top: 4.5rem; }
  .plans { padding-top: 4.5rem; }
}
