/* =========================================================
   EVESTRUM DESIGN STUDIUM — Landing provisional
   ========================================================= */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: 'Founders Grotesk';
  src: url('fuentes/Founders Grotesk - Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sole Serif Display';
  src: url('fuentes/Sole Serif Display Regular Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --c-green: #00db5e;
  --c-green-hover: #007a34;
  --c-green-active: #6dffac;
  --c-dark: #101820;
  --c-pill-fill: rgba(60, 60, 59, 0.30);
  --c-white: #ffffff;

  --font-sans: 'Founders Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Sole Serif Display', Georgia, serif;

  --slide-duration: 6s;       /* 4.5s visible + 1.5s fade */
  --slide-fade: 1.5s;
  --marquee-duration: 40s;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-dark);
  color: var(--c-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  /* Altura = viewport - banda de pills (~130px desktop).
     Min/max para evitar aplastamiento en laptops 13" y estiramiento en monitores verticales. */
  height: calc(100vh - 130px);
  min-height: 640px;
  max-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 64px 64px;
  overflow: hidden;
}

/* Slideshow */
.hero__slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity var(--slide-fade) ease-in-out;
  will-change: opacity;
}

.hero__slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__slide.is-active { opacity: 1; }

/* Overlay radial (oscurece bordes, mantiene centro legible) */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

/* Contenido del hero */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
  width: 100%;
  max-width: 740px;
  text-align: center;
}

.hero__logo {
  display: block;
  width: 230px;
  height: 46px;
}

.hero__logo img {
  width: 100%;
  height: 100%;
}

.hero__title {
  font-size: 100px;
  line-height: 1.1;
  letter-spacing: -2px;
  margin: 0;
  font-weight: 400;
  color: var(--c-white);
}

.hero__title-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--c-green);
}

.hero__subtitle {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.56px;
  margin: 0;
  max-width: 529px;
}

/* Redes */
.hero__social {
  display: flex;
  gap: 48px;
  align-items: center;
}

.hero__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hero__social a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Botones */
.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Padding superior > inferior para empujar el texto ópticamente hacia abajo
     (compensa la métrica de Founders Grotesk con descendente alto) */
  padding: 18px 28px 10px;
  border-radius: 50px;
  font-size: 18px;
  letter-spacing: -0.09px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--c-green);
  color: #000;
}
.btn--primary:hover {
  background: var(--c-green-hover);
  color: var(--c-white);
}
.btn--primary:active {
  background: var(--c-green-active);
  color: #000;
}

.btn--secondary {
  background: transparent;
  color: var(--c-green);
  border-color: var(--c-green);
}
.btn--secondary:hover {
  background: transparent;
  color: var(--c-green-hover);
  border-color: var(--c-green-hover);
}
.btn--secondary:active {
  background: transparent;
  color: var(--c-green-active);
  border-color: var(--c-green-active);
}

/* =========================================================
   BANDA DE SERVICIOS (marquee)
   ========================================================= */
.services {
  background: var(--c-dark);
  padding: 48px 0 80px;
  overflow: hidden;
}

.services__marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  /* Mask para fade en bordes */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
}

.services__track {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
  /* Animación usa distancia en px calculada por JS = ancho del SET de items originales.
     Después de trasladar esa distancia, los items clonados están exactamente
     donde estaban los originales → loop visualmente perfecto. */
  animation: marquee var(--marquee-duration, 40s) linear infinite;
  will-change: transform;
}

.services__marquee:hover .services__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--marquee-distance, -100%)); }
}

/* Pill — fill plano 3C3C3B al 30%, sin stroke */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-radius: 50px;
  background: rgba(60, 60, 59, 0.30);
  color: var(--c-white);
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

/* =========================================================
   RESPONSIVE — Mobile (≤ 768px)
   ========================================================= */
@media (max-width: 768px) {

  .hero {
    /* Mobile: dejar espacio para barra de pills (~100px) y URL bar dinámico */
    height: calc(100svh - 100px);
    min-height: 580px;
    max-height: 760px;
    padding: 40px 24px;
  }

  .hero__content {
    gap: 28px;
    max-width: 100%;
  }

  .hero__logo {
    width: 144px;
    height: 28px;
  }

  .hero__title {
    font-size: 75px;
    line-height: 45px;
    letter-spacing: -1.5px;
  }

  .hero__subtitle {
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.4px;
  }

  .hero__social { gap: 40px; }

  .hero__buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .btn {
    width: 100%;
    font-size: 16px;
  }

  .services { padding: 32px 0 48px; }

  .pill { font-size: 14px; padding: 14px 16px; }
}

/* =========================================================
   RESPONSIVE — Tablet ajuste fino (769–1024)
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero__title { font-size: 80px; }
  .hero__subtitle { font-size: 24px; }
}

/* =========================================================
   ACCESIBILIDAD — Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
  .services__track { animation: none; }
  .hero__social a { transition: none; }
  .btn { transition: none; }
}
