/* ===== Valmir AI Systems — estilos ===== */

/* Tipografía Jost alojada en nuestro servidor (sin Google Fonts). Es una fuente variable: un archivo cubre los pesos 300-600. */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #05070D;
  --bg-alt: #080B16;
  --surface: #0D1222;
  --border: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --text-soft: #A9B1C7;
  --blue: #1A4BFF;
  --blue-light: #3AA8FF;
  --blue-dark: #0A1F7A;
  --gradient: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 55%, var(--blue-dark) 100%);
  --radius: 14px;
  --container: 1160px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 12px var(--blue-light);
}

.lead { margin-top: 20px; font-size: 1.15rem; color: var(--text-soft); max-width: 560px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(26, 75, 255, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(58, 168, 255, 0.45); }
.btn--ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; }
.btn--ghost:hover { border-color: var(--blue-light); box-shadow: none; }
.btn--small { padding: 9px 20px; font-size: 0.8rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ===== Encabezado ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
/* "V" del logo con fondo transparente (logo-v.png). El recorte quita el margen vacío de arriba y abajo. */
.brand__mark { position: relative; width: 44px; height: 32px; overflow: hidden; flex-shrink: 0; }
.brand__mark img {
  position: absolute;
  top: -10px;
  left: 0;
  width: 44px;
  max-width: none;
  height: auto;
}
.brand__name { font-size: 1.15rem; font-weight: 400; letter-spacing: 0.4em; }
.brand__name small { display: block; font-size: 0.6rem; letter-spacing: 0.5em; color: var(--text-soft); }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a:not(.btn) {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color .2s ease;
}
.nav a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; }

/* ===== Inicio ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 75% 40%, rgba(26, 75, 255, 0.25), transparent 70%),
    radial-gradient(500px 300px at 10% 90%, rgba(58, 168, 255, 0.10), transparent 70%);
}
/* Franjas diagonales, como las de la "V" del logo */
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -80px;
  width: 520px;
  height: 260px;
  background: repeating-linear-gradient(-60deg, rgba(26, 75, 255, 0.12) 0 22px, transparent 22px 44px);
  mask-image: linear-gradient(to left, #000, transparent);
  -webkit-mask-image: linear-gradient(to left, #000, transparent);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__logo img {
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 55%, transparent 100%);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px); } }

.features {
  position: relative;
  list-style: none;
  margin: 70px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.features li { padding: 28px 28px 0 0; }
.features li + li { padding-left: 28px; border-left: 1px solid var(--border); }
.features p { margin-top: 8px; color: var(--text-soft); font-size: 0.98rem; }

/* ===== Secciones ===== */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { margin-bottom: 60px; }

/* Servicios */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  position: relative;
  padding: 32px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(58, 168, 255, 0.4);
  box-shadow: 0 20px 50px rgba(26, 75, 255, 0.15);
}
.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 12px;
  background: rgba(26, 75, 255, 0.12);
  border: 1px solid rgba(58, 168, 255, 0.25);
}
.card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--blue-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card p { margin-top: 12px; color: var(--text-soft); font-size: 0.98rem; }

/* Demo */
.demo__tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 28px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  scrollbar-width: none;
}
.demo__tabs button {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.demo__tabs button:hover { color: var(--text); }
.demo__tabs button[aria-selected="true"] { background: var(--gradient); color: #fff; }

.demo__panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  min-height: 520px;
  padding: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 360px at 80% 50%, rgba(26, 75, 255, 0.18), transparent 70%),
    var(--surface);
}
.demo__panel[hidden] { display: none; }
.demo__info p { margin-top: 14px; color: var(--text-soft); }
.demo__points { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 10px; }
.demo__points li { display: flex; gap: 12px; align-items: baseline; font-size: 0.98rem; }
.demo__points li::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-light); box-shadow: 0 0 10px var(--blue-light); transform: translateY(-2px); }

/* Pasos animados: ocultos hasta que la demo los muestra */
.js [data-step] { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.js [data-step].is-shown { opacity: 1; transform: none; }

/* WhatsApp */
.phone {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0B141A;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(26, 75, 255, 0.15);
}
.phone__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #1F2C34; }
.phone__bar strong { display: block; font-weight: 500; font-size: 0.95rem; }
.phone__bar small { color: #8696A0; font-size: 0.78rem; }
.phone__avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--gradient); font-size: 0.8rem; font-weight: 500; }
.chat { display: flex; flex-direction: column; gap: 8px; height: 420px; padding: 16px 14px; overflow-y: auto; scrollbar-width: none; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; line-height: 1.45; }
.msg b { font-weight: 500; }
.msg--in { align-self: flex-start; background: #202C33; border-top-left-radius: 2px; }
.msg--out { align-self: flex-end; background: #005C4B; border-top-right-radius: 2px; }
.js .msg:not(.is-shown) { display: none; }
.typing { display: none; align-self: flex-end; gap: 4px; padding: 12px 14px; border-radius: 10px; background: #005C4B; }
.typing.is-active { display: flex; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }

/* Voz */
.call {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 7, 13, 0.7);
}
.call__head { display: flex; align-items: center; gap: 14px; }
.call__head strong { display: block; font-weight: 500; }
.call__head small { color: var(--text-soft); font-size: 0.85rem; }
.call__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 24px rgba(58, 168, 255, 0.5); }
.call__icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 70px; margin: 22px 0; }
.wave span { width: 4px; height: 10%; border-radius: 4px; background: var(--gradient); transition: height .3s ease; }
.call.is-live .wave span { animation: wave 1.1s ease-in-out infinite; }
.wave span:nth-child(3n) { animation-delay: -.3s; }
.wave span:nth-child(3n+1) { animation-delay: -.6s; }
.wave span:nth-child(4n) { animation-delay: -.9s; }
@keyframes wave { 0%, 100% { height: 15%; } 50% { height: 90%; } }
.transcript { display: grid; gap: 12px; }
.line { padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 0.92rem; }
.line b { display: block; margin-bottom: 2px; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-soft); }
.line--ai { background: rgba(26, 75, 255, 0.14); }
.line--ai b { color: var(--blue-light); }

/* Automatización */
.flow__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(58, 168, 255, 0.25);
  background: rgba(5, 7, 13, 0.7);
}
.node + .node::before {
  content: "";
  position: absolute;
  left: 38px;
  top: -15px;
  width: 2px;
  height: 14px;
  background: var(--gradient);
}
.node.is-shown { box-shadow: 0 0 0 1px rgba(58, 168, 255, 0.2), 0 10px 30px rgba(26, 75, 255, 0.18); }
.node__icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(26, 75, 255, 0.15); font-size: 1.2rem; }
.node strong { display: block; font-weight: 500; font-size: 0.98rem; }
.node small { color: var(--text-soft); font-size: 0.85rem; }
.flow__done { margin-top: 18px; text-align: center; color: #5BE3A4; font-size: 0.95rem; }

/* Web */
.browser {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(26, 75, 255, 0.15);
}
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #1A1F2E; }
.browser__bar span { width: 10px; height: 10px; border-radius: 50%; background: #3A4156; }
.browser__bar p { flex: 1; margin-left: 10px; padding: 4px 12px; border-radius: 6px; background: #0D1222; color: var(--text-soft); font-size: 0.75rem; }
.browser__view { height: 380px; overflow: hidden; }
.mock { color: #1B1B1B; animation: mock-scroll 14s ease-in-out infinite alternate; }
@keyframes mock-scroll { 0%, 15% { transform: translateY(0); } 85%, 100% { transform: translateY(calc(-100% + 380px)); } }
.mock__nav { display: flex; align-items: center; gap: 14px; padding: 16px 22px; }
.mock__nav b { flex: 1; letter-spacing: 0.3em; font-weight: 500; font-size: 0.85rem; }
.mock__nav i { width: 36px; height: 6px; border-radius: 3px; background: #D9D4CC; }
.mock__hero {
  display: grid;
  gap: 10px;
  padding: 60px 26px;
  background: linear-gradient(135deg, #E8DFD3, #C9B8A3);
}
.mock__hero small { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: #6B5A48; }
.mock__hero strong { font-size: 1.8rem; font-weight: 400; line-height: 1.1; }
.mock__btn { width: fit-content; padding: 8px 18px; border-radius: 999px; background: #1B1B1B; color: #fff; font-size: 0.75rem; }
.mock__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 22px; }
.mock__grid span { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(160deg, #D6CFC4, #A8998A); }
.mock__grid--2 { grid-template-columns: repeat(2, 1fr); }
.mock__grid--2 span { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #B7C4C9, #7F9299); }
.mock__text { display: grid; gap: 8px; padding: 6px 22px 10px; }
.mock__text i { height: 7px; border-radius: 4px; background: #E3DED7; }
.mock__text i:nth-child(2) { width: 85%; }
.mock__text i:nth-child(3) { width: 60%; }
.mock__cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 22px 26px; padding: 22px; border-radius: 10px; background: #1B1B1B; color: #fff; }
.mock__cta strong { font-weight: 400; }
.mock__cta .mock__btn { background: #C9B8A3; color: #1B1B1B; }

.demo__cta {
  margin-top: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 36px;
  border-radius: var(--radius);
  border: 1px solid rgba(58, 168, 255, 0.25);
  background: linear-gradient(120deg, rgba(26, 75, 255, 0.15), transparent);
}
.demo__cta p { font-size: 1.2rem; }

/* Contacto */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.contact__mail { margin-top: 28px; color: var(--text-soft); }
.contact__mail a { color: var(--blue-light); border-bottom: 1px solid rgba(58, 168, 255, 0.4); }

.form {
  display: grid;
  gap: 18px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; }
.form label span { font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-soft); }
.form label em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%), linear-gradient(135deg, var(--text-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(58, 168, 255, 0.15);
}
.form__status { min-height: 1.6em; font-size: 0.95rem; text-align: center; }
.form__status.is-ok { color: #5BE3A4; }
.form__status.is-error { color: #FF7A7A; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Pie ===== */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 28px; }
.footer__nav a, .footer__copy { font-size: 0.85rem; color: var(--text-soft); }
.footer__nav a:hover { color: var(--text); }

/* ===== Animación al hacer scroll ===== */
/* Solo con JavaScript: sin él, todo el contenido se ve directamente */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__logo img { animation: none; }
  .mock { animation: none; }
  .js [data-step] { transition: none; }
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr 0.8fr; }
  .demo__panel { grid-template-columns: 1fr; padding: 32px; }
}

/* ===== Móvil ===== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }

  .nav-toggle {
    display: grid;
    gap: 6px;
    width: 44px;
    height: 44px;
    place-content: center;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .3s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 26px;
    padding: 36px 16px 40px;
    background: rgba(5, 7, 13, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .35s ease;
  }
  .nav.is-open { transform: none; }
  .header:has(.nav.is-open) { background: rgba(5, 7, 13, 0.97); }

  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__logo { order: -1; max-width: 340px; margin: 0 auto -20px; }
  .features { grid-template-columns: 1fr; margin-top: 50px; }
  .features li, .features li + li { padding: 22px 0; border-left: 0; }
  .features li + li { border-top: 1px solid var(--border); }

  .cards { grid-template-columns: 1fr; }
  .demo__cta { padding: 26px 22px; }
  .demo__tabs { border-radius: 14px; }
  .demo__panel { gap: 32px; padding: 22px 16px; min-height: 0; }
  .chat { height: 380px; }
  .call { padding: 20px 16px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .form { padding: 24px 18px; }
  .form__row { grid-template-columns: 1fr; }
  .brand__name small { display: none; }
}

/* Los mensajes del chat entran con una pequeña animación (pasan de display: none a visibles) */
.msg.is-shown { animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ===== Páginas legales ===== */
.legal { padding: calc(var(--header-h) + 60px) 0 100px; }
.legal__inner { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal__date { margin-top: 12px; color: var(--text-soft); font-size: 0.9rem; }
.legal h2 { margin: 48px 0 14px; font-size: 1.35rem; font-weight: 500; }
.legal p, .legal li { color: var(--text-soft); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; }
.legal strong { color: var(--text); font-weight: 500; }
.legal a:not(.btn) { color: var(--blue-light); border-bottom: 1px solid rgba(58, 168, 255, 0.4); }
/* Datos que faltan completar: bien visibles para no olvidarlos */
.pending { padding: 1px 6px; border-radius: 4px; background: rgba(255, 196, 0, 0.15); color: #FFD24D; }

/* Casilla de consentimiento del formulario */
.form label.form__consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.form__consent input { width: 18px; height: 18px; flex-shrink: 0; margin: 3px 0 0; padding: 0; accent-color: var(--blue); }
.form label.form__consent span { font-size: 0.9rem; letter-spacing: 0; text-transform: none; }
.form__consent a { color: var(--blue-light); border-bottom: 1px solid rgba(58, 168, 255, 0.4); }
.legal h3.legal__sub { margin: 28px 0 10px; font-size: 1.05rem; font-weight: 500; color: var(--blue-light); }

/* ===== Botón de idioma ES / EN =====
   La píldora azul (::before) marca el idioma actual y se desliza hacia el otro al pasar el ratón. */
.brand { margin-right: auto; }
.header__inner { gap: 28px; }
.lang {
  position: relative;
  display: flex;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.lang::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(58, 168, 255, 0.4);
  transition: transform .35s cubic-bezier(.65, 0, .35, 1);
}
.lang[data-current="en"]::before,
.lang[data-current="es"]:has(a:hover, a:focus-visible)::before { transform: translateX(100%); }
.lang[data-current="en"]:has(a:hover, a:focus-visible)::before { transform: translateX(0); }
.lang > * {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 40px;
  padding: 6px 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-soft);
  transition: color .3s ease;
}
.lang > [aria-current] { color: #fff; }
.lang:has(a:hover, a:focus-visible) > [aria-current] { color: var(--text-soft); }
.lang > a:hover, .lang > a:focus-visible { color: #fff; outline: none; }
.header .btn--ghost.btn--small { flex-shrink: 0; }

@media (max-width: 760px) {
  .header__inner { gap: 12px; }
}
@media (max-width: 480px) {
  .back span { display: none; }
}

/* ===== Página 404 ===== */
.notfound { min-height: 100vh; display: flex; align-items: center; }
.notfound__code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 300; line-height: 1; letter-spacing: 0.05em; }
.notfound__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.notfound__grid > div + div { padding-left: 48px; border-left: 1px solid var(--border); }
.notfound h1 { font-size: 1.8rem; }
.notfound p { margin: 12px 0 28px; color: var(--text-soft); }
@media (max-width: 760px) {
  .notfound__grid { grid-template-columns: 1fr; gap: 40px; }
  .notfound__grid > div + div { padding: 40px 0 0; border-left: 0; border-top: 1px solid var(--border); }
}

/* ===== Botón flotante de WhatsApp ===== */
.wa {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.5);
  animation: wa-pulse 2.8s ease-out infinite;
  transition: transform .2s ease;
}
.wa:hover, .wa:focus-visible { transform: scale(1.08); }
.wa svg { width: 30px; height: 30px; fill: #fff; }
@keyframes wa-pulse {
  0% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35), 0 0 0 16px rgba(37, 211, 102, 0); }
}
/* Etiqueta que aparece a la izquierda al pasar el ratón (solo en ordenador) */
.wa__tip {
  position: absolute;
  right: calc(100% + 12px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.wa:hover .wa__tip, .wa:focus-visible .wa__tip { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .wa { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .wa__tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wa { animation: none; }
}
