/* =========================================================
   Lorena Hurtado Santos · Logopeda
   Paleta: verde oscuro + crema · Estilo corporativo y sereno
   ========================================================= */

:root {
  --verde-900: #16302a;
  --verde-800: #1f3d34;
  --verde-700: #2c5246;
  --verde-500: #5d8174;
  --verde-100: #dfe7e1;
  --crema-50:  #fbf8f2;
  --crema-100: #f4eee3;
  --crema-200: #e9dfcd;
  --dorado:    #b08d57;
  --terracota: #b8644a;
  --tinta:     #1b221f;
  --texto:     #3d4642;
  --suave:     #5c6661;
  --terracota-texto: #9c4f37;
  --wa:        #1a7d44;
  --linea:     #ddd4c3;

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radio: 14px;
  --sombra: 0 1px 2px rgba(22, 48, 42, .06), 0 12px 32px -12px rgba(22, 48, 42, .18);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--crema-50);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }

/* Enlace "Saltar al contenido": primera parada del tabulador */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--verde-800); color: var(--crema-50);
  padding: .7rem 1.1rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: top .16s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Superficies del navegador con la paleta de la marca */
html { scrollbar-color: var(--verde-500) var(--crema-100); accent-color: var(--verde-800); }
::selection { background: rgba(184, 100, 74, .22); color: var(--tinta); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--verde-800);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: 0;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.nowrap { white-space: nowrap; }

.lead { font-size: 1.15rem; color: var(--texto); max-width: 34em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--verde-800);
  background: var(--verde-800);
  color: var(--crema-50);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--verde-800); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--verde-900); }
  .btn--ghost:hover { background: var(--verde-800); color: var(--crema-50); }
}
.btn--small { padding: .6rem 1.15rem; font-size: .88rem; }

/* Botón "escribiendo…": al pasar el ratón aparece una burbuja de chat
   con los tres puntos de "está escribiendo", como en WhatsApp */
.btn--voice { position: relative; }
.typing {
  position: absolute; right: -6px; top: -16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 44px; height: 26px;
  border-radius: 13px 13px 13px 4px;
  background: #fff;
  box-shadow: 0 6px 16px -6px rgba(22, 48, 42, .35);
  opacity: 0; pointer-events: none;
  transform: scale(.6) translateY(6px); transform-origin: bottom left;
  transition: opacity .15s ease, transform .15s ease;
}
.typing i { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--verde-800); }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  .btn--voice:hover .typing {
    opacity: 1; transform: none;
    transition: opacity .2s var(--ease), transform .25s var(--ease);
  }
  .btn--voice:hover .typing i { animation: typing 1s ease-in-out infinite; }
  .btn--voice:hover .typing i:nth-child(2) { animation-delay: .15s; }
  .btn--voice:hover .typing i:nth-child(3) { animation-delay: .3s; }
}
.btn--full { width: 100%; }

:focus-visible { outline: 2px solid var(--dorado); outline-offset: 3px; border-radius: 6px; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, .88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--linea); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand__mark { width: 42px; height: auto; color: var(--verde-800); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--serif); font-weight: 500; font-size: 1.08rem; color: var(--tinta); }
.brand__text small { font-size: .78rem; color: var(--suave); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  text-decoration: none;
  font-size: .94rem;
  font-weight: 500;
  color: var(--texto);
  position: relative;
}
/* Menú: al pasar el ratón, el texto se pone verde y aparece debajo un punto terracota */
.nav a:not(.btn) { transition: color .2s ease; }
.nav a:not(.btn)::after {
  content: "";
  position: absolute; left: 50%; bottom: -10px;
  width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%;
  background: var(--terracota);
  opacity: 0;
  transform: translateY(4px) scale(.5);
  transition: opacity .15s ease, transform .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--verde-800); }
  .nav a:not(.btn):hover::after {
    opacity: 1; transform: none;
    transition: opacity .2s var(--ease), transform .25s var(--ease);
  }
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 11px; top: 21px; width: 22px; height: 1.5px;
  background: var(--tinta);
  transition: transform .22s var(--ease);
}
.nav-toggle span:first-child { transform: translateY(-3.5px); }
.nav-toggle span:last-child { transform: translateY(3.5px); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.nav-toggle:active { transform: scale(.94); }
.nav-toggle { transition: transform .16s var(--ease); -webkit-tap-highlight-color: transparent; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.6vw, 5.2rem); line-height: 1.02; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--terracota); }
.hero .lead { margin-top: 1.5rem; }
.hero .lead strong { color: var(--verde-800); font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.25rem; }

.hero__media { position: relative; }
.hero__media::before {
  content: "";
  position: absolute; z-index: -1;
  width: 78%; aspect-ratio: 1;
  right: -12%; top: -8%;
  border-radius: 50%;
  background: var(--verde-800);
}
.hero { position: relative; overflow: hidden; isolation: isolate; }

/* Panel de la portada: logo hasta que haya foto (misma forma de arco) */
.hero__logo, .hero__photo {
  aspect-ratio: 4 / 5;
  border-radius: 200px 200px var(--radio) var(--radio);
  box-shadow: 0 30px 60px -30px rgba(22, 48, 42, .35);
}
.hero__logo {
  background: var(--crema-100);
  border: 1px solid var(--crema-200);
  display: grid; place-items: center;
  color: var(--verde-800);
}
.hero__logo svg { width: 58%; height: auto; }
.hero__photo { width: 100%; object-fit: cover; display: block; }


/* ---------- Secciones ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section--light { background: var(--crema-100); }
.section--dark { background: var(--verde-800); color: var(--crema-200); }
.section--dark h2, .section--dark h3 { color: var(--crema-50); }
.section__head { max-width: 640px; margin-bottom: 3.5rem; }
.section__intro { color: var(--suave); }
.note { font-size: .9rem; font-style: italic; }

/* Sobre mí */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--verde-700);
  margin-top: 1.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--dorado);
}
.about__text { max-width: 38em; padding-top: 2.4rem; }
.about__title { font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1.02; margin-bottom: .9rem; }
.about__role {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--terracota-texto); margin: 0;
}
.about__role::before { content: ""; width: 2.25rem; height: 2px; background: var(--terracota); }
.about__close { font-weight: 600; color: var(--verde-800); margin-bottom: 0; }

.values {
  list-style: none; padding: 0; margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.values li {
  background: var(--crema-50);
  border-radius: var(--radio);
  padding: 2rem 1.75rem;
}
.values h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.values p { font-size: .95rem; margin: 0; color: var(--texto); }
.values__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--terracota);
  display: grid; place-items: center;
  margin-bottom: 1.25rem;
}
.values__icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: #fff; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.values__icon svg [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (hover: hover) and (pointer: fine) {
  .values li:hover .values__icon svg [pathLength] { animation: trace .7s var(--ease-in-out) both; }
  .values li:hover .values__icon svg [pathLength]:nth-child(2) { animation-delay: .12s; }
  .values li:hover .values__icon svg [pathLength]:nth-child(3) { animation-delay: .24s; }
  .values li:hover .values__icon svg [pathLength]:nth-child(4) { animation-delay: .36s; }
}
@media (prefers-reduced-motion: reduce) {
  .values li:hover .values__icon svg [pathLength] { animation: none; }
}

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 2rem 1.75rem;
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .2s ease;
}
.card p { font-size: .96rem; flex: 1; margin: 0; }
.card h3 { font-size: 1.3rem; }
.card__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #f6e6df;
  display: grid; place-items: center;
  margin-bottom: 1.5rem;
  transition: background-color .2s ease;
}
.card__icon svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--terracota); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .2s ease;
}
/* Las tarjetas de servicios no son enlaces: sin "subir" al pasar el ratón
   (sugeriría que se pueden pulsar). Solo un cambio de color tranquilo. */
/* Iconos que se dibujan trazo a trazo al pasar el ratón (pathLength lo pone script.js) */
.card__icon svg [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__icon svg [pathLength] { animation: trace .7s var(--ease-in-out) both; }
  .card:hover .card__icon svg [pathLength]:nth-child(2) { animation-delay: .12s; }
  .card:hover .card__icon svg [pathLength]:nth-child(3) { animation-delay: .24s; }
  .card:hover .card__icon svg [pathLength]:nth-child(4) { animation-delay: .36s; }
  .card:hover { border-color: var(--terracota); }
  .card:hover .card__icon { background: var(--terracota); }
  .card:hover .card__icon svg { stroke: #fff; }
}

/* Cómo trabajo */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem;
}
.steps li { border-top: 1px solid rgba(233, 223, 205, .3); padding-top: 1.5rem; }
.steps__num { font-family: var(--serif); font-size: 2.4rem; color: var(--dorado); display: block; margin-bottom: .75rem; }
.steps p { font-size: .95rem; color: var(--crema-200); opacity: .85; }

/* Segundo momento de autor (solo escritorio): una línea dorada recorre los 5 pasos
   y cada paso se "enciende" con un punto al llegar. Ocurre una sola vez. */
@media (min-width: 981px) {
  .steps { position: relative; }
  .steps::after {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
    background: var(--dorado);
    transform: scaleX(0); transform-origin: left center;
  }
  .steps li { position: relative; }
  .steps li::before {
    content: ""; position: absolute; left: 0; top: -5px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--dorado);
    box-shadow: 0 0 0 4px var(--verde-800);
    transform: scale(0);
  }
  .steps.is-drawn::after { transform: scaleX(1); transition: transform 2s var(--ease-in-out) .15s; }
  .steps.is-drawn li::before { transform: scale(1); transition: transform .35s var(--ease); }
  .steps.is-drawn li:nth-child(1)::before { transition-delay: .15s; }
  .steps.is-drawn li:nth-child(2)::before { transition-delay: .55s; }
  .steps.is-drawn li:nth-child(3)::before { transition-delay: .95s; }
  .steps.is-drawn li:nth-child(4)::before { transition-delay: 1.35s; }
  .steps.is-drawn li:nth-child(5)::before { transition-delay: 1.75s; }
}
@media (min-width: 981px) and (prefers-reduced-motion: reduce) {
  .steps::after, .steps li::before { transform: none !important; transition: none !important; }
}

/* Testimonios */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.quote {
  margin: 0;
  background: var(--crema-50);
  border-radius: var(--radio);
  padding: 2.25rem 2rem 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--linea);
  position: relative;
}
.quote::before {
  content: "“";
  font-family: var(--serif);
  font-size: 4.5rem; line-height: 1;
  color: var(--terracota);
  display: block; height: 2.2rem;
}
.quote blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--tinta);
}
.quote figcaption { display: flex; flex-direction: column; font-size: .88rem; }
.quote figcaption strong { color: var(--verde-800); }
.quote figcaption span { color: var(--suave); }

/* Contacto */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact__list li {
  display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--linea);
}
.contact__label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--suave); padding-top: .2rem; }
.contact__list a { color: var(--verde-800); font-weight: 600; text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }
.contact__phone { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.contact__big { font-family: var(--serif); font-size: 1.5rem; font-weight: 500 !important; }
.contact__chips { display: flex; gap: .4rem; }
.contact__list .chip {
  font-size: .8rem; padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--verde-800); text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.contact__list .chip:active { transform: scale(.96); }
.contact__list .chip--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .contact__list .chip:hover { background: var(--verde-800); color: var(--crema-50); text-decoration: none; }
  .contact__list .chip--wa:hover { background: #146636; border-color: #146636; color: #fff; }
}

.form {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: calc(var(--radio) + 4px);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--sombra);
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__row { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.form label { font-size: .86rem; font-weight: 600; color: var(--tinta); margin-bottom: .4rem; }
.form input, .form select, .form textarea {
  font: inherit; font-size: .96rem;
  padding: .8rem .95rem;
  border: 1px solid var(--linea);
  border-radius: 10px;
  background: var(--crema-50);
  color: var(--tinta);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--verde-500); background: #fff;
  box-shadow: 0 0 0 3px rgba(93, 129, 116, .18);
}
.form .is-invalid { border-color: #b4543f; }
.form__check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; color: var(--texto) !important; margin: .4rem 0 1.4rem; }
.form__check input { margin-top: .25rem; accent-color: var(--verde-800); }
.form__status { margin: 1rem 0 0; font-size: .92rem; min-height: 1.4em; }
.form__status:empty { display: none; }
.form__status.ok, .form__status.err { padding: .85rem 1rem; border-radius: 10px; }
.form__status.ok { color: var(--verde-800); background: var(--verde-100); }
.form__status.err { color: #8f3d2b; background: #f8e6df; }
.form__status a { color: inherit; font-weight: 700; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form.is-sending .btn { opacity: .75; cursor: progress; }
.btn:disabled { cursor: progress; }

/* Pie */
.footer { background: var(--verde-900); color: var(--crema-200); padding: 3rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand--footer .brand__mark { color: var(--crema-100); }
.brand--footer strong { color: var(--crema-50); }
.brand--footer small { color: var(--crema-200); opacity: .7; }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a { font-size: .88rem; text-decoration: none; opacity: .8; }
.footer__links a:hover { opacity: 1; text-decoration: underline; }
.footer__copy { margin: 0; font-size: .85rem; opacity: .6; }

/* Páginas legales */
.legal { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .3rem; }
.legal__updated { color: var(--suave); font-size: .9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.45rem; margin: 2.5rem 0 .75rem; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: .4rem; }
.legal li::marker { color: var(--terracota); }
.legal a { color: var(--verde-800); font-weight: 600; }
.legal__links { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.legal-page .footer__links a[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* WhatsApp flotante */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.35);
  transition: transform .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.whatsapp:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .whatsapp:hover { transform: scale(1.05); }
  .whatsapp:hover:active { transform: scale(.97); }
}
.whatsapp svg { width: 30px; height: 30px; fill: #fff; }

/* Saludo: un pequeño gesto del botón y una burbuja "¿Hablamos?", una sola vez */
@keyframes nudge {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(3deg); }
}
.whatsapp.is-greeting svg { animation: nudge .7s var(--ease) both; }
.whatsapp__bubble {
  position: absolute; right: calc(100% + 12px); top: 50%;
  white-space: nowrap;
  background: #fff; color: var(--tinta);
  font-size: .9rem; font-weight: 600;
  padding: .55rem .9rem; border-radius: 999px;
  box-shadow: 0 8px 24px -10px rgba(22, 48, 42, .45);
  transform-origin: right center;
  transform: translateY(-50%);
  opacity: 0;
  /* Ciclo de 16 s: aparece, se queda 6 s, desaparece y espera ~9 s antes de volver */
  animation: bubble-cycle 16s var(--ease) 2s infinite;
}
@keyframes bubble-cycle {
  0%         { opacity: 0; transform: translateY(-50%) scale(.95) translateX(6px); }
  3%, 40%    { opacity: 1; transform: translateY(-50%) scale(1) translateX(0); }
  43%, 100%  { opacity: 0; transform: translateY(-50%) scale(.97) translateX(4px); }
}

/* Portada: entrada escalonada al cargar (solo la primera vez) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
.hero__text > * { animation: rise .6s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: 70ms; }
.hero__text > :nth-child(3) { animation-delay: 140ms; }
.hero__media { animation: rise .7s var(--ease) 120ms both; }

/* Momento de autor: la onda del logo se dibuja como una voz que empieza a hablar */
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.brand__wave {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 1.4s var(--ease-in-out) .35s both;
}

/* Movimiento reducido: solo fundidos suaves, sin desplazamientos */
@media (prefers-reduced-motion: reduce) {
  .hero__text > *, .hero__media, .brand__wave { animation: none; }
  .btn--voice:hover .typing i, .card:hover .card__icon svg [pathLength], .whatsapp.is-greeting svg { animation: none !important; }
  .nav a:not(.btn)::after { transition: none; }
  .whatsapp__bubble { animation: none; opacity: 1; }
  .card, .card__icon, .card__icon svg, .nav, .nav-toggle span, .skip-link { transition: none; }
  .btn:active, .whatsapp:active, .contact__list .chip:active, .nav-toggle:active { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards, .quotes { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--crema-50);
    border-bottom: 1px solid var(--linea);
    padding: .5rem 20px 1.5rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  }
  .nav.is-open {
    opacity: 1; transform: none; visibility: visible;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s;
  }
  .nav a:not(.btn) { padding: 1rem 0; border-bottom: 1px solid var(--linea); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.25rem; }

  .hero__grid, .about, .contact { grid-template-columns: 1fr; }
  .about__text { padding-top: 0; }
  .hero__media { max-width: 420px; width: 100%; margin-inline: auto; }
  .hero__logo, .hero__photo { aspect-ratio: 4 / 3.4; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .brand__text strong { font-size: .98rem; }
  .cards, .quotes, .steps, .values, .form__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { gap: 1.5rem; }
  .contact__list li { grid-template-columns: 1fr; gap: .2rem; }
  /* Zonas táctiles de 44px y separadas */
  .brand { min-height: 44px; }
  .contact__list a { display: inline-flex; align-items: center; min-height: 44px; }
  .form__check input { width: 20px; height: 20px; flex: none; margin-top: 0; }
  .contact__chips { gap: .6rem; }
  .contact__list .chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 1.1rem; font-size: .9rem; }
  .footer__links { flex-wrap: wrap; gap: .25rem 1rem; }
  .footer__links a { display: inline-flex; align-items: center; min-height: 44px; }
  /* Que el botón flotante de WhatsApp no tape el final del pie */
  .footer { padding-bottom: 6rem; }
}
