/* ==========================================================================
   SIPUMERC · Landing de una sola pantalla
   Paleta y tipografía consistentes con el sitio hermano (Branbex)
   ========================================================================== */

:root {
  /* Colores */
  --color-bg: #000000;
  --color-accent: #5DA130;
  --color-accent-hover: #6FBB3B;
  --color-text: #FFFFFF;
  --color-muted: #9A9CB8;

  /* Superficies claras (modal) */
  --color-light: #F6F7FB;
  --color-ink: #16182F;
  --color-ink-muted: #4A4D6B;

  /* Header en vidrio esmerilado */
  --header-bg: rgba(0, 0, 0, 0.6);
  --header-bg-solid: rgba(0, 0, 0, 0.94);
  --header-border: rgba(154, 156, 184, 0.16);
  --header-height: 84px;

  /* Logo del header */
  --logo-height: 56px;

  /* Tipografía */
  --font-display: "Archivo Black", "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Espaciado */
  --gutter: 1.25rem;
  --radius: 999px;
}

/* --------------------------------------------------------------------------
   Reset básico
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;         /* fallback para navegadores sin svh */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Brillo sutil de acento detrás del hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Sobre negro puro no se puede "oscurecer" para dar profundidad:
     el degradado suma luz en lugar de restarla. */
  background:
    radial-gradient(58% 46% at 50% 42%, rgba(93, 161, 48, 0.22) 0%, rgba(93, 161, 48, 0) 70%),
    radial-gradient(90% 60% at 50% 104%, rgba(93, 161, 48, 0.10) 0%, rgba(93, 161, 48, 0) 62%),
    radial-gradient(120% 80% at 50% 0%, rgba(154, 156, 184, 0.08) 0%, rgba(154, 156, 184, 0) 55%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Header fijo · vidrio esmerilado
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--header-border);

  /* Fallback: fondo casi sólido para navegadores sin backdrop-filter */
  background-color: var(--header-bg-solid);
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background-color: var(--header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.site-header__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--logo-height);
}

.brand__logo {
  height: var(--logo-height);
  width: auto;
}

/* Visible sólo si assets/logo.png no carga (ver onerror en index.html) */
.brand__fallback {
  display: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  line-height: 1;
}

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

.hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) var(--gutter) 2rem;
}

.hero__inner {
  width: 100%;
  max-width: 1100px;
  text-align: center;
  animation: fade-up 0.7s ease-out both;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;             /* Archivo Black ya es pesada */
  font-size: clamp(2.2rem, 11vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.hero__tagline {
  margin: 1.1rem 0 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.8rem, 3.2vw, 1.25rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.btn {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 0.9rem 2.1rem;
  background-color: var(--color-accent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.85rem, 2.6vw, 1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(93, 161, 48, 0.28);
}

.btn:active {
  transform: translateY(0);
}

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

.site-footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 1.25rem var(--gutter) calc(1.25rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.site-footer__sep {
  margin: 0 0.4rem;
  color: var(--color-muted);
  opacity: 0.6;
}

/* Botón con apariencia de enlace (abre el modal de privacidad) */
.site-footer__link {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Modal · Aviso de Privacidad
   -------------------------------------------------------------------------- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 1rem;
  background-color: rgba(6, 7, 24, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  overscroll-behavior: contain;
}

.modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade 0.2s ease-out both;
}

/* Bloquea el scroll de fondo mientras el modal está abierto */
body.has-modal-open {
  overflow: hidden;
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1.25rem 1.75rem;
  background-color: var(--color-light);
  color: var(--color-ink);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: left;
  animation: modal-rise 0.25s ease-out both;
}

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(22, 24, 47, 0.06);
  color: var(--color-ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-text);
}

.modal__title {
  margin: 0 0 1rem;
  padding-right: 2.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.15;
  color: var(--color-ink);
}

.modal__body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-ink-muted);
}

.modal__body h3 {
  margin: 1.6rem 0 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--color-ink);
}

.modal__body p {
  margin: 0 0 0.85rem;
}

.modal__body ul {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
}

.modal__body li {
  margin-bottom: 0.3rem;
}

.modal__body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.modal__legal {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 24, 47, 0.12);
  font-size: 0.78rem;
  color: var(--color-ink-muted);
}

/* --------------------------------------------------------------------------
   Animación
   -------------------------------------------------------------------------- */

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

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

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet */
@media (min-width: 768px) {
  :root {
    --gutter: 2rem;
    --header-height: 96px;
    --logo-height: 64px;
  }

  .brand__fallback {
    font-size: 1.35rem;
  }

  .hero__tagline {
    margin-top: 1.35rem;
    letter-spacing: 0.4em;
  }

  .site-footer p {
    font-size: 0.85rem;
  }

  .modal__box {
    padding: 2.25rem 2rem 2rem;
    border-radius: 16px;
  }

  .modal__close {
    top: 0.9rem;
    right: 0.9rem;
  }

  .modal__body {
    font-size: 0.95rem;
  }
}

/* Escritorio */
@media (min-width: 1024px) {
  :root {
    --gutter: 3rem;
    --header-height: 104px;
    --logo-height: 72px;
  }

  .site-header__inner {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .brand__fallback {
    font-size: 1.5rem;
  }

  .btn {
    margin-top: 2.75rem;
    padding: 1rem 2.6rem;
  }
}

/* Pantallas bajas en horizontal: evita que el hero desborde */
@media (max-height: 520px) {
  :root {
    --header-height: 64px;
    --logo-height: 44px;
  }

  .site-header__inner {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .modal__box {
    max-height: 92vh;
  }

  .hero {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 1rem;
  }

  .hero__title {
    font-size: clamp(2.2rem, 9vh, 5rem);
  }

  .btn {
    margin-top: 1.5rem;
  }
}
