/* Vidrio oscuro y cinco planos de color. Cargar después de immersive.css. */
:root {
  --brand-1: #ee3825;
  --brand-2: #ff6b0b;
  --brand-3: #fec306;
  --brand-4: #77bd20;
  --brand-5: #188ad9;
  --rayo-red: var(--brand-1);
  --rayo-orange: var(--brand-2);
  --rayo-yellow: var(--brand-3);
  --rayo-green: var(--brand-4);
  --rayo-blue: var(--brand-5);
  --rayo-spectrum: linear-gradient(
    105deg,
    var(--rayo-red) 0% 20%,
    var(--rayo-orange) 20% 40%,
    var(--rayo-yellow) 40% 60%,
    var(--rayo-green) 60% 80%,
    var(--rayo-blue) 80% 100%
  );
  --glass-border: rgb(255 255 255 / 0.15);
  --glass-focus: #f2d48b;
}

/* El destino de la intro es un landmark, no un control con borde de foco. */
#main:focus {
  outline: none;
}

/* La cápsula ocupa el mismo alto de navegación: 80 px / 73 px. */
.site-header {
  isolation: isolate;
  padding-inline: 20px;
  gap: 22px;
  background: transparent;
  border: 0;
}
.site-header::before {
  inset: 9px 0;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: linear-gradient(145deg, #1e1e20ed, #111113f5);
  box-shadow:
    0 12px 40px rgb(0 0 0 / 0.18),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  pointer-events: none;
}
.main-nav {
  gap: 23px;
}
.main-nav a {
  position: relative;
  color: #bdbdc3;
  transition: color 180ms ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 7px;
  height: 1px;
  background: var(--rayo-spectrum);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition:
    opacity 250ms ease,
    transform 400ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
.main-nav a:is(:hover, :focus-visible, :active) {
  color: #fff;
}
.main-nav a:is(:hover, :focus-visible, :active)::after {
  opacity: 0.7;
  transform: scaleX(1);
}

/* Los pseudo-elementos quedan detrás del texto, dentro de su propia capa. */
.button,
.header-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  color: #f7f7f4;
  background: linear-gradient(145deg, #232326db, #111113ed);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.07),
    0 8px 24px rgb(0 0 0 / 0.14);
  transition:
    border-color 250ms ease,
    box-shadow 350ms ease,
    transform 250ms ease-out;
}
.button::before,
.header-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rayo-spectrum);
  clip-path: inset(0 49.8% round 16px);
  opacity: 0;
  transition:
    clip-path 450ms cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 350ms ease;
  pointer-events: none;
}
.button::after,
.header-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.28)),
    var(--rayo-spectrum) center bottom / 78% 1px no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.button:is(:hover, :focus-visible, :active),
.header-cta:is(:hover, :focus-visible, :active) {
  color: #fff;
  background: linear-gradient(145deg, #262629e0, #131315ed);
  border-color: rgb(255 255 255 / 0.27);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    0 10px 30px rgb(0 0 0 / 0.22);
}
.button:is(:hover, :focus-visible, :active)::before,
.header-cta:is(:hover, :focus-visible, :active)::before {
  clip-path: inset(0 0 round 16px);
  opacity: 0.22;
}
.button:active::before,
.header-cta:active::before {
  opacity: 0.28;
}
.button:disabled::before {
  opacity: 0;
}
.header-cta {
  flex: none;
  min-height: 44px;
  padding: 10px 15px;
  gap: 14px;
  border-radius: 15px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.hero-actions {
  width: min(286px, calc(100vw - 2 * var(--page)));
}
.hero-actions .button {
  width: 100%;
  min-height: 62px;
  padding: 17px 24px;
  gap: 20px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.12px;
  transition:
    border-color 250ms ease,
    box-shadow 350ms ease,
    transform 250ms ease-out;
}
.hero-actions .button svg {
  width: 20px;
  height: 20px;
}
.text-link {
  border-radius: 8px;
  transition: color 180ms ease;
}
.text-link:hover {
  color: #fff;
}
.button:focus-visible,
.header-cta:focus-visible,
.main-nav a:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--glass-focus);
  outline-offset: 4px;
}

@supports (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .site-header::before {
    background: linear-gradient(145deg, #24242775, #111113b8);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
    backdrop-filter: blur(22px) saturate(125%);
  }
  .button,
  .header-cta {
    background: linear-gradient(145deg, #30303470, #101013b8);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
  }
  .button:is(:hover, :focus-visible, :active),
  .header-cta:is(:hover, :focus-visible, :active) {
    background: linear-gradient(145deg, #30303480, #101013c2);
  }
}

@media (max-width: 1099px) {
  .site-header {
    gap: 16px;
  }
  .main-nav {
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 20px;
    gap: 16px;
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    background: #131316ed;
    box-shadow: 0 20px 44px rgb(0 0 0 / 0.24);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    backdrop-filter: blur(24px) saturate(120%);
  }
  .js-ready .main-nav {
    padding: 12px 20px;
    align-items: stretch;
  }
  .js-ready .main-nav a {
    padding-inline: 7px;
    border-color: rgb(255 255 255 / 0.08);
  }
  .js-ready .main-nav a:last-child {
    border-bottom: 0;
  }
  .js-ready .menu-toggle {
    margin-right: 0;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: 14px;
    background: rgb(255 255 255 / 0.025);
    transition:
      background 200ms ease,
      border-color 200ms ease;
  }
  .js-ready .menu-toggle:is(:hover, :active, .is-open) {
    background: rgb(255 255 255 / 0.08);
    border-color: rgb(255 255 255 / 0.23);
  }
}
@media (max-width: 767px) {
  .site-header {
    padding-inline: 8px;
    gap: 8px;
  }
  .site-header::before {
    inset-block: 7px;
    border-radius: 22px;
  }
  .site-header .brand {
    justify-content: center;
    min-width: 40px;
  }
  .site-header .brand > span:last-child {
    display: none;
  }
  .header-cta {
    min-height: 44px;
    padding-inline: 12px;
    gap: 9px;
    font-size: 11px;
  }
  .header-cta svg {
    width: 14px;
    height: 14px;
  }
  body:not(.js-ready) .main-nav {
    flex-wrap: wrap;
    gap: 0 16px;
  }
  body:not(.js-ready) .main-nav a {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .button::before,
  .header-cta,
  .header-cta::before,
  .hero-actions .button,
  .main-nav a,
  .main-nav a::after,
  .text-link,
  .js-ready .menu-toggle,
  .menu-toggle span {
    transition: none;
  }
}
