@import url('tokens.css');

/* Landing del apex.
 *
 * El lenguaje visual sale del diseño de la landing del design system (Ulises):
 * display grande con letter-spacing negativo, un tramo del título en degradé,
 * CTAs tipo pastilla, tarjetas de instrumento con sombra en capas y ritmo de
 * secciones con un acento por bloque.
 *
 * La historia de color NO sale de ahí. Ese archivo tiene tres `:root` en
 * conflicto y un `--primary` que el propio comentario declara "overridden at
 * runtime by the toggle", o sea que el primario todavía se estaba tanteando.
 * Por decisión del usuario (2026-08-31) la landing usa el azul del portal
 * (#0065F4) y los neutrales cálidos que ya están en el design system, así que
 * el apex y el panel se ven de la misma familia.
 *
 * Tampoco sale de ahí el contenido: el mockup traía diez marcas de comercio
 * inventadas con monto, testimonios y links a páginas que no existen. Nada de
 * eso está acá.
 */

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* --- head ---------------------------------------------------------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  width: 100%;
  max-width: 72rem;
}

.site-head .wordmark {
  margin: 0;
  font-size: 1.25rem;
}

/* --- botones ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 200ms ease;
}

.btn-ghost {
  padding: 0.5rem 0.875rem;
  color: var(--foreground);
  font-size: 0.875rem;
}

.btn-ghost:hover {
  background: var(--shell);
  color: var(--foreground);
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  box-shadow:
    0 1px 2px rgb(7 17 44 / 10%),
    0 8px 18px -6px rgb(0 101 244 / 45%);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--surface);
}

.btn-secondary {
  border-color: var(--gray-300);
  background: var(--surface);
  color: var(--foreground);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  color: var(--foreground);
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  gap: 3.5rem;
  align-items: center;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) 1.5rem clamp(3rem, 8vh, 5rem);
  width: 100%;
  max-width: 72rem;
}

@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.hero h1 {
  margin: 0;
  max-width: 35rem;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* El degradé del tramo destacado es del diseño; los stops son la escala azul
 * del portal en vez de los cuatro acentos del mockup. */
.hero h1 .accent {
  background: linear-gradient(
    110deg,
    var(--primary-dark) 0%,
    var(--primary) 45%,
    #4790ff 78%,
    #47c2ff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .sub {
  margin: 1.375rem 0 0;
  max-width: 32rem;
  color: var(--gray-600);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

/* --- tarjetas del hero --------------------------------------------------- */

.hero-visual {
  overflow: hidden;
  /* Se difumina en los bordes en vez de cortarse en seco, como en el diseño. */
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.gc-row {
  overflow: hidden;
}

.gc-row + .gc-row {
  margin-top: 1rem;
}

/* La segunda fila corre al revés y más lento, como las dos pistas cruzadas del
 * diseño: da movimiento sin que se lea como un carrusel. */
.gc-row--2 {
  margin-left: -3rem;
}

.gc-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gc-slide 40s linear infinite;
}

.gc-row--2 .gc-track {
  animation-duration: 52s;
  animation-direction: reverse;
}

@keyframes gc-slide {
  from {
    transform: translateX(0);
  }
  to {
    /* La pista es la lista de tarjetas dos veces, así que a la mitad el loop
     * empalma sin salto. */
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-track {
    animation: none;
  }
}

.gc {
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  width: 13.5rem;
  height: 8.25rem;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--surface);
  box-shadow:
    0 14px 32px -14px rgb(10 10 20 / 18%),
    0 2px 4px rgb(10 10 20 / 6%);
}

.gc-kind {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gc-amount {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gc-foot {
  display: flex;
  justify-content: space-between;
  color: var(--gray-400);
  font-size: 0.75rem;
}

.gc-mark {
  font-weight: 700;
}

/* Los hues son los que el portal ya le asigna a cada tipo de instrumento:
 * gift card → blue, descuento → green, voucher → amber. */
.gc--blue {
  background: #dce8fd;
  border-color: #c7dbfb;
}

.gc--blue .gc-kind {
  color: #1c5cd8;
}

.gc--green {
  background: #d6f1dc;
  border-color: #bfe7c8;
}

.gc--green .gc-kind {
  color: #14904a;
}

.gc--amber {
  background: #fdeec5;
  border-color: #f8e0a4;
}

.gc--amber .gc-kind {
  color: #b27607;
}

/* --- features ------------------------------------------------------------ */

.features {
  display: grid;
  gap: 1.25rem;
  margin: 0 auto;
  padding: 0 1.5rem clamp(3rem, 8vh, 5rem);
  width: 100%;
  max-width: 72rem;
}

@media (min-width: 52rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Un acento por bloque, como el ritmo `data-accent` del diseño. */
.feature {
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature--blue {
  border-top-color: #1c5cd8;
}

.feature--green {
  border-top-color: #14904a;
}

.feature--amber {
  border-top-color: #b27607;
}

.feature h2 {
  margin: 0 0 0.625rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- cierre -------------------------------------------------------------- */

.cta-final {
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 4.5rem) 1.5rem;
  width: 100%;
  max-width: 72rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.cta-final h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cta-final p {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.cta-final .ctas {
  justify-content: center;
}

.site-foot {
  margin-top: auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  background: var(--shell);
  font-size: 0.875rem;
}

.site-foot p {
  margin: 0 auto;
  width: 100%;
  max-width: 72rem;
}

.site-foot .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-foot .fine {
  margin-top: 0.75rem;
  color: var(--gray-400);
}
