/* ============================================================================
   FUDI APP — Landing page
   Hoja de estilos única. Los valores provienen del prototipo de diseño
   (design/prototype/) y del manual de marca; ver docs/DESIGN.md.

   Todo el CSS vive aquí, fuera del HTML, para que la CSP pueda declarar
   `style-src 'self'` sin 'unsafe-inline'. No añadir atributos style="" al
   markup: romperían la política.
   ========================================================================= */

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --color-yellow: #ffc702;
  --color-black: #000000;
  --color-white: #ffffff;

  --on-dark-strong: rgba(255, 255, 255, 0.75);
  --on-dark-muted: rgba(255, 255, 255, 0.65);
  --on-dark-subtle: rgba(255, 255, 255, 0.6);
  --on-dark-faint: rgba(255, 255, 255, 0.45);
  --on-light-muted: rgba(0, 0, 0, 0.65);
  --on-light-strong: rgba(0, 0, 0, 0.7);

  --border-light: rgba(0, 0, 0, 0.1);
  --border-dark: rgba(255, 255, 255, 0.12);
  --border-ghost: rgba(255, 255, 255, 0.4);

  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', system-ui, sans-serif;

  --radius-pill: 999px;
  --radius-store: 14px;
  --radius-card: 20px;
  --radius-photo: 24px;
  --radius-icon: 16px;

  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.08);

  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Compensa la navbar sticky al saltar a un ancla. */
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  /* Red de seguridad, NO la solución: si algo desborda, el arreglo va en el
     elemento que desborda (ver la nota de min() en .hero__inner). Dejarlo aquí
     sin más convierte un bug de layout en contenido recortado sin aviso. */
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--color-black);
  text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* Foco visible y consistente en toda la página: requisito de accesibilidad
   (WCAG 2.4.7) que además evita que se pierda el rastro del teclado. */
:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-yellow);
  color: var(--color-black);
  padding: 12px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

/* ── Tipografía compartida ───────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--color-yellow);
  font-size: 14px;
  letter-spacing: 2px;
}

.kicker--on-dark {
  font-weight: 800;
  font-size: 15px;
}

.section__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-top: 10px;
}

.section__head {
  margin-bottom: 56px;
}

.section__head--center {
  text-align: center;
}

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

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

.section--dark {
  background: var(--color-black);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

/* ── Botones ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn--pill-yellow {
  background: var(--color-yellow);
  color: var(--color-black);
  padding: 12px 22px;
  font-size: 14px;
}

.btn--pill-yellow:hover {
  background: var(--color-black);
  color: var(--color-yellow);
}

.btn--pill-black {
  background: var(--color-black);
  color: var(--color-yellow);
}

.btn--pill-black:hover {
  background: var(--color-yellow);
  color: var(--color-black);
}

.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-store);
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.store-btn__icon {
  flex: none;
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-btn__pre {
  font-size: 11px;
  font-weight: 500;
}

.store-btn__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.store-btn--yellow {
  background: var(--color-yellow);
  color: var(--color-black);
}

.store-btn--yellow:hover {
  transform: translateY(-2px);
}

.store-btn--black {
  background: var(--color-black);
  color: var(--color-white);
  padding: 14px 26px;
}

.store-btn--black:hover {
  transform: translateY(-2px);
}

.store-btn__icon--accent {
  color: var(--color-yellow);
}

.store-btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: var(--border-ghost);
}

.store-btn--ghost:hover {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  height: 64px;
  width: auto;
  margin: -10px 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 14px;
}

.site-nav__link {
  transition: color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--color-yellow);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--color-black);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 75% 45%,
    rgba(255, 199, 2, 0.14),
    transparent 70%
  );
  pointer-events: none;
}

.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 88px var(--gutter) 96px;
  display: grid;
  /* `min(300px, 100%)` en lugar de `300px` a secas: con un mínimo fijo, la
     columna no puede bajar de 300px y por debajo de ~348px de viewport (300 +
     48 de padding) la página desborda a lo ancho. Envolverlo en min() mantiene
     exactamente el mismo punto de colapso en pantallas grandes y deja que la
     pista se encoja en móviles pequeños (iPhone SE, Androids de 320px).
     Mismo motivo en .cards, .steps y .join. */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  animation: fade-up 0.7s ease-out both;
}

.hero__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.05;
}

.hero__title-accent {
  color: var(--color-yellow);
}

.hero__lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--on-dark-strong);
  max-width: 480px;
}

.hero__stats {
  display: flex;
  gap: 28px;
  color: var(--on-dark-subtle);
  font-size: 13px;
  font-weight: 500;
}

.hero__stat-value {
  color: var(--color-yellow);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.hero__art {
  display: flex;
  justify-content: center;
  animation: fade-up 0.7s 0.15s ease-out both;
}

.hero__logo {
  width: min(440px, 90%);
  filter: drop-shadow(0 24px 60px rgba(255, 199, 2, 0.25));
}

/* ── Beneficios ──────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
}

.card {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--color-yellow);
  box-shadow: var(--shadow-card-hover);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-icon);
  display: grid;
  place-items: center;
  flex: none;
}

.card__icon--yellow {
  background: var(--color-yellow);
  color: var(--color-black);
}

.card__icon--black {
  background: var(--color-black);
  color: var(--color-yellow);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.card__body {
  color: var(--on-light-muted);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Cómo funciona ───────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step__num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 56px;
  color: var(--color-yellow);
  line-height: 1;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.step__body {
  color: var(--on-dark-muted);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Repartidores ────────────────────────────────────────────────────────── */
.join {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 48px;
  align-items: center;
}

.join__media {
  height: 420px;
  position: relative;
}

.join__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-photo);
}

.join__badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--color-yellow);
  color: var(--color-black);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  pointer-events: none;
}

.join__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.join__copy .section__title {
  margin-top: 0;
}

.join__body {
  color: var(--on-light-muted);
  line-height: 1.7;
  font-size: 16px;
  max-width: 460px;
}

/* ── CTA final ───────────────────────────────────────────────────────────── */
.cta {
  background: var(--color-yellow);
  padding: 80px var(--gutter);
  overflow: hidden;
  position: relative;
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(30px, 4.5vw, 48px);
  color: var(--color-black);
  line-height: 1.1;
}

.cta__slogan {
  margin-top: 10px;
  color: var(--on-light-strong);
  font-weight: 600;
  font-size: 16px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-black);
  color: var(--on-dark-strong);
  padding: 64px var(--gutter) 32px;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 320px;
}

.site-footer__brand img {
  width: 160px;
}

.site-footer__tagline {
  font-size: 14px;
  line-height: 1.7;
}

.site-footer__cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.site-footer__col-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-yellow);
  font-size: 13px;
  letter-spacing: 1.5px;
}

.site-footer__link {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.site-footer__link:hover {
  color: var(--color-yellow);
}

.site-footer__legal {
  border-top: 1px solid var(--border-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--on-dark-faint);
}

/* Crédito de autoría. Va tras la línea legal, centrado y con menos peso que
   ella para que no compita con el copyright de FUDI. */
.site-footer__credit {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--on-dark-subtle);
}

.site-footer__credit-icon {
  /* Los emoji heredan su propio color; sólo se ajusta el tamaño óptico. */
  font-size: 14px;
  line-height: 1;
}

.site-footer__credit-link {
  color: var(--color-white);
  font-weight: 600;
  text-decoration: none;
}

.site-footer__credit-link:hover,
.site-footer__credit-link:focus-visible {
  color: var(--color-yellow);
  text-decoration: underline;
}

/* ── Animaciones ─────────────────────────────────────────────────────────── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Estado inicial del reveal-on-scroll. Se aplica SOLO cuando main.js ha
   marcado el documento, de modo que sin JS (o si el script falla al cargar) el
   contenido queda visible en lugar de invisible para siempre. */
[data-js-reveal] [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-js-reveal] [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  :root {
    --section-y: 72px;
  }

  .site-footer__cols {
    gap: 40px;
  }
}

@media (max-width: 720px) {
  /* Sin menú hamburguesa a propósito: los tres enlaces son anclas de esta
     misma página y están repetidos en el footer, así que ocultarlos evita
     añadir JavaScript (y superficie de ataque) por un menú desplegable. */
  .site-nav li:not(:last-child) {
    display: none;
  }

  .hero__inner {
    padding: 64px var(--gutter) 72px;
  }

  .hero__stats {
    gap: 20px;
    flex-wrap: wrap;
  }

  .join__media {
    height: 320px;
  }
}

/* ── Accesibilidad: respetar la preferencia del sistema ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-js-reveal] [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ── Impresión ───────────────────────────────────────────────────────────── */
@media print {
  .site-header,
  .hero__glow {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
