/*
Theme Name: Adium Live
Description: Landing del webinar de Adium con la inscripción conectada a WebinarPress. Textos editables desde Apariencia → Personalizar.
Version: 1.2.0
Author: Codivit
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: adiumlive
*/

/* Paleta y tipografías según Manual de Marca Adium (junio 2024). */

:root {
  --red: #FF0032;
  --red-soft: #EA6875;
  --gray: #3B4A5C;
  --gray-soft: #5C6977;
  --wine: #8E1420;
  --blue: #4688EF;
  --white: #FFFFFF;
  --mist: #F3F5F7;            /* gris de marca al 6 % sobre blanco */
  --line: rgba(59, 74, 92, .14);

  --display: "Montserrat", system-ui, sans-serif;
  --body: "Raleway", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--gray);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

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

.icon {
  width: 1.5rem; height: 1.5rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 8px;
  background: var(--gray); color: var(--white); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── Tipografía de marca ─────────────────────────────── */

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--display); font-weight: 600;
  font-size: .75rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--red);
}
.eyebrow::after { content: ""; width: 48px; height: 1.5px; background: currentColor; }

.display, .heading { font-family: var(--display); color: var(--gray); }
.display__strong, .display__light { display: block; }
.display__strong { font-weight: 700; letter-spacing: -.025em; }
.display__light { font-weight: 300; letter-spacing: -.015em; }

.display { position: relative; margin-top: 22px; font-size: clamp(2.35rem, 1.4rem + 3.4vw, 4.1rem); line-height: 1.04; }
.display::before { /* filete rojo que nace del borde, como en las piezas del manual */
  content: ""; position: absolute; top: .12em; height: 1.9em; width: 6px; background: var(--red);
  left: calc(-1 * (max(0px, (100vw - var(--wrap)) / 2) + var(--gutter)));
}
.display__light { margin-top: .12em; font-size: .86em; line-height: 1.12; }

.heading { margin-top: 18px; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem); line-height: 1.12; }

.tag {
  position: relative; padding-left: 16px;
  font-family: var(--display); font-weight: 600;
  font-size: .625rem; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gray-soft);
}
.tag::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 2px; background: var(--red); }

/* ── Header ──────────────────────────────────────────── */

.topbar { position: relative; z-index: 2; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.topbar__logo { width: 112px; }
.topbar .tag { letter-spacing: .1em; }

/* ── Hero ────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; background: var(--mist); padding-block: clamp(44px, 7vw, 96px); }

.signup-wrap { position: relative; align-self: start; }
.hero__rings { display: none; position: absolute; pointer-events: none; }
.ring { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) .2s forwards; }
.ring--red { stroke: var(--red); stroke-width: 1.6; opacity: .55; }
.ring--gray { stroke: var(--gray); stroke-width: 1; opacity: .18; animation-delay: .5s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__grid { position: relative; display: grid; gap: 40px; }

.lede { max-width: 30rem; margin-top: 28px; color: var(--gray); }

.facts { display: grid; gap: 14px; margin-top: 36px; }
.fact { display: flex; align-items: center; gap: 12px; font-size: .875rem; line-height: 1.35; color: var(--gray-soft); }
.fact .icon { color: var(--red); }
.fact__text { display: grid; }
.fact strong { font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--gray); }

/* ── Formulario (estilos a portar al widget de WebinarPress) ─ */

.signup {
  position: relative; z-index: 1;
  background: var(--white); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 1px 2px rgba(59, 74, 92, .06), 0 24px 60px -24px rgba(59, 74, 92, .28);
}
.signup::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--red), var(--red-soft)); }
.signup:focus { outline: none; }

.form__title { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.01em; }
.form__title:focus { outline: none; }
.form__lede { margin-top: 6px; font-size: .95rem; color: var(--gray-soft); }


.field { margin-top: 14px; }
.form__lede + .field { margin-top: 22px; }
.field label { display: block; margin-bottom: 6px; font-family: var(--display); font-weight: 500; font-size: .82rem; color: var(--gray); }
.field__optional { font-weight: 400; color: var(--gray-soft); }

.field input {
  width: 100%; height: 50px; padding: 0 14px;
  font: inherit; font-size: 1rem; color: var(--gray);
  background: var(--white);
  border: 1px solid rgba(59, 74, 92, .24); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: rgba(92, 105, 119, .7); }
.field input:hover { border-color: rgba(59, 74, 92, .45); }
.field input:focus { outline: none; border-color: var(--gray); box-shadow: 0 0 0 4px rgba(70, 136, 239, .22); }
.field input[aria-invalid="true"] { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(142, 20, 32, .08); }

.field__error { min-height: 0; font-size: .8rem; line-height: 1.4; color: var(--wine); }
.field__error:not(:empty) { margin-top: 6px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; margin-top: 26px; padding: 0 24px;
  border: 0; border-radius: 10px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1.1875rem; text-decoration: none;
  color: var(--white); background: var(--red);
  transition: background-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.button .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2; transition: transform .25s var(--ease); }
.button:hover { background: #E6002D; box-shadow: 0 12px 28px -12px rgba(255, 0, 50, .6); }
.button:hover .icon { transform: translateX(4px); }
.button:active { transform: translateY(1px); }
.button[aria-busy="true"] { opacity: .7; pointer-events: none; }

.footer__small a {
  font-weight: 600; color: var(--gray);
  text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}

.done { text-align: left; }
.done__badge {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px;
  border-radius: 50%; color: var(--white); background: var(--red);
  animation: pop .5s var(--ease);
}
.done__badge .icon { stroke-width: 2.2; }
.done__date { margin-top: 18px; font-family: var(--display); font-weight: 600; font-size: .95rem; }
.done__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.link-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(59, 74, 92, .24); border-radius: 10px;
  font-family: var(--display); font-weight: 600; font-size: .85rem; text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.link-button:hover { border-color: var(--gray); background: var(--mist); }

@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ── Speakers ────────────────────────────────────────── */

.speakers { padding-block: clamp(64px, 9vw, 120px); }

.speakers__head { display: grid; gap: 24px; }
.speakers__lede { max-width: 30rem; color: var(--gray-soft); }

.care { display: grid; gap: 40px; margin-top: clamp(40px, 6vw, 72px); align-items: center; }

.care__diagram { position: relative; width: min(100%, 320px); margin-inline: auto; }
.care__diagram svg { display: block; width: 100%; overflow: visible; }

.care__track { fill: none; stroke: var(--line); stroke-width: 1; }

/* Entrada: los tres arcos se trazan en secuencia y cierran el círculo.
   Va por animación (no transición) para no contaminar el hover con demoras. */
.arc-wrap, .node__in { opacity: 0; }
.arc-wrap--1 { --d: .1s; }  .node--1 { --d: .6s; }
.arc-wrap--2 { --d: .7s; }  .node--2 { --d: 1.2s; }
.arc-wrap--3 { --d: 1.3s; } .node--3 { --d: 1.8s; }

.care.is-drawn .arc-wrap { animation: show 0s var(--d) forwards; }
.care.is-drawn .arc { animation: sweep .6s cubic-bezier(.45, 0, .55, 1) var(--d) forwards; }
.care.is-drawn .node__in { animation: pop-in .5s var(--ease) var(--d) forwards; }

@keyframes show { to { opacity: 1; } }
@keyframes sweep { from { stroke-dasharray: 0 360; } to { stroke-dasharray: 112 248; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }

.arc {
  fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 360;
  transition: stroke-width .35s var(--ease), opacity .35s var(--ease);
}
.arc--1 { stroke: var(--red-soft); }
.arc--2 { stroke: var(--red); }
.arc--3 { stroke: var(--gray); }

.node { transition: opacity .35s var(--ease); }
.node__in, .node__body { transform-box: fill-box; transform-origin: center; }
.node__body { transition: transform .35s var(--ease); }
.node circle { fill: var(--white); stroke-width: 1.5; transition: fill .35s var(--ease); }
.node use { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s var(--ease); }
.node--1 circle, .node--1 use { stroke: var(--red-soft); }
.node--2 circle, .node--2 use { stroke: var(--red); }
.node--3 circle, .node--3 use { stroke: var(--gray); }

.care__center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-family: var(--display); color: var(--gray); pointer-events: none;
}
.care__strong { font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.6vw, 1.9rem); line-height: 1; letter-spacing: -.02em; }
.care__light { font-weight: 300; font-size: clamp(1.4rem, 1rem + 1.6vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em; }

/* Al señalar a una especialista (en la lista o en el círculo), su arco toma protagonismo */
.care.has-active .arc,
.care.has-active .node { opacity: .2; }
.care[data-active="1"] .arc--1, .care[data-active="2"] .arc--2, .care[data-active="3"] .arc--3 { opacity: 1; stroke-width: 10; }
.care[data-active="1"] .node--1, .care[data-active="2"] .node--2, .care[data-active="3"] .node--3 { opacity: 1; }
.care[data-active="1"] .node--1 .node__body, .care[data-active="2"] .node--2 .node__body, .care[data-active="3"] .node--3 .node__body { transform: scale(1.14); }
.care[data-active="1"] .node--1 circle { fill: var(--red-soft); }
.care[data-active="2"] .node--2 circle { fill: var(--red); }
.care[data-active="3"] .node--3 circle { fill: var(--gray); }
.care[data-active="1"] .node--1 use, .care[data-active="2"] .node--2 use, .care[data-active="3"] .node--3 use { stroke: var(--white); }

.people { display: grid; }
.person {
  --accent: var(--red);
  position: relative; display: flex; align-items: center; gap: 20px;
  padding: 22px 8px 22px 0; border-top: 1px solid var(--line);
  cursor: default; outline-offset: -3px;
}
.person:last-child { border-bottom: 1px solid var(--line); }
.person[data-arc="1"] { --accent: var(--red-soft); }
.person[data-arc="3"] { --accent: var(--gray); }
.person__icon {
  display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 50%;
  color: var(--accent); background: var(--mist);
  transition: background-color .3s, color .3s;
}
.person__icon .icon { width: 28px; height: 28px; }
.person:hover .person__icon, .person:focus-visible .person__icon, .person.is-active .person__icon { background: var(--accent); color: var(--white); }

.person__text { display: grid; gap: 2px; }
.person__topic { font-family: var(--display); font-weight: 600; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-soft); }
.person__name { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); line-height: 1.2; letter-spacing: -.01em; transition: transform .35s var(--ease); }
.person:hover .person__name, .person:focus-visible .person__name, .person.is-active .person__name { transform: translateX(4px); }

/* ── Cierre ──────────────────────────────────────────── */

.closing { background: var(--red); color: var(--white); }
.closing__inner { display: grid; gap: 24px; padding-block: clamp(40px, 6vw, 64px); }
.closing__text { font-family: var(--display); font-weight: 300; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.2; letter-spacing: -.015em; }
.closing__date { display: block; margin-bottom: 6px; font-weight: 700; }

.button--light { width: auto; margin-top: 0; color: var(--red); background: var(--white); justify-self: start; }
.button--light:hover { background: var(--white); box-shadow: 0 14px 30px -14px rgba(59, 74, 92, .7); }

/* ── Footer ──────────────────────────────────────────── */

.footer { background: var(--gray); color: rgba(255, 255, 255, .78); }
.footer__inner { display: grid; gap: 28px; padding-block: 44px; }
.footer__brand { display: flex; align-items: center; gap: 20px; }
.footer__brand img { width: 112px; }
.footer__claim {
  padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .25);
  font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--white);
}
.footer__meta { display: grid; gap: 14px; }
.tag--dark { color: rgba(255, 255, 255, .78); }
.footer__small { font-size: .8rem; }
.footer__small a { color: var(--white); }

/* ── Botón fijo en celular ───────────────────────────── */

.dock {
  position: fixed; z-index: 20; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 14px;
  background: var(--gray); color: var(--white); text-decoration: none;
  box-shadow: 0 16px 40px -12px rgba(30, 38, 48, .55);
  transform: translateY(140%); transition: transform .4s var(--ease);
}
.dock.is-visible { transform: none; }
.dock__date { font-family: var(--display); font-weight: 600; font-size: .85rem; }
.dock__cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1rem; background: var(--red);
}
.dock__cta .icon { width: 1.1rem; height: 1.1rem; stroke-width: 2; }

/* ── Entradas ────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── Breakpoints ─────────────────────────────────────── */

@media (min-width: 560px) {
  .facts { grid-auto-flow: column; justify-content: start; gap: 0; }
  .fact { padding-inline: 20px; border-left: 1px solid var(--line); }
  .fact:first-child { padding-left: 0; border-left: 0; }
  .tag, .topbar .tag { font-size: .6875rem; letter-spacing: .16em; }
  .topbar__logo { width: 124px; }
}

@media (min-width: 900px) {
  .topbar__inner { min-height: 88px; }
  .topbar__logo { width: 144px; }
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
  .signup-wrap { align-self: center; }
  .hero__rings { width: 800px; left: 50%; top: 50%; translate: -50% -50%; }
  .facts { gap: 0; }
  .fact { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fact strong { white-space: nowrap; }
  .speakers__head { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
  .speakers__lede { padding-left: 32px; border-left: 1px solid var(--line); }
  .care { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 112px); }
  .care__diagram { width: min(100%, 420px); }
  .person { padding-block: 30px; }
  .closing__inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer__inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer__meta { justify-items: end; text-align: right; }
  .tag--dark { padding-left: 0; padding-right: 16px; }
  .tag--dark::before { left: auto; right: 0; }
  .dock { display: none; }
}

@media (min-width: 1200px) {
  .hero__rings { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .arc { stroke-dasharray: 112 248; }
  .arc-wrap, .node__in { opacity: 1; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ── Agregados del tema ──────────────────────────────── */

/* Campos extra definidos en WebinarPress (select y casilla) */
.field select {
  width: 100%; height: 50px; padding: 0 40px 0 14px;
  font: inherit; font-size: 1rem; color: var(--gray);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B4A5C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  border: 1px solid rgba(59, 74, 92, .24); border-radius: 10px;
  appearance: none; transition: border-color .2s, box-shadow .2s;
}
.field select:hover { border-color: rgba(59, 74, 92, .45); }
.field select:focus { outline: none; border-color: var(--gray); box-shadow: 0 0 0 4px rgba(70, 136, 239, .22); }
.field select[aria-invalid="true"] { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(142, 20, 32, .08); }

.field--check label { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-family: var(--body); font-size: .9rem; font-weight: 400; cursor: pointer; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--red); }

/* Aviso general del formulario (errores del servidor o de conexión) */
.form__notice { margin-top: 18px; padding: 12px 14px; border-radius: 10px; font-size: .9rem; line-height: 1.45; color: var(--wine); background: rgba(142, 20, 32, .06); }
.form__notice[hidden] { display: none; }

.form__closed { margin-top: 18px; font-size: .95rem; color: var(--gray-soft); }

.done__access { margin-top: 18px; font-size: .9rem; color: var(--gray-soft); }
.done__access a { font-weight: 600; color: var(--gray); text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* Páginas de texto (Política de Privacidad) */
.page-body { padding-block: clamp(48px, 7vw, 96px); background: var(--white); }
.page-body .wrap { max-width: 760px; }
.page-body .heading { margin: 18px 0 32px; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 1.8em; font-family: var(--display); font-weight: 600; line-height: 1.25; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose a { font-weight: 600; text-decoration-color: var(--red); text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; font-family: var(--display); font-weight: 600; font-size: .9rem; text-decoration: none; }
.back-link .icon { width: 1.1rem; height: 1.1rem; transform: rotate(180deg); }

/* Sala de espera */
.wait .done__actions { margin-top: 26px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.countdown__unit {
  display: grid; justify-items: center; gap: 2px; padding: 16px 4px 12px;
  border-radius: 12px; background: var(--mist);
}
.countdown__value { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1; letter-spacing: -.02em; color: var(--gray); font-variant-numeric: tabular-nums; }
.countdown__label { font-family: var(--display); font-weight: 600; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-soft); }

.wait__note { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: .92rem; line-height: 1.45; color: var(--gray-soft); }
.wait__dot { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.wait__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red); animation: pulse 1.8s var(--ease) infinite; }
.wait__note.is-soon { color: var(--gray); font-weight: 600; }
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.6); opacity: 0; } }

/* Página de mensaje (Gracias) */
.hero--message { display: grid; align-items: center; min-height: calc(100vh - 77px - 200px); }
.message { max-width: 620px; margin-inline: auto; }
.message__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
.message__body { margin-top: 14px; color: var(--gray-soft); }

/* Trampa para bots: fuera de la vista y del foco */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
