/* Propuesta de rediseño de stratosecurities.com.
   Mismos textos que el sitio actual; cambia solo el diseño. Sin frameworks ni estilos inline (CSP estricta). */

/* Raleway (SIL Open Font License 1.1, ver assets/fonts/OFL.txt). */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/raleway-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Marca: los dos azules y el gris del sitio actual. */
  --navy-950: #020f17;
  --navy-900: #031926;
  --navy-800: #0a2c40;
  --ice: #ddf3fe;
  --mist: #dce1de;
  --paper: #f4f7f9;
  --ink: #0d1f2b;
  --ink-soft: #3d4f5b;
  --on-dark: #ffffff;
  --on-dark-soft: #c9d6de;
  --accent: #7cc7ef;
  --accent-ink: #0b5f8a;

  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 72px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 24px 60px -28px rgba(3, 25, 38, 0.45);
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Raleway, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  /* Raleway usa números de estilo antiguo por defecto; en datos financieros se leen mejor alineados. */
  font-variant-numeric: lining-nums;
}

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

a {
  color: inherit;
}

/* Foco: azul oscuro sobre fondos claros y celeste sobre fondos oscuros (contraste ≥ 3:1 en ambos). */
:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero :focus-visible,
.section--dark :focus-visible,
.license :focus-visible,
.footer :focus-visible,
.header:not(.is-scrolled):not(.is-open) :focus-visible {
  outline-color: var(--accent);
}

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

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--ice);
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------- Header */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  color: var(--on-dark);
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

.header.is-scrolled,
.header.is-open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(3, 25, 38, 0.08);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.header__logo img {
  width: 132px;
  height: auto;
  /* El logo es negro: sobre el hero oscuro se muestra en blanco. */
  filter: brightness(0) invert(1);
  transition: filter 0.35s ease;
}

.header.is-open {
  background: #ffffff;
}

.header.is-scrolled .header__logo img,
.header.is-open .header__logo img {
  filter: none;
}

.header__toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
}

.header__toggle-bars,
.header__toggle-bars::before,
.header__toggle-bars::after {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.header__toggle-bars {
  position: relative;
}

.header__toggle-bars::before,
.header__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.header__toggle-bars::before {
  top: -7px;
}

.header__toggle-bars::after {
  top: 7px;
}

.header.is-open .header__toggle-bars {
  background: transparent;
}

.header.is-open .header__toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.header.is-open .header__toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.header__list {
  list-style: none;
}

.header__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  text-decoration: none;
}

.header__lang .header__link {
  font-weight: 700;
}

@media (max-width: 899.98px) {
  .header__nav {
    position: absolute;
    inset: var(--header-h) 0 auto;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition:
      max-height 0.4s var(--ease-out),
      visibility 0s 0.4s;
  }

  .header.is-open .header__nav {
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    visibility: visible;
    transition: max-height 0.4s var(--ease-out);
  }

  .header__list {
    padding: 0.5rem var(--gutter) 1.5rem;
  }

  .header__link {
    min-height: 56px;
    font-size: 1.375rem;
    border-bottom: 1px solid rgba(3, 25, 38, 0.08);
  }

  .header__lang .header__link {
    border-bottom: 0;
  }
}

@media (min-width: 900px) {
  .header__toggle {
    display: none;
  }

  .header__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .header__link {
    min-height: 44px;
    padding: 0 0.9rem;
    border-radius: 999px;
    transition: background-color 0.2s ease;
  }

  .header__link:hover {
    background: rgba(127, 199, 239, 0.18);
  }

  .header__link--login {
    margin-left: 0.5rem;
    border: 1.5px solid currentColor;
  }

  .header__lang {
    margin-left: 0.25rem;
  }

  .header__logo img {
    width: 150px;
  }
}

/* ------------------------------------------------------------------ Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 3rem) 6rem;
  overflow: hidden;
  isolation: isolate;
  color: var(--on-dark);
  background: var(--navy-900) url(../video/hero-poster.jpg) center / cover no-repeat;
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sombras para que el texto se lea sobre el video en cualquier ancho. */
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 15, 23, 0.9) 0%, rgba(2, 15, 23, 0.82) 55%, rgba(2, 15, 23, 0.7) 82%, rgba(2, 15, 23, 0.2) 100%),
    linear-gradient(180deg, rgba(2, 15, 23, 0.35) 0%, rgba(2, 15, 23, 0) 25%, rgba(3, 25, 38, 0) 70%, var(--navy-900) 100%);
}

/* Hasta 1099 px el título ocupa casi todo el ancho: la sombra cubre todo el hero. */
@media (max-width: 1099.98px) {
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(2, 15, 23, 0.6) 0%, rgba(2, 15, 23, 0.74) 50%, var(--navy-900) 100%);
  }
}

.hero__content {
  position: relative;
}

.hero__title {
  max-width: 21em;
  font-size: clamp(1.6rem, 1.05rem + 2.3vw, 2.9rem);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__title strong {
  font-weight: 700;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease-out),
    background-color 0.25s ease,
    color 0.25s ease;
}

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

.button--primary {
  background: var(--ice);
  color: var(--navy-900);
}

.button--primary:hover {
  background: #ffffff;
}

.button--ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: var(--on-dark);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero__pause {
  position: absolute;
  right: var(--gutter);
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(2, 15, 23, 0.55);
  color: var(--on-dark);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.hero__pause-icon {
  width: 10px;
  height: 12px;
  border-inline: 3px solid currentColor;
}

.hero__pause[data-state="paused"] .hero__pause-icon {
  width: 0;
  height: 0;
  border-block: 6px solid transparent;
  border-inline: 10px solid currentColor;
  border-inline-end: 0;
}

/* Sin JS el botón no haría nada: se muestra solo cuando site.js está activo. */
html:not(.js) .hero__pause {
  display: none;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--on-dark);
}

@media (max-width: 767.98px) {
  .hero__scroll {
    display: none;
  }
}

/* -------------------------------------------------------------- Sections */

.section {
  padding-block: var(--section-y);
}

.section--light {
  background: var(--paper);
  color: var(--ink);
}

.section--dark {
  background: var(--navy-900);
  color: var(--on-dark);
}

.section__title {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section__title--center {
  max-width: 24em;
  margin-inline: auto;
  text-align: center;
}

.section__lead {
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--ink-soft);
}

.section--dark .section__lead {
  color: var(--on-dark-soft);
}

/* Página 404: ocupa la pantalla debajo del header fijo. */
.notfound {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + var(--section-y));
  text-align: center;
}

.notfound__text {
  margin-top: 1rem;
  color: var(--on-dark-soft);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 5fr 7fr;
  }

  .split--reverse .split__media {
    order: 2;
  }

  .split--reverse {
    grid-template-columns: 7fr 5fr;
  }
}

.photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.photo--wide {
  aspect-ratio: 16 / 7;
}

@media (max-width: 899.98px) {
  .photo {
    aspect-ratio: 16 / 10;
  }
}

/* Licencia: tarjeta oscura sobre la sección clara. */
.license {
  margin-top: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--navy-900);
  color: var(--on-dark);
  box-shadow: var(--shadow);
}

.license__number {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.license__list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  list-style: none;
}

.license__list li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  font-size: 1.125rem;
}

.icon--check {
  margin-top: 0.2em;
  padding: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(124, 199, 239, 0.2);
  fill: var(--accent);
}

/* Servicios. */
.services__head {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .services__head {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.cards {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 2rem;
  border: 1px solid rgba(3, 25, 38, 0.08);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink-soft);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  padding: 11px;
  border-radius: 14px;
  background: var(--navy-900);
  fill: var(--accent);
}

.link {
  /* El padding vertical de un elemento inline no mueve el texto: lleva el área táctil a ≥ 24 px (C-06). */
  padding-block: 0.2em;
  color: var(--accent-ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Contacto. */
.contact {
  background:
    radial-gradient(1200px 500px at 85% 0%, rgba(124, 199, 239, 0.12), transparent 60%),
    var(--navy-900);
}

.contact__grid {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: 5fr 7fr;
    align-items: stretch;
  }
}

.contact__list {
  display: grid;
  gap: 0.75rem;
  align-content: center;
  list-style: none;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-dark-soft);
  overflow-wrap: anywhere;
}

.contact__item .icon {
  fill: var(--accent);
}

.contact__item--code {
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
}

.contact__link {
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
}

.contact__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact__map {
  width: 100%;
  min-width: 0;
  min-height: 340px;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------------------- Footer */

.footer {
  padding-block: 2.25rem;
  background: var(--navy-950);
  color: var(--on-dark-soft);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__logo {
  width: 120px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer__text {
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------- Sin JS */

/* Sin JS el header no sabe si hubo scroll ni puede abrir el menú: queda claro y con el menú a la vista. */
html:not(.js) .header {
  position: absolute;
  color: var(--ink);
  background: #ffffff;
}

html:not(.js) .header__logo img {
  filter: none;
}

html:not(.js) .header__toggle {
  display: none;
}

@media (max-width: 899.98px) {
  html:not(.js) .header__bar {
    flex-wrap: wrap;
  }

  html:not(.js) .header__nav {
    position: static;
    width: 100%;
    max-height: none;
    visibility: visible;
    box-shadow: none;
  }

  html:not(.js) .header__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    padding: 0 0 0.75rem;
  }

  html:not(.js) .header__link {
    min-height: 44px;
    font-size: 1rem;
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------- Impresión */

@media print {
  .header,
  .hero__video,
  .hero__shade,
  .hero__pause,
  .hero__scroll,
  .skip-link {
    display: none !important;
  }

  /* Las transiciones le ganan a !important: hay que apagarlas para que todo se imprima visible. */
  *,
  .reveal {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero,
  .section--dark,
  .contact,
  .footer,
  .license {
    background: none !important;
    color: #000 !important;
  }

  .section--dark .section__lead,
  .contact__item,
  .contact__link {
    color: #000 !important;
  }
}

/* ------------------------------------------------------------ Animaciones */

@media (prefers-reduced-motion: no-preference) {
  .hero .reveal {
    animation: rise 1.1s var(--ease-out) both;
  }

  .hero .hero__actions {
    animation-delay: 0.25s;
  }

  /* Las demás secciones aparecen al entrar en pantalla (site.js agrega .is-visible). */
  .js main > :not(.hero) .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.9s var(--ease-out),
      transform 0.9s var(--ease-out);
  }

  .js main > :not(.hero) .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .hero__scroll span {
    animation: scroll-cue 2s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button:hover,
  .card:hover {
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scroll-cue {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
  }
  80% {
    opacity: 0;
    transform: translateY(12px);
  }
}
