@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
}

:root {
  --color-accent: #eb0029;
  --color-accent-dark: #c40022;
  --color-accent-soft: #fbe4e8;
  --color-text: #4a4a4a;
  --color-text-strong: #333333;
  --color-muted: #6b6b6b;
  --color-surface: #f4f4f4;
  --color-border: #d6d6d6;
  --color-white: #ffffff;
  --radius-input: 6px;
  --container: 1512px;
  --gutter: clamp(20px, 5.3vw, 80px);
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-accent);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

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

.text-accent {
  color: var(--color-accent);
}

/* Íconos en círculo */
.icon-badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.icon-badge svg {
  width: 18px;
  height: 18px;
}

.icon-badge--sm {
  width: 26px;
  height: 26px;
}

.icon-badge--sm svg {
  width: 16px;
  height: 16px;
}

/* ---------- Encabezado ---------- */

.site-header {
  position: relative;
  z-index: 2;
  background: var(--color-white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.site-header__logo {
  display: block;
  line-height: 0;
}

.site-header__logo img {
  width: 150px;
  height: auto;
}

@media (min-width: 1100px) {
  .site-header__inner {
    min-height: 87px;
    padding-left: calc(var(--gutter) + 12px);
  }

  .site-header__logo img {
    width: 220px;
  }
}

/* ---------- Registro: hero ---------- */

main {
  flex: 1 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero__media {
  display: block;
  position: relative;
}

.hero__media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  aspect-ratio: 900 / 696;
  object-fit: cover;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-areas:
    'intro'
    'registro'
    'temario';
  gap: 32px;
  margin-top: -48px;
  padding-bottom: 56px;
}

.intro {
  grid-area: intro;
}

.temario {
  grid-area: temario;
}

.registro {
  grid-area: registro;
}

.intro__title {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

.intro__title .line:last-child {
  display: block;
}

.intro__speaker {
  margin-top: 28px;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.intro__speaker strong {
  display: block;
  font-weight: 600;
}

.intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 18px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.intro__meta li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.temario__title {
  font-size: 1rem;
  font-weight: 700;
}

.temario__list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.temario__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.125rem;
  line-height: 1.4;
}

/* ---------- Formulario ---------- */

.registro__card {
  padding: 28px 22px 26px;
  background: var(--color-surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.registro__title {
  margin-bottom: 26px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-text);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-strong);
}

.field input[type='text'],
.field input[type='email'] {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text-strong);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #8a8a8a;
  opacity: 1;
}

.field input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(235, 0, 41, 0.15);
}

.field input[aria-invalid='true'] {
  border-color: var(--color-accent);
}

.field__error {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-accent-dark);
}

.field__error:empty {
  display: none;
}

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: start;
  margin-top: 26px;
}

.field--check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--color-accent);
}

.field--check label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted);
}

.field--check .field__error {
  grid-column: 1 / -1;
}

.field--captcha {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-accent-dark);
  background: #fff0f2;
  border-left: 4px solid var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 24px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn--primary {
  margin-top: 22px;
  color: var(--color-white);
  background: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.75;
}

.recaptcha-legal {
  margin-top: 14px;
  font-size: 0.6875rem;
  line-height: 1.45;
  text-align: center;
  color: var(--color-muted);
}

.recaptcha-legal a {
  color: inherit;
}

/* El aviso legal anterior sustituye al distintivo flotante de reCAPTCHA v3. */
.grecaptcha-badge {
  visibility: hidden;
}

/* ---------- Registro: tablet y escritorio ---------- */

@media (min-width: 640px) and (max-width: 1099.98px) {
  .hero__grid {
    max-width: calc(760px + 2 * var(--gutter));
  }
}

@media (min-width: 760px) {
  .intro__title .line {
    display: block;
  }
}

@media (min-width: 1100px) {
  .hero {
    display: flex;
    align-items: flex-start;
    min-height: 735px;
    background-color: #fff;
  }

  /* Imagen de fondo: el degradado blanco integrado queda del lado del texto. */
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/hero-desktop.webp') 74% 42% / max(146.8%, 1801px) auto no-repeat;
  }

  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 28%, rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
  }

  .hero__media {
    display: none;
  }

  .hero__grid {
    z-index: 1;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'intro registro'
      'temario registro';
    column-gap: 48px;
    row-gap: 84px;
    margin-top: 0;
    padding-block: 82px 70px;
    padding-right: calc(var(--gutter) + clamp(0px, 1.7vw, 26px));
  }

  .intro__title {
    font-size: clamp(1.9rem, 0.6rem + 2.2vw, 2.25rem);
    line-height: 0.97;
    letter-spacing: -0.025em;
  }

  .registro {
    align-self: start;
  }

  .registro__card {
    padding: 30px 26px 36px;
  }

  .registro__title {
    margin-bottom: 42px;
  }

  .field {
    margin-bottom: 30px;
  }

  .field--check {
    margin-top: 34px;
    margin-bottom: 0;
  }

  .field--check label {
    font-size: 0.72rem;
  }

  .btn--primary {
    margin-top: 36px;
  }

  .intro__speaker {
    margin-top: 46px;
  }
}

/* Escritorio compacto: la imagen se recorre y el velo blanco protege la lectura. */
@media (min-width: 1100px) and (max-width: 1299.98px) {
  .hero::before {
    background-position: 64% 42%;
  }

  .hero::after {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.8) 34%, rgba(255, 255, 255, 0) 54%);
  }
}

@media (min-width: 1100px) and (max-width: 1179.98px) {
  .temario__list li,
  .intro__speaker {
    font-size: 1rem;
  }
}

/* Pantallas muy anchas: el fondo cubre siempre todo el ancho. */
@media (min-width: 1800px) {
  .hero::before {
    background-size: cover;
    background-position: 70% 40%;
  }
}

/* ---------- Página del webinar ---------- */

.page-webinar {
  background:
    radial-gradient(ellipse 80% 60% at 85% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(ellipse 70% 50% at 0% 100%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    #efefef;
}

.webinar {
  padding-block: 40px 48px;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.webinar__title {
  margin-top: 10px;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.webinar__meta {
  gap: 6px 28px;
  margin-top: 12px;
  font-size: 1rem;
}

.webinar__meta li + li::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--color-accent);
}

.webinar__stage {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.webinar__video,
.webinar__chat {
  overflow: hidden;
  background: #1b1b1b;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ratio-16x9 {
  position: relative;
  padding-top: 56.25%;
}

.ratio-16x9 iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.webinar__chat {
  background: var(--color-white);
}

.webinar__chat iframe {
  width: 100%;
  height: 520px;
  border: 0;
}

.webinar__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 20px;
}

.webinar__exit {
  font-size: 0.9375rem;
  font-weight: 600;
}

.webinar__help {
  font-size: 0.9375rem;
  color: var(--color-muted);
}

@media (min-width: 1100px) {
  .webinar {
    padding-block: 56px 64px;
  }

  .webinar__stage {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .webinar__chat {
    position: relative;
    min-height: 420px;
  }

  .webinar__chat iframe {
    position: absolute;
    inset: 0;
    height: 100%;
  }
}

/* ---------- Pie de página ---------- */

.site-footer {
  padding-block: 20px;
  font-size: 0.8125rem;
  color: var(--color-muted);
  background: var(--color-surface);
  border-top: 1px solid #e6e6e6;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: inherit;
}

.site-footer__legal {
  flex-basis: 100%;
  padding-top: 10px;
  border-top: 1px solid #e3e3e3;
  font-size: 0.75rem;
}

.site-footer__legal a {
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
