/* Fillwize landing. "El informe entregado" at night: the white report sheet
   is the one luminous object; dark glass carries everything around it. */

/* ==== Base ==== */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --navy: #0B1222;
  --blue-700: #1A77F6;
  --blue-600: #228FFB;

  /* Night layers, all derived from the navy */
  --navy-1: #0F192E;
  --navy-2: #142038;
  --navy-3: #1B2A4A;

  /* Text on the night */
  --on: #E9EFF6;
  --on-muted: #A9B8CF;
  --on-glass-muted: #D3DCE8; /* 4.76:1 worst case: white paper behind the glass, under both highlights */

  /* Paper */
  --paper: #FFFFFF;
  --rule: #D3DCE8;
  --ink: var(--navy);
  --muted: #4A5870;

  /* Glass */
  --glass-tint: rgba(16, 26, 48, .76);
  --glass-blur: 18px;
  --glass-rim: rgba(233, 239, 246, .09);
  --glass-rim-top: rgba(233, 239, 246, .26);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 77.5rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --band-pad: clamp(5rem, 10vw, 9rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --sheet-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .25), 0 50px 90px -36px rgba(0, 0, 0, .85);
  --lift-shadow: 0 30px 60px -28px rgba(0, 0, 0, .75);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  scrollbar-color: var(--blue-600) var(--navy);
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  color: var(--on);
  background: var(--navy);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue-600); color: var(--navy); }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

/* Line icons: one stroke weight everywhere */
.ctl svg, .pdf-ready svg, .trades svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: #FFFFFF;
  color: var(--navy);
  font-weight: 700;
  border-radius: .7rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
  border-radius: .35rem;
}
.btn:focus-visible { border-radius: 999px; }

/* Glass: translucent navy, blurred backdrop, a rim of light brighter on top,
   a faint specular in the top-left corner, a soft shadow. */
.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 45%),
    var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-rim);
  border-top-color: var(--glass-rim-top);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--lift-shadow);
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(90% 60% at 12% 0%, rgba(255, 255, 255, .035), transparent 60%);
  pointer-events: none;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 45%),
      rgba(18, 28, 50, .97);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 700;
  font-stretch: 105%;
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
/* Primary action: white on the night, navy text, a neutral shadow (no glow). */
.btn--light {
  background: #FFFFFF;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 24px -14px rgba(0, 0, 0, .75);
}
.btn--light:hover { background: #E4E9F1; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 16px 28px -14px rgba(0, 0, 0, .8); }
.btn--light:active { background: #D3DCE8; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 14px -10px rgba(0, 0, 0, .75); }
/* keyboard focus: a light ring, clear of the white fill */
.btn--light:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.btn--small { min-height: 2.75rem; padding: 0 1.1rem; font-size: .93rem; }

.status__dot {
  flex: none;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--blue-600);
  outline: 3px solid rgba(34, 143, 251, .22);
}


.section-head { max-width: 46rem; }
.section-head h2,
.chapter__text h2 {
  font-size: clamp(2.2rem, 1rem + 3.4vw, 3.8rem);
  font-weight: 780;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
  text-wrap: balance;
}
.section-head p {
  margin-top: 1.1rem;
  max-width: 52ch;
  font-size: 1.15rem;
  color: var(--on-muted);
}

/* The report sheet: paper, the one luminous object */
.sheet {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--sheet-shadow);
  color: var(--ink);
}
.sheet__head { padding-bottom: .9rem; border-bottom: 2px solid var(--navy); }
.sheet__title {
  font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.sheet__fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.sheet__fields div { padding: .6rem 0 .55rem; border-bottom: 1px solid var(--rule); }
.sheet__fields dt,
.sheet__label,
.doc__fields dt {
  font-size: .78rem;
  font-weight: 600;
  font-stretch: 75%;
  line-height: 1.35;
  color: var(--muted);
}
.sheet__fields dd { font-size: .98rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.sheet__block { margin-top: 1.35rem; }
.sheet__label { color: var(--ink); }
.sheet__text { margin-top: .35rem; font-size: 1.02rem; line-height: 1.55; }
/* the sentence that was dictated on the phone, marked on the paper */
.sheet__dictated {
  background: rgba(34, 143, 251, .22);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sheet__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.photo svg { width: 100%; height: auto; border-radius: 3px; }
.photo figcaption { margin-top: .45rem; font-size: .8rem; font-stretch: 85%; color: var(--muted); }
.photo figcaption span { margin-right: .25rem; font-weight: 700; color: var(--ink); }
.sheet__foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-top: .7rem;
  border-top: 1px solid var(--rule);
  font-size: .75rem;
  font-stretch: 85%;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Recording bar and waveform, shared by the hero card and the phone */
.rec {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--on);
}
.rec__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue-600); }
.rec__time { margin-left: auto; color: var(--on-glass-muted); font-variant-numeric: tabular-nums; }

.wave { display: flex; align-items: center; gap: 3px; height: 3rem; }
.wave i {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 2px;
  background: var(--blue-600);
  transform-origin: center;
}
.wave i:nth-child(4n+1) { --h: 34%; }
.wave i:nth-child(4n+2) { --h: 72%; }
.wave i:nth-child(4n+3) { --h: 52%; }
.wave i:nth-child(4n+4) { --h: 90%; }
.wave i:nth-child(5n) { --h: 24%; }
.wave i:nth-child(7n) { --h: 100%; }

.pdf-ready {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  padding: .4rem .8rem .4rem .6rem;
  border-radius: 999px;
  background: var(--blue-600);
  color: var(--navy);
  font-size: .85rem;
  font-weight: 750;
  font-stretch: 105%;
}
.pdf-ready svg { width: 1.1rem; height: 1.1rem; }

/* Motion: each section first sets its still, final state (no JavaScript,
   no scroll-driven animation support, reduced motion), then adds a resting
   pose under no-preference, then scroll-driven motion where supported. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ==== Barra flotante ==== */
.nav {
  position: fixed;
  top: .75rem;
  left: .75rem;
  right: .75rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 68rem;
  margin-inline: auto;
  padding: .4rem .4rem .4rem 1.35rem;
  border-radius: 999px;
  --glass-tint: rgba(16, 26, 48, .74);
}
.nav__brand { flex: none; padding: .55rem 0; border-radius: .35rem; }
.nav__brand img { width: auto; height: 1.55rem; }
.nav__links { margin-left: auto; }
.nav__links ul { display: flex; gap: .25rem; }
.nav__links a {
  display: block;
  padding: .65rem .85rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 550;
  color: var(--on);
  text-decoration: none;
  transition: background-color .2s var(--ease-out);
}
.nav__links a:hover { background: rgba(233, 239, 246, .08); }
.nav__links a:focus-visible { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
  .nav__links a { transition: none; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav { justify-content: space-between; padding-left: 1.1rem; }
}
@media (max-width: 420px) {
  .wide-only { display: none; }
  .nav__brand img { height: 1.3rem; }
}

/* ==== Pie ==== */
.site-footer { border-top: 1px solid rgba(233, 239, 246, .1); color: var(--on-muted); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 2rem;
  padding-block: 2rem;
  font-size: .95rem;
}
.site-footer__logo { width: auto; height: 1.5rem; }
.site-footer a { color: #FFFFFF; text-decoration: underline; }
.site-footer__copy { margin-left: auto; }
@media (max-width: 640px) {
  .site-footer__copy { width: 100%; margin-left: 0; }
}

/* ==== Portada ==== */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(100svh, 60rem);
  padding: 7rem 0 5rem;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46rem 30rem at 50% 88%, rgba(34, 143, 251, .24), transparent 70%),
    radial-gradient(30rem 22rem at 18% 46%, rgba(34, 143, 251, .09), transparent 70%),
    radial-gradient(30rem 22rem at 84% 40%, rgba(26, 119, 246, .12), transparent 70%);
  /* the light fades out before the section edge: no seam into the next band */
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
  pointer-events: none;
}

.hero__title {
  font-size: clamp(2.5rem, .6rem + 6.4vw, 6rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .92;
  letter-spacing: -.035em;
  text-align: center;
  color: #fff;
}
.hero__title span { display: block; }

/* Centre: chip, headline, one line, the action. Nothing else competes. */
.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: .45rem 1rem;
  border: 1px solid rgba(233, 239, 246, .18);
  border-radius: 999px;
  background: rgba(11, 18, 34, .7);
  font-size: .88rem;
  font-weight: 600;
  color: var(--on);
}
.hero__lead {
  max-width: 34ch;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  line-height: 1.5;
  color: var(--on);
  text-wrap: balance;
}
.hero__content .btn { margin-top: 2rem; }

/* Background: the interface pieces, bigger, blurred and faint, pushed to the
   edges so the centre stays clean. Static blur; only transform scrolls. */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* pieces fade out before the section edge instead of being cut */
  -webkit-mask-image: linear-gradient(#000 72%, transparent 98%);
  mask-image: linear-gradient(#000 72%, transparent 98%);
}
.float {
  --tilt: 0deg;
  --blur: 8px;
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.3rem;
  border: 1px solid rgba(233, 239, 246, .1);
  border-top-color: rgba(233, 239, 246, .24);
  border-radius: 1.8rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 45%), var(--navy-2);
  box-shadow: var(--lift-shadow);
  opacity: .5;
  filter: blur(var(--blur));
  transform: rotate(var(--tilt));
}
.float--wave { --drift: -6rem; top: 19%; left: 3%; width: 19rem; }
.float--photo { --drift: -9rem; top: 12%; right: 4%; width: 17rem; }
.float--sheet {
  --drift: -4rem;
  --blur: 10px;
  bottom: -6rem;
  left: 7%;
  width: 27rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  opacity: .3;
}
.float--pdf { --drift: -7rem; right: 9%; bottom: 11%; width: 13rem; }
.float .wave { height: 3.6rem; }
.float__quote { font-size: .95rem; line-height: 1.4; color: #fff; }
.float__pic { width: 100%; height: auto; border-radius: .7rem; }
.float__cap { font-size: .8rem; font-stretch: 90%; color: var(--on-glass-muted); }
.float__cap b { margin-right: .25rem; font-weight: 700; color: #fff; }

@media (max-width: 1180px) {
  .float--wave { width: 15rem; }
  .float--photo { width: 13rem; }
  .float--sheet { bottom: -10rem; width: 21rem; }
  .float--pdf { width: 11rem; }
}
/* Phones: smaller pieces in the bands above and below the text, never behind it */
@media (max-width: 640px) {
  :root { --glass-blur: 10px; }
  body { font-size: 1rem; }
  .hero { min-height: 0; padding: 12.5rem 0 9rem; }
  .hero__title { font-stretch: 112%; letter-spacing: -.03em; }
  .hero__content .btn { width: 100%; }
  .float { --blur: 6px; padding: .8rem; border-radius: 1.2rem; gap: .6rem; }
  .float--wave { --drift: -1.5rem; top: 5.25rem; left: -1.25rem; width: 10.5rem; }
  .float--photo { --drift: -2rem; top: 4.5rem; right: -1.25rem; width: 9rem; }
  .float--sheet { display: none; }
  .float--pdf { --drift: -1.5rem; right: -.75rem; bottom: 1.5rem; width: 9rem; }
  .float__quote { display: none; }
  .wave { height: 2.2rem; }
  .float .wave { height: 2.4rem; }
  .sheet__fields { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .hero__title { font-size: clamp(2.1rem, 11vw, 2.5rem); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Resting poses: tilted pieces, even before anything moves */
  .float--wave { --tilt: -9deg; }
  .float--photo { --tilt: 8deg; }
  .float--sheet { --tilt: 7deg; }
  .float--pdf { --tilt: -6deg; }
}

@supports (animation-timeline: view()) and (timeline-scope: --a) {
  @media (prefers-reduced-motion: no-preference) {
    /* Hero: the pieces drift at different speeds and straighten as you leave */
    .float {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
    @keyframes drift { to { transform: translateY(var(--drift)) rotate(calc(var(--tilt) * .3)); } }
  }
}

/* ==== Cómo funciona ==== */
.how { position: relative; padding-block: var(--band-pad); }
.how__stage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "device steps" "device result";
  column-gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.how__device { grid-area: device; }
.how__sticky { display: flex; flex-direction: column; align-items: center; perspective: 1400px; }

/* The illustrative phone */
.device {
  --ry: 0deg;
  --rx: 0deg;
  --rz: 0deg;
  width: 17rem;
  aspect-ratio: 9 / 18.6;
  padding: .55rem;
  border-radius: 2.9rem;
  background: linear-gradient(155deg, #22324f, #0d1526 55%, #121d33);
  box-shadow:
    inset 0 0 0 1px rgba(233, 239, 246, .16),
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 60px 100px -40px rgba(0, 0, 0, .95);
  transform: rotateY(var(--ry)) rotateX(var(--rx)) rotateZ(var(--rz));
}
.device__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 2.4rem;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(34, 143, 251, .32), transparent 60%),
    radial-gradient(90% 50% at 80% 100%, rgba(34, 143, 251, .16), transparent 60%),
    var(--navy-1);
}
.device__island {
  position: absolute;
  top: .65rem;
  left: 50%;
  z-index: 3;
  width: 5.4rem;
  height: 1.5rem;
  margin-left: -2.7rem;
  border-radius: 999px;
  background: #04070d;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 3.1rem 1.1rem 6rem;
}
.screen--photo, .screen--pdf { opacity: 0; }
.device--still .screen--pdf { opacity: 1; padding-bottom: 1.4rem; }
.wave--big { height: 4.5rem; }
.screen__transcript { font-size: 1rem; line-height: 1.45; color: #fff; }
.screen__transcript span { display: inline; }

.viewfinder { position: relative; overflow: hidden; border-radius: 1rem; }
.viewfinder svg { width: 100%; height: auto; }
.viewfinder::before {
  content: "";
  position: absolute;
  inset: .7rem;
  z-index: 1;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: .5rem;
  -webkit-mask: linear-gradient(#000 0 0) top left / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) top right / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) bottom left / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) bottom right / 1.2rem 1.2rem no-repeat;
  mask: linear-gradient(#000 0 0) top left / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) top right / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) bottom left / 1.2rem 1.2rem no-repeat, linear-gradient(#000 0 0) bottom right / 1.2rem 1.2rem no-repeat;
}
.viewfinder__flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.thumbs { display: flex; gap: .45rem; }
.thumbs span { width: 2.7rem; aspect-ratio: 1; border-radius: .55rem; background: var(--blue-700); }
.thumbs span:nth-child(2) { background: var(--blue-600); }
.thumbs__new { background: #FFFFFF !important; }

.mini-sheet {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1rem .95rem;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 34px -18px rgba(0, 0, 0, .8);
}
.mini-sheet__title {
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--navy);
  font-size: .86rem;
  font-weight: 750;
  font-stretch: 110%;
  line-height: 1.35;
}
.mini-sheet__row { height: .32rem; border-radius: 2px; background: #C4CFDD; }
.mini-sheet__row--short { width: 62%; }
.mini-sheet__pics { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .2rem; }
.mini-sheet__pics i { aspect-ratio: 4 / 3; border-radius: 2px; background: var(--blue-700); }
.mini-sheet__pics i + i { background: var(--blue-600); }

.controls {
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: .55rem;
  border-radius: 1.9rem;
  /* a flat tint with a light rim: the phone is not a second glass layer */
  background: rgba(233, 239, 246, .06);
  border: 1px solid rgba(233, 239, 246, .1);
  border-top-color: rgba(233, 239, 246, .22);
}
.ctl {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  color: var(--on);
  box-shadow: inset 0 0 0 1.5px rgba(233, 239, 246, .3);
}
/* the control in use: a Blue 600 tinted disc with a Blue 600 ring */
.ctl::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(34, 143, 251, .22);
  box-shadow: inset 0 0 0 2px var(--blue-600);
  opacity: 0;
}
.ctl svg { position: relative; width: 1.3rem; height: 1.3rem; }
.ctl--mic { width: 3.5rem; height: 3.5rem; }
.ctl--mic::before { opacity: 1; }
.ctl--mic svg { width: 1.6rem; height: 1.6rem; }


/* The three steps */
.steps { grid-area: steps; display: grid; gap: 1.5rem; }
.step__card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "n title" "n text";
  align-items: center;
  column-gap: 1.4rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 2rem;
}
/* lit edge: a thin Blue 600 rim that switches on when the step is the active one */
.step__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--blue-600);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.step__art { display: none; }
.step__n {
  grid-area: n;
  align-self: start;
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 800;
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
}
.step h3 {
  grid-area: title;
  font-size: clamp(1.6rem, 1rem + 1.4vw, 2.3rem);
  font-weight: 780;
  font-stretch: 115%;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: #fff;
}
.step__card > p:last-child { grid-area: text; margin-top: .55rem; max-width: 36ch; font-size: 1.08rem; color: var(--on-glass-muted); }

/* The finished report assembles at the end of the steps */
.result { grid-area: result; margin-top: clamp(3rem, 6vw, 5rem); perspective: 1600px; }
.result__sheet { transform-origin: 50% 100%; }

@media (max-width: 960px) {
  .how__stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "steps" "result"; }
  .how__device { display: none; }
  .step__card { grid-template-areas: "art art" "n title" "text text"; }
  .step__art {
    display: flex;
    align-items: center;
    grid-area: art;
    min-height: 4.5rem;
    margin-bottom: 1.25rem;
  }
  .step__art .wave { gap: 4px; }
  .step__art .wave i { flex: none; width: 4px; }
  .step__pic { width: 9rem; height: auto; border-radius: .6rem; }
}
@media (max-width: 640px) {
  .step__card { column-gap: 1rem; border-radius: 1.5rem; }
  .step__n { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
  .sheet__photos { gap: .7rem; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Pinned phone while the steps scroll past (desktop) */
  @media (min-width: 961px) {
    .how__sticky { position: sticky; top: max(6rem, calc(50vh - 19rem)); }
    .how__device .device { --ry: -16deg; --rx: 6deg; }
    .step { display: grid; align-content: center; min-height: 72vh; }
    .steps { gap: 0; }
  }
}

@supports (animation-timeline: view()) and (timeline-scope: --a) {
  @media (prefers-reduced-motion: no-preference) {
    /* Cómo funciona: the phone turns, steps light up, the screen follows */
    .how__stage { timeline-scope: --s1, --s2, --s3, --stage; view-timeline: --stage; }
    .step--1 { view-timeline: --s1; }
    .step--2 { view-timeline: --s2; }
    .step--3 { view-timeline: --s3; }

    .step__card { animation: step-scale linear both; animation-range: cover 0% cover 100%; }
    .step__card::before { animation: step-lit linear both; animation-range: cover 0% cover 100%; }
    .step--1 .step__card, .step--1 .step__card::before { animation-timeline: --s1; }
    .step--2 .step__card, .step--2 .step__card::before { animation-timeline: --s2; }
    .step--3 .step__card, .step--3 .step__card::before { animation-timeline: --s3; }
    .step--3 .step__card::before { animation-name: step-lit-last; }
    .step--3 .step__card { animation-name: step-scale-last; }

    @keyframes step-lit { 0%, 25% { opacity: 0; } 42%, 58% { opacity: 1; } 75%, 100% { opacity: 0; } }
    @keyframes step-lit-last { 0%, 25% { opacity: 0; } 42%, 100% { opacity: 1; } }
    @keyframes step-scale { 0%, 25% { transform: scale(.95); } 42%, 58% { transform: scale(1); } 75%, 100% { transform: scale(.95); } }
    @keyframes step-scale-last { 0%, 25% { transform: scale(.95); } 42%, 100% { transform: scale(1); } }

    @media (min-width: 961px) {
      .how__device .device {
        animation: phone-turn linear both;
        animation-timeline: --stage;
        animation-range: contain 0% contain 100%;
      }
      @keyframes phone-turn {
        0% { transform: rotateY(-24deg) rotateX(8deg) rotateZ(-3deg); }
        45% { transform: rotateY(-4deg) rotateX(2deg) rotateZ(0deg); }
        100% { transform: rotateY(18deg) rotateX(-4deg) rotateZ(3deg); }
      }

      /* screens: voice, photo, pdf. Each handoff runs both sides on the same
         timeline and range, so the two opacities always add up to one. */
      @keyframes screen-in { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
      @keyframes screen-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-.6rem); } }
      @keyframes ring-in { from { opacity: 0; } to { opacity: 1; } }
      @keyframes ring-out { from { opacity: 1; } to { opacity: 0; } }
      .screen--voice, .ctl--mic::before {
        animation: screen-out linear both;
        animation-timeline: --s2;
        animation-range: cover 23% cover 27%;
      }
      .screen--photo, .ctl--cam::before {
        animation: screen-in linear both, screen-out linear forwards;
        animation-timeline: --s2, --s3;
        animation-range: cover 23% cover 27%, cover 23% cover 27%;
      }
      .screen--pdf, .ctl--doc::before {
        animation: screen-in linear both;
        animation-timeline: --s3;
        animation-range: cover 23% cover 27%;
      }
      .ctl--mic::before { animation-name: ring-out; }
      .ctl--cam::before { animation-name: ring-in, ring-out; }
      .ctl--doc::before { animation-name: ring-in; }

      /* dictation: the wave plays and the transcript writes itself */
      .screen--voice .wave i { animation: bar-a linear both; animation-timeline: --s1; animation-range: cover 10% cover 70%; }
      .screen--voice .wave i:nth-child(3n+2) { animation-name: bar-b; }
      .screen--voice .wave i:nth-child(3n) { animation-name: bar-c; }
      @keyframes bar-a { 0%, 100% { transform: scaleY(.3); } 20% { transform: scaleY(1); } 40% { transform: scaleY(.45); } 60% { transform: scaleY(.95); } 80% { transform: scaleY(.5); } }
      @keyframes bar-b { 0%, 100% { transform: scaleY(.5); } 20% { transform: scaleY(.35); } 40% { transform: scaleY(1); } 60% { transform: scaleY(.4); } 80% { transform: scaleY(.9); } }
      @keyframes bar-c { 0%, 100% { transform: scaleY(.8); } 20% { transform: scaleY(.55); } 40% { transform: scaleY(.3); } 60% { transform: scaleY(1); } 80% { transform: scaleY(.35); } }

      .screen__transcript span { animation: appear linear both; animation-timeline: --s1; }
      .screen__transcript span:nth-child(1) { animation-range: cover 24% cover 34%; }
      .screen__transcript span:nth-child(2) { animation-range: cover 34% cover 44%; }
      .screen__transcript span:nth-child(3) { animation-range: cover 44% cover 54%; }
      @keyframes appear { from { opacity: 0; } to { opacity: 1; } }

      /* photo: flash, then the new thumbnail drops into the strip */
      .viewfinder__flash { animation: flash linear both; animation-timeline: --s2; animation-range: cover 40% cover 50%; }
      @keyframes flash { 0%, 100% { opacity: 0; } 30% { opacity: .85; } }
      .thumbs__new { animation: drop linear both; animation-timeline: --s2; animation-range: cover 46% cover 58%; }
      @keyframes drop { from { opacity: 0; transform: translateY(-5rem) scale(1.6); } to { opacity: 1; transform: none; } }

      /* pdf: the ready badge pops in */
      .screen--pdf .pdf-ready { animation: badge linear both; animation-timeline: --s3; animation-range: cover 38% cover 48%; }
      @keyframes badge { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
    }

    /* The report assembles piece by piece as it comes into view */
    .result { view-timeline: --result; }
    .result__sheet { animation: sheet-in linear both; animation-timeline: --result; animation-range: entry 0% entry 70%; }
    @keyframes sheet-in {
      from { opacity: 0; transform: rotateX(28deg) translateY(6rem) scale(.92); }
      to { opacity: 1; transform: none; }
    }
    .result__sheet .sheet__head,
    .result__sheet .sheet__fields > div,
    .result__sheet .sheet__block,
    .result__sheet .photo,
    .result__sheet .sheet__foot { animation: piece linear both; animation-timeline: --result; }
    @keyframes piece { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
    .result__sheet .sheet__head { animation-range: entry 20% entry 45%; }
    .result__sheet .sheet__fields > div:nth-child(1) { animation-range: entry 30% entry 52%; }
    .result__sheet .sheet__fields > div:nth-child(2) { animation-range: entry 34% entry 56%; }
    .result__sheet .sheet__fields > div:nth-child(3) { animation-range: entry 38% entry 60%; }
    .result__sheet .sheet__fields > div:nth-child(4) { animation-range: entry 42% entry 64%; }
    .result__sheet .sheet__block { animation-range: entry 50% entry 72%; }
    .result__sheet .photo { animation-name: photo-drop; }
    .result__sheet .photo:nth-child(1) { animation-range: entry 62% entry 86%; }
    .result__sheet .photo:nth-child(2) { animation-range: entry 70% entry 94%; }
    .result__sheet .sheet__foot { animation-range: entry 80% entry 100%; }
    @keyframes photo-drop {
      from { opacity: 0; transform: translateY(-2.5rem) rotate(-6deg) scale(1.06); }
      to { opacity: 1; transform: none; }
    }
  }
}

/* ==== Línea narrativa ==== */
.story {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--band-pad) var(--gutter);
  overflow-x: clip;
}
.story__line {
  position: absolute;
  top: var(--band-pad);
  bottom: var(--band-pad);
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(233, 239, 246, .12);
}
.story__fill {
  position: absolute;
  inset: 0;
  background: var(--blue-600);
  transform-origin: 50% 0;
}
.story__dot, .story__track { display: none; }

.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(4rem, 10vw, 9rem);
  padding-block: clamp(2rem, 6vh, 4rem);
}
.chapter + .chapter { margin-top: clamp(3rem, 8vh, 6rem); }
/* text comes first in the source; even chapters show the image on the left */
.chapter:nth-child(even) .chapter__art { order: -1; }
.chapter__art {
  --dir: 1;
  --tilt: 0deg;
}
/* The resting tilt sits on the inner element, not on the animated container:
   a composited animation layer is rasterised as a bitmap, so the tilt is drawn
   as real, sharp text instead of a rotated bitmap. */
.chapter__art > svg,
.chapter__art > .docs { transform: rotate(var(--tilt)); }
.chapter:nth-child(odd) .chapter__art { --dir: -1; }
.chapter__art svg {
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
  box-shadow: inset 0 0 0 1px rgba(233, 239, 246, .08), var(--lift-shadow);
}
.chapter__art svg text { font-family: var(--font); }
.chapter__text { max-width: 32rem; }
.chapter__text p { margin-top: 1.2rem; font-size: 1.15rem; line-height: 1.55; color: var(--on-muted); }

/* Templates: three report covers fanned */
.docs { display: grid; padding: 1rem 0 2rem; }
.doc {
  position: relative;
  width: 82%;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--sheet-shadow);
  color: var(--ink);
}
.doc:nth-child(1) { transform: rotate(-3deg); }
.doc:nth-child(2) { margin: -1.25rem 0 0 9%; transform: rotate(1.5deg); }
.doc:nth-child(3) { margin: -1.25rem 0 0 18%; transform: rotate(-1deg); }
.doc__title {
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--navy);
  font-size: clamp(1.35rem, 1rem + 1vw, 1.8rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.doc__fields div { padding: .55rem 0 .1rem; }
.doc__fields dd { font-size: 1rem; line-height: 1.4; }

.trades { margin-top: 1.6rem; }
.trades li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-top: 1px solid rgba(233, 239, 246, .14);
  font-size: clamp(1.4rem, 1rem + 1.3vw, 2.1rem);
  font-weight: 780;
  font-stretch: 115%;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #fff;
}
.trades li:last-child { border-bottom: 1px solid rgba(233, 239, 246, .14); }
.trades svg { flex: none; width: 1.6rem; height: 1.6rem; color: var(--blue-600); }

@media (max-width: 860px) {
  .story__line { left: calc(var(--gutter) + .5rem); }
  .chapter {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
    min-height: 0;
    padding-left: 2.25rem;
  }
  .chapter .chapter__art { order: -1; }
  .chapter__art svg { border-radius: 1.25rem; }
  .doc { width: 88%; }
}

@media (prefers-reduced-motion: no-preference) {
  .chapter__art { --tilt: calc(var(--dir) * 2.5deg); }
  @media (min-width: 861px) {
    .chapter { min-height: 78vh; }
  }

  /* The line fills with the scroll: the marker sticks at mid-viewport, and a
     twin sticky tip carries the filled stroke above it inside a track clipped
     to the line's ends (the marker itself stays unclipped). No timeline
     maths, so the tip always sits exactly on the marker. */
  .story__fill { display: none; }
  .story__track {
    display: block;
    position: absolute;
    inset: 0;
    clip-path: inset(0 -4px);
  }
  .story__tip {
    display: block;
    position: sticky;
    top: calc(50vh + 7px);
    height: 0;
  }
  .story__tip::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2px;
    height: 400vh;
    background: var(--blue-600);
  }
  .story__dot {
    display: block;
    position: sticky;
    top: 50vh;
    width: 14px;
    height: 14px;
    margin-left: -6px;
    border-radius: 50%;
    background: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(34, 143, 251, .18);
  }
}

@supports (animation-timeline: view()) and (timeline-scope: --a) {
  @media (prefers-reduced-motion: no-preference) {

    /* each chapter: the image swings in from its side, the text comes and goes */
    .chapter__art {
      animation: art-swing linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    /* 2D only on purpose: any 3D transform (rotateY, perspective) makes the
       browser paint the layer at low resolution and the text goes pixelated.
       The "turning" is a horizontal squash plus a skew, flat at rest. */
    @keyframes art-swing {
      0% { opacity: 0; transform: translateX(calc(var(--dir) * 12%)) scaleX(.62) skewY(calc(var(--dir) * 6deg)) rotate(calc(var(--dir) * 9deg)) scale(.88); }
      /* scale(1), not none: the browser picks the paint resolution from the
         largest scale in the keyframes, so the peak must be 1, not .96 */
      35%, 65% { opacity: 1; transform: scale(1); }
      100% { opacity: .35; transform: translateX(calc(var(--dir) * -4%)) scaleX(.9) skewY(calc(var(--dir) * -2deg)) rotate(calc(var(--dir) * -2deg)) scale(.96); }
    }
    .chapter__text {
      animation: text-pass linear both;
      animation-timeline: view();
      animation-range: cover 5% cover 95%;
    }
    @keyframes text-pass {
      0% { opacity: 0; transform: translateY(2.5rem); }
      28%, 68% { opacity: 1; transform: none; }
      100% { opacity: 0; transform: translateY(-2rem); }
    }
  }
}

/* ==== Cierre ==== */
.close {
  position: relative;
  padding: var(--band-pad) 0 clamp(4rem, 8vw, 6rem);
  overflow-x: clip;
}
.close::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(42rem 32rem at 78% 70%, rgba(34, 143, 251, .2), transparent 70%);
  pointer-events: none;
}
.close__title {
  font-size: clamp(2.3rem, .3rem + 9vw, 8.5rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .9;
  letter-spacing: -.04em;
  color: #fff;
}
.close__title span { display: block; }
.close__title span + span { color: var(--blue-600); }
.close__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 3rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.close__body p { max-width: 40ch; font-size: 1.2rem; color: var(--on-muted); }
.close__body p + p { margin-top: .6rem; }
.close__body .btn { margin-top: 2rem; }
/* if the mailto opens nothing, the address can still be copied: one click selects it */
.close__body .close__copy { margin-top: 1rem; font-size: .95rem; }
.copyable {
  -webkit-user-select: all;
  user-select: all;
  font-weight: 650;
  color: var(--on);
}
.close__device { perspective: 1400px; }
.close__device .device { --rz: 0deg; margin-inline: auto; width: 15rem; }

@media (max-width: 860px) {
  .close__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* «próximamente» spans the column: bigger than the hero headline */
  .close__title { font-size: 12.6vw; font-stretch: 100%; }
  .close__body .btn { width: 100%; white-space: normal; text-align: center; }
  .close__device .device { width: 13rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .close__device .device { --ry: -22deg; --rx: 8deg; --rz: 5deg; }
}

@supports (animation-timeline: view()) and (timeline-scope: --a) {
  @media (prefers-reduced-motion: no-preference) {
    /* Cierre: the phone straightens a little as it arrives */
    .close__device .device {
      animation: close-phone linear both;
      animation-timeline: view();
      animation-range: entry 0% contain 40%;
    }
    @keyframes close-phone {
      from { transform: rotateY(-34deg) rotateX(14deg) rotateZ(9deg) translateY(4rem); }
      to { transform: rotateY(-22deg) rotateX(8deg) rotateZ(5deg); }
    }
    .close__title span { animation: title-slide linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
    .close__title span + span { animation-name: title-slide-r; }
    @keyframes title-slide { from { transform: translateX(-8%); } to { transform: none; } }
    @keyframes title-slide-r { from { transform: translateX(8%); } to { transform: none; } }
  }
}

/* ==== Alternativa sin animaciones de scroll ==== */
/* Browsers without scroll-driven animations get state, not continuous motion:
   main.js marks the active step and reveals blocks once. */
.fx-fallback .step__card::before { opacity: 0; transition: opacity .4s var(--ease-out); }
.fx-fallback .step.is-active .step__card::before { opacity: 1; }
.fx-fallback .step__card { transition: transform .5s var(--ease-out); transform: scale(.96); }
.fx-fallback .step.is-active .step__card { transform: none; }

@media (min-width: 961px) {
  .fx-fallback .screen { transition: opacity .45s var(--ease-out); }
  .fx-fallback .how[data-step="2"] .screen--voice,
  .fx-fallback .how[data-step="3"] .screen--voice { opacity: 0; }
  .fx-fallback .how[data-step="2"] .screen--photo,
  .fx-fallback .how[data-step="3"] .screen--pdf { opacity: 1; }
  .fx-fallback .ctl::before { transition: opacity .3s var(--ease-out); }
  .fx-fallback .how[data-step="2"] .ctl--mic::before,
  .fx-fallback .how[data-step="3"] .ctl--mic::before { opacity: 0; }
  .fx-fallback .how[data-step="2"] .ctl--cam::before,
  .fx-fallback .how[data-step="3"] .ctl--doc::before { opacity: 1; }
}

.fx-fallback [data-reveal] {
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.fx-fallback [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(2rem); }
