@import url('https://fonts.cdnfonts.com/css/star-wars');

:root {
  --void: #020305;
  --space: #080b10;
  --space-2: #0e1319;
  --panel: rgba(14, 18, 22, 0.94);
  --panel-soft: rgba(17, 22, 27, 0.82);
  --panel-warm: rgba(30, 27, 21, 0.92);
  --ink: #f1ead4;
  --muted: #a79f8d;
  --dim: #6f716c;
  --yellow: #f5c842;
  --yellow-bright: #ffe36a;
  --amber: #d9922e;
  --rust: #9f4b2a;
  --cyan: #75d6df;
  --cyan-soft: rgba(117, 214, 223, 0.16);
  --green: #86c789;
  --red: #df6d5d;
  --line: rgba(245, 200, 66, 0.24);
  --line-cool: rgba(117, 214, 223, 0.24);
  --edge: rgba(241, 234, 212, 0.15);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  --shadow-tight: 0 16px 38px rgba(0, 0, 0, 0.42);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --font-display: 'Star Wars', 'Orbitron', system-ui, sans-serif;
  --font-condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* =========================================================
   INTRO CINEMATOGRAFICA
   ========================================================= */
body.opening-active {
  overflow: hidden;
}

.opening-sequence {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  color: #ffe81f;
  background: #000;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  filter: blur(0);
  transition:
    opacity 1.25s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 1.55s cubic-bezier(0.18, 0.72, 0.2, 1),
    filter 1.25s ease,
    visibility 1.25s ease;
  isolation: isolate;
}

.opening-sequence.is-ending {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-sequence.is-revealing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.18);
  filter: blur(12px);
}

.opening-starfield,
.opening-nebula,
.opening-vignette,
.opening-warp-flash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.opening-starfield {
  z-index: 1;
  display: block;
  background: #000;
}

.opening-nebula {
  z-index: 2;
  inset: -22%;
  width: 144%;
  height: 144%;
  opacity: 0.38;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at 15% 62%, rgba(68, 92, 144, 0.18), transparent 31%),
    radial-gradient(ellipse at 76% 32%, rgba(138, 84, 52, 0.1), transparent 27%),
    linear-gradient(124deg, transparent 31%, rgba(85, 112, 158, 0.055) 43%, rgba(218, 205, 168, 0.065) 50%, rgba(71, 87, 132, 0.045) 58%, transparent 69%);
  filter: blur(24px);
  transform: rotate(-7deg) scale(1.04);
  animation: openingNebulaDrift 24s ease-in-out infinite alternate;
}

@keyframes openingNebulaDrift {
  from { transform: rotate(-7deg) scale(1.04) translate3d(-1.5%, 0, 0); }
  to { transform: rotate(-5deg) scale(1.1) translate3d(1.5%, -1%, 0); }
}

.opening-vignette {
  z-index: 15;
  background:
    radial-gradient(circle at center, transparent 37%, rgba(0, 0, 0, 0.26) 68%, rgba(0, 0, 0, 0.86) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.42));
}

.opening-warp-flash {
  z-index: 14;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 1%, rgba(181, 220, 255, 0.92) 2%, rgba(84, 152, 225, 0.2) 12%, transparent 42%);
  transform: scale(0.08);
}

.opening-sequence.is-jumping .opening-warp-flash {
  animation: openingWarpFlash 1.85s cubic-bezier(0.18, 0.76, 0.2, 1) forwards;
}

@keyframes openingWarpFlash {
  0% { opacity: 0; transform: scale(0.08); }
  52% { opacity: 0.08; }
  82% { opacity: 0.82; transform: scale(2.7); }
  100% { opacity: 0.18; transform: scale(5.5); }
}

.opening-skip {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 30;
  min-height: 42px;
  padding: 10px 16px;
  color: rgba(241, 234, 212, 0.78);
  border: 1px solid rgba(241, 234, 212, 0.28);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.52);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.35s ease;
}

.opening-skip:hover {
  color: #ffe81f;
  border-color: rgba(255, 232, 31, 0.76);
  background: rgba(255, 232, 31, 0.08);
}

.opening-sequence.is-jumping .opening-skip {
  opacity: 0;
  pointer-events: none;
}

.opening-prologue {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: min(78vw, 760px);
  margin: 0;
  color: #4bd5ee;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.08rem, 2.55vw, 1.95rem);
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-shadow: 0 0 9px rgba(75, 213, 238, 0.14);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: openingPrologue 5.3s ease-in-out forwards;
}

@keyframes openingPrologue {
  0%, 8% { opacity: 0; }
  18%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.opening-logo {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  width: min(90vw, 1040px);
  color: #ffe81f;
  font-family: 'Star Wars', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(6rem, 18vw, 13rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.55rem, 1.15vw, 1.15rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.018em;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) scale(2.55);
  transform-origin: center;
  opacity: 0;
  animation: openingLogoFlight 8.9s cubic-bezier(0.2, 0.66, 0.24, 1) 5.05s forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 5px rgba(255, 232, 31, 0.34));
}

.opening-logo span {
  display: block;
  line-height: 0.88;
  white-space: nowrap;
  -webkit-text-stroke: 0.012em #ffe81f;
  paint-order: stroke fill;
  text-shadow:
    0 0 1px #ffe81f,
    0 0 12px rgba(255, 232, 31, 0.14);
}


@keyframes openingLogoFlight {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.55); }
  7% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.055); }
}

.opening-crawl-stage {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  perspective: 455px;
  perspective-origin: 50% 36%;
  opacity: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  animation: openingCrawlReveal 0.8s linear 14.35s forwards;
}

@keyframes openingCrawlReveal {
  to { opacity: 1; }
}

.opening-crawl {
  position: absolute;
  top: 87%;
  left: 50%;
  width: min(930px, 92vw);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(25deg);
  animation: openingCrawlMove var(--crawl-duration, 38.5s) linear 14.35s forwards;
  will-change: top, transform;
}

.opening-crawl-copy {
  color: #ffe81f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.24rem, 2.28vw, 2.1rem);
  font-weight: 700;
  line-height: 1.58;
  letter-spacing: 0.015em;
  text-align: justify;
  text-shadow: 0 0 4px rgba(255, 232, 31, 0.16);
}

.opening-crawl-copy h2 {
  margin: 0 0 0.9em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.72em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.opening-crawl-copy p {
  margin: 0 0 1.05em;
}

.opening-crawl-copy .opening-episode {
  margin-bottom: 0.55em;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

@keyframes openingCrawlMove {
  0% { top: 87%; }
  100% { top: var(--crawl-end-top, -215%); }
}

.opening-sequence.is-jumping .opening-prologue,
.opening-sequence.is-jumping .opening-logo,
.opening-sequence.is-jumping .opening-crawl-stage,
.opening-sequence.is-jumping .opening-nebula {
  opacity: 0 !important;
  transition: opacity 0.45s ease;
}

body.home-arriving .hero {
  animation: homeArrivalHero 1.65s cubic-bezier(0.16, 0.78, 0.22, 1) both;
}

body.home-arriving main,
body.home-arriving .footer {
  animation: homeArrivalContent 1.35s cubic-bezier(0.18, 0.72, 0.22, 1) 0.18s both;
}

body.home-arriving .stars-layer {
  animation: homeArrivalStars 1.8s ease-out both;
}

@keyframes homeArrivalHero {
  0% { opacity: 0; transform: scale(0.91) translateY(34px); filter: blur(16px) brightness(1.65); }
  48% { opacity: 1; filter: blur(3px) brightness(1.2); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0) brightness(1); }
}

@keyframes homeArrivalContent {
  0% { opacity: 0; transform: translateY(28px); filter: blur(9px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes homeArrivalStars {
  0% { opacity: 0; transform: scale(1.18); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@media (max-width: 700px) {
  .opening-prologue {
    width: min(84vw, 520px);
    font-size: clamp(1rem, 5vw, 1.42rem);
  }

  .opening-logo {
    width: min(94vw, 720px);
    font-size: clamp(4.5rem, 22vw, 8.5rem);
    gap: clamp(0.4rem, 2vw, 0.8rem);
    line-height: 0.92;
    letter-spacing: 0.012em;
  }

  .opening-crawl-stage {
    perspective: 340px;
  }

  .opening-crawl {
    width: 95vw;
    transform: translateX(-50%) rotateX(26deg);
  }

  .opening-crawl-copy {
    font-size: clamp(1.03rem, 4.65vw, 1.43rem);
    line-height: 1.53;
  }

  .opening-skip {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening-prologue,
  .opening-logo,
  .opening-crawl-stage,
  .opening-crawl,
  .opening-nebula,
  .opening-warp-flash {
    animation: none !important;
  }

  .opening-prologue {
    opacity: 1;
  }

  .opening-logo,
  .opening-crawl-stage {
    display: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(245, 200, 66, 0.08), transparent 34rem),
    radial-gradient(circle at 10% 48%, rgba(117, 214, 223, 0.06), transparent 30rem),
    linear-gradient(180deg, #030405 0%, #080b0e 48%, #030405 100%);
  font-family: var(--font-body);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 45%, rgba(255, 255, 255, 0.012));
}

body.modal-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  color: #090909;
  background: var(--yellow);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.stars-layer,
.hyperspace {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stars-layer {
  z-index: -3;
}

.stars-layer span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(255, 248, 219, var(--alpha));
  box-shadow: 0 0 8px rgba(255, 248, 219, 0.6);
  animation: starPulse var(--duration) ease-in-out infinite alternate;
}

.hyperspace {
  z-index: -4;
  opacity: 0.18;
  background-image:
    linear-gradient(120deg, transparent 0 48.8%, rgba(117, 214, 223, 0.22) 49.6%, transparent 50.4%),
    linear-gradient(60deg, transparent 0 49%, rgba(245, 200, 66, 0.13) 49.7%, transparent 50.4%);
  background-size: 260px 260px;
  animation: gridDrift 28s linear infinite;
}

@keyframes starPulse {
  from { opacity: 0.35; transform: scale(0.65); }
  to { opacity: 1; transform: scale(1.2); }
}

@keyframes gridDrift {
  to { transform: translate3d(-260px, 260px, 0); }
}

.glass {
  position: relative;
  border: 1px solid var(--edge);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--panel-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.glass::after {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px clamp(18px, 5vw, 78px) 48px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(1, 2, 3, 0.2) 0%, rgba(1, 2, 3, 0.32) 54%, #030405 100%),
    radial-gradient(ellipse at 50% 37%, rgba(245, 200, 66, 0.12), transparent 32rem),
    radial-gradient(ellipse at 50% 50%, transparent 0 25%, rgba(0, 0, 0, 0.58) 75%);
}

.hero::after {
  content: '';
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: 20px;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  box-shadow: 0 0 20px rgba(245, 200, 66, 0.35);
}

.nav-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 58px;
  padding: 8px 14px;
  border-top: 1px solid rgba(245, 200, 66, 0.42);
  border-bottom: 1px solid rgba(245, 200, 66, 0.18);
  background: linear-gradient(90deg, transparent, rgba(8, 11, 14, 0.88) 9%, rgba(8, 11, 14, 0.88) 91%, transparent);
}

.nav-shell::before,
.nav-shell::after {
  content: '';
  width: 8px;
  height: 8px;
  border: 1px solid var(--yellow);
  transform: rotate(45deg);
  opacity: 0.65;
}

.nav-shell::before {
  position: absolute;
  left: 0;
}

.nav-shell::after {
  position: absolute;
  right: 0;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--yellow);
  border: 1px solid rgba(245, 200, 66, 0.45);
  background: rgba(245, 200, 66, 0.06);
  box-shadow: inset 0 0 18px rgba(245, 200, 66, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  color: var(--muted);
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 1px;
  transform: scaleX(0);
  background: var(--yellow);
  transition: transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-family: var(--font-condensed);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.nav-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(134, 199, 137, 0.8);
}

.hero-content {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 74px 0 54px;
}

.hero-content::before,
.hero-content::after {
  content: '';
  position: absolute;
  top: 50%;
  width: min(17vw, 230px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(117, 214, 223, 0.5));
}

.hero-content::before { left: 0; }
.hero-content::after { right: 0; transform: scaleX(-1); }

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  display: grid;
  gap: 0.12em;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 14vw, 12.5rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0;
  filter: none;
  text-shadow: none;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero h1 span:last-child {
  letter-spacing: 0.04em;
}

.hero-subtitle {
  max-width: 790px;
  margin: 34px 0 0;
  color: #d7d0bd;
  font-family: var(--font-condensed);
  font-size: clamp(1.15rem, 2.2vw, 1.48rem);
  line-height: 1.5;
  letter-spacing: 0.025em;
}

.hero-subtitle strong {
  color: var(--yellow-bright);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid rgba(241, 234, 212, 0.18);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 200, 66, 0.7);
  background: rgba(245, 200, 66, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.btn.primary {
  color: #11100c;
  border-color: var(--yellow);
  background: linear-gradient(180deg, var(--yellow-bright), var(--yellow));
  box-shadow: 0 0 24px rgba(245, 200, 66, 0.15), inset 0 -4px 0 rgba(130, 83, 8, 0.16);
}

.btn.primary:hover {
  background: #ffe976;
  box-shadow: 0 0 34px rgba(245, 200, 66, 0.26);
}

.btn.ghost {
  color: #c8edf0;
  border-color: rgba(117, 214, 223, 0.42);
  background: rgba(117, 214, 223, 0.05);
}

.btn.tiny {
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
}

.hero-data-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(241, 234, 212, 0.1);
  color: var(--dim);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-data-strip b {
  margin-right: 7px;
  color: var(--cyan);
  font-weight: 700;
}

.progress-card {
  justify-self: end;
  position: relative;
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(245, 200, 66, 0.22);
  background:
    linear-gradient(90deg, rgba(245, 200, 66, 0.05), transparent 38%),
    rgba(8, 11, 14, 0.86);
  box-shadow: var(--shadow-tight);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.progress-card::before {
  content: 'TRACKING';
  position: absolute;
  top: 7px;
  right: 12px;
  color: rgba(117, 214, 223, 0.45);
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.progress-ring {
  --progress: 0deg;
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--yellow) var(--progress), rgba(255, 255, 255, 0.08) 0deg);
  box-shadow: 0 0 24px rgba(245, 200, 66, 0.12);
}

.progress-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #080b0e;
  border: 1px solid rgba(245, 200, 66, 0.16);
}

.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--yellow-bright);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
}

.progress-card p,
.progress-card strong,
.progress-card small {
  display: block;
  margin: 0;
}

.progress-card p {
  color: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-card strong {
  margin-top: 5px;
  font-family: var(--font-condensed);
  font-size: 1.24rem;
  letter-spacing: 0.025em;
}

.progress-card small {
  margin-top: 4px;
  color: var(--dim);
}

main {
  width: min(1240px, calc(100% - 34px));
  margin: 0 auto 82px;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  margin-top: 34px;
  padding: clamp(26px, 4vw, 50px);
  border-radius: 0;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.intro-panel::before {
  content: 'ARCHIVE NOTE // 001';
  position: absolute;
  left: 22px;
  bottom: 10px;
  color: rgba(117, 214, 223, 0.35);
  font-family: var(--font-condensed);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.intro-panel h2,
.section-heading h2 {
  margin: 0;
  max-width: 760px;
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: clamp(2.05rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.intro-panel p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.section-heading {
  position: relative;
  margin: 90px 0 26px;
  padding: 0 0 16px 22px;
  border-left: 3px solid var(--yellow);
  border-bottom: 1px solid rgba(241, 234, 212, 0.1);
}

.section-heading::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(26vw, 300px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(117, 214, 223, 0.5));
}

.section-heading .section-kicker {
  margin-bottom: 9px;
}

.map-wrap {
  position: relative;
  padding: 26px 20px 20px;
  overflow-x: auto;
  border-radius: 0;
  scrollbar-color: var(--yellow) rgba(255, 255, 255, 0.05);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.map-wrap::before {
  content: 'GALACTIC ROUTE / SCROLL HORIZONTAL';
  position: absolute;
  top: 8px;
  left: 18px;
  color: rgba(117, 214, 223, 0.42);
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.galaxy-map {
  position: relative;
  min-width: max-content;
  min-height: 290px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 54px 34px 72px;
}

.galaxy-map::before {
  content: '';
  position: absolute;
  left: 42px;
  right: 42px;
  top: 50%;
  height: 2px;
  background:
    repeating-linear-gradient(90deg, var(--yellow) 0 10px, transparent 10px 18px),
    linear-gradient(90deg, transparent, var(--yellow), transparent);
  opacity: 0.55;
  box-shadow: 0 0 18px rgba(245, 200, 66, 0.2);
}

.poster-planet-btn {
  --planet-a: #2e3e46;
  --planet-b: #111317;
  position: relative;
  z-index: 1;
  flex: 0 0 92px;
  width: 92px;
  height: 138px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(241, 234, 212, 0.28);
  border-radius: 3px;
  color: var(--ink);
  background: linear-gradient(150deg, var(--planet-a), var(--planet-b));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.52), 0 0 0 4px rgba(8, 11, 14, 0.8);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.poster-planet-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.75));
}

.poster-planet-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.poster-planet-btn:hover {
  z-index: 3;
  transform: translateY(-10px) scale(1.06);
  border-color: var(--yellow);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.68), 0 0 24px rgba(245, 200, 66, 0.22);
}

.poster-planet-btn.has-image {
  background: #111;
}


.map-index {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 7px;
  min-width: 27px;
  padding: 3px 5px;
  color: #0d0d0b;
  background: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.map-title {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: calc(100% + 12px);
  width: 132px;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-align: center;
}

.poster-planet-btn.is-watched::after {
  content: '✓';
  position: absolute;
  z-index: 6;
  right: -8px;
  top: -8px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061108;
  background: var(--green);
  border: 3px solid #080b0e;
  font-size: 0.72rem;
  font-weight: 900;
}

.controls {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.4fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 84px;
  padding: 14px;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(245, 200, 66, 0.045), transparent 24%),
    rgba(8, 11, 14, 0.94);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.search-box {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid rgba(117, 214, 223, 0.28);
  background: #080c10;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.search-box > span {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-condensed);
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.search-box input::placeholder {
  color: #737a79;
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.filter-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(241, 234, 212, 0.14);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-condensed);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-btn:hover {
  color: var(--ink);
  border-color: rgba(245, 200, 66, 0.5);
  transform: translateY(-1px);
}

.filter-btn.active {
  color: #141108;
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: inset 0 -3px 0 rgba(124, 78, 4, 0.22), 0 0 16px rgba(245, 200, 66, 0.1);
}

.filter-help {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--dim);
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.results-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 24px;
  padding: 0 12px;
  color: var(--muted);
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, rgba(117, 214, 223, 0.06), transparent 70%);
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  letter-spacing: 0.035em;
}

.timeline {
  display: grid;
  gap: 58px;
}

.era-block {
  position: relative;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 30px;
}

.era-label {
  position: sticky;
  top: 116px;
  align-self: start;
  padding: 18px 18px 22px;
  border-top: 3px solid var(--yellow);
  border-right: 1px solid rgba(241, 234, 212, 0.1);
  border-bottom: 1px solid rgba(241, 234, 212, 0.1);
  border-left: 1px solid rgba(241, 234, 212, 0.1);
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(255, 255, 255, 0.012) 10px 11px),
    rgba(10, 13, 16, 0.9);
  box-shadow: var(--shadow-tight);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.era-label::before {
  content: 'ERA';
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-family: var(--font-condensed);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.era-label h3 {
  margin: 0;
  color: var(--yellow-bright);
  font-family: var(--font-condensed);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.era-label p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.62;
}

.era-items {
  position: relative;
  display: grid;
  gap: 22px;
}

.era-items::before {
  content: '';
  position: absolute;
  left: 104px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--yellow) 8%, var(--cyan) 48%, var(--yellow) 92%, transparent);
  opacity: 0.58;
  box-shadow: 0 0 18px rgba(117, 214, 223, 0.2);
}

.timeline-card {
  --accent-a: #26333a;
  --accent-b: #121519;
  --accent-soft: rgba(117, 214, 223, 0.08);
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 24px;
  min-height: 312px;
  padding: 18px 18px 18px 0;
  overflow: hidden;
  border: 1px solid rgba(241, 234, 212, 0.12);
  border-left: 0;
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 255, 255, 0.025) 18.2%, transparent 42%),
    linear-gradient(135deg, var(--accent-soft), transparent 48%),
    rgba(11, 14, 17, 0.92);
  box-shadow: var(--shadow-tight);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.timeline-card::before {
  content: '';
  position: absolute;
  left: 210px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(245, 200, 66, 0.35), transparent);
}

.timeline-card::after {
  content: 'ARCHIVE ENTRY';
  position: absolute;
  right: 16px;
  bottom: 8px;
  color: rgba(117, 214, 223, 0.25);
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.timeline-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 200, 66, 0.38);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(245, 200, 66, 0.06);
}

.timeline-card.is-hidden {
  display: none;
}

.timeline-card.is-watched {
  border-color: rgba(134, 199, 137, 0.36);
}

.timeline-card.is-watched::after {
  content: 'ARCHIVED ✓';
  color: rgba(134, 199, 137, 0.42);
}

.timeline-node-poster {
  position: relative;
  z-index: 2;
  align-self: stretch;
  width: 210px;
  min-height: 294px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 14%, rgba(255, 255, 255, 0.22), transparent 10%),
    linear-gradient(145deg, var(--accent-a), var(--accent-b));
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.38);
}

.timeline-node-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 12% 88%, rgba(0, 0, 0, 0.2));
}

.timeline-node-poster::after {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.timeline-node-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-node-poster strong {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  min-width: 40px;
  padding: 6px 8px;
  color: #101008;
  background: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.timeline-node-poster span {
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  bottom: 20px;
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 3px 12px #000;
}

.timeline-node-poster.has-image span {
  display: none;
}


.card-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 6px 0 22px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.badge {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  color: var(--muted);
  border: 1px solid rgba(241, 234, 212, 0.12);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge.movie { color: #d8e9ad; border-color: rgba(185, 209, 124, 0.32); }
.badge.series { color: #a8dbe2; border-color: rgba(117, 214, 223, 0.34); }
.badge.animation { color: #cfb9e9; border-color: rgba(184, 139, 217, 0.35); }
.badge.live-action { color: var(--yellow-bright); border-color: rgba(245, 200, 66, 0.28); }
.badge.rating { color: #121008; border-color: var(--yellow); background: var(--yellow); }
.badge.special { color: #efb6a5; border-color: rgba(223, 109, 93, 0.35); }

.card-copy h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.card-copy > p {
  margin: 16px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 20px;
}

.card-details span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  color: #c8c1af;
  border-left: 2px solid rgba(117, 214, 223, 0.42);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-condensed);
  font-size: 0.86rem;
  line-height: 1.25;
}

.card-details b {
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.card-actions {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 9px;
  align-content: center;
}

.icon-btn {
  min-height: 43px;
  padding: 0 13px;
  border: 1px solid rgba(241, 234, 212, 0.16);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: rgba(245, 200, 66, 0.5);
  background: rgba(245, 200, 66, 0.06);
}

.icon-btn.details {
  color: var(--cyan);
  border-color: rgba(117, 214, 223, 0.28);
}

.icon-btn.watched {
  color: #081009;
  border-color: var(--green);
  background: var(--green);
}

.empty-state {
  padding: 46px;
  color: var(--muted);
  border: 1px dashed rgba(245, 200, 66, 0.28);
  background: rgba(245, 200, 66, 0.03);
  font-family: var(--font-condensed);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
}

.empty-state strong {
  color: var(--yellow);
  text-transform: uppercase;
}

.footer {
  width: min(1240px, calc(100% - 34px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  margin: 0 auto 28px;
  padding: 25px 28px;
  border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.footer p {
  margin: 0;
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer code {
  color: var(--cyan);
}

.footer a {
  color: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal {
  width: min(1100px, calc(100% - 26px));
  max-height: min(90vh, 860px);
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(245, 200, 66, 0.34);
  border-radius: 0;
  color: var(--ink);
  background: #090c0f;
  box-shadow: 0 50px 160px rgba(0, 0, 0, 0.85);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  max-height: min(90vh, 860px);
  overflow: auto;
  background:
    linear-gradient(110deg, rgba(245, 200, 66, 0.04), transparent 34%),
    #090c0f;
}

.modal-card::after {
  content: 'GALACTIC ARCHIVE // DETAIL';
  position: absolute;
  right: 20px;
  bottom: 10px;
  color: rgba(117, 214, 223, 0.25);
  font-family: var(--font-condensed);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
}

.modal-close {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(241, 234, 212, 0.2);
  border-radius: 0;
  color: var(--ink);
  background: rgba(4, 5, 6, 0.84);
  font-size: 1.45rem;
}

.modal-close:hover {
  color: #111;
  border-color: var(--yellow);
  background: var(--yellow);
}

.modal-poster {
  --accent-a: #273238;
  --accent-b: #111418;
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: grid;
  place-items: end start;
  padding: 28px;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.2), transparent 11%),
    linear-gradient(145deg, var(--accent-a), var(--accent-b));
}

.modal-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.92));
}

.modal-poster::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.17);
  pointer-events: none;
}

.modal-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-poster span {
  position: relative;
  z-index: 4;
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 4px 16px #000;
}

.modal-poster.has-image span {
  display: none;
}

.poster-source {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 18px;
  padding: 5px 8px;
  color: #111;
  background: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.modal-content {
  position: relative;
  padding: clamp(32px, 5vw, 66px) clamp(24px, 5vw, 58px) 56px;
}

.modal-era {
  margin: 0 0 11px;
  color: var(--yellow);
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-content h3 {
  margin: 0;
  font-family: var(--font-condensed);
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.modal-meta {
  margin: 20px 0 0;
  color: var(--cyan);
  font-family: var(--font-condensed);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.modal-description {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 26px;
}

.info-pill {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border-left: 2px solid rgba(117, 214, 223, 0.48);
  background: rgba(255, 255, 255, 0.025);
}

.info-pill span {
  color: var(--dim);
  font-family: var(--font-condensed);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.info-pill strong {
  color: #d9d2bf;
  font-size: 0.84rem;
  line-height: 1.35;
}

.modal-note {
  margin-top: 24px;
  padding: 16px 18px;
  color: var(--muted);
  border: 1px solid rgba(245, 200, 66, 0.14);
  background: rgba(245, 200, 66, 0.035);
  font-size: 0.88rem;
  line-height: 1.6;
}

.modal-note strong {
  color: var(--yellow);
  font-family: var(--font-condensed);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-note small {
  color: var(--dim);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

@media (max-width: 1080px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-status {
    display: none;
  }

  .controls {
    grid-template-columns: 1fr auto;
  }

  .filter-grid {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .timeline-card {
    grid-template-columns: 190px minmax(0, 1fr);
    padding-right: 18px;
  }

  .timeline-card::before {
    left: 190px;
  }

  .timeline-node-poster {
    width: 190px;
  }

  .card-actions {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 140px));
    justify-content: start;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    padding-inline: 18px;
  }

  .nav-shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    margin-right: auto;
  }

  .hero-content::before,
  .hero-content::after {
    display: none;
  }

  .progress-card {
    justify-self: center;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .era-block {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .era-label {
    position: relative;
    top: auto;
  }

  .era-items::before {
    left: 86px;
  }

  .timeline-card {
    grid-template-columns: 172px minmax(0, 1fr);
    min-height: 270px;
  }

  .timeline-card::before {
    left: 172px;
  }

  .timeline-node-poster {
    width: 172px;
    min-height: 252px;
  }

  .card-copy h4 {
    font-size: clamp(1.7rem, 6vw, 2.5rem);
  }

  .card-details {
    grid-template-columns: 1fr;
  }

  .modal-card {
    grid-template-columns: 1fr;
  }

  .modal-poster {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  main,
  .footer {
    width: min(100% - 22px, 1240px);
  }

  .hero {
    padding: 14px 12px 34px;
  }

  .nav-shell {
    gap: 7px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

  .nav-links a {
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .hero-content {
    padding: 58px 0 40px;
  }

  .hero h1 {
    font-size: clamp(4.1rem, 23vw, 7rem);
  }

  .hero-subtitle {
    font-size: 1.12rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-data-strip {
    display: grid;
    justify-items: center;
  }

  .progress-card {
    width: 100%;
  }

  .intro-panel {
    margin-top: 22px;
    padding: 28px 22px 42px;
  }

  .section-heading {
    margin-top: 66px;
    padding-left: 15px;
  }

  .map-wrap {
    padding-inline: 8px;
  }

  .galaxy-map {
    gap: 20px;
    padding-inline: 25px;
  }

  .poster-planet-btn {
    flex-basis: 82px;
    width: 82px;
    height: 123px;
  }

  .controls {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
    margin-top: 62px;
  }

  .filter-grid {
    grid-column: auto;
    grid-row: auto;
    justify-content: flex-start;
  }

  .controls .btn.tiny {
    width: 100%;
  }

  .timeline {
    gap: 42px;
  }

  .era-items::before {
    display: none;
  }

  .timeline-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 0 13px 14px 0;
  }

  .timeline-card::before {
    left: 112px;
  }

  .timeline-node-poster {
    width: 112px;
    min-height: 168px;
    align-self: start;
  }

  .timeline-node-poster strong {
    top: 8px;
    left: 8px;
    min-width: 31px;
    padding: 4px 6px;
    font-size: 0.76rem;
  }

  .timeline-node-poster span {
    left: 10px;
    right: 10px;
    bottom: 12px;
    font-size: 1.08rem;
  }

  .card-copy {
    padding: 15px 0 8px;
  }

  .badges {
    gap: 5px;
    margin-bottom: 10px;
  }

  .badge {
    min-height: 22px;
    padding: 2px 6px;
    font-size: 0.62rem;
  }

  .card-copy h4 {
    font-size: 1.55rem;
  }

  .card-copy > p {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .card-details {
    grid-column: 1 / -1;
    display: none;
  }

  .card-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    padding-left: 13px;
  }

  .footer {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .modal {
    width: calc(100% - 16px);
    max-height: 94vh;
  }

  .modal-card {
    max-height: 94vh;
  }

  .modal-poster {
    min-height: 330px;
  }

  .modal-content {
    padding: 30px 20px 50px;
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

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