/* Monet · portada. Componentes de la app (Mo, isla, barra flotante, cifra, filas, aurora) en HTML y CSS. */

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mo-body {
  fill: url(#mo-body);
  stroke: rgb(255 255 255 / 0.55);
  stroke-width: 1.2;
}

@media (prefers-color-scheme: dark) {
  .mo-body {
    stroke: rgb(255 255 255 / 0.7);
  }
}

.home {
  --phone-w: clamp(250px, 26vw, 340px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  background-image: none;
}


/* ---------- iPhone de CSS ---------- */

.device {
  position: relative;
  width: var(--phone-w);
  margin: 0;
  padding: calc(var(--phone-w) * 0.034);
  border-radius: calc(var(--phone-w) * 0.165);
  background: #1a1c21;
  box-shadow:
    inset 0 0 0 1.5px #3b3f47,
    inset 0 0 0 4px #111216,
    0 30px 60px -24px rgb(20 22 26 / 0.35);
}

@media (prefers-color-scheme: dark) {
  .device {
    background: #2a2d34;
    box-shadow:
      inset 0 0 0 1.5px #5a5f69,
      inset 0 0 0 4px #15171b,
      0 30px 60px -24px rgb(0 0 0 / 0.7);
  }
}

.screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--phone-w) * 0.135);
  background: #0b0c10;
}

.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Isla dinámica (sobre la isla de la captura) ---------- */

.island {
  --w: 31.2%;
  position: absolute;
  top: 1.55%;
  left: 50%;
  width: var(--w);
  height: 4.25%;
  translate: -50% 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6%;
  padding: 0 4%;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: calc(var(--phone-w) * 0.036);
  line-height: 1.15;
  overflow: hidden;
  transition:
    width 0.55s var(--ease-spring),
    height 0.55s var(--ease-spring),
    border-radius 0.55s var(--ease-out),
    top 0.55s var(--ease-out);
}

.island > * {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.island.is-compact {
  --w: 46%;
}

.island.is-compact > .island-icon,
.island.is-compact > .island-mo,
.island.is-compact > .island-amount {
  opacity: 1;
  transition-delay: 0.25s;
}

.island.is-open {
  --w: 92%;
  top: 1.2%;
  height: 12.5%;
  border-radius: calc(var(--phone-w) * 0.12);
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-content: center;
  padding: 0 6%;
  row-gap: 10%;
}

.island.is-open > * {
  opacity: 1;
  transition-delay: 0.3s;
}

.island-icon {
  width: calc(var(--phone-w) * 0.06);
  height: calc(var(--phone-w) * 0.06);
  border-radius: 50%;
  border: 2px solid #4fbfa4;
  position: relative;
}

.island-icon.ok::after {
  content: "";
  position: absolute;
  left: 30%;
  top: 18%;
  width: 28%;
  height: 48%;
  border: solid #4fbfa4;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

.island-mo svg {
  display: block;
  width: calc(var(--phone-w) * 0.075);
  height: calc(var(--phone-w) * 0.075);
}

.island-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.island-title {
  font-weight: 500;
  white-space: nowrap;
}

.island-sub {
  color: #a3a9b6;
  white-space: nowrap;
}

.island-amount {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.island-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.18);
  overflow: hidden;
}

.island-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #8f97f0;
  transition: width 0.3s linear;
}

.island:not(.is-open) .island-bar,
.island:not(.is-open) .island-text {
  display: none;
}

/* ---------- Mo ---------- */

.mo-orb {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}

.mo-orb svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mo-face {
  transition: transform 0.35s var(--ease-out);
}

.mo-eye {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.12s ease;
}

.mo-mouth {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.3s var(--ease-spring);
}

.mo-orb.is-blink .mo-eye {
  transform: scaleY(0.12);
}

.mo-orb.is-happy .mo-mouth {
  transform: scale(1.4, 0.8);
}

.mo-orb.is-hop {
  animation: mo-hop 0.6s var(--ease-spring);
}

@keyframes mo-hop {
  40% {
    translate: 0 -14%;
  }
}

/* ---------- Héroe ---------- */

.intro {
  position: relative;
  isolation: isolate;
  padding: 8.5rem 0 clamp(4rem, 8vw, 7rem);
  background: linear-gradient(to bottom, var(--sky-top), var(--paper) 78%);
  overflow: hidden;
  --sky-top: #d6e3f5;
}

@media (prefers-color-scheme: dark) {
  .intro {
    --sky-top: #0f1d22;
  }
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.intro-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2rem;
  }
}

.intro h1 {
  margin: 0;
  font-weight: 700;
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.intro h1 .accent {
  display: block;
  color: var(--accent);
}

.intro-lede {
  max-width: 31rem;
  margin: 1.75rem 0 0;
  color: var(--ink);
  font-size: var(--t-h3);
  line-height: 1.45;
}

.intro-note {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.intro-stage {
  position: relative;
  justify-self: center;
  perspective: 1400px;
  padding: 1rem 0 2rem;
}

.tilt {
  transform: rotateY(calc(var(--tilt, 1) * -16deg)) rotateX(calc(var(--tilt, 1) * 6deg)) rotateZ(calc(var(--tilt, 1) * 2deg));
  transform-style: preserve-3d;
  transition: transform 0.2s linear;
  will-change: transform;
}

.mo-peek {
  position: absolute;
  left: calc(var(--phone-w) * -0.3);
  bottom: 3.5rem;
  width: calc(var(--phone-w) * 0.42);
  height: calc(var(--phone-w) * 0.42);
  filter: drop-shadow(0 14px 18px rgb(20 22 26 / 0.22));
}

@media (max-width: 899px) {
  .intro {
    padding-top: 6.5rem;
  }

  .intro-stage {
    --phone-w: min(68vw, 300px);
  }

  .mo-peek {
    left: calc(var(--phone-w) * -0.18);
  }
}

/* ---------- Banda gris y pilares ---------- */

.band {
  background: var(--band);
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.band-title,
.story-title {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  font-size: var(--t-title);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.pillars {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 820px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pillar {
  min-width: 0;
  text-align: center;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border-radius: 36px;
  background: var(--card);
}

.pillar h3 {
  margin: 1.5rem 0 0.35rem;
  font-weight: 600;
  font-size: var(--t-h3);
  letter-spacing: -0.01em;
}

.pillar p {
  max-width: 19rem;
  margin: 0 auto;
  color: var(--ink-soft);
}

.art {
  height: 196px;
  border-radius: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  overflow: hidden;
  /* Tonos de Análisis (ChartPalette): claro y oscuro. */
  --hue-durazno: #b0532a;
  --hue-estanque: #22705f;
  --hue-lila: #4f56b8;
  --hue-bruma: #6a4fa8;
  --hue-arena: #8a6420;
  --fill-durazno: #ffe7da;
  --fill-estanque: #ddefea;
}

@media (prefers-color-scheme: dark) {
  .art {
    --hue-durazno: #ffb48f;
    --hue-estanque: #6fd3b9;
    --hue-lila: #b9bff5;
    --hue-bruma: #cdb9f5;
    --hue-arena: #e8c58a;
    --fill-durazno: #3d2a22;
    --fill-estanque: #153430;
  }
}

/* «Se anota solo»: las filas de Movimientos (símbolo en su círculo, comercio, «hora · medio •• dígitos», importe). */
.art-rows {
  gap: 0.35rem;
}

.art-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.art-source-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.mini-row {
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 18px;
  background: var(--card);
}

.mini-badge {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  font-weight: 500;
  font-size: 0.9375rem;
}

.mini-badge.hue-durazno { background: var(--fill-durazno); color: var(--hue-durazno); }
.mini-badge.hue-estanque { background: var(--fill-estanque); color: var(--hue-estanque); }

.mini-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.mini-name {
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-meta {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-amount {
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

.mini-row .cents {
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: no-preference) {
  .js .pillar:not(.is-in) .mini-row.is-new {
    opacity: 0;
    translate: 0 -10px;
  }

  .mini-row.is-new {
    transition: opacity 0.5s var(--ease-out) 0.35s, translate 0.6s var(--ease-spring) 0.35s;
  }
}

/* «Tu ritmo»: el gráfico de puntos del widget (WidgetDotChart). Una columna por día, la altura en escala de raíz;
   los días pasados en el tono del ritmo (estanque: vas mejor que el mes pasado), hoy en lila hondo, lo que falta un
   punto tenue. */
.art-pace {
  gap: 0.9rem;
}

.dot-chart {
  display: block;
  width: 100%;
  height: auto;
}

.dot-chart .f { fill: var(--estanque); }
.dot-chart .e { fill: var(--ink-faint); fill-opacity: 0.12; }
.dot-chart .u { fill: var(--ink-faint); fill-opacity: 0.35; }
.dot-chart .t { fill: var(--accent); }
.dot-chart .te { fill: var(--accent); fill-opacity: 0.18; }

.pace-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: center;
  margin: 0;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--estanque) 12%, transparent);
  color: var(--estanque);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* La flecha «↘» del ritmo (arrow.down.right en la app). */
.pace-arrow {
  position: relative;
  width: 0.7rem;
  height: 0.7rem;
}

.pace-arrow::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0.45rem;
  height: 0.45rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
}

.pace-arrow::after {
  content: "";
  position: absolute;
  left: 0.05rem;
  top: 0.32rem;
  width: 0.8rem;
  height: 2px;
  background: currentColor;
  rotate: 45deg;
  transform-origin: left center;
  translate: 0 -0.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  .js .pillar:not(.is-in) .dc-col {
    opacity: 0;
  }

  .js .pillar.is-in .dc-col {
    animation: col-in 0.45s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 32ms + 0.15s);
  }
}

@keyframes col-in {
  from {
    opacity: 0;
    translate: 0 4px;
  }
}

/* «En qué se va»: las columnas de Inicio (HomeCategoryBars) con el acabado de puntos de Análisis (DotFill). */
.art-cats {
  justify-content: flex-end;
  padding-bottom: 0.85rem;
}

.cat-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}

.cat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.cat-plot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 96px;
}

.cat-bar {
  --c: var(--hue-lila);
  display: block;
  width: 100%;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--c);
  background-color: color-mix(in srgb, var(--c) 10%, transparent);
  background-image: radial-gradient(circle at 50% 50%, var(--c) 0.8px, transparent 1.1px);
  background-size: 3.2px 3.2px;
  background-position: 1px 1px;
  transform-origin: bottom;
}

.cat-bar.hue-durazno { --c: var(--hue-durazno); }
.cat-bar.hue-estanque { --c: var(--hue-estanque); }
.cat-bar.hue-lila { --c: var(--hue-lila); }
.cat-bar.hue-bruma { --c: var(--hue-bruma); }
.cat-bar.hue-arena { --c: var(--hue-arena); }

.cat-bar.h40 { height: 40px; }
.cat-bar.h50 { height: 50px; }
.cat-bar.h56 { height: 56px; }
.cat-bar.h75 { height: 75px; }
.cat-bar.h96 { height: 96px; }

.cat-name {
  max-width: 100%;
  margin-top: 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.cat-amt {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .js .pillar:not(.is-in) .cat-bar {
    scale: 1 0;
  }

  .cat-bar {
    transition: scale 0.8s var(--ease-out);
  }

  .cat-col:nth-child(2) .cat-bar { transition-delay: 0.06s; }
  .cat-col:nth-child(3) .cat-bar { transition-delay: 0.12s; }
  .cat-col:nth-child(4) .cat-bar { transition-delay: 0.18s; }
  .cat-col:nth-child(5) .cat-bar { transition-delay: 0.24s; }
}

/* ---------- Historia fija ---------- */

.story {
  padding-block: clamp(5rem, 10vw, 9rem) clamp(3rem, 6vw, 5rem);
}

.story-grid {
  display: grid;
  gap: 2rem;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step h3 {
  margin: 0 0 0.6rem;
  font-weight: 650;
  font-size: var(--t-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.step > p {
  max-width: 30rem;
  margin: 0;
  color: var(--ink);
  font-size: var(--t-body);
}

.step-device {
  --phone-w: min(72vw, 300px);
  margin: 2.5rem auto 0;
}

.story-stage {
  display: none;
}

@media (min-width: 900px) {
  .story-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }

  .step {
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.28;
    transition: opacity 0.5s var(--ease-out);
  }

  .step.is-active {
    opacity: 1;
  }

  .step-device {
    display: none;
  }

  .story-stage {
    display: block;
    position: sticky;
    top: calc(50vh - var(--phone-w) * 1.087 - 1rem);
    align-self: start;
    justify-self: center;
    padding-block: 6vh;
  }

  .story-device {
    --phone-w: clamp(280px, 25vw, 340px);
  }
}

.story-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  scale: 1.04;
  transition:
    opacity 0.6s var(--ease-out),
    scale 0.8s var(--ease-out);
}

.story-shot.is-on {
  opacity: 1;
  scale: 1;
}

/* ---------- Vistos ---------- */

.checks {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 2.1rem;
  font-size: var(--t-body);
}

.checks li + li {
  margin-top: 0.7rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--estanque) 16%, transparent);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.38em;
  width: 0.35rem;
  height: 0.65rem;
  border: solid var(--estanque);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}

/* ---------- Cifra y filas ---------- */

.figure-band {
  padding-block: clamp(4.5rem, 9vw, 8rem);
  background: var(--band);
}

.figure-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .figure-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 4rem;
  }
}

.figure-grid h2 {
  margin: 0;
  font-weight: 650;
  font-size: var(--t-title);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.figure-lede {
  max-width: 28rem;
  margin: 1rem 0 0;
  font-size: var(--t-body);
}

.hero-figure {
  display: flex;
  align-items: flex-start;
  margin: 2rem 0 0;
  font-weight: 300;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hero-figure .cur {
  font-size: 0.3em;
  font-weight: 400;
  margin: 0.25em 0.12em 0 0;
  letter-spacing: 0;
}

.cents {
  color: var(--ink-faint);
}

.pace {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--card);
  font-size: 1rem;
}

.pace-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--estanque);
}

.glass {
  border-radius: 30px;
  background: var(--card);
  box-shadow: inset 0 1px 0 var(--edge), 0 1px 2px rgb(20 22 26 / 0.04);
}

.rows {
  padding: 1.25rem 1.25rem 0.75rem;
}

.rows ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows-day {
  margin: 0 0 0.25rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.5rem;
}

.row + .row {
  box-shadow: inset 0 1px 0 var(--hairline);
}

.row-badge {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-weight: 500;
  color: var(--ink);
  background: color-mix(in srgb, var(--tone) 34%, var(--card));
}

.tone-l { --tone: var(--lila); }
.tone-a { --tone: var(--amanecer); }
.tone-e { --tone: var(--estanque); }

.row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.row-amount {
  font-variant-numeric: tabular-nums;
  font-size: 1.0625rem;
}

.row.income .row-amount {
  color: var(--estanque);
}

.row.income .row-amount .cents {
  color: inherit;
  opacity: 0.7;
}

/* ---------- Tarjetas de función ---------- */

.features {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.features .wrap {
  display: grid;
  gap: 1.5rem;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 4rem);
  border-radius: 44px;
  background: var(--card);
  overflow: hidden;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
    padding-bottom: 0;
  }

  .feature.flip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .feature.flip > .feature-copy {
    order: 2;
  }

  .feature > .device {
    align-self: end;
    margin-bottom: calc(var(--phone-w) * -0.5);
    margin-top: 1rem;
  }

  .feature .feature-copy {
    padding-bottom: clamp(1.75rem, 4vw, 4rem);
  }
}

.feature h2 {
  margin: 0;
  font-weight: 650;
  font-size: var(--t-title);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.feature-copy > p {
  max-width: 30rem;
  margin: 1rem 0 0;
  font-size: var(--t-body);
}

.feature > .device {
  --phone-w: clamp(240px, 24vw, 310px);
  justify-self: center;
}

.feature-link {
  margin-top: 1.5rem;
}

@media (max-width: 899px) {
  .feature > .device {
    margin-bottom: calc(var(--phone-w) * -0.55 - clamp(1.75rem, 4vw, 4rem));
  }
}

/* ---------- Hablar: la frase, los gastos y la aurora ---------- */

.feature-speak {
  background: var(--card);
}

@media (min-width: 900px) {
  .feature-speak {
    grid-template-columns: minmax(0, 1fr) 25rem;
    padding-bottom: clamp(1.75rem, 4vw, 4rem);
  }

  .feature-speak .feature-copy {
    padding-bottom: 0;
  }
}

.speak-demo {
  position: relative;
  width: 100%;
  max-width: 25rem;
  justify-self: center;
  padding: 1.5rem;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
}

.speak-head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.speak-mic {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ink);
  position: relative;
}

.speak-mic::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  width: 26%;
  height: 40%;
  translate: -50% 0;
  border-radius: 999px;
  background: var(--paper);
}

.speak-mic::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 44%;
  height: 30%;
  translate: -50% 0;
  border: 2px solid var(--paper);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.speak-phrase {
  margin: 0.2rem 0 0;
  min-height: 3.2em;
  font-size: 1.1875rem;
  line-height: 1.35;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.speak-items {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.speak-items .row {
  border-radius: 20px;
  background: var(--card);
  padding: 0.75rem 0.9rem;
  box-shadow: none;
}

.speak-items .row + .row {
  margin-top: 0.5rem;
}

.js .speak-items .row {
  opacity: 0;
  translate: 0 12px;
  transition:
    opacity 0.4s var(--ease-out),
    translate 0.5s var(--ease-spring);
}

.js .speak-items .row.is-in {
  opacity: 1;
  translate: 0 0;
}

.save {
  --p: 0;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  height: 5.5rem;
  margin-top: 1.25rem;
  border-radius: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.aurora {
  position: absolute;
  inset: auto 0 0 0;
  height: 100%;
  background:
    radial-gradient(60% 80% at 30% 100%, rgb(185 191 245 / 0.9), transparent 70%),
    radial-gradient(55% 70% at 72% 100%, rgb(255 180 143 / 0.75), transparent 70%),
    radial-gradient(40% 50% at 50% 100%, rgb(79 191 164 / 0.55), transparent 70%);
  opacity: calc(0.25 + var(--p) * 0.75);
  transform-origin: bottom;
  scale: 1 calc(0.35 + var(--p) * 0.85);
  filter: blur(8px);
  pointer-events: none;
}

.save-label {
  position: relative;
  align-self: start;
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.save-knob {
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  width: 3rem;
  height: 3rem;
  translate: -50% calc(var(--p) * -1.6rem);
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
  touch-action: none;
}

.save-knob span {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 0.75rem;
  height: 0.75rem;
  border: solid var(--paper);
  border-width: 2px 0 0 2px;
  translate: -50% 0;
  rotate: 45deg;
}

.save.is-dragging .save-knob {
  cursor: grabbing;
}

.save.is-saved .save-knob {
  translate: -50% -1.6rem;
}

.speak-done {
  margin: 0.75rem 0 0;
  text-align: center;
  font-weight: 500;
  color: var(--estanque);
}

.speak-again {
  display: block;
  min-height: 44px;
  margin: 0.5rem auto 0;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.speak-again:hover {
  color: var(--ink);
}

/* ---------- Google: breve; el detalle está en privacidad ---------- */

.google {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  background: var(--band);
}

.google-inner {
  max-width: 46rem;
  text-align: center;
}

.google h2 {
  margin: 0;
  font-weight: 650;
  font-size: var(--t-h2);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.google-inner > p {
  margin: 0.9rem auto 0;
  max-width: 36rem;
}

.google .limited-use {
  margin-top: 1.5rem;
  max-width: 32rem;
  color: var(--ink-soft);
  font-size: var(--t-small);
  line-height: 1.5;
}

/* ---------- Barra flotante ---------- */

.dock {
  --h: 3.5rem;
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 20;
  translate: -50% 0;
  display: grid;
  grid-template-columns: var(--h) auto var(--h);
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 2rem);
}

.dock-orb,
.dock-plus,
.dock-pill {
  height: var(--h);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 1px 0 var(--edge), 0 10px 30px -12px rgb(20 22 26 / 0.3);
}

.dock-orb {
  display: grid;
  place-items: center;
}

.dock-orb svg {
  width: 72%;
  height: 72%;
}

.dock-pill {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0 1.4rem;
  white-space: nowrap;
  font-size: 1rem;
}

.dock-pill strong {
  font-weight: 600;
}

.dock-sep {
  width: 1px;
  height: 1.2rem;
  background: var(--hairline);
}

.dock-plus {
  position: relative;
  background: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.dock-plus span::before,
.dock-plus span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  translate: -50% -50%;
}

.dock-plus span::after {
  rotate: 90deg;
}

.dock a {
  transition: scale 0.2s var(--ease-spring);
}

.dock a:hover {
  scale: 1.06;
}

.dock a:active {
  scale: 0.94;
}

@media (max-width: 520px) {
  .dock {
    --h: 3.25rem;
    gap: 0.4rem;
  }

  .dock-pill {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 1rem;
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .dock-sep {
    display: none;
  }
}

/* ---------- Aparición al desplazar ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    translate: 0 28px;
    transition:
      opacity 0.8s var(--ease-out),
      translate 0.9s var(--ease-out);
    transition-delay: var(--delay, 0s);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    translate: 0 0;
  }

  .js .pillar:nth-child(2) { --delay: 0.08s; }
  .js .pillar:nth-child(3) { --delay: 0.16s; }


  .js .intro-copy {
    animation: nudge 0.7s var(--ease-out) both;
  }

  .js .intro-stage {
    animation: rise 0.9s var(--ease-out) 0.1s both;
  }
}

@keyframes nudge {
  from {
    translate: 0 18px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tilt {
    transform: none;
  }

  .island,
  .island > *,
  .story-shot,
  .step,
  .mo-face,
  .mo-eye {
    transition: none;
  }

  .caret {
    animation: none;
  }
}

@media print {
  .dock,
  .sky,
  .story-stage {
    display: none;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }
}

/* Al saltar a una sección, que la píldora de arriba no la tape. */
#como,
#apple-pay,
#hablar,
#mo,
#ciclo,
#google {
  scroll-margin-top: 5.5rem;
}
