/* ══════════════════════════════════════════════════════════════════════════
   FENÓMENOS DEL CARIBE — style.css
   Mobile-first. One file. Built on the original design language:
   deep-navy glass, gradient hairline borders, Gugi display type,
   the grid + light-streak hero, and the marquee.
   Brand blue: #000b33 (fenomenosdelcaribe.org theme colour)
   ══════════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Gugi&display=swap");

/* ─────────────────────────────  1. TOKENS  ───────────────────────────── */

:root {
  /* Brand + surfaces */
  --brand: #000b33; /* the dark blue */
  --brand-700: #0a1642;
  --brand-600: #121e43; /* glass header */
  --brand-500: #172554; /* dropdown / card wash */

  --bg: #00060f;
  --surface: #070b19; /* grid cells, band sections */
  --surface-2: #090f22; /* hero backdrop */
  --ink: #050711; /* icon chips */

  /* Lines + glow */
  --line: rgba(69, 81, 118, 0.18);
  --line-2: rgba(93, 102, 135, 0.42);
  --glow: #455176;

  /* Type */
  --text: #ffffff;
  --text-2: #ccd2e0;
  --text-3: #b9becc;
  --text-4: #8b92aa;
  --text-5: #5d6687;

  /* The single accent: a weather-warning amber, only for "live" signals */
  --alert: #ffb020;

  /* Shape + motion */
  --r-sm: 1rem;
  --r-md: 1.6rem;
  --r-lg: 2rem;
  --r-pill: 1000rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --header-h: 6.6rem; /* slim on phones */
  --gutter: 2rem;
}

@media (min-width: 64em) {
  :root {
    --header-h: 8.6rem;
    --gutter: 4rem;
  }
}

/* ─────────────────────────────  2. RESET  ────────────────────────────── */

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 2.4rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text-3);
  font-size: 1.6rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

section {
  position: relative;
  z-index: 100;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 0.2rem solid var(--alert);
  outline-offset: 0.3rem;
  border-radius: 0.4rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1.6rem;
  z-index: 5000;
  padding: 1.2rem 2rem;
  background-color: var(--text);
  color: var(--ink);
  font-weight: 600;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ──────────────────────  3. TYPE + SHARED PIECES  ────────────────────── */

/* The signature: a display line that runs the full width of the page.
   On phones it wraps at a clamped size; from 48em up, js/script.js measures
   the longest line and scales the type so it fills the column edge to edge. */
.heading__primary {
  font-family: "Gugi", "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.08rem;
  font-size: clamp(2.8rem, 8vw, 12rem); /* no-JS fallback; script.js fits it */
  background-image: linear-gradient(180deg, #ffffff 42%, #96a0bd 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.2rem transparent; /* thickens the glyphs, as in the original */
  filter: drop-shadow(0 0 6rem rgba(69, 81, 118, 0.45));
}

.heading__secondary {
  font-family: "Gugi", "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04rem;
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  background-image: linear-gradient(180deg, #ffffff 50%, #97a0ba 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.12rem transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--text-5);
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 0.1rem;
  flex-shrink: 0;
  background-color: var(--line-2);
}
.eyebrow--live {
  color: var(--alert);
}
.eyebrow--live::before {
  display: none;
}

.container {
  width: min(100% - (var(--gutter) * 2), 140rem);
  margin-inline: auto;
}

.section {
  padding: 8rem 0;
  border-bottom: 0.1rem solid var(--line);
}

.section__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  margin-bottom: 4rem;
  max-width: 62rem;
}

.section__lead {
  font-size: 1.6rem;
  line-height: 1.65;
  color: var(--text-4);
}

@media (min-width: 64em) {
  .section {
    padding: 12rem 0;
  }
  .section__head {
    align-items: center;
    text-align: center;
    margin-inline: auto;
    margin-bottom: 6.4rem;
  }
  .section__lead {
    font-size: 1.8rem;
  }
}

/* Section banding — alternate the two surfaces down the page */
.logos,
.coverage,
.regions,
.articles,
.footer {
  background-color: var(--surface);
}
.mission,
.services,
.community,
.alerts {
  background-color: var(--bg);
}

/* Buttons — the gradient-hairline pill from the original hero button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  padding: 1.4rem 2.8rem;
  border-radius: var(--r-pill);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn ion-icon {
  font-size: 1.9rem;
}

.btn--primary {
  background-color: #dfe3ee;
  color: var(--ink);
  width: 100%;
}
.btn--primary:hover {
  background-color: #fff;
}

.btn--ghost {
  color: var(--text-2);
  background-color: rgba(18, 30, 67, 0.45);
  border: 0.1rem solid var(--line-2);
  backdrop-filter: blur(1.2rem);
}
.btn--ghost:hover {
  color: #fff;
  background-color: var(--brand-500);
  border-color: var(--text-5);
}

.btn__back {
  display: flex;
  padding: 0.1rem;
  border-radius: var(--r-pill);
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.05), #fff);
}
.btn__back--inline {
  align-self: flex-start;
  margin-top: 0.8rem;
}
.btn__back--inline .btn--primary {
  width: auto;
}

@media (min-width: 36em) {
  .btn {
    font-size: 1.7rem;
    padding: 1.5rem 3rem;
  }
  .btn--primary {
    width: auto;
  }
}

/* Cards — gradient hairline wrapper + dark inner panel */

.grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
}

.card {
  padding: 0.1rem;
  border-radius: var(--r-lg);
  background-image: linear-gradient(
    170deg,
    rgba(93, 102, 135, 0.45),
    rgba(23, 37, 84, 0.08) 55%
  );
  transition: transform 0.3s var(--ease), background-image 0.3s var(--ease);
}

.card__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  height: 100%;
  padding: 2.4rem;
  border-radius: calc(var(--r-lg) - 0.1rem);
  background-image: linear-gradient(
    170deg,
    rgba(9, 15, 34, 0.94),
    rgba(0, 11, 51, 0.72)
  );
  overflow: hidden;
  text-decoration: none;
  transition: background-image 0.3s var(--ease);
}

/* A thread of light along the top edge of every card */
.card__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 0.1rem;
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-0.4rem);
  background-image: linear-gradient(
    170deg,
    rgba(139, 146, 170, 0.7),
    rgba(23, 37, 84, 0.15) 55%
  );
}
.card:hover .card__inner {
  background-image: linear-gradient(
    170deg,
    rgba(13, 22, 52, 0.96),
    rgba(0, 11, 51, 0.75)
  );
}
.card:hover .card__inner::before {
  opacity: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  margin-bottom: 0.4rem;
  background-color: var(--ink);
  border: 0.1rem solid var(--line);
  border-radius: var(--r-sm);
  color: #e8e9ee;
  font-size: 2.8rem;
  transition: all 0.3s var(--ease);
}
.card:hover .card__icon {
  border-color: var(--line-2);
  color: #fff;
}

.card__title {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02rem;
}

.card__text {
  font-size: 1.45rem;
  line-height: 1.6;
  color: var(--text-4);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.card__link ion-icon {
  font-size: 1.5rem;
}
.card:hover .card__link,
.card__link:hover {
  color: #fff;
  gap: 1.1rem;
}

@media (min-width: 36em) {
  .grid {
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64em) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .card__inner {
    padding: 3rem;
  }
}

/* Scroll reveal — scoped to .js so nothing is invisible without JavaScript */

.js .reveal {
  opacity: 0;
  transform: translateY(2.4rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────  4. HERO BACKGROUND  ──────────────────────── */

.project {
  display: flex;
  flex-direction: column;
}

.project-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 0.1rem solid var(--line);
}

/* Vignette: darkens the far edges so the type sits cleanly on the mesh,
   and fades the hero into the band below. */
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-image: radial-gradient(
      130% 95% at 50% 42%,
      rgba(0, 6, 15, 0) 34%,
      rgba(0, 6, 15, 0.72) 100%
    ),
    linear-gradient(to bottom, rgba(0, 6, 15, 0) 78%, var(--surface) 100%);
}

.background {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--surface-2);
}

/* The mesh. Cells are opaque; the 0.2rem gaps and the semi-transparent
   "lit" cells are what let the moving light streaks bleed through. */
.background-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr));
  grid-auto-rows: 5.6rem;
  gap: 0.2rem;
  pointer-events: none;
}

.background-grid-box {
  background-color: var(--surface);
}

.background-grid-box.is-lit {
  background-color: rgba(9, 15, 34, 0.83);
  animation: cellPulse 6s infinite ease-in-out;
}

@media (min-width: 64em) {
  .background-grid {
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    grid-auto-rows: 7rem;
  }
}

/* Light streaks */

.background-line-1,
.background-line-2,
.background-line-3 {
  position: absolute;
  z-index: 2;
  width: 22rem;
  height: 12rem;
  background-color: var(--glow);
  filter: blur(3rem);
}

.background-line-4,
.background-line-5,
.background-line-6 {
  position: absolute;
  z-index: 2;
  width: 12rem;
  height: 22rem;
  background-color: var(--glow);
  filter: blur(3rem);
}

.background-line-1 {
  top: 80%;
  left: -20%;
  animation: MovingLine 10s infinite 15s linear;
}
.background-line-2 {
  top: 45%;
  left: -20%;
  animation: MovingLine 15s infinite 10s linear;
}
.background-line-3 {
  top: 10%;
  left: -20%;
  animation: MovingLine 17s infinite linear;
}
.background-line-4 {
  top: -35%;
  left: 25%;
  animation: MovingLineVertical 10s infinite 17s linear;
}
.background-line-5 {
  top: -35%;
  left: 50%;
  animation: MovingLineVertical 15s infinite 10s linear;
}
.background-line-6 {
  top: -35%;
  left: 75%;
  animation: MovingLineVertical 17s infinite 5s linear;
}

@media (min-width: 64em) {
  .background-line-1,
  .background-line-2,
  .background-line-3 {
    width: 30rem;
    height: 15rem;
  }
  .background-line-4,
  .background-line-5,
  .background-line-6 {
    width: 15rem;
    height: 30rem;
  }
}

@keyframes MovingLine {
  0% {
    left: -25%;
  }
  50% {
    opacity: 0;
  }
  100% {
    left: 105%;
  }
}

@keyframes MovingLineVertical {
  0% {
    top: -35%;
  }
  50% {
    opacity: 0;
  }
  100% {
    top: 105%;
  }
}

@keyframes cellPulse {
  0%,
  100% {
    background-color: rgba(9, 15, 34, 0.83);
  }
  50% {
    background-color: rgba(9, 15, 34, 0.55);
  }
}

@keyframes sliderLogo {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.55);
  }
  70% {
    box-shadow: 0 0 0 0.9rem rgba(255, 176, 32, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0);
  }
}

/* ────────────────────────────  5. HEADER  ────────────────────────────── */

.header {
  position: relative;
  z-index: 1600; /* above the phone dropdown, so the X stays tappable */
}

.header__container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 2.4rem, 140rem);
  margin: 1rem 0;
  padding: 0.7rem 0.7rem 0.7rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background-color: rgba(18, 30, 67, 0.5);
  border: 0.1rem solid rgba(18, 30, 67, 0.45);
  border-radius: var(--r-pill);
  backdrop-filter: blur(3rem);
  -webkit-backdrop-filter: blur(3rem);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.header__container.is-scrolled {
  background-color: rgba(0, 11, 51, 0.85);
  border-color: var(--line);
  box-shadow: 0 1.2rem 4rem rgba(0, 4, 20, 0.55);
}

.header__left {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  min-width: 0;
}

.header__logo {
  width: 3.6rem;
  height: 3.6rem;
  flex-shrink: 0;
  border-radius: 50%;
}

.header__logo--text {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01rem;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.header__left:hover .header__logo--text {
  color: #fff;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav,
.header__right--right {
  display: none;
}

/* Burger */

.header__burger {
  display: grid;
  place-content: center;
  gap: 0.5rem;
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 0.1rem solid var(--line-2);
  background-color: rgba(5, 7, 17, 0.5);
}

.header__burger--bar {
  display: block;
  width: 1.7rem;
  height: 0.15rem;
  background-color: var(--text-2);
  border-radius: 0.2rem;
  transition: transform 0.3s var(--ease);
}

.header__burger[aria-expanded="true"] .header__burger--bar:first-child {
  transform: translateY(0.32rem) rotate(45deg);
}
.header__burger[aria-expanded="true"] .header__burger--bar:last-child {
  transform: translateY(-0.33rem) rotate(-45deg);
}

@media (min-width: 64em) {
  .header__container {
    padding: 1.2rem 1.2rem 1.2rem 2rem;
    margin: 1.5rem 0;
  }
  .header__logo {
    width: 4.8rem;
    height: 4.8rem;
  }
  .header__logo--text {
    font-size: 2rem;
  }
  .header__burger {
    display: none;
  }
  .header__nav,
  .header__right--right {
    display: flex;
    align-items: center;
  }
  .header__nav {
    gap: 3rem;
  }
  .header__right--right {
    gap: 2rem;
  }
}

/* Desktop nav */

.header__nav--links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-4);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.header__nav--links:hover {
  color: #e6e9f2;
}

.header__nav--box {
  position: relative;
}

.header__nav--icon {
  font-size: 1.6rem;
  transition: transform 0.25s var(--ease);
}
.header__nav--products[aria-expanded="true"] {
  color: #fff;
}
.header__nav--products[aria-expanded="true"] .header__nav--icon {
  transform: rotate(180deg);
}

.header__right--sep {
  width: 0.1rem;
  height: 3.4rem;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.46),
    rgba(255, 255, 255, 0)
  );
}

.header__right--start-back {
  display: flex;
  padding: 0.1rem;
  border-radius: var(--r-pill);
  background-image: linear-gradient(to right, #5d6687, rgba(255, 255, 255, 0));
}

.header__right--start {
  padding: 1.2rem 2.2rem;
  font-size: 1.6rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-radius: var(--r-pill);
  background-image: linear-gradient(to right, var(--brand-600), var(--brand));
  background-size: 200% 200%;
  background-position: 90%;
  transition: background-position 0.4s var(--ease);
  white-space: nowrap;
}
.header__right--start:hover {
  background-position: 20%;
}

/* ────────────────────  6. PRODUCTS DROPDOWN (desktop)  ───────────────── */

.products__dropdown {
  position: absolute;
  top: calc(100% + 2.2rem);
  left: 50%;
  z-index: 5;
  width: min(44rem, 90vw);
  padding: 0.2rem;
  border-radius: var(--r-lg);
  background-image: linear-gradient(rgba(23, 37, 84, 0), var(--brand-500));
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s;
}

.products__dropdown.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-0.8rem);
}

.products__dropdown--container {
  padding: 1.6rem;
  border-radius: calc(var(--r-lg) - 0.2rem);
  background-color: rgba(0, 6, 15, 0.9);
  backdrop-filter: blur(2rem);
  -webkit-backdrop-filter: blur(2rem);
}

.products__dropdown--heading {
  display: block;
  margin-left: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--text-5);
}

.products__dropdown--links {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.products__dropdown--link {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}
.products__dropdown--link:hover {
  background-color: var(--ink);
}

.products__dropdown--link-icon {
  flex-shrink: 0;
  padding: 1rem;
  font-size: 2.6rem;
  color: #e8e9ee;
  background-color: var(--ink);
  border: 0.1rem solid var(--line);
  border-radius: var(--r-sm);
}
.products__dropdown--link:hover .products__dropdown--link-icon {
  border-color: var(--line-2);
}

.products__dropdown--link-right {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.products__dropdown--link-right-heading {
  font-size: 1.7rem;
  font-weight: 500;
  color: #fff;
}

.products__dropdown--link-right-desc {
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--text-4);
}

/* ───────────  7. PHONE NAV — a compact dropdown, not a takeover  ─────────── */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1500;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 6, 15, 0.55);
  backdrop-filter: blur(0.6rem);
  -webkit-backdrop-filter: blur(0.6rem);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.mobile-nav.is-open .mobile-nav__backdrop {
  opacity: 1;
}

/* Hangs straight off the bottom of the header pill and is only as tall
   as its contents. */
.mobile-nav__panel {
  position: absolute;
  top: calc(var(--header-h) + 1rem);
  left: 1.2rem;
  right: 1.2rem;
  max-height: calc(100svh - var(--header-h) - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.1rem;
  border-radius: var(--r-lg);
  background-image: linear-gradient(
    170deg,
    rgba(93, 102, 135, 0.5),
    rgba(23, 37, 84, 0.1)
  );
  box-shadow: 0 2rem 6rem rgba(0, 4, 20, 0.65);
  opacity: 0;
  transform: translateY(-1rem) scale(0.985);
  transform-origin: top center;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.mobile-nav.is-open .mobile-nav__panel {
  opacity: 1;
  transform: none;
}

.mobile-nav__inner {
  padding: 0.8rem;
  border-radius: calc(var(--r-lg) - 0.1rem);
  background-image: linear-gradient(
    rgba(9, 15, 34, 0.97),
    rgba(0, 11, 51, 0.95)
  );
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.4rem;
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.mobile-nav__link:hover,
.mobile-nav__link:active {
  background-color: var(--ink);
  color: #fff;
}

.mobile-nav__link ion-icon {
  font-size: 1.6rem;
  color: var(--text-5);
  transition: transform 0.25s var(--ease);
}

.mobile-nav__group {
  margin-block: 0.4rem;
  padding-block: 0.4rem;
  border-block: 0.1rem solid var(--line);
}

.mobile-nav__toggle[aria-expanded="true"] ion-icon {
  transform: rotate(180deg);
}

.mobile-nav__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.mobile-nav__toggle[aria-expanded="true"] + .mobile-nav__sub {
  grid-template-rows: 1fr;
}
.mobile-nav__sub > div {
  overflow: hidden;
}

.mobile-nav__sub--link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem 0.85rem 1.8rem;
  font-size: 1.4rem;
  color: var(--text-4);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.mobile-nav__sub--link ion-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  color: var(--text-5);
}
.mobile-nav__sub--link:hover,
.mobile-nav__sub--link:active {
  color: #fff;
  background-color: var(--ink);
}

.mobile-nav__cta {
  margin-top: 0.8rem;
  padding: 1.2rem 0.6rem 0.6rem;
  border-top: 0.1rem solid var(--line);
}

@media (min-width: 64em) {
  .mobile-nav {
    display: none !important;
  }
}

/* ─────────────────────────────  8. HERO  ─────────────────────────────── */

.hero {
  position: relative;
  z-index: 100;
  display: flex;
  width: 100%;
  padding: calc(var(--header-h) + 3.2rem) 0 2.4rem;
}

.hero__container {
  display: flex;
  flex-direction: column;
  width: min(100% - (var(--gutter) * 2), 140rem);
  margin-inline: auto;
  text-align: center;
}

/* Content sits in the optical centre; the strip is pinned to the foot */
.hero__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 2.4rem;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1.6rem;
  margin-bottom: 2.4rem;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-3);
  background-color: rgba(5, 7, 17, 0.6);
  border: 0.1rem solid var(--line-2);
  border-radius: var(--r-pill);
  backdrop-filter: blur(1rem);
}

.hero__status--dot {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--alert);
  animation: livePulse 2.2s infinite;
}

.hero__heading {
  width: 100%;
  text-align: center;
}

.hero__heading--line {
  display: block;
  width: fit-content; /* shrink-wraps the text so JS can measure it */
  margin-inline: auto;
  white-space: nowrap; /* the two lines are the composition — never reflow them */
}

/* On phones the headline must read BIG: let the lines wrap naturally and
   set a large size here (the JS auto-fit only runs from 48em up). */
@media (max-width: 47.99em) {
  .hero__heading {
    font-size: clamp(3.6rem, 11.5vw, 6.4rem);
    line-height: 1.08;
  }
  .hero__heading--line {
    white-space: normal;
  }
}

.hero__text {
  margin-top: 2.4rem;
  max-width: 64rem;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-3);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.2rem;
  width: 100%;
  max-width: 34rem;
  margin-top: 3.2rem;
}

/* Instrument strip along the foot of the hero */
.hero__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding-top: 2rem;
  border-top: 0.1rem solid var(--line-2);
}

.hero__stat {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.4rem;
  padding-inline: 0.6rem;
}
.hero__stat + .hero__stat {
  border-left: 0.1rem solid var(--line);
}

.hero__stat--value {
  font-family: "Gugi", "Inter", sans-serif;
  font-size: 1.4rem;
  line-height: 1.25;
  color: #fff;
}

.hero__stat--label {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--text-5);
}

@media (min-width: 36em) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
    max-width: none;
  }
  .hero__text {
    font-size: 1.9rem;
  }
  .hero__stat--value {
    font-size: 1.8rem;
  }
  .hero__stat--label {
    font-size: 1.2rem;
  }
}

@media (min-width: 64em) {
  .hero {
    padding: calc(var(--header-h) + 2.4rem) 0 3.2rem;
  }
  .hero__body {
    padding-block: 1.6rem;
  }
  .hero__text {
    margin-top: 2.4rem;
    max-width: 68rem;
    font-size: 2rem;
  }
  .hero__actions {
    margin-top: 3.2rem;
  }
  .hero__strip {
    padding-top: 2.8rem;
  }
  .hero__stat {
    flex-direction: column-reverse;
    align-items: flex-start;
    padding-inline: 3.2rem;
  }
  .hero__stat:first-child {
    padding-left: 0;
  }
  .hero__stat--value {
    font-size: 2.2rem;
  }
}

/* ─────────────────────  9. SOURCES MARQUEE (logos)  ──────────────────── */

.logos {
  padding: 5.6rem 0;
  border-bottom: 0.1rem solid var(--line);
}

.logos__container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logos__heading {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-5);
}

.logos__container--box {
  width: 100%;
  margin-top: 3.2rem;
}

.logos__container--box-line {
  position: relative;
  display: flex;
  white-space: nowrap;
  overflow: hidden;
}

.logos__container--box-line::before,
.logos__container--box-line::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 10;
  width: 8rem;
  height: 100%;
  pointer-events: none;
}
.logos__container--box-line::before {
  left: 0;
  background-image: linear-gradient(
    to right,
    var(--surface) 20%,
    rgba(7, 11, 25, 0)
  );
}
.logos__container--box-line::after {
  right: 0;
  background-image: linear-gradient(
    to left,
    var(--surface) 20%,
    rgba(7, 11, 25, 0)
  );
}

.logos__container--box-line-sep {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1.2rem;
  padding-right: 1.2rem;
  animation: sliderLogo 34s infinite linear;
}
.logos__container--box-line:hover .logos__container--box-line-sep {
  animation-play-state: paused;
}

.source {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.2rem 2rem;
  border: 0.1rem solid var(--line);
  border-radius: var(--r-md);
  background-image: linear-gradient(
    170deg,
    rgba(23, 37, 84, 0.4),
    rgba(0, 11, 51, 0.25)
  );
  transition: border-color 0.25s var(--ease);
}
.source:hover {
  border-color: var(--line-2);
}

.source__abbr {
  font-family: "Gugi", "Inter", sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: #e8e9ee;
}

.source__name {
  font-size: 1.1rem;
  color: var(--text-5);
}

@media (min-width: 64em) {
  .logos {
    padding: 7rem 0;
  }
  .logos__container--box-line::before,
  .logos__container--box-line::after {
    width: 22rem;
  }
  .logos__container--box-line-sep {
    gap: 2rem;
    padding-right: 2rem;
  }
  .source {
    padding: 1.4rem 2.6rem;
  }
  .source__abbr {
    font-size: 1.8rem;
  }
  .source__name {
    font-size: 1.2rem;
  }
}

/* ────────────────────────  10. COVERAGE BRANDS  ──────────────────────── */

/* Deliberately a different shape from the mission grid: two wide,
   logo-led cards per row instead of four narrow ones. */
.brands {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
}

.brand {
  flex-direction: row;
  align-items: flex-start;
  gap: 1.8rem;
}

/* La tarjeta entera lleva a su página de cobertura mediante un enlace
   superpuesto; «Redes sociales» queda por encima y conserva su destino. */
.brand__cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}
.brand .card__link {
  position: relative;
  z-index: 3;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 6.4rem;
  height: 6.4rem;
  flex-shrink: 0;
  padding: 0.6rem;
  background-color: var(--ink);
  border: 0.1rem solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.6rem;
}
.brand__logo ion-icon {
  font-size: 3rem;
  color: #e8e9ee;
}
.card:hover .brand__logo {
  border-color: var(--line-2);
}

.brand__body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}

.brand__title {
  font-family: "Gugi", "Inter", sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.01rem;
  color: #fff;
}

.brand__text {
  font-size: 1.45rem;
  line-height: 1.6;
  color: var(--text-4);
}

@media (min-width: 36em) {
  .brands {
    gap: 2rem;
  }
}
@media (min-width: 64em) {
  .brands {
    grid-template-columns: repeat(2, 1fr);
  }
  .brand {
    gap: 2.4rem;
  }
  .brand__logo {
    width: 7.6rem;
    height: 7.6rem;
  }
  .brand__title {
    font-size: 2.1rem;
  }
}

/* ───────────────────────────  11. SERVICES  ──────────────────────────── */

.services__grid {
  margin-top: 3.2rem;
}

.services .section__head {
  align-items: flex-start;
  text-align: left;
  margin-inline: 0;
}

@media (min-width: 64em) {
  .section__split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 6rem;
    align-items: center;
  }
  .services .section__head {
    margin-bottom: 0;
  }
  .services__grid {
    margin-top: 0;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ────────────────────────────  12. REGIONS  ──────────────────────────── */

.regions__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.region {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-2);
  background-image: linear-gradient(
    170deg,
    rgba(23, 37, 84, 0.45),
    rgba(0, 11, 51, 0.3)
  );
  border: 0.1rem solid var(--line);
  border-radius: var(--r-pill);
  transition: all 0.25s var(--ease);
}
.region:hover {
  color: #fff;
  border-color: var(--line-2);
  transform: translateY(-0.2rem);
}

.region__flag {
  font-size: 1.8rem;
  line-height: 1;
}

.region--more {
  color: var(--text-5);
  background-image: none;
  border-style: dashed;
}

@media (min-width: 64em) {
  .regions__grid {
    gap: 1.2rem;
  }
  .region {
    padding: 1.3rem 2.2rem;
    font-size: 1.6rem;
  }
  .region__flag {
    font-size: 2.2rem;
  }
}

/* ───────────────────────────  13. COMMUNITY  ─────────────────────────── */

.community__panel {
  padding: 0.1rem;
  border-radius: 2.4rem;
  background-image: linear-gradient(
    150deg,
    rgba(93, 102, 135, 0.55),
    rgba(23, 37, 84, 0.1) 60%
  );
}

.community__inner {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 3.2rem 2.4rem;
  border-radius: 2.3rem;
  background-image: linear-gradient(
    150deg,
    rgba(9, 15, 34, 0.96),
    rgba(0, 11, 51, 0.9)
  );
}

.community__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
}

.community__label {
  margin-bottom: 1.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
  color: var(--text-5);
}

.community__channels {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.channel {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.4rem 1.8rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  background-color: rgba(5, 7, 17, 0.7);
  border: 0.1rem solid var(--line);
  border-radius: var(--r-md);
  transition: all 0.25s var(--ease);
}
.channel > ion-icon:first-child {
  font-size: 2.2rem;
  color: var(--text-3);
}
.channel__go {
  margin-left: auto;
  font-size: 1.6rem;
  color: var(--text-5);
  transition: transform 0.25s var(--ease);
}
.channel:hover {
  color: #fff;
  border-color: var(--line-2);
  background-color: var(--brand-500);
}
.channel:hover .channel__go {
  transform: translateX(0.4rem);
}

@media (min-width: 64em) {
  .community__inner {
    flex-direction: row;
    align-items: center;
    gap: 8rem;
    padding: 6rem;
  }
  .community__left {
    flex: 1;
  }
  .community__right {
    flex: 0 0 36rem;
  }
}

/* ───────────────────────────  14. ARTICLES  ──────────────────────────── */

.card--article .card__inner {
  padding: 1.6rem;
  gap: 1rem;
}

.article__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-md);
  background-image: linear-gradient(150deg, var(--brand-500), var(--ink));
  border: 0.1rem solid var(--line);
}

.article__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(0.75) contrast(1.05);
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease),
    filter 0.4s var(--ease);
}
.card--article:hover .article__media img {
  transform: scale(1.06);
  opacity: 1;
  filter: saturate(1) contrast(1);
}

.article__meta {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--text-5);
}

.card--article .card__title {
  font-size: 1.7rem;
}

.articles__more {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

@media (min-width: 64em) {
  .card--article .card__inner {
    padding: 2rem;
  }
  .articles__more {
    margin-top: 6rem;
  }
}

/* ────────────────────────────  15. ALERTS  ───────────────────────────── */

.alerts {
  border-bottom: 0;
}

.alerts__panel {
  padding: 0.1rem;
  border-radius: 2.4rem;
  background-image: linear-gradient(
    170deg,
    rgba(93, 102, 135, 0.55),
    rgba(23, 37, 84, 0.1) 65%
  );
}

.alerts__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2.4rem;
  border-radius: 2.3rem;
  overflow: hidden;
  background-image: radial-gradient(
      120% 100% at 50% 0%,
      rgba(23, 37, 84, 0.75),
      rgba(0, 11, 51, 0) 65%
    ),
    linear-gradient(rgba(9, 15, 34, 0.97), rgba(0, 11, 51, 0.94));
}

.alerts__icon {
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  margin-bottom: 2.4rem;
  font-size: 3rem;
  color: var(--alert);
  background-color: var(--ink);
  border: 0.1rem solid var(--line-2);
  border-radius: var(--r-md);
}

.alerts__heading,
.alerts__lead {
  max-width: 56rem;
}
.alerts__lead {
  margin-top: 1.6rem;
}

.alerts__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 48rem;
  margin-top: 3.2rem;
}

.alerts__field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}
.alerts__field ion-icon {
  position: absolute;
  left: 1.8rem;
  font-size: 2rem;
  color: var(--text-5);
  pointer-events: none;
}

.alerts__input {
  width: 100%;
  padding: 1.5rem 2rem 1.5rem 4.8rem;
  font-family: inherit;
  font-size: 1.6rem;
  color: #fff;
  background-color: rgba(5, 7, 17, 0.8);
  border: 0.1rem solid var(--line-2);
  border-radius: var(--r-pill);
  transition: border-color 0.25s var(--ease);
}
.alerts__input::placeholder {
  color: var(--text-5);
}
.alerts__input:focus {
  outline: none;
  border-color: var(--text-4);
}
.alerts__input[aria-invalid="true"] {
  border-color: var(--alert);
}

.alerts__submit {
  width: 100%;
}

.alerts__msg {
  min-height: 2.2rem;
  margin-top: 1.2rem;
  font-size: 1.4rem;
  color: var(--alert);
}
.alerts__msg.is-ok {
  color: #9be8b6;
}

.alerts__fine {
  margin-top: 0.4rem;
  font-size: 1.2rem;
  color: var(--text-5);
}

@media (min-width: 36em) {
  .alerts__form {
    flex-direction: row;
  }
  .alerts__submit {
    width: auto;
  }
}

@media (min-width: 64em) {
  .alerts__inner {
    padding: 7rem 4rem;
  }
}

/* ────────────────────────────  16. FOOTER  ───────────────────────────── */

.footer {
  position: relative;
  z-index: 100;
  padding: 6.4rem 0 3.2rem;
  border-top: 0.1rem solid var(--line);
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.footer__logo-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
}

.footer__logo {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
}

.footer__logo-text {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-2);
}

.footer__tagline {
  margin-top: 1.6rem;
  max-width: 42rem;
  font-size: 1.4rem;
  line-height: 1.65;
  color: var(--text-5);
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.2rem 2rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer__col-title {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: var(--text-4);
}

.footer__link {
  font-size: 1.45rem;
  color: var(--text-5);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2.4rem;
  margin-top: 4.8rem;
  padding-top: 2.4rem;
  border-top: 0.1rem solid var(--line);
}

.footer__copy {
  font-size: 1.3rem;
  text-align: center;
  color: var(--text-5);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  font-size: 1.9rem;
  color: var(--text-4);
  background-color: var(--ink);
  border: 0.1rem solid var(--line);
  border-radius: 50%;
  transition: all 0.25s var(--ease);
}
.footer__social a:hover {
  color: #fff;
  border-color: var(--line-2);
  transform: translateY(-0.2rem);
}

@media (min-width: 48em) {
  .footer__cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 64em) {
  .footer {
    padding: 9.6rem 0 4rem;
  }
  .footer__top {
    flex-direction: row;
    justify-content: space-between;
    gap: 8rem;
  }
  .footer__brand {
    flex: 0 0 38rem;
  }
  .footer__cols {
    flex: 1;
    gap: 4rem;
  }
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
  .footer__copy {
    text-align: left;
  }
}

/* ───────────────────────────  17. TO TOP  ────────────────────────────── */

.to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 1200;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  font-size: 2rem;
  color: var(--text-2);
  background-color: rgba(0, 11, 51, 0.85);
  border: 0.1rem solid var(--line-2);
  border-radius: 50%;
  backdrop-filter: blur(1.2rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: all 0.3s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  color: #fff;
  background-color: var(--brand-500);
}

@media (min-width: 64em) {
  .to-top {
    right: 3.2rem;
    bottom: 3.2rem;
    width: 5.2rem;
    height: 5.2rem;
  }
}

/* ─────────────────────────  18. REDUCED MOTION  ──────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .background-line-1,
  .background-line-2,
  .background-line-3,
  .background-line-4,
  .background-line-5,
  .background-line-6 {
    display: none;
  }
}
