/* =========================================================================
   EasyPills Learning Studio · estilos
   Marca: Poppins (titulares) + Open Sans (texto). Paleta del Intro deck.
   ========================================================================= */

/* ---------- Fuentes (alojadas en el propio sitio) ---------- */
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-200.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../assets/fonts/opensans-var.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../assets/fonts/opensans-italic-var.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #141414;
  --ink-2: #16161D;
  --card-dark: #23232E;
  --text: #33333D;
  --muted: #6B6B76;
  --on-dark: #C9C9D2;
  --on-dark-2: #B6B6C0;
  --soft: #F4F4F6;
  --line: #E2E2E8;
  --white: #FFFFFF;

  --cyan: #4FD0EE;
  --coral: #FF8278;
  --pink: #F5B5BE;
  --blue: #558ACC;

  /* Recuadros de marca: relleno suave + contorno del mismo tono */
  --cyan-soft: #E6F8FD;
  --pink-soft: #FCEEF0;
  --blue-soft: #E8EFF8;
  --cyan-line: #4FD0EF;
  --pink-line: #E5A9B1;
  --meter-track: #5A3B40;

  --font-head: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  --radius: 24px;
  --radius-lg: 30px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --section-y: clamp(72px, 10vw, 136px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.2vw + 15.3px, 17.5px);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 4.6vw + 0.9rem, 5rem); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 2.6vw + 0.9rem, 3.25rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 0.5vw + 1.05rem, 1.5rem); }
h4 { font-size: 1.2rem; }
.h3 { font-size: clamp(1.4rem, 1.1vw + 1rem, 2rem); }
.h4 { font-size: clamp(1.2rem, 0.6vw + 1rem, 1.5rem); }
.h5 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

p { margin: 0 0 1em; }
a { color: inherit; }
strong { font-weight: 700; color: var(--ink); }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Piezas reutilizables ---------- */
.pill {
  display: inline-block;
  width: 34px;
  height: 12px;
  border-radius: 999px;
  background: var(--ink);
  flex: none;
}
.pill-cyan { background: var(--cyan); }
.pill-coral { background: var(--coral); }
.pill-pink { background: var(--pink); }
.pill-blue { background: var(--blue); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow-on-dark { color: var(--cyan); }

/* Subrayado tipo rotulador: el texto sigue en tinta y el color va detrás */
.hl {
  padding: 0 0.06em;
  background-image: linear-gradient(transparent 63%, var(--cyan) 63%, var(--cyan) 88%, transparent 88%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl-dark { color: var(--cyan); }
.thin { font-weight: 300; color: var(--muted); }

.lead {
  font-size: clamp(1.1rem, 0.45vw + 1rem, 1.32rem);
  line-height: 1.6;
  color: var(--text);
}
.lead-sm {
  font-size: clamp(1.08rem, 0.35vw + 1rem, 1.25rem);
  line-height: 1.6;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn-lg { padding: 17px 30px; font-size: 1.04rem; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--cyan); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--pink); }
.btn-cyan { background: var(--cyan); color: var(--ink); }
.btn-cyan:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  white-space: nowrap;
}
.link-arrow::after { content: "→"; transition: transform 0.2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Secciones ---------- */
.section { position: relative; padding-block: var(--section-y); }
.section-soft { background: var(--soft); }
.section-dark { background: var(--ink); color: var(--on-dark); overflow: hidden; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark strong { color: #fff; }

.section-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-intro { font-size: clamp(1.04rem, 0.3vw + 1rem, 1.18rem); color: var(--muted); max-width: 44em; }
.section-dark .section-intro { color: var(--on-dark); }

/* Píldoras decorativas que se salen del borde (como en el Intro deck) */
.deco { position: absolute; z-index: 0; border-radius: 999px; pointer-events: none; }
.section > .container { position: relative; z-index: 1; }
.deco-pill-coral { width: clamp(120px, 15vw, 210px); height: clamp(36px, 4vw, 58px); top: clamp(36px, 5vw, 64px); right: clamp(-60px, -3vw, -20px); background: var(--coral); }
.deco-pill-cyan { width: clamp(90px, 10vw, 140px); height: clamp(28px, 3vw, 42px); top: clamp(88px, 10vw, 140px); right: clamp(12px, 3vw, 44px); background: var(--cyan); }
.deco-pill-pink { width: clamp(140px, 18vw, 260px); height: clamp(36px, 4vw, 58px); bottom: clamp(40px, 6vw, 72px); left: clamp(-80px, -4vw, -30px); background: var(--pink); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  transition: box-shadow 0.3s ease;
}
/* El desenfoque va en un pseudo-elemento para no crear un bloque contenedor para el menú móvil (position: fixed) */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(20, 20, 20, 0.06); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 54px; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.nav-list { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav-list a {
  position: relative;
  padding: 6px 0;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 5px;
  border-radius: 999px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-list a:hover::after,
.nav-list a[aria-current="true"]::after { transform: scaleX(1); }

.menu-toggle { display: none; }
.nav-easy { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(28px, 4vw, 60px);
  background: var(--white);
}
.hero { padding-bottom: clamp(44px, 6.5vw, 104px); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy > * { max-width: 760px; }
.hero h1 { max-width: 11.5em; margin-bottom: 0.38em; }
.hero .lead { max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.hero-art {
  position: relative;
  z-index: 1;
  width: min(100%, 1600px);
  margin-inline: auto;
  aspect-ratio: 1362 / 633;
  /* La parte alta derecha de la ola sube al lado del texto; la izquierda queda por debajo */
  margin-top: calc(min(100vw, 1600px) * -0.18);
}
.hero-wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-easy { position: absolute; left: 58.86%; top: 61.69%; width: auto; height: 37.6%; }

/* Titular rotativo: dos preguntas (el problema) y la solución, en bucle.
   Sin JS o con "reducir movimiento": las preguntas pequeñas encima y la solución grande. */
.hero-copy > .rotator { max-width: 15em; }
.rotator { display: grid; margin-bottom: 0.3em; font-size: clamp(2.4rem, 3.6vw + 0.9rem, 4.3rem); }
.rotator-item { display: block; }
.rotator:not(.is-rotating) .rotator-item:not(.rotator-answer) {
  margin-bottom: 0.3em;
  font-size: 0.42em;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.rotator.is-rotating .rotator-item {
  grid-area: 1 / 1;
  align-self: end;
  opacity: 0;
  transform: translateY(0.3em);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rotator.is-rotating .rotator-item.is-active { opacity: 1; transform: none; }
.rotator.is-rotating .rotator-item.is-leaving { transform: translateY(-0.3em); }
.rotator.is-rotating .rotator-answer .hl { background-size: 0% 100%; transition: background-size 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.3s; }
.rotator.is-rotating .rotator-answer.is-active .hl { background-size: 100% 100%; }

.rotator-controls { display: flex; align-items: center; gap: 14px; margin: 2px 0 20px; }
.rotator-dots { display: flex; gap: 6px; }
.rotator-dots i {
  display: block;
  width: 14px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  transition: width 0.3s ease, background-color 0.3s ease;
}
.rotator-dots i.is-active { width: 32px; background: var(--coral); }
.rotator-dots i:last-child.is-active { background: var(--cyan); }
.rotator-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.rotator-toggle:hover { border-color: var(--ink); }
.rotator-icon { width: 9px; height: 10px; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.rotator-toggle.is-paused .rotator-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--ink);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  margin: -4px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-head);
  font-size: clamp(1rem, 0.35vw + 0.92rem, 1.18rem);
  font-weight: 600;
  color: var(--ink);
}
.hero-tags li + li::before { content: "·"; margin: 0 0.5em; color: var(--cyan); font-weight: 700; }

/* ---------- ¿Cómo trabajamos? ---------- */
.section.how { padding-top: clamp(48px, 5.5vw, 84px); }
.how .section-head h2 { max-width: 19em; }
.how-label { margin: 0 0 18px; font-size: clamp(1.3rem, 0.7vw + 1.05rem, 1.7rem); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
}
.how-card {
  padding: clamp(24px, 2.6vw, 32px);
  border-radius: var(--radius);
  background: var(--white);
}
.how-pill { width: 52px; height: 18px; }
.how-card h4 { margin: 20px 0 10px; font-size: 1.5rem; }
.how-card p { margin: 0; color: var(--muted); }
.how-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  margin-top: clamp(36px, 4.5vw, 56px);
}
.how-process {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 0.9vw + 1rem, 1.75rem);
  font-weight: 300;
  line-height: 1.42;
  color: var(--ink);
}
.how-process strong { font-weight: 600; }

/* ---------- El problema ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.75fr) 1.5fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.problem-art { margin: 0; }
.problem-art img { width: min(100%, 360px); margin-inline: auto; }
.problem-list h2 { margin-bottom: 26px; font-size: clamp(2.2rem, 2.8vw + 1rem, 3.6rem); }
.checklist { display: grid; gap: 10px; margin-bottom: 28px; }
.checklist li {
  position: relative;
  padding: 15px 20px 15px 58px;
  border-radius: 16px;
  background: var(--card-dark);
  color: #ECECF1;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 22px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  transform: translateY(-50%);
}
.checklist li:nth-child(4n + 2)::before { background: var(--coral); }
.checklist li:nth-child(4n + 3)::before { background: var(--pink); }
.checklist li:nth-child(4n + 4)::before { background: var(--blue); }
.problem-close {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.3rem);
  font-weight: 500;
  color: #fff;
}

/* ---------- Cinta ---------- */
.marquee {
  overflow: hidden;
  padding-block: clamp(16px, 2vw, 24px);
  background: var(--cyan);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-track > * { margin-right: clamp(22px, 3vw, 44px); flex: none; }
.marquee span {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.6vw + 0.6rem, 3.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.marquee i {
  display: block;
  width: clamp(44px, 4.5vw, 72px);
  height: clamp(16px, 1.5vw, 24px);
  border-radius: 999px;
  background: var(--ink);
}
.marquee i:nth-of-type(3n + 2) { background: #fff; }
.marquee i:nth-of-type(3n + 3) { background: var(--coral); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Tarjeta de IA híbrida ---------- */
.ai-note {
  padding: clamp(26px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-dark);
}
.ai-note p:last-child { margin: 0; font-size: 1.05rem; }
.ai-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
/* ---------- Por qué funciona ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}
.stat {
  padding: clamp(24px, 2.6vw, 32px);
  border-radius: var(--radius);
  background: var(--card-dark);
}
.stat-value {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: clamp(3rem, 4.4vw + 0.8rem, 4.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}
.stat-label { margin: 0 0 22px; color: var(--on-dark); font-size: 1.02rem; }
.meter {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--meter-track);
}
.meter > span {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transform-origin: left center;
  transition: transform 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}
.stats-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--on-dark-2); }

.science-subtitle { margin: clamp(52px, 6vw, 80px) 0 22px; font-size: clamp(1.3rem, 0.8vw + 1rem, 1.7rem); }
.methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
  margin-bottom: clamp(32px, 5vw, 72px);   /* espacio para la píldora rosa decorativa */
}
.method::before {
  content: "";
  display: block;
  width: 40px;
  height: 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--cyan);
}
.method:nth-child(2)::before { background: var(--pink); }
.method:nth-child(3)::before { background: var(--blue); }
.method h4 { margin: 0; font-size: 1.3rem; }

/* ---------- Quiénes somos ---------- */
.about-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "photo copy" ". video";
  gap: clamp(28px, 3.5vw, 44px) clamp(28px, 4vw, 64px);
  align-items: start;
}
.about-copy { grid-area: copy; max-width: 46em; }
.about-video { grid-area: video; max-width: 820px; }

/* Avatar de la fundadora: pequeño, redondo, borde finísimo */
.founder { grid-area: photo; display: grid; justify-items: center; gap: 14px; margin: 6px 0 0; text-align: center; }
.founder-photo {
  width: clamp(180px, 15vw, 220px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-caption { display: grid; gap: 2px; line-height: 1.25; }
.founder-caption strong { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; }
.founder-caption span { font-size: 0.88rem; color: var(--muted); }
.about-copy p:last-child { margin-bottom: 0; }
.about-video { margin: 0; }
.about-copy p:last-child, .about-copy .lead-sm { max-width: 34em; }
.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -34px rgba(20, 20, 20, 0.3);
}
.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* Empuja a blanco los grises muy claros del fondo del vídeo */
  filter: brightness(1.04) contrast(1.06);
}
.video-replay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.video-replay[hidden] { display: none; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.contact-copy h2 { font-size: clamp(2.3rem, 3.2vw + 1rem, 3.8rem); }
.contact-copy .lead-sm { max-width: 26em; }
.contact-easy { width: min(300px, 70%); margin-top: clamp(24px, 3vw, 40px); }

.contact-form {
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 30px 60px -38px rgba(20, 20, 20, 0.35);
}
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-family: var(--font-head); font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #CDCDD6;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(79, 208, 238, 0.45);
}
.field [aria-invalid="true"] { border-color: #C2332B; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.field-check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); }
.field-check label { font-family: var(--font-body); font-size: 0.92rem; font-weight: 400; line-height: 1.5; color: var(--text); }
.form-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FDECEA;
  color: #9E2A22;
  font-size: 0.95rem;
}
.form-status {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--ink);
  font-size: 0.95rem;
}
.contact-form .btn { width: 100%; }

/* ---------- Pie ---------- */
.site-footer {
  padding: clamp(56px, 7vw, 92px) 0 28px;
  background: var(--ink);
  color: var(--on-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-brand img { width: 230px; margin-bottom: 18px; }
.footer-brand p { max-width: 22em; margin: 0; font-family: var(--font-head); font-weight: 300; font-size: 1.1rem; color: #fff; }
.footer-title {
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
.site-footer ul { display: grid; gap: 9px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer .btn-cyan { color: var(--ink); text-decoration: none; }
.footer-cta { margin-top: 22px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }
.legal { display: flex !important; flex-wrap: wrap; gap: 20px !important; }
.cyan { color: var(--cyan); }

/* ---------- Animación de entrada ---------- */
.js .reveal {
  transform: translateY(14px);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) and (min-width: 761px) {
  /* En pantallas medianas la ola sube menos junto al texto */
  .hero-art { margin-top: calc(100vw * -0.08); }
}

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .brand img { height: 46px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px 9px 18px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle-icon { display: grid; gap: 5px; width: 18px; }
  .menu-toggle-icon span {
    display: block;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.25s ease;
  }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 32px;
    padding: 28px var(--gutter) 40px;
    background: var(--white);
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-list a { display: inline-block; padding: 8px 0; font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .nav-cta { padding: 17px 30px; font-size: 1.05rem; }
  body.menu-open { overflow: hidden; }
  .nav-easy { display: block; position: absolute; right: var(--gutter); bottom: 32px; width: auto; height: min(34vh, 260px); }

  .problem-grid { grid-template-columns: 1fr; }
  .problem-art img { width: min(60%, 280px); }
  .about-grid { grid-template-columns: 1fr; grid-template-areas: "photo" "copy" "video"; }
  .founder { justify-items: start; grid-template-columns: auto 1fr; align-items: center; column-gap: 20px; text-align: left; }
  .how-foot { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-easy { display: none; }
}

@media (max-width: 760px) {
  .hero-copy > * { max-width: none; }
  .hero-art {
    width: 225%;
    margin-top: 8px;
    margin-left: -93%;
  }
  .deco-pill-pink { display: none; }
  .deco-pill-coral { top: 20px; }
  .deco-pill-cyan { top: 64px; }
  .problem-art img { width: min(46%, 220px); }
  .stats { grid-template-columns: 1fr; }
  .methods { grid-template-columns: 1fr; gap: 28px; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  /* En móvil las etiquetas del hero pasan a ser píldoras, sin separadores sueltos al partir la línea */
  .hero-tags { gap: 8px; margin-top: 2px; font-size: 0.95rem; }
  .hero-tags li { padding: 6px 13px; border-radius: 999px; background: var(--soft); }
  .hero-tags li + li::before { content: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Protección de datos bajo el formulario: una línea que se despliega ---------- */
.form-legal { margin-top: 18px; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.form-legal-line { margin: 0; }
.form-legal-line a { color: var(--text); }
.form-legal-toggle {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.form-legal-toggle::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin: 0 0.15em 0.15em 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.form-legal-toggle[aria-expanded="true"]::after { transform: translateY(0.2em) rotate(-135deg); }
.form-legal-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 14px;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
}
.js .form-legal-info:not(.is-open) { display: none; }
.form-legal-info dt { font-weight: 600; color: var(--text); }
.form-legal-info dd { margin: 0; }

/* ---------- Páginas legales ---------- */
.legal-header { border-bottom: 1px solid var(--line); background: var(--white); }
.legal-main { padding-block: clamp(44px, 7vw, 96px); }
.legal-doc { max-width: 760px; }
.legal-doc h1 { margin-bottom: 0.25em; font-size: clamp(2.2rem, 3vw + 1rem, 3.4rem); }
.legal-doc h2 { margin: 2.2em 0 0.6em; font-size: clamp(1.2rem, 0.6vw + 1rem, 1.4rem); }
.legal-doc ul { padding-left: 1.2em; }
.legal-doc li { margin-bottom: 0.5em; }
.legal-doc a { color: var(--ink); text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal-meta { color: var(--muted); font-size: 0.92rem; }
.legal-data {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0 0 1em;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--soft);
}
.legal-data dt { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.legal-data dd { margin: 0; }
.legal-footer { padding-top: 0; }
.legal-footer .footer-bottom { margin-top: 0; border-top: 0; }
.legal a[aria-current="page"] { color: #fff; }
@media (max-width: 520px) {
  .legal-data, .form-legal-info { grid-template-columns: 1fr; gap: 2px; }
  .legal-data dd { margin-bottom: 10px; }
}
