/* ===========================================================================
   Home page: the hero with the 3D network, in the colors of the theme.
   Loaded only by overrides/home.html.
   =========================================================================== */

:root {
  --una-night: #05070d;
  --una-blue: #2a54c4;
  --una-blue-hi: #8fa9f0;
  --una-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --una-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Colors of the hero for each theme. The dark theme is the night sky. In the
   light theme an inverting filter turns the glow of the same galaxy into ink
   on white and the hue rotation keeps its blue. */
.una-hero {
  --hero-bg: #fff;
  --hero-shade: 255, 255, 255;
  --hero-title: #0d1424;
  --hero-text: 24, 32, 52;
  --hero-em: var(--una-blue);
  --hero-ghost: 13, 20, 36;
  --hero-filter: invert(1) hue-rotate(180deg) saturate(1.2);
}
[data-md-color-scheme="slate"] .una-hero {
  --hero-bg: var(--una-night);
  --hero-shade: 5, 7, 13;
  --hero-title: #fff;
  --hero-text: 230, 233, 242;
  --hero-em: var(--una-blue-hi);
  --hero-ghost: 255, 255, 255;
  --hero-filter: none;
}

/* ---- Header over the hero (dark theme only) -------------------------------- */
[data-md-color-scheme="slate"]:has(.una-hero) .md-header {
  background: var(--una-night);
  color: #e6e9f2;
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-header__title,
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-icon,
[data-md-color-scheme="slate"]:has(.una-hero) .md-header__button,
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-source { color: #e6e9f2; }
body:has(.una-hero) .md-header .md-tabs {
  background: transparent;
  border-bottom: 0;
}
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-tabs__link { color: rgba(230, 233, 242, 0.62); }
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-tabs__link:hover,
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-tabs__link--active { color: #fff; }
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-search__form,
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-search__form:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-md-color-scheme="slate"]:has(.una-hero) .md-search__input,
[data-md-color-scheme="slate"]:has(.una-hero) .md-search__icon { color: rgba(230, 233, 242, 0.8); }
[data-md-color-scheme="slate"]:has(.una-hero) .md-search__input::placeholder { color: rgba(230, 233, 242, 0.5); }

/* ---- Hero ----------------------------------------------------------------- */
.una-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--una-header-h, 6rem));
  min-height: max(480px, calc(100svh - var(--una-header-h, 6rem)));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--hero-bg);
  color: rgb(var(--hero-text));
  overflow: hidden;
}
.una-hero__field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}
/* A soft shade behind the text keeps it readable over the figure. */
.una-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--hero-shade), 0.86) 0%, rgba(var(--hero-shade), 0.55) 42%, rgba(var(--hero-shade), 0) 70%);
}
.una-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.2rem 128px;
  text-align: left;
}
.una-hero__copy { max-width: 36rem; text-align: left; }
.una-hero__eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--una-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--hero-text), 0.55);
}
.una-hero .una-hero__title {
  margin: 0;
  font-family: var(--una-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--hero-title);
  text-wrap: balance;
}
.una-hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--hero-em);
}
.una-hero__lead {
  margin: 1.4rem 0 0;
  max-width: 31rem;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.6;
  color: rgba(var(--hero-text), 0.74);
}
.una-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.una-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.una-btn--primary { background: var(--una-blue); color: #fff; }
.una-btn--primary:hover,
.una-btn--primary:focus-visible { background: #3b66d9; color: #fff; }
.una-btn--ghost {
  background: rgba(var(--hero-ghost), 0.06);
  color: rgb(var(--hero-text));
  box-shadow: inset 0 0 0 1px rgba(var(--hero-ghost), 0.16);
}
.una-btn--ghost:hover,
.una-btn--ghost:focus-visible { background: rgba(var(--hero-ghost), 0.12); color: var(--hero-title); }
.una-btn:focus-visible { outline: 2px solid var(--hero-em); outline-offset: 3px; }


/* ---- Below the hero ------------------------------------------------------------ */
/* The home is the hero alone. The content area and the link to the next page
   stay hidden and the copyright line lies over the bottom of the hero. */
body:has(.una-hero) .md-main,
body:has(.una-hero) .md-footer__inner { display: none; }
body:has(.una-hero) .md-footer {
  position: relative;
  z-index: 2;
  margin-top: -64px;
  background: transparent;
  border-top: 0;
}
body:has(.una-hero) .md-footer-meta { background: transparent; }
[data-md-color-scheme="slate"]:has(.una-hero) .md-footer-meta,
[data-md-color-scheme="slate"]:has(.una-hero) .md-footer-meta a { color: rgba(230, 233, 242, 0.5); }

/* ---- 3D canvas of the hero --------------------------------------------------- */
.una-3d__canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  filter: var(--hero-filter);
}
.una-3d__labels { display: none; }

/* ---- Small screens --------------------------------------------------------- */
@media (max-width: 44.9375em) {
  .una-hero::before {
    background: linear-gradient(0deg, rgba(var(--hero-shade), 0.92) 0%, rgba(var(--hero-shade), 0.6) 55%, rgba(var(--hero-shade), 0.15) 100%);
  }
  .una-hero__inner { padding-bottom: 112px; }
}

/* The modern header shows search as a button. */
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-search__button {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(230, 233, 242, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
[data-md-color-scheme="slate"]:has(.una-hero) .md-header .md-search__button:hover { background: rgba(255, 255, 255, 0.12); }
