* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #fff;
}

.bg-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: -2;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1);
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: -1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 24px 48px;
  z-index: 30;
}

.site-header .logo {
  justify-self: start;
  font-size: 22px;
  letter-spacing: 4px;
  font-weight: 300;
}

.site-header .audio-player {
  justify-self: center;
}

.site-header .nav-wrap {
  justify-self: end;
  position: relative;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* ---------- Hamburger toggle ---------- */

.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.menu-toggle:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.menu-bar {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #c96287, #cc7d23);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-bar:nth-child(2) {
  background: linear-gradient(90deg, #cc7d23, #469396);
}

.menu-bar:nth-child(3) {
  background: linear-gradient(90deg, #469396, #f1ffa5);
}

.menu-toggle.open .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .menu-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Dropdown panel ---------- */

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  min-width: 180px;
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-header .nav-dropdown a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Responsive: tablets ---------- */
@media (max-width: 900px) {
  .site-header {
    padding: 18px 28px;
  }

  .site-header .logo {
    font-size: 18px;
    letter-spacing: 3px;
  }

  .contact-email {
    font-size: 22px;
  }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 480px) {
  .site-header {
    padding: 14px 18px;
  }

  .site-header .logo {
    font-size: 15px;
    letter-spacing: 2px;
  }

  .audio-toggle {
    padding: 7px 14px 7px 12px;
  }

  .audio-title {
    display: none;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }
}

/* ---------- Responsive: landscape phones (short height) ---------- */
@media (max-height: 420px) and (orientation: landscape) {
  .site-header {
    padding: 10px 20px;
  }

  .site-header .logo {
    font-size: 14px;
  }
}

/* =========================================================
   Fase 1 — Rediseño: scroll, contenido de noticias, UX/UI
   (el fondo/vídeo y el panel de contacto de arriba no se tocan)
   ========================================================= */

html {
  scroll-behavior: smooth;
}

main {
  position: relative;
  z-index: 5;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.site-footer {
  position: relative;
  z-index: 5;
  padding: 40px 24px 32px;
  text-align: center;
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer p {
  font-size: 12px;
  line-height: 1.6;
  color: #fff;
  opacity: 0.55;
  letter-spacing: 0.3px;
}

.footer-email {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.footer-email:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .site-footer {
    padding: 32px 20px 24px;
  }

  .site-footer p {
    font-size: 11px;
  }
}

.hero-spacer {
  height: 82vh;
  height: 82dvh;
  pointer-events: none;
}

/* ---------- Custom cursor ---------- */

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}

body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.cursor-ring.hover {
  width: 58px;
  height: 58px;
  border-color: #fff;
}

/* ---------- Section shells ---------- */

.news-section {
  position: relative;
  overflow: hidden;
  padding: 40px 6vw 100px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.82) 12%,
    rgba(0, 0, 0, 0.92) 100%
  );
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.depth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.orb-a {
  top: -10%;
  left: -6%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 59, 59, 0.18), transparent 70%);
}

.orb-b {
  bottom: -12%;
  right: -8%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 300;
  letter-spacing: 2px;
  margin: 10px 0 6px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: heading-gradient-move 3s linear infinite;
}

@keyframes heading-gradient-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.section-sub {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.55;
}

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.6);
  animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 59, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); }
}

.feed-status {
  text-align: center;
  opacity: 0.6;
  font-size: 14px;
  letter-spacing: 0.5px;
  grid-column: 1 / -1;
}

/* ---------- News grid ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.news-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: block;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease,
    opacity 0.6s ease, translate 0.6s ease;
  will-change: transform;
  cursor: pointer;
}

.news-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.news-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

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

.card-body {
  padding: 16px 20px 22px;
}

.card-source {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.6;
}

.card-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  margin: 8px 0 10px;
}

.card-link {
  color: #fff;
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-time {
  font-size: 12px;
  opacity: 0.45;
}

/* ---------- Responsive additions ---------- */

@media (max-width: 900px) {
  .news-section {
    padding-left: 6vw;
    padding-right: 6vw;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-section {
    padding-top: 24px;
  }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Gradient button (prueba local) ---------- */

@property --pos-x { syntax: '<percentage>'; initial-value: 11.14%; inherits: false; }
@property --pos-y { syntax: '<percentage>'; initial-value: 140%; inherits: false; }
@property --spread-x { syntax: '<percentage>'; initial-value: 150%; inherits: false; }
@property --spread-y { syntax: '<percentage>'; initial-value: 180.06%; inherits: false; }
@property --color-1 { syntax: '<color>'; initial-value: #000; inherits: false; }
@property --color-2 { syntax: '<color>'; initial-value: #08012c; inherits: false; }
@property --color-3 { syntax: '<color>'; initial-value: #4e1e40; inherits: false; }
@property --color-4 { syntax: '<color>'; initial-value: #70464e; inherits: false; }
@property --color-5 { syntax: '<color>'; initial-value: #88394c; inherits: false; }
@property --border-angle { syntax: '<angle>'; initial-value: 20deg; inherits: true; }
@property --border-color-1 { syntax: '<color>'; initial-value: hsla(340, 75%, 60%, 0.2); inherits: true; }
@property --border-color-2 { syntax: '<color>'; initial-value: hsla(340, 75%, 40%, 0.75); inherits: true; }
@property --stop-1 { syntax: '<percentage>'; initial-value: 37.35%; inherits: false; }
@property --stop-2 { syntax: '<percentage>'; initial-value: 61.36%; inherits: false; }
@property --stop-3 { syntax: '<percentage>'; initial-value: 78.42%; inherits: false; }
@property --stop-4 { syntax: '<percentage>'; initial-value: 89.52%; inherits: false; }
@property --stop-5 { syntax: '<percentage>'; initial-value: 100%; inherits: false; }

.gradient-button {
  position: relative;
  appearance: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 22px;
  border: none;
  background: radial-gradient(
    var(--spread-x) var(--spread-y) at var(--pos-x) var(--pos-y),
    var(--color-1) var(--stop-1),
    var(--color-2) var(--stop-2),
    var(--color-3) var(--stop-3),
    var(--color-4) var(--stop-4),
    var(--color-5) var(--stop-5)
  );
  transition:
    --pos-x 0.5s, --pos-y 0.5s, --spread-x 0.5s, --spread-y 0.5s,
    --color-1 0.5s, --color-2 0.5s, --color-3 0.5s, --color-4 0.5s, --color-5 0.5s,
    --border-angle 0.5s, --border-color-1 0.5s, --border-color-2 0.5s,
    --stop-1 0.5s, --stop-2 0.5s, --stop-3 0.5s, --stop-4 0.5s, --stop-5 0.5s;
}

.gradient-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(var(--border-angle), var(--border-color-1), var(--border-color-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.gradient-button:hover {
  --pos-x: 0%;
  --pos-y: 91.51%;
  --spread-x: 120.24%;
  --spread-y: 103.18%;
  --color-1: #c96287;
  --color-2: #c66c64;
  --color-3: #cc7d23;
  --color-4: #37140a;
  --color-5: #000;
  --border-angle: 190deg;
  --border-color-1: hsla(340, 78%, 90%, 0.1);
  --border-color-2: hsla(340, 75%, 90%, 0.6);
  --stop-1: 0%;
  --stop-2: 8.8%;
  --stop-3: 21.44%;
  --stop-4: 71.34%;
  --stop-5: 85.76%;
}

.gradient-button-variant {
  --color-1: #000022;
  --color-2: #1f3f6d;
  --color-3: #469396;
  --color-4: #f1ffa5;
  --border-angle: 200deg;
  --border-color-1: hsla(320, 75%, 90%, 0.6);
  --border-color-2: hsla(320, 50%, 90%, 0.15);
}

.gradient-button-variant:hover {
  --pos-x: 0%;
  --pos-y: 95.51%;
  --spread-x: 110.24%;
  --spread-y: 110.2%;
  --color-1: #000020;
  --color-2: #f1ffa5;
  --color-3: #469396;
  --color-4: #1f3f6d;
  --color-5: #000;
  --stop-1: 0%;
  --stop-2: 10%;
  --stop-3: 35.44%;
  --stop-4: 71.34%;
  --stop-5: 90.76%;
  --border-angle: 210deg;
  --border-color-1: hsla(320, 75%, 90%, 0.2);
  --border-color-2: hsla(320, 50%, 90%, 0.75);
}

/* ---------- Contact page (prueba local) ---------- */

body.contact-page {
  background: #000;
}

.contact-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 110px 24px 40px;
  text-align: center;
}

.contact-email {
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 6px;
  word-break: break-word;
  max-width: 100%;
}

.contact-email:hover {
  border-color: #fff;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

@media (max-width: 480px) {
  .contact-email {
    font-size: 17px;
    letter-spacing: 1px;
    padding-bottom: 4px;
  }
}

/* ---------- NASA nav button + embed page ---------- */

.nav-live {
  position: relative;
}

.nav-live-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.6);
  animation: live-pulse 1.8s infinite;
}

.nasa-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
}

.nasa-embed {
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.nasa-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Audio player (prueba local) ---------- */

.audio-player {
  display: flex;
  align-items: center;
}

.audio-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 20px 8px 14px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(201, 98, 135, 0.35);
}

.audio-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.audio-icon-btn:hover {
  opacity: 0.85;
}

.audio-icon-btn.active {
  opacity: 1;
}

.audio-icon-btn .icon-play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}

.audio-icon-btn .icon-pause {
  display: flex;
  gap: 3px;
}

.audio-icon-btn .icon-pause span {
  width: 3px;
  height: 13px;
  background: #fff;
  display: inline-block;
}

.audio-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
