/* Copernicus Contributing Missions - infografica animata
   Tutto il disegno vive dentro un unico SVG con viewBox 2400x1280, cosi'
   le coordinate coincidono con quelle del layout originale. */

/* Font istituzionale ESA: le metriche coincidono con quelle del PDF originale. */
@font-face {
  font-family: "NotesEsa";
  src: url("../font/NotesEsaReg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NotesEsa";
  src: url("../font/NotesEsaBol.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NotesEsa";
  src: url("../font/NotesEsaRegIta.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "NotesEsa";
  src: url("../font/NotesEsaBolIta.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  background: #1c1c29;
  color: #f8f8f8;
  font-family: "NotesEsa", "Notes Esa", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* Impostato sull'elemento radice: il testo SVG lo eredita, mentre le classi
   che devono usare Arial (come nell'originale) restano libere di sovrascriverlo. */
#infographic {
  font-family: "NotesEsa", "Notes Esa", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 2400px;
  margin: 0 auto;
}

#infographic {
  display: block;
  width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------ scena */

.curves path {
  fill: none;
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: .85;
}

.orbits circle {
  fill: none;
  stroke: #f8f8f8;
  stroke-width: 1;
  stroke-dasharray: 9 3;
  opacity: .32;
}

.orbit-labels text {
  fill: #08c8ab;
  fill-opacity: .28;
  font-weight: 700;
  font-size: 105px;
}

.timeline text {
  fill: #f8f8f8;
  fill-opacity: .55;
  font-size: 15px;
  text-anchor: middle;
  transition: fill-opacity .35s linear;
}

.timeline text.is-past { fill-opacity: .8; }

.timeline text.is-current {
  fill: #08c8ab;
  fill-opacity: 1;
}

.timeline .tick-dot {
  fill: #f8f8f8;
  fill-opacity: .45;
  font-size: 15px;
  text-anchor: middle;
}

/* --------------------------------------------------------------- satelliti */

.trails path {
  fill: none;
  stroke-linecap: round;
}

.satellites .sat { cursor: pointer; }

.satellites .sat-label {
  font-size: 15px;
  opacity: 0;
  transition: opacity .45s ease-out;
  pointer-events: none;
}

.satellites .sat.is-parked .sat-label { opacity: 1; }
.satellites .sat-label .op { font-weight: 700; }
.satellites .sat-label .mission { fill-opacity: .92; }

.satellites .sat-pulse {
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

/* attenuazione quando si evidenzia un tipo di sensore o un satellite */
.satellites .sat,
.mission-list .entry {
  transition: opacity .25s linear;
}

.is-dimmed { opacity: .15; }

/* ------------------------------------------------------------------ chrome */

.headline text {
  font-size: 66.4px;
  font-weight: 700;
  letter-spacing: 0;
}

.rule {
  stroke: #f8f8f8;
  stroke-width: 1;
  stroke-dasharray: 9 3;
  opacity: .55;
}

.panel-head {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26.4px;
  fill: #f8f8f8;
}

.panel-head-strong { font-weight: 700; }

.sensor-legend text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

.sensor-legend .swatch { cursor: pointer; }

.mission-list .group-head {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 23px;
  font-weight: 700;
  fill: #08c8ab;
}

.mission-list text {
  font-size: 13.5px;
  fill: #f8f8f8;
}

.mission-list .op { font-weight: 700; }
.mission-list .mission { fill-opacity: .92; }

.category-legend text {
  font-size: 15px;
  fill: #f8f8f8;
}

.category-legend .cat-name { font-weight: 700; }

.category-legend .cat-note {
  font-style: italic;
  fill-opacity: .8;
}

.footnote {
  font-size: 11.2px;
  fill: #f8f8f8;
  fill-opacity: .8;
}

/* --------------------------------------------------------------------- HUD */

/* Barra comandi al centro in basso: la colonna dell'elenco missioni
   occupa tutto il margine inferiore sinistro. */
.hud {
  position: absolute;
  left: 50%;
  bottom: 2.6%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(248, 248, 248, .18);
  border-radius: 999px;
  background: rgba(28, 28, 41, .82);
  font-size: 13px;
  opacity: 0;
  transition: opacity .4s ease-out;
}

.hud.is-ready { opacity: 1; }

.hud-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(248, 248, 248, .12);
  color: #f8f8f8;
  cursor: pointer;
}

.hud-btn:hover { background: rgba(8, 200, 171, .3); }
.hud-btn svg { width: 16px; height: 16px; fill: currentColor; }

.hud-range {
  width: 190px;
  height: 3px;
  margin: 0;
  border-radius: 2px;
  background: rgba(248, 248, 248, .22);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.hud-range::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #08c8ab;
  -webkit-appearance: none;
  appearance: none;
}

.hud-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #08c8ab;
}

.hud-year {
  min-width: 42px;
  color: #08c8ab;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.hud-count {
  min-width: 46px;
  color: rgba(248, 248, 248, .6);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ----------------------------------------------------------------- tooltip */

.tooltip {
  position: absolute;
  z-index: 3;
  max-width: 250px;
  padding: 9px 12px;
  border: 1px solid rgba(248, 248, 248, .2);
  border-left-width: 3px;
  border-radius: 4px;
  background: rgba(20, 20, 31, .95);
  font-size: 13px;
  line-height: 1.42;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%);
  transition: opacity .15s linear;
}

.tooltip.is-visible { opacity: 1; }
.tooltip b { display: block; font-size: 14px; }
.tooltip .tt-mission { color: #f8f8f8; }
.tooltip .tt-meta { color: rgba(248, 248, 248, .6); font-size: 11.5px; }

/* ----------------------------------------------------------------- loading */

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: rgba(248, 248, 248, .7);
  transform: translate(-50%, -50%);
}

.loading[hidden] { display: none; }

.loading.is-error {
  max-width: 520px;
  color: #e71b3a;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .satellites .sat-label,
  .timeline text { transition: none; }
}

@media (max-width: 720px) {
  .hud { padding: 6px 10px; }
  .hud-range { width: 110px; }
}
