/* Shared styles for the NIMA subpages. The landing page (index.html) keeps its own inline styles. */
:root {
  --bg: #050b16;
  --bg-2: #06101d;
  --panel: #081627;
  --line: rgba(120, 200, 255, 0.14);
  --line-strong: rgba(120, 200, 255, 0.28);
  --text: #eef3f8;
  --text-2: #c3cfdb;
  --muted: #8fa0b2;
  --accent: #22c3ee;
  --accent-soft: rgba(34, 195, 238, 0.16);
  --warn: #f5b84a;
  --ok: #46d39a;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body { font-family: 'Lexend', system-ui, sans-serif; font-weight: 300; line-height: 1.55; overflow-x: hidden; }
a { color: var(--text); text-decoration: none; }
a:hover { color: #6fdcf7; }
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
button { font: inherit; color: inherit; }

/* Bilingual content: every translatable string ships in both languages. */
html[data-lang="es"] body [lang="en"],
html:not([data-lang="es"]) body [lang="es"] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 11, 22, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
}
.site-header .bar {
  max-width: 1480px; height: 68px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 40px);
}
.site-header .logo img { height: 24px; width: auto; }
.site-nav { display: flex; gap: clamp(14px, 1.8vw, 28px); font-size: 14px; white-space: nowrap; min-width: 0; overflow: hidden; padding-left: clamp(0px, 2vw, 32px); }
.site-nav a { color: var(--text-2); position: relative; padding: 6px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.lang-toggle { display: flex; padding: 3px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); }
.lang-toggle button {
  appearance: none; cursor: pointer; border: none; border-radius: 999px; padding: 5px 11px;
  font-size: 12px; font-weight: 400; letter-spacing: 0.08em; background: transparent; color: #cfd9e3;
  transition: background .2s, color .2s;
}
.lang-toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.header-tools .gh { font-size: 15px; }
.menu-btn {
  display: none; appearance: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18); background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { width: 16px; height: 1.5px; background: var(--text); }
.mobile-nav { display: none; }

@media (max-width: 1020px) {
  .site-nav, .header-tools .gh { display: none; }
  .site-header .bar { grid-template-columns: auto 1fr auto; }
  .menu-btn { display: flex; }
  .mobile-nav.open {
    display: flex; flex-direction: column; padding: 4px var(--gutter) 18px;
    border-top: 1px solid rgba(120, 200, 255, 0.08); font-size: 18px;
  }
  .mobile-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .mobile-nav a:last-child { border-bottom: none; }
  .mobile-nav a[aria-current="page"] { color: var(--accent); }
}

/* ---------- Page hero ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  background: radial-gradient(120% 90% at 85% 0%, #0a2a45 0%, #061527 45%, var(--bg) 75%);
}
.page-hero::after {
  content: ""; position: absolute; left: 50%; bottom: -1400px; width: 1800px; height: 1800px; margin-left: -900px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 40%, #0b3a5c 0%, #072642 35%, #061a30 60%, #050f1f 75%);
  box-shadow: inset 0 6px 14px rgba(190, 245, 255, 0.35), inset 0 40px 110px rgba(40, 175, 235, 0.3);
  opacity: .55;
  /* Only the top 400px of the circle are visible: fade them out so the section edge never cuts it. */
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 140px, transparent 380px);
  mask-image: linear-gradient(180deg, #000 0, #000 140px, transparent 380px);
}
.page-hero .wrap { position: relative; z-index: 1; }
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: 0.34em; color: #cfd9e3; text-transform: uppercase; }
.page-hero h1 { margin-top: 18px; font-size: clamp(38px, 6vw, 76px); font-weight: 200; letter-spacing: -0.035em; }
.page-hero h1 b { font-weight: 400; color: var(--accent); }
.page-hero .lead { margin-top: 20px; max-width: 640px; font-size: clamp(15px, 1.6vw, 18px); color: var(--text-2); text-wrap: pretty; }

section.block { padding: clamp(48px, 7vw, 96px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head h2 { font-size: clamp(26px, 3.2vw, 40px); }
.section-head p { max-width: 520px; color: var(--muted); font-size: 15px; }

/* ---------- Common pieces ---------- */
.card {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(150deg, #0a1f35, #061223 70%); overflow: hidden;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--accent); border-color: rgba(34, 195, 238, 0.5); background: var(--accent-soft); }
.pill.live::before { animation: pulse 1.6s ease-in-out infinite; }
.pill.warn { color: var(--warn); border-color: rgba(245, 184, 74, 0.45); background: rgba(245, 184, 74, 0.1); }
.pill.done { color: var(--ok); border-color: rgba(70, 211, 154, 0.45); background: rgba(70, 211, 154, 0.08); }
.pill.next { color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px;
  padding: 0 30px; border-radius: 999px; font-size: 15px; font-weight: 400; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary { background: var(--accent); color: #041018; border-color: var(--accent); box-shadow: 0 0 40px rgba(34, 195, 238, 0.3); }
.btn.primary:hover { background: #4fd3f3; color: #041018; }

.tag { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: var(--text-2); border: 1px solid rgba(255, 255, 255, 0.06); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.3, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill.live::before { animation: none; }
}

/* ---------- Teaser modal ---------- */
.teaser-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px); background: rgba(2, 6, 12, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s ease;
}
.teaser-modal.open { opacity: 1; }
.teaser-modal .frame {
  position: relative; width: min(96vw, calc((100vh - 120px) * 16 / 9), 1600px); aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #000;
  border: 1px solid var(--line-strong); box-shadow: 0 30px 120px rgba(0, 0, 0, 0.6), 0 0 80px rgba(34, 195, 238, 0.12);
  transform: scale(.97); transition: transform .3s cubic-bezier(.3, .8, .2, 1);
}
.teaser-modal.open .frame { transform: none; }
.teaser-modal iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.teaser-modal .close {
  position: absolute; top: clamp(10px, 2vw, 22px); right: clamp(10px, 2vw, 22px); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(5, 11, 22, 0.7); color: var(--text);
}
.teaser-modal .close:hover { border-color: var(--accent); color: var(--accent); }
.teaser-modal .caption { position: absolute; left: 0; right: 0; bottom: clamp(8px, 2vw, 18px); text-align: center; font-size: 12px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; pointer-events: none; }
@media (max-height: 520px) { .teaser-modal .caption { display: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: clamp(40px, 8vw, 100px); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: clamp(28px, 4vw, 40px); padding: clamp(36px, 5vw, 56px) 0 36px; }
.site-footer .col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.site-footer .col .h { color: var(--muted); margin-bottom: 2px; }
.site-footer .brand img { height: 36px; width: auto; align-self: flex-start; }
.site-footer .motto { font-size: 11px; font-weight: 400; letter-spacing: 0.3em; color: var(--muted); line-height: 2; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center; color: #cfd9e3;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.socials svg { width: 16px; height: 16px; }
.site-footer .legal { display: flex; justify-content: space-between; gap: 24px; padding: 0 0 40px; font-size: 12px; color: #7f90a2; }
