/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-foreground);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, picture {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== Layout ===== */
/* Container global (sólo usado por header + footer) — padding 24px, max 1392px */
.container {
  width: 100%;
  max-width: calc(var(--content-max-footer) + 2 * var(--footer-pad-x));
  margin-inline: auto;
  padding-inline: var(--footer-pad-x);
}

/* ===== Botones (variantes Figma) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-text-sm);
  line-height: var(--lh-text-sm);
  white-space: nowrap;
  border-radius: 0;            /* Figma no usa border-radius en estos botones */
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  color: currentColor;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.btn--light {
  background: var(--color-white);
  color: var(--color-primary);
}
.btn-sm {
  height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-text-sm);
}

/* Header CTA: en móvil baja a 36px (Figma mobile header button) */
@media (max-width: 767px) {
  .navbar .btn {
    height: 36px;
  }
}

/* ===== Dialog bar (rojo, sin botón) — STICKY arriba ===== */
.dialog-bar {
  position: sticky;
  top: 0;
  z-index: 51;                            /* encima del header */
  background: var(--color-accent-foreground);
  color: var(--color-white);
  font-size: var(--fs-text-sm);
  line-height: var(--lh-text-sm);
  box-shadow: var(--shadow-lg);
}
.dialog-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
  padding: var(--space-1-5) var(--space-6);
  text-align: center;
}
.dialog-bar__msg {
  white-space: nowrap;
}

/* En móvil, según briefing del usuario, el texto se mueve (marquee suave) */
@media (max-width: 767px) {
  .dialog-bar {
    overflow: hidden;
  }
  .dialog-bar__inner {
    padding-inline: 0;
    justify-content: flex-start;
    overflow: hidden;
  }
  .dialog-bar__msg {
    display: inline-block;
    padding-left: 100%;
    animation: dialogMarquee 20s linear infinite;
  }
  @keyframes dialogMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
  }
}

/* ===== Header sticky =====
   Figma 1:1072 navbar: padding x=32 y=16, ancho interno 1376.
   Top: 32px = altura del dialog-bar (que es sticky encima).
*/
.site-header {
  position: sticky;
  top: 32px;
  z-index: var(--header-z);
  background: var(--color-white);
  transition: box-shadow 200ms var(--ease-out);
}
.site-header--scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.site-header > .container {
  /* Override del .container global para el header */
  max-width: calc(var(--content-max-media) + 2 * var(--media-pad-x));   /* 1440 */
  padding-inline: var(--media-pad-x);                                    /* 32px */
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
  padding-block: var(--space-4);
}
.navbar__brand {
  display: inline-flex;
  align-items: center;
}
.navbar__brand-desktop {
  display: block;
  height: 36px;
  width: auto;
  max-width: 70vw;
}
.navbar__brand-mobile {
  display: none;
  height: 36px;
  width: 42px;
  object-fit: contain;
}
@media (max-width: 767px) {
  /* Figma móvil 5:175: navbar py-14 sin min-height */
  .site-header > .container {
    padding-inline: var(--media-pad-x);                 /* 32px — alinea CTA del header con el contenido de las secciones */
  }
  .navbar {
    padding-block: 14px;
    min-height: 0;
  }
  .navbar__brand-desktop { display: none; }
  .navbar__brand-mobile  { display: block; }
}

/* ===== Hero =====
   Figma 1:1080: pt-32 px-32 (frame Hero)
   El "inner button" Figma tiene `py-40 px-10` pero sus hijos son absolutos,
   así que ese padding NO afecta visualmente. No lo replicamos.
*/
.hero {
  background: var(--color-primary);
  padding: var(--media-pad-y) var(--media-pad-x) 0;
}
.hero__inner {
  position: relative;
  max-width: var(--content-max-media);
  margin-inline: auto;
  width: 100%;
}
.hero__media {
  position: relative;
  width: 100%;
  /* Figma desktop: 1376x554 ≈ aspect 2.48 */
  aspect-ratio: 1376 / 554;
}
@media (max-width: 767px) {
  /* Hero móvil: imagen vertical 3:4 con object-fit cover.
     Brand overlay tocando el borde INFERIOR de la imagen (bottom: 0).
     Padding-top 64px (override de los 80px de desktop). */
  .hero {
    padding: 64px var(--media-pad-x) 0;
  }
  .hero__inner {
    height: auto;
  }
  .hero__media {
    aspect-ratio: 3 / 4;
    height: auto;
  }
}

.hero__img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__img-wrap picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Hero v2 landscape (1920×1282 ≈ 3:2) — center horizontal, ligeramente abajo */
  object-position: 50% 55%;
}
.hero__brand-overlay {
  position: absolute;
  right: 0;
  bottom: -82px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background: var(--color-primary);
  /* Figma: pt-34 pr-80 pb-32, pl no especificado */
  padding: 34px 80px 32px 0;
  width: 441px;
  max-width: 80%;
  height: 163px;
}
.hero__brand-overlay img {
  display: block;
  width: 316px;
  max-width: 100%;
  height: auto;
}
@media (max-width: 767px) {
  /* Brand overlay móvil tocando el borde inferior del hero (bottom: 0).
     Padding bottom 0, height reducida; padding redondeado. */
  .hero__brand-overlay {
    bottom: 0;
    width: 189px;
    height: 61px;
    padding: 16px 32px 0 0;
    max-width: none;
  }
  .hero__brand-overlay img {
    width: 136px;
    height: 41px;
  }
}

/* Hero tablet (768-1023): aspect intermedio entre 1:1 móvil y 1376/554 desktop.
   Brand overlay también intermedio (más pequeño que desktop). */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__media {
    aspect-ratio: 3 / 2;
  }
  .hero__brand-overlay {
    bottom: -40px;
    width: 310px;
    height: 112px;
    padding: 24px 56px 22px 0;
  }
  .hero__brand-overlay img {
    width: 220px;
    height: auto;
  }
}

/* ===== Sección "Why" (texto + CTA en columna) =====
   Layout Figma: column, gap 40px, padding 80px
   - Título Azurio 48/48
   - Cuerpo Basis Grotesque 18px / line-height 24, justified, ancho 500px, indentado 40px
   - Botón blanco con icono, indentado 40px
*/
.why-section {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--section-pad-y) var(--section-pad-x);   /* 80px todos los lados */
}
.why-section__inner {
  max-width: var(--content-max-section);                /* 1280 */
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  align-items: flex-start;
}
.why-section__title {
  font-family: var(--font-display);
  font-weight: 500;            /* Azurio Medium */
  font-size: var(--fs-heading-xl);
  line-height: var(--lh-heading-xl);
  letter-spacing: 0;
  color: var(--color-white);
  width: 465px;
  max-width: 100%;
}
.why-section__body {
  padding-inline: var(--space-10);                      /* 40px en ambos lados */
  width: calc(500px + 2 * var(--space-10));             /* 500px de contenido + padding */
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-lg);
  line-height: var(--lh-text-base);
  color: var(--color-white);
  text-align: justify;
}
.why-section__body p + p {
  margin-top: var(--space-6);                           /* 24px (línea vacía) */
}
.why-section__cta-wrap {
  padding-inline: var(--space-10);                      /* 40px en ambos lados */
}
@media (max-width: 767px) {
  /* Figma móvil 3:1574 "Planifica": px-32 py-64, gap-40 */
  .why-section {
    padding: var(--space-16) var(--space-8);
  }
  .why-section__inner {
    gap: var(--space-10);                               /* 40px */
  }
  /* Figma móvil 3:1599 "Un paisaje": gap-32 (no 40) */
  .why-section--landscape .why-section__inner {
    gap: var(--space-8);                                /* 32px */
  }
  .why-section__title {
    width: 100%;
  }
  .why-section__body {
    padding-inline: 0;
    width: 100%;
  }
  .why-section__cta-wrap {
    padding-inline: 0;
  }
}

/* ===== "¿Cómo funciona?" =====
   Background #fe7449
   Título derecha 48/48 negro
   4 pasos flex justify-between
   CTA negro
*/
.how-section {
  background: var(--color-how);
  color: var(--color-primary);
  padding: var(--section-pad-y) var(--section-pad-x);   /* 80px todos los lados */
}
.how-section__inner {
  max-width: var(--content-max-section);                /* 1280 */
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  align-items: flex-start;                              /* Figma items-start */
}
.how-section__title {
  font-family: var(--font-display);
  font-weight: 500;            /* Azurio Medium */
  font-size: var(--fs-heading-xl);
  line-height: var(--lh-heading-xl);
  text-align: right;
  color: var(--color-primary);
  width: 100%;
}
.how-section__steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  width: 100%;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  flex: 1 0 0;
  min-width: 0;
  padding-inline: var(--space-8);
}
.step__title {
  font-family: var(--font-display);
  font-weight: 500;            /* Azurio Medium */
  font-size: var(--fs-step-title); /* 28 */
  line-height: 1.1;
  color: var(--color-primary);
  display: block;
}
/* Número dentro del .step__title como <strong> en línea con <br> después.
   Tamaño 32 Azurio Bold; el <br> separa visualmente de la frase del título. */
.step__number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-step-num);   /* 32 */
  line-height: 1.1;
  color: inherit;
}
.step__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-xl);   /* 20 */
  line-height: var(--lh-text-xl); /* 28 */
  color: var(--color-primary);
}
.how-section__cta {
  display: flex;
  padding-inline: var(--space-5);
}
@media (max-width: 1023px) {
  .how-section__steps {
    flex-wrap: wrap;
    row-gap: var(--space-10);
  }
  .step {
    flex: 0 0 50%;
  }
}
@media (max-width: 767px) {
  /* Figma móvil 3:1580: px-32 py-64, gap-40 wrapper, gap-48 steps */
  .how-section {
    padding: var(--space-16) var(--space-8);
  }
  .how-section__inner {
    gap: var(--space-10);                               /* 40px */
  }
  .how-section__steps {
    flex-direction: column;
    gap: var(--space-12);                               /* 48px Figma */
    row-gap: var(--space-12);                           /* override bp ≤1023 */
  }
  .step {
    flex: 0 0 100%;
    padding-inline: 0;
    width: 100%;
  }
  .how-section__cta {
    padding-inline: 0;
  }
}

/* ===== Vídeo full-bleed (sin border-radius) =====
   Figma 1:1129: pt-32 px-32 pb-0
*/
.video-block {
  background: var(--color-primary);
  padding: var(--media-pad-y) var(--media-pad-x) 0;
}
.video-block__inner {
  max-width: var(--content-max-media);                  /* 1376 */
  margin-inline: auto;
  position: relative;
  aspect-ratio: 16 / 9;                                 /* ratio nativo del MP4 */
  overflow: hidden;
}
@media (max-width: 767px) {
  .video-block {
    padding: 64px var(--media-pad-x) 0;
  }
  /* aspect-ratio 16/9 también en móvil */
}
.video-block__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

/* ===== "Información importante" ===== */
.info-section {
  background: var(--color-card);
  color: var(--color-primary);
  padding: var(--section-pad-y) var(--section-pad-x);   /* 80px todos los lados */
}
.info-section__inner {
  max-width: var(--content-max-section);                /* 1280 */
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  align-items: flex-start;                              /* Figma items-start */
}
.info-section__title {
  font-family: var(--font-display);
  font-weight: 500;            /* Azurio Medium */
  font-size: var(--fs-heading-xl);
  line-height: var(--lh-heading-xl);
  text-align: right;
  color: var(--color-primary);
  width: 100%;
}
.info-section__items {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  flex: 1 0 0;
  min-width: 0;
  padding-inline: var(--space-8);
}
.info-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-primary);
}
.info-item__text {
  flex: 1 0 0;
  min-width: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-xl);
  line-height: var(--lh-text-xl);
  color: var(--color-foreground-on-card);
}
.info-section__cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding-inline: var(--space-10);
  flex-wrap: wrap;
}
.info-section__note {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-lg);
  line-height: var(--lh-text-base);
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-offset: from-font;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .info-section__items {
    flex-wrap: wrap;
    row-gap: var(--space-8);
  }
  .info-item {
    flex: 0 0 50%;
  }
}
@media (max-width: 767px) {
  /* Figma móvil 3:1605: px-32 py-80 (NO 64!), gap-80 inner, items gap-48, CTA gap-20 column */
  .info-section {
    padding: var(--space-20) var(--space-8);            /* 80px vertical, 32px lateral */
  }
  .info-section__inner {
    gap: var(--space-20);                               /* 80px */
  }
  .info-section__items {
    flex-direction: column;
    gap: var(--space-12);                               /* 48px Figma móvil */
    row-gap: var(--space-12);
  }
  .info-item {
    flex: 0 0 100%;
    padding-inline: 0;
    width: 100%;
  }
  .info-section__cta-row {
    padding-inline: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);                                /* 20px */
  }
  .info-section__note {
    white-space: normal;
    width: 100%;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-white);
  color: var(--color-foreground);
  padding-block: var(--space-16);
}
.footer-grid {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}
.footer-col-brand {
  flex: 1 0 0;
  min-width: 376px;
  padding-right: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.footer-brand__logo-link {
  display: inline-block;
  transition: opacity 150ms var(--ease-out);
}
.footer-brand__logo-link:hover { opacity: 0.85; }
.footer-brand__logo {
  width: 185px;
  height: 161px;
  object-fit: contain;
  display: block;
}
.footer-brand__block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 100%;
}
.footer-brand__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-foreground);
}
.footer-contact a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-muted-foreground);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-offset: from-font;
  display: inline-block;           /* solo el ancho del texto */
  width: max-content;
  max-width: 100%;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  align-self: flex-start;          /* no estirar al 100% del flex column padre */
  width: auto;
  max-width: max-content;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-text-sm);
  line-height: var(--lh-text-sm);
  height: 36px;
  padding: var(--space-2) 32px var(--space-2) 40px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  /* Globe izquierda + chevron derecha, ambos en blanco (data URI) */
  background-image:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cg transform='translate(2,2)'%3E%3Cpath d='M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M1 11H21M11 1C13.5013 3.73835 14.9228 7.29203 15 11C14.9228 14.708 13.5013 18.2616 11 21M11 1C8.49872 3.73835 7.07725 7.29203 7 11C7.07725 14.708 8.49872 18.2616 11 21' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpolyline points='6 9 12 15 18 9' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-position: left 12px center, right 12px center;
  background-size: 16px 16px, 16px 16px;
  background-repeat: no-repeat, no-repeat;
}
.lang-select::-ms-expand { display: none; }

.footer-socials {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.footer-socials a {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground);
  transition: opacity 150ms var(--ease-out);
}
.footer-socials a:hover { opacity: 0.6; }
.footer-socials img,
.footer-socials svg {
  width: 100%;
  height: 100%;
}

.footer-column {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-column__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-foreground);
}
.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-column ul a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-muted-foreground);
}
.footer-column ul a:hover {
  color: var(--color-foreground);
  text-decoration: underline;
  text-underline-offset: from-font;
}

.footer-separator {
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-16) var(--space-16);
  width: 100%;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-text-base);
  line-height: var(--lh-text-base);
  color: var(--color-muted-foreground);
}
.footer-legal__links {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}
.footer-legal a {
  color: var(--color-muted-foreground);
}
.footer-legal a:hover {
  color: var(--color-foreground);
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .footer-grid {
    flex-wrap: wrap;
    gap: var(--space-10);
  }
  .footer-col-brand {
    flex: 0 0 100%;
    min-width: 0;
    padding-right: 0;
  }
  .footer-column {
    flex: 0 0 calc(50% - var(--space-5));
  }
}
@media (max-width: 767px) {
  /* Figma móvil 5:469→5:484: container gap-48 entre bloques */
  .footer-separator {
    margin-block: var(--space-12) var(--space-12);      /* 48 / 48 (gap-48 container) */
  }
  .footer-grid {
    gap: var(--space-12);                               /* 48 entre brand y columnas */
  }
  .footer-column {
    flex: 0 0 100%;
  }
  /* Figma móvil 5:514: flex-col gap-48 (links arriba, copyright debajo).
     HTML pone copyright primero; usamos column-reverse para invertir. */
  .footer-legal {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: var(--space-12);                               /* 48 entre links y copyright */
  }
  .footer-legal__links {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--space-4);                                /* 16 entre cada legal */
    width: 100%;
  }
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Sprite SVG: fuera del layout, sin tamaño visible. <use> aún funciona. */
.svg-sprite-hidden {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Print */
@media print {
  .dialog-bar,
  .site-header,
  .video-block {
    display: none;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .dialog-bar__msg {
    animation: none !important;
    padding-left: 0 !important;
  }
}
