/* Estilos propios de la página publicada (hero Saturno, menú, contacto y pie) */

/* ---------- Hero: Saturno a contraluz ---------- */
.saturn {
  --sw: 84vw;
  --cx: 78%;
  --cy: 54%;
  position: absolute;
  width: var(--sw);
  aspect-ratio: 2200 / 1239;
  left: calc(var(--cx) - var(--sw) * 0.5);
  top: calc(var(--cy) - var(--sw) * 0.5632 * 0.57);
  transform: rotate(-12deg) scale(1.08);
  transform-origin: 50% 57%;
  /* parte transparente y en penumbra (no en negro: el negro puro quedaría más oscuro que el fondo) */
  opacity: 0;
  filter: brightness(0.35);
  transition: transform 4.5s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 1.2s ease 0.2s, filter 3.6s cubic-bezier(0.5, 0, 0.2, 1) 0.4s;
}
/* "Eclipse": el sol pasa detrás del planeta y se encienden los anillos */
.is-on .saturn { transform: rotate(-12deg); opacity: 1; filter: brightness(1.05); }
.saturn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* el duotono violeta ya viene aplicado en el archivo: se ve igual desde el primer
     instante y en todos los navegadores (Safari no aplica bien filtros SVG a imágenes) */
  -webkit-mask: radial-gradient(50% 50% at 50% 57%, #000 70%, transparent);
  mask: radial-gradient(50% 50% at 50% 57%, #000 70%, transparent);
}

.model {
  right: 25vw;
  top: 12vh;
  width: 22vw;
  height: 30vh;
  transform: translate(-12vw, 6vh) scale(0.6);
}
.model model-viewer { filter: drop-shadow(0 0 26px rgba(167, 107, 255, 0.5)); }
.readout { right: 7vw; top: 80vh; }

.hero-copy { max-width: 700px; }
.hero h1 { font-size: clamp(42px, 5.3vw, 76px); text-wrap: balance; }

/* Íconos de los CTA: el cohete despega y el telescopio apunta al pasar el mouse */
.ico { flex: none; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cta-rocket:hover .ico { transform: translate(2px, -3px); }
.cta-scope .ico { transform-origin: 50% 60%; }
.cta-scope:hover .ico { transform: rotate(-12deg); }

/* ---------- Header: acceso al portal ---------- */
.nav-portal { display: inline-flex; align-items: center; gap: 7px; padding-left: 26px; border-left: 1px solid var(--line-strong); }

/* ---------- Header: menú mobile ---------- */
.site-header { position: absolute; }
.menu-btn { cursor: pointer; }
.menu-btn svg path { transition: transform 0.3s ease, opacity 0.2s ease; transform-origin: center; }
.site-header.open .menu-btn .l1 { transform: translateY(4px) rotate(45deg); }
.site-header.open .menu-btn .l2 { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  z-index: 2;
  padding: 120px var(--gutter) 140px;
  text-align: center;
  background:
    radial-gradient(60% 70% at 50% 100%, rgba(122, 58, 176, 0.28), transparent 70%),
    var(--cosmos);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.contact h2 {
  margin: 0 auto;
  max-width: 820px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.contact h2 span { color: var(--nebula); }
.contact p { margin: 22px auto 0; max-width: 520px; color: var(--gray); font-size: 17px; }
.contact .hero-actions { justify-content: center; margin-top: 36px; }
.mail-link { color: var(--white); font-family: var(--display); font-size: 18px; letter-spacing: 0.01em; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.mail-link:hover { border-color: var(--nebula); }

/* ---------- Pie ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--cosmos);
  font-size: 14px;
  color: var(--gray);
}
.site-footer .brand .iso { width: 24px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a:hover { color: var(--white); }
.footer-legal a { color: inherit; }

@media (max-width: 900px) {
  /* Menú desplegable */
  .site-header.open .site-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: var(--gutter);
    right: var(--gutter);
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(9, 13, 29, 0.94);
    backdrop-filter: blur(14px);
    font-size: 16px;
  }
  .site-header.open .site-nav a { padding: 12px 14px; border-radius: 10px; color: var(--white); }
  .site-header.open .site-nav a:hover { background: var(--orbital); }
  .site-header.open .site-nav .nav-portal { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; padding-top: 16px; }

  /* Hero mobile: la escena ocupa el fondo y el texto sube sobre ella con un degradado.
     100svh = alto visible con la barra del navegador abierta; el padding inferior
     respeta la zona segura (home indicator / barra de gestos). */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--header-h) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  }
  .visual { position: absolute; inset: 0 0 auto; height: 68svh; margin: 0; }
  .veil { background: linear-gradient(to bottom, rgba(9, 13, 29, 0) 38%, rgba(9, 13, 29, 0.82) 72%, var(--cosmos) 100%); }
  .saturn {
    --sw: 205vw; --cx: 50%; --cy: 44%;
    /* eclipse más corto en mobile: el texto aparece casi enseguida */
    transition: transform 2.6s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.8s ease, filter 1.4s ease-out 0.1s;
  }
  /* Saturno más tenue para que la sonda y el texto tengan contraste */
  .is-on .saturn { filter: brightness(0.62) saturate(0.9); }
  .model { right: auto; left: 2vw; top: calc(var(--header-h) - 4px); width: 52vw; height: 20svh; }
  .readout { right: var(--gutter); top: calc(var(--header-h) + 8px); }
  .hero h1 { font-size: clamp(34px, 10.5vw, 44px); }
  .hero-desc { font-size: 15.5px; margin-top: 14px; }
  .hero-actions { margin-top: 22px; gap: 12px 20px; }
  /* mismo padding y separación que el botón: íconos y textos alineados en columna */
  .cta-scope { padding: 4px 24px; gap: 10px; }

  .contact { padding: 88px var(--gutter) 100px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
/* Teléfonos altos: el planeta baja para acompañar al texto sin dejar hueco */
@media (max-width: 900px) and (min-height: 800px) {
  .saturn { --cy: 50%; --sw: 215vw; }
}
/* Teléfonos bajos (p. ej. iPhone SE): compactar para que la idea quepa completa */
@media (max-width: 900px) and (max-height: 700px) {
  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 14.5px; line-height: 1.45; }
  .btn { padding: 13px 20px; }
  .cta-scope { padding: 2px 20px; }
}
