/* Wallas Transcribe - estilos compartidos */
:root {
  --accent: #6D3FE0;
  --accent-2: #5A2DCF;
  --on-accent: #FFFFFF;
  --bg: #F6F4FA;
  --surface: #FFFFFF;
  --text: #16121F;
  --muted: #4D4760;
  --line: #E4DFEE;
  --field: #767089;
  --rec: #FF5F7A;
  --tint: rgb(109 63 224 / .1);
  --shadow: 0 1px 2px rgb(22 18 31 / .04), 0 .75rem 2rem -.75rem rgb(60 30 140 / .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #B69CFF;
    --accent-2: #CBB8FF;
    --on-accent: #0E0B17;
    --bg: #0E0B17;
    --surface: #1A1526;
    --text: #F4F1FA;
    --muted: #C2BBD3;
    --line: #2E2740;
    --field: #8C84A3;
    --tint: rgb(182 156 255 / .14);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 .75rem 2rem -.75rem rgb(0 0 0 / .6);
  }
}

/* Idioma: español por defecto, inglés con el selector */
html:not([data-lang="en"]) .en { display: none !important; }
html[data-lang="en"] .es { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: .75rem 1rem; border-radius: .75rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: 1.25rem; }

/* Íconos de línea */
.i { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Encabezado */
.site-header { position: relative; z-index: 50; }
.site-header .wrap {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "nav nav";
  align-items: center; gap: .25rem 1rem; padding-block: .75rem;
}
.brand {
  grid-area: brand; display: flex; align-items: center; gap: .625rem;
  font-weight: 800; font-size: 1.125rem; letter-spacing: -.01em; color: var(--text); text-decoration: none;
  min-height: 2.75rem; justify-self: start;
}
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 22.5%; }
.nav { grid-area: nav; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .125rem;
  color: var(--text); text-decoration: none; font-weight: 600;
  text-decoration-line: underline; text-decoration-color: transparent; text-decoration-thickness: 2px;
  transition: color .2s, text-decoration-color .2s;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); text-decoration-color: currentColor; }
.lang-btn {
  grid-area: lang;
  font: inherit; font-weight: 600; color: var(--text); background: transparent;
  border: 1.5px solid var(--field); border-radius: 999px;
  padding: .5rem 1rem; min-height: 2.75rem; cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 48rem) {
  .site-header {
    position: sticky; top: 0;
    background: rgb(246 244 250 / .78);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
  }
  .site-header.scrolled { border-bottom-color: var(--line); }
  .site-header .wrap { display: flex; gap: 2rem; padding-block: .625rem; }
  .nav { margin-left: auto; gap: 0 1.75rem; }
  html { scroll-padding-top: 5.5rem; }
}
@media (min-width: 48rem) and (prefers-color-scheme: dark) {
  .site-header { background: rgb(14 11 23 / .78); }
}

/* Tipografía */
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
.hl { color: var(--accent); }
.lead { font-size: clamp(1.125rem, 2.5vw, 1.375rem); color: var(--muted); max-width: 38rem; }
.eyebrow { font-weight: 700; color: var(--accent); font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; }
.note { font-size: .9375rem; color: var(--muted); }
.stack > * + * { margin-top: 1rem; }
.intro { max-width: 44rem; }
.intro > * + * { margin-top: .75rem; }
.intro .eyebrow + h2 { margin-top: .5rem; }

main section { padding-block: 3.5rem; }
@media (min-width: 48rem) { main section { padding-block: 5rem; } }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .card, .band .steps li { background: var(--bg); }

/* Portada */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-top: 1.5rem; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36rem 30rem at 78% 40%, var(--tint), transparent 70%),
    radial-gradient(28rem 20rem at 5% 0%, rgb(255 95 122 / .06), transparent 70%);
}
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 48rem) { .hero .wrap { grid-template-columns: 1.3fr 1fr; } }
.badge-link { display: inline-block; border-radius: .6rem; transition: transform .2s var(--ease); }
.badge-link img { height: 3.25rem; width: auto; }
.badge-link:hover { transform: translateY(-2px); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-text .chips { margin-top: 1.5rem; }
.chips li {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .375rem .875rem .375rem .625rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .9375rem; font-weight: 600;
}
.chips .i { width: 1.125rem; height: 1.125rem; color: var(--accent); stroke-width: 2.5; }

/* Ilustración del iPhone */
.hero-art { position: relative; display: grid; justify-items: center; gap: 1.25rem; }
.phone {
  position: relative; width: min(19rem, 72vw); aspect-ratio: 9 / 19;
  padding: .625rem; border-radius: 3rem; background: #16121F;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08) inset, 0 2rem 4rem -1.5rem rgb(60 30 140 / .5), 0 0 0 1px var(--line);
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 2.4rem;
  background: #0E0B17; color: #F4F1FA; display: flex; flex-direction: column; font-size: .9375rem;
}
.app-head {
  background: #6D3FE0; color: #FFFFFF; padding: 2.75rem 1rem 1rem; border-radius: 0 0 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: .375rem;
}
.island { position: absolute; top: .625rem; left: 50%; translate: -50% 0; width: 32%; height: 1.5rem; border-radius: 999px; background: #000; }
.status { position: absolute; top: .75rem; inset-inline: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: .8125rem; font-weight: 700; }
.batt { width: 1.375rem; height: .6875rem; border: 1.5px solid currentColor; border-radius: .25rem; position: relative; opacity: .9; }
.batt::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: currentColor; border-radius: 1px; }
.nav-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .375rem; }
.pill { background: rgb(255 255 255 / .2); border-radius: 999px; padding: .3rem .8rem; font-weight: 600; font-size: .875rem; }
.dots { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: rgb(255 255 255 / .2); font-size: .5rem; letter-spacing: .1em; }
.date { font-size: 1.625rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.meta { font-size: .8125rem; opacity: .92; }
.player { display: flex; align-items: center; gap: .625rem; background: rgb(0 0 0 / .18); border-radius: 1rem; padding: .625rem .75rem; margin-top: .375rem; }
.player .play { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #FFFFFF; display: grid; place-items: center; flex-shrink: 0; }
.player .play svg { width: 1rem; height: 1rem; fill: #6D3FE0; margin-left: 2px; }
.pl-body { flex: 1; min-width: 0; display: grid; gap: .25rem; }
.wave { display: flex; align-items: center; gap: 2px; height: 1.375rem; }
.wave i { flex: 1; height: var(--h); border-radius: 2px; background: rgb(255 255 255 / .55); }
.times { display: flex; justify-content: space-between; font-size: .6875rem; font-variant-numeric: tabular-nums; opacity: .92; }
.body { display: grid; padding: 1.125rem 1rem; }
.body > * { grid-area: 1 / 1; }
.working {
  align-self: start; display: grid; gap: .5rem; visibility: hidden;
  background: #1A1526; border: 1.5px dashed #7C5CE6; border-radius: 1rem; padding: .75rem .875rem;
}
.working .lbl { font-weight: 700; font-size: .875rem; }
.working .wave i { background: #B69CFF; }
.words { font-size: 1.3125rem; line-height: 1.55; font-weight: 500; }
.hlt { background: rgb(109 63 224 / .45); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.dock {
  position: absolute; bottom: 1.25rem; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 1rem; padding: .3rem 1rem .3rem .3rem;
  background: #FFFFFF; color: #6D3FE0; border-radius: 999px; box-shadow: 0 .5rem 1.5rem rgb(109 63 224 / .45);
}
.dock .pause { display: inline-flex; align-items: center; gap: .375rem; background: #6D3FE0; color: #FFFFFF; border-radius: 999px; padding: .45rem .9rem; font-weight: 700; font-size: .875rem; font-variant-numeric: tabular-nums; }
.dock svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock .pause svg { width: .875rem; height: .875rem; fill: currentColor; stroke: none; }
.hero-icon {
  position: absolute; top: 68%; left: max(0rem, calc(50% - min(19rem, 72vw) / 2 - 2.25rem));
  width: clamp(4rem, 14vw, 5.5rem); border-radius: 22.5%;
  box-shadow: 0 1rem 2rem -.5rem rgb(60 30 140 / .45);
}
.replay {
  display: none; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1rem;
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.replay .i { width: 1.125rem; height: 1.125rem; }
.replay:hover { color: var(--accent); }

/* Tarjetas y pasos */
.cards {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.5rem; }
.card h3 { margin-top: 1rem; }
.card p { color: var(--muted); margin-top: .5rem; }
.tile { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .875rem; background: var(--tint); color: var(--accent); }
.steps {
  counter-reset: paso; list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.steps li {
  counter-increment: paso; background: var(--surface); border: 1px solid var(--line);
  border-radius: 1.5rem; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  font-size: 1.125rem; font-weight: 600;
}
.steps li::before {
  content: counter(paso); display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800;
}
.rec { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--rec); margin-right: .45em; vertical-align: .1em; }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.625rem, 3vw, 2rem); margin: 2.5rem auto 0; padding: 0; list-style: none; max-width: 56rem; align-items: start; }
.shots img { border-radius: clamp(.75rem, 3vw, 2.25rem); border: 1px solid var(--line); box-shadow: var(--shadow); }
.shots li:nth-child(2) { position: relative; top: clamp(-2.5rem, -4vw, -1rem); }

/* Privacidad */
.panel {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); border-radius: 2rem; padding: clamp(2rem, 6vw, 4.5rem);
  display: grid; gap: 2rem; align-items: center;
}
@media (min-width: 48rem) { .panel { grid-template-columns: 1fr auto; } }
.panel-text > * + * { margin-top: 1rem; }
.panel .eyebrow, .panel .lead, .panel a { color: inherit; }
.panel .eyebrow { opacity: .85; }
.panel a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
.panel :focus-visible { outline-color: var(--on-accent); }
.checks { list-style: none; padding: 0; font-size: 1.125rem; }
.checks li { display: flex; gap: .625rem; align-items: flex-start; }
.checks li + li { margin-top: .625rem; }
.checks li::before {
  content: ""; flex-shrink: 0; width: 1.375rem; height: 1.375rem; margin-top: .15rem; border-radius: 50%;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M7.5 12.5l3 3L16.5 9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M7.5 12.5l3 3L16.5 9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.shield { width: clamp(7rem, 18vw, 12rem); height: auto; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; opacity: .9; justify-self: center; }
@media (max-width: 47.99rem) { .shield { display: none; } }

.cta { text-align: center; }
.cta .wrap { display: grid; justify-items: center; gap: 1rem; }
.cta .lead { margin-inline: auto; }
.cta .badge-link { margin-top: .75rem; }
.cta-icon { width: 5.5rem; border-radius: 22.5%; box-shadow: 0 1rem 2rem -.75rem rgb(60 30 140 / .45); margin-bottom: .5rem; }

/* Textos largos */
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.prose p, .prose ul { margin-top: .75rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: .5rem; }

/* Preguntas frecuentes */
.faq { display: grid; gap: .75rem; margin-top: 1.5rem; max-width: 48rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 1.25rem; transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--field); box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.125rem 1.25rem; font-weight: 700; border-radius: 1.25rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.75rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--tint); font-size: 1.375rem; line-height: 1; color: var(--accent); flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.25rem 1.25rem; color: var(--muted); }

/* Formulario */
.form { display: grid; gap: 1.25rem; max-width: 36rem; margin-top: 1.5rem; }
.field { display: grid; gap: .375rem; }
.field label { font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--field); border-radius: .875rem; padding: .75rem 1rem; min-height: 2.75rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--accent); }
.field textarea { min-height: 9rem; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  min-height: 3rem; padding: .75rem 1.75rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease), filter .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Pie de página */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: .9375rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1rem; }
.foot-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--text); font-size: 1rem; }
.foot-brand img { width: 1.75rem; height: 1.75rem; border-radius: 22.5%; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.site-footer nav a { color: var(--text); display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-footer p { max-width: 48rem; }

/* --- Animaciones ---
   Solo si la persona no pidió reducir el movimiento (lang.js agrega la clase "anim").
   Ninguna se repite sin fin y la de la portada dura menos de 5 segundos. */
@media (prefers-reduced-motion: no-preference) {
  .anim .reveal {
    opacity: 0; transform: translateY(1.5rem);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
  }
  .anim .reveal.in { opacity: 1; transform: none; }

  .anim .replay { display: inline-flex; }

  /* Portada: el audio se transcribe y aparece el texto, una sola vez */
  .anim .demo .working .wave i { background: rgb(182 156 255 / .25); }
  .anim .demo .hlt { background-color: transparent; }
  .anim .demo .words .hlt span, .anim .demo .dock { opacity: 0; }

  .anim .demo.play .working { animation: show 1.9s .2s; }
  .anim .demo.play .working .wave i { animation: fillbar .3s var(--ease) forwards; animation-delay: calc(.45s + var(--b) * 55ms); }
  .anim .demo.play .words .hlt span { display: inline-block; animation: word .45s var(--ease) forwards; animation-delay: calc(2.1s + var(--w) * 70ms); }
  .anim .demo.play .hlt { animation: hl .6s 3.4s var(--ease) forwards; }
  .anim .demo.play .dock { animation: rise .5s 3.5s var(--ease) forwards; }

  .anim .rec.in, .anim .in .rec { animation: pulse 1.4s ease-in-out 3; }

  @keyframes fillbar { 50% { transform: scaleY(1.35); } to { background: #B69CFF; transform: none; } }
  @keyframes hl { to { background-color: rgb(109 63 224 / .45); } }
  @keyframes show { 0%, 100% { visibility: visible; } }
  @keyframes word { from { opacity: 0; transform: translateY(.4em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 95 122 / .55); } 60% { box-shadow: 0 0 0 .4em rgb(255 95 122 / 0); } }
}
@media print { .reveal { opacity: 1 !important; transform: none !important; } }
