@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/portada/assets/fonts/inter-tight-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --navy: #0b1b31;
  --navy-deep: #061321;
  --navy-soft: #102945;
  --ink: #f3f7fc;
  --muted: #a9b7ca;
  --brand: #0056a4;
  --cyan: #55c7ff;
  --button-blue: #43a8ff;
  --button-cyan: #63d3ff;
  font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--navy);
}

body {
  min-width: 320px;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 53%, rgba(34, 79, 124, 0.34) 0, rgba(11, 27, 49, 0.13) 34%, transparent 64%),
    linear-gradient(145deg, var(--navy-deep) 0%, var(--navy) 50%, #092039 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 24%),
    radial-gradient(ellipse at center, transparent 48%, rgba(1, 8, 17, 0.18) 100%);
}

#particle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 460ms ease, transform 620ms cubic-bezier(.16, 1, .3, 1);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 88px 1fr;
  width: 100%;
  min-height: 100svh;
}

.site-header {
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 6.5vw, 128px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  outline-offset: 7px;
}

.brand-wordmark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 78px;
  height: 32px;
  overflow: hidden;
}

.brand-wordmark img {
  position: absolute;
  top: -6.57px;
  left: -5.94px;
  display: block;
  width: 90px;
  height: auto;
  max-width: none;
}

.brand-divider {
  width: 1px;
  height: 27px;
  background: rgba(255, 255, 255, 0.68);
}

.brand-platform {
  color: #fff;
  font-size: 18px;
  font-weight: 520;
  letter-spacing: -0.02em;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 18px 24px 34px;
}

.hero-content {
  position: relative;
  width: min(100%, 1240px);
  margin-top: -2.5vh;
  text-align: center;
  transition: opacity 360ms ease, transform 460ms cubic-bezier(.4, 0, .2, 1), filter 360ms ease;
}

body.is-entering-access #particle-field {
  opacity: 0.72;
  transform: scale(1.035) translateX(-1.5vw);
}

body.is-entering-access .hero-content {
  opacity: 0;
  filter: blur(5px);
  transform: translateX(-4vw) scale(0.985);
}

.hero-wordmark {
  position: relative;
  width: 111px;
  height: 45px;
  margin: 0 auto 27px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  animation: reveal-mark 620ms 80ms cubic-bezier(.16, 1, .3, 1) forwards;
}

.hero-wordmark img {
  position: absolute;
  top: -9.2px;
  left: -8.3px;
  display: block;
  width: 126px;
  height: auto;
  max-width: none;
}

h1 {
  min-height: 1.96em;
  max-width: 1180px;
  margin: 0 auto;
  color: #f4f7fb;
  font-size: clamp(58px, 4.65vw, 88px);
  font-weight: 430;
  line-height: 0.98;
  letter-spacing: -0.047em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.12);
}

.headline-line {
  display: grid;
  width: max-content;
  max-width: 100%;
  min-height: 0.98em;
  margin: 0 auto;
  text-align: left;
}

.headline-reserve,
.headline-type {
  grid-area: 1 / 1;
  max-width: 100%;
}

.headline-reserve {
  visibility: hidden;
}

.headline-type {
  position: relative;
  width: 100%;
  white-space: pre-wrap;
}

.headline-type.is-typing::after {
  display: inline-block;
  width: 0.045em;
  height: 0.74em;
  margin-left: 0.075em;
  content: "";
  vertical-align: 0.02em;
  background: rgba(100, 211, 255, 0.94);
  box-shadow: 0 0 16px rgba(85, 199, 255, 0.38);
  animation: cursor-pulse 720ms steps(1, end) infinite;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
  transform: translateY(0);
  transition:
    opacity 480ms cubic-bezier(.16, 1, .3, 1),
    transform 480ms cubic-bezier(.16, 1, .3, 1);
}

/* La entrada animada solo si el JS esta vivo; sin el, los botones se ven. */
.js-anim .hero-actions {
  opacity: 0;
  transform: translateY(10px);
}

.hero-actions.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.brand-lockup:focus-visible {
  outline: 3px solid rgba(87, 190, 255, 0.92);
}

.button--primary {
  gap: 10px;
  min-width: 224px;
  color: #061321;
  border-color: rgba(185, 234, 255, 0.38);
  background: linear-gradient(118deg, var(--button-blue) 0%, #55c1ff 54%, var(--button-cyan) 100%);
  box-shadow:
    0 10px 34px rgba(32, 151, 237, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(5, 78, 136, 0.12);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: linear-gradient(118deg, #50b2ff 0%, #63caff 54%, #76dcff 100%);
  box-shadow:
    0 15px 42px rgba(32, 151, 237, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(5, 78, 136, 0.1);
}

.button-arrow {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms ease;
}

.button--primary:hover .button-arrow,
.button--primary:focus-visible .button-arrow {
  transform: translateX(3px);
}

.button--secondary {
  min-width: 166px;
  border-color: rgba(220, 235, 255, 0.2);
  color: rgba(246, 249, 255, 0.88);
  background: rgba(240, 247, 255, 0.035);
}

.button--secondary:hover,
.button--secondary:focus-visible {
  border-color: rgba(220, 235, 255, 0.34);
  background: rgba(240, 247, 255, 0.075);
}

@keyframes reveal-mark {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cursor-pulse {
  0%,
  48% { opacity: 1; }
  49%,
  100% { opacity: 0.22; }
}

@media (max-width: 800px) {
  .page-shell {
    grid-template-rows: 76px 1fr;
  }

  .site-header {
    padding: 0 20px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-wordmark {
    width: 68px;
    height: 28px;
  }

  .brand-wordmark img {
    top: -5.72px;
    left: -5.17px;
    width: 78.46px;
  }

  .brand-platform {
    font-size: 16px;
  }

  .brand-divider {
    height: 23px;
  }

  .hero {
    padding: 10px 20px 18px;
  }

  .hero-content {
    margin-top: -12px;
  }

  .hero-wordmark {
    width: 95px;
    height: 39px;
    margin-bottom: 22px;
  }

  .hero-wordmark img {
    top: -7.88px;
    left: -7.12px;
    width: 108px;
  }

  h1 {
    min-height: 3.92em;
    width: 100%;
    max-width: calc(100vw - 40px);
    font-size: clamp(39px, 10.6vw, 54px);
    font-weight: 440;
    line-height: 1;
    letter-spacing: -0.05em;
  }

  .headline-line {
    width: 100%;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 310px);
    margin: 34px auto 0;
  }

  .button {
    width: 100%;
  }
}

@media (max-height: 720px) and (min-width: 801px) {
  .page-shell {
    grid-template-rows: 74px 1fr;
  }

  .hero {
    padding-bottom: 18px;
  }

  .hero-wordmark {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(50px, 4.3vw, 72px);
  }

  .hero-actions {
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .headline-type.is-typing::after {
    animation: none;
  }
}
