/* ============================================================
   Hey Axton — Splash / página de inicio independiente
   Base HTML estático. Sin dependencias ni build.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --gold:        #e3c48f;
  --gold-soft:   #d9bd86;
  --gold-rule:   #c9a86a;

  /* Fondo */
  --bg-base:     #1a1918;
  --bg-mid:      #2b2823;
  --bg-hi:       #3a352d;

  /* Texto */
  --text:        #ffffff;
  --text-muted:  #d9d6d1;

  /* Layout */
  --gutter:      clamp(1.5rem, 5.2vw, 6.25rem);
  --max-copy:    46rem;

  /* Tipografía */
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, p { margin: 0; }

/* ============================================================
   Shell
   ============================================================ */
.splash {
  position: relative;
  isolation: isolate;

  /* Movil: flujo vertical simple — logo, copy, formulario, claim.
     La pantalla unica de 100dvh solo tiene sentido en escritorio, donde el
     formulario cabe al lado del texto en lugar de debajo. */
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  min-height: 100dvh;
  padding: clamp(1.5rem, 3.5vw, 3.75rem) var(--gutter);
  overflow: hidden;

  /* Degradado base: más claro hacia el centro-derecha, como el arte original */
  background:
    radial-gradient(115% 95% at 72% 34%, var(--bg-hi) 0%, transparent 62%),
    linear-gradient(135deg, var(--bg-mid) 0%, var(--bg-base) 58%, #111110 100%);
}

/* Textura "Hey" — capa decorativa, nunca contenido */
.splash__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../img/bg-hey.jpg");
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
  pointer-events: none;
}

/* ============================================================
   Header / logo
   ============================================================ */
.splash__header { display: flex; }

.splash__logo-link {
  display: inline-block;
  line-height: 0;
  border-radius: 50%;
  outline-offset: 6px;
}

.splash__logo {
  width: clamp(5rem, 11vw, 12.5rem);
  height: auto;
}

/* ============================================================
   Contenido
   ============================================================ */
.splash__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max-copy);
}

.splash__title {
  font-size: clamp(2.75rem, 8.6vw, 5.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--gold);
}

.splash__rule {
  width: clamp(11rem, 30vw, 35.5rem);
  margin: clamp(1rem, 2.2vh, 1.75rem) 0 clamp(1.5rem, 3.4vh, 2.75rem);
  border: 0;
  border-top: 3px solid var(--gold-rule);
}

.splash__headline {
  font-size: clamp(1.375rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: var(--text);
}

.splash__lead {
  margin-top: clamp(1.25rem, 3vh, 2.25rem);
  font-size: clamp(1rem, 1.9vw, 1.625rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
}

.is-gold { color: var(--gold); }

/* ---------- CTA hacia el formulario ---------- */
.splash__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  margin-top: clamp(1.5rem, 3.5vh, 2.5rem);
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bg-base);
  text-decoration: none;
  background: var(--gold);
  border-radius: 999px;
  transition: background-color 160ms ease, transform 160ms ease;
}

.splash__cta:hover,
.splash__cta:focus-visible {
  background: #f0d5a6;
  transform: translateY(-1px);
}

.splash__cta-icon { flex: none; }

/* ============================================================
   Panel del formulario
   ============================================================ */
/* Sin fondo, sin sombra, sin radio: el formulario de Zoho ya trae su propia
   tarjeta blanca (450px de ancho) y su pagina tiene el fondo transparente.
   Poner un panel blanco detras duplicaba visualmente el ancho del formulario:
   se veia un bloque blanco mucho mas grande que el formulario en si. */
.splash__form {
  background: none;
}

.splash__form iframe {
  display: block;
  width: 100%;
  border: 0;

  /* Alto medido de la tarjeta blanca de Zoho (.centerContainer), no del
     documento: su wrapper `bgWrapper` es `height: 100%`, asi que scrollHeight
     siempre devuelve el alto del iframe y no sirve para medir.
     A 342px de ancho la tarjeta mide 765px → 49rem deja ~19px de margen. */
  height: 49rem;
}

/* ============================================================
   Footer / claim
   ============================================================ */
.splash__footer { display: flex; }

.splash__claim {
  width: clamp(15rem, 44vw, 47rem);
  height: auto;
}

/* Variante en texto vivo (si se retira el recurso grafico) */
.splash__claim--text {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.1rem);
  font-size: clamp(1.5rem, 4.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Escritorio: el arte a la izquierda, el formulario en el panel derecho,
   sobre el espacio que ocupa el trazo "Hey". Vuelve a ser UNA pantalla. */
@media (min-width: 64rem) {
  .splash {
    display: grid;
    /* Dos columnas iguales: la derecha se queda con todo el espacio libre y
       el formulario se centra dentro de ella, en lugar de quedar pegado al
       borde derecho de la pagina. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(2rem, 4vw, 4.5rem);
    gap: 0;
    column-gap: clamp(2rem, 4vw, 4.5rem);
  }

  .splash__header  { grid-area: 1 / 1 / 2 / 2; }
  .splash__content { grid-area: 2 / 1 / 3 / 2; padding-block: clamp(2rem, 6vh, 5rem); }
  .splash__footer  { grid-area: 3 / 1 / 4 / 2; }

  /* El panel ocupa las tres filas: llega desde la altura del logo hasta la
     del claim, igual que en el diseño. */
  .splash__form {
    grid-area: 1 / 2 / 4 / 3;

    /* Centrado en los dos ejes, NO estirado. Vertical: estirarlo a las tres
       filas daba un panel de 1080px con el formulario ocupando 860px, o sea un
       bloque muerto abajo. Horizontal: sin esto la tarjeta queda contra el
       borde derecho de la pagina. */
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: 30rem;   /* la tarjeta de Zoho mide 450px */
  }

  .splash__form iframe {
    /* A 480px de ancho la tarjeta mide 746px. Con los 864px anteriores
       quedaban 118px de iframe transparente debajo: el formulario se veia
       descentrado hacia arriba con un hueco grande abajo. */
    height: 47rem;
  }
}

/* Móvil: los saltos de línea del arte original estorban */
@media (max-width: 47.9375rem) {
  .splash__headline br,
  .splash__lead br { display: none; }

  .splash__bg {
    background-position: 62% center;
    opacity: 0.38;
  }
}

/* Pantallas bajas y apaisadas (móvil horizontal) */
@media (max-height: 34rem) and (orientation: landscape) {
  .splash { padding-block: 1rem; }
  .splash__logo { width: 3.5rem; }
  .splash__content { padding-block: 0.5rem; }
  .splash__title { font-size: 2.25rem; }
  .splash__rule { margin: 0.5rem 0 0.75rem; width: 12rem; }
  .splash__headline { font-size: 1.125rem; line-height: 1.25; }
  .splash__lead { margin-top: 0.625rem; font-size: 0.875rem; line-height: 1.4; }
  .splash__claim { width: 11rem; }
  .splash__cta { margin-top: 0.75rem; padding: 0.5rem 1.1rem; font-size: 0.8125rem; }
}

/* ============================================================
   Accesibilidad
   ============================================================ */
:where(a, button):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

@media (prefers-contrast: more) {
  .splash__bg  { opacity: 0.35; }
  .splash__lead { color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
