/*
 * Public About page (/about, /cs/about) — server-rendered, no JS.
 *
 * Direction: editorial and quiet, like a well-set science feature. SolarSim's
 * dark base (#050608) with the one ice-blue accent (#7dd3fc) reserved for
 * links and the single primary action; amber only for the safety limit.
 * System sans (no web fonts, CSP font-src 'self'), 17 px reading size at 1.6,
 * prose capped at 70ch inside a 1100 px frame. Sections are ruled rows with the
 * heading in a left rail, not a grid of cards. One 10 px control radius (HUD
 * control radius), no shadows. The only ornament is a hairline orbit behind
 * the hero. Motion is limited to 150 ms colour changes, off under reduced motion.
 */

:root {
  color-scheme: dark;
  --about-bg: #050608;
  --about-fg: #e6edf3;
  --about-soft: #c9d4de;
  --about-muted: #aab8c4;
  --about-line: rgba(255, 255, 255, 0.1);
  --about-line-strong: rgba(255, 255, 255, 0.18);
  --about-accent: #7dd3fc;
  --about-accent-hover: #a5e3fd;
  --about-accent-dim: rgba(125, 211, 252, 0.16);
  --about-on-accent: #05202b;
  --about-caution: #fbbf24;
  --about-radius: 10px;
  --about-gutter: clamp(1.25rem, 5vw, 3rem);
  --about-max: 1100px;
  --about-measure: 70ch;
  --about-ease: 150ms ease-out;
  --about-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
}

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

html {
  background: var(--about-bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--about-bg);
  color: var(--about-fg);
  font-family: var(--about-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(125, 211, 252, 0.3);
  color: var(--about-fg);
}

h1,
h2,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  text-wrap: balance;
}

p,
dd,
li {
  text-wrap: pretty;
}

a {
  color: var(--about-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition:
    color var(--about-ease),
    background-color var(--about-ease),
    text-decoration-color var(--about-ease);
}

a:hover {
  color: var(--about-accent-hover);
}

:focus-visible {
  outline: 2px solid var(--about-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.about-wrap {
  width: min(100% - 2 * var(--about-gutter), var(--about-max));
  margin-inline: auto;
}

/* ── Skip link ─────────────────────────────────────────────────────────── */

.about-skip {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--about-radius);
  background: var(--about-accent);
  color: var(--about-on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.about-skip:focus,
.about-skip:focus-visible {
  transform: none;
  color: var(--about-on-accent);
  outline-color: var(--about-fg);
}

.about-main:focus {
  outline: none;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.about-header {
  border-bottom: 1px solid var(--about-line);
}

.about-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.about-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--about-fg);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.about-brand::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--about-accent);
  box-shadow: 0 0 0 4px var(--about-accent-dim);
}

.about-brand:hover {
  color: var(--about-fg);
}

.about-header__end {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.about-lang ul {
  display: flex;
  gap: 0.25rem;
}

.about-lang__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  color: var(--about-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.about-lang__link:hover {
  color: var(--about-fg);
}

.about-lang__link[aria-current='page'] {
  color: var(--about-fg);
  text-decoration: underline;
  text-decoration-color: var(--about-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.about-header__open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--about-line-strong);
  border-radius: var(--about-radius);
  color: var(--about-fg);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
}

.about-header__open:hover {
  border-color: var(--about-accent);
  color: var(--about-fg);
  background: var(--about-accent-dim);
}

@media (max-width: 559px) {
  /* The hero's primary action sits directly below; keep the bar uncluttered. */
  .about-header__open {
    display: none;
  }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.about-main {
  display: block;
  overflow: hidden;
  overflow: clip;
}

/* Orbit geometry: --orbit-cx is the ring centre's inset from the frame's right
   edge (negative = outside), --orbit-cy its offset from the hero top. The body
   sits at inset cx + 0.7071r, top cy + 0.7071r — tuned to land in the empty
   top-right corner, never under text or the facts panel. */
.about-hero {
  --orbit-cx: -2.78rem;
  --orbit-cy: -6.03rem;
  --orbit-size: 22rem;

  position: relative;
  isolation: isolate;
  display: grid;
  gap: 3rem;
  padding-block: clamp(3.5rem, 10vw, 7.5rem) clamp(3rem, 7vw, 5.5rem);
}

/* Hairline orbits with one body on the inner ring (decorative only). The dot
   is a gradient placed on the ring at 135°: 50% ± 35.36%. */
.about-hero::before,
.about-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.about-hero::before {
  width: var(--orbit-size);
  height: var(--orbit-size);
  right: calc(var(--orbit-cx) - var(--orbit-size) / 2);
  top: calc(var(--orbit-cy) - var(--orbit-size) / 2);
  border: 1px solid rgba(125, 211, 252, 0.2);
  background:
    radial-gradient(circle at 14.64% 85.36%, var(--about-accent) 0 4px, transparent 5px),
    radial-gradient(circle at 14.64% 85.36%, rgba(125, 211, 252, 0.22) 0 11px, transparent 12px);
}

.about-hero::after {
  width: calc(var(--orbit-size) * 1.55);
  height: calc(var(--orbit-size) * 1.55);
  right: calc(var(--orbit-cx) - var(--orbit-size) * 0.775);
  top: calc(var(--orbit-cy) - var(--orbit-size) * 0.775);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.about-hero__title {
  font-size: clamp(2.875rem, 9vw, 5rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.035em;
}

.about-hero__pre {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--about-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
}

.about-lead {
  max-width: 38em;
  margin-top: 1.5rem;
  color: var(--about-soft);
  font-size: clamp(1.125rem, 2.1vw, 1.3125rem);
  line-height: 1.55;
}

.about-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2.25rem;
}

.about-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border-radius: var(--about-radius);
  background: var(--about-accent);
  color: var(--about-on-accent);
  font-weight: 600;
  text-decoration: none;
}

.about-button:hover {
  background: var(--about-accent-hover);
  color: var(--about-on-accent);
}

.about-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
}

.about-arrow-link::after {
  content: '→';
  content: '→' / '';
  text-decoration: none;
  transition: transform var(--about-ease);
}

.about-arrow-link:hover::after {
  transform: translateX(3px);
}

/* Facts: a small spec sheet that carries the WebApplication microdata. */
.about-facts {
  align-self: end;
  padding: 1.25rem 1.25rem 0.25rem;
  border: 1px solid var(--about-line);
  border-radius: var(--about-radius);
  background: rgba(5, 6, 8, 0.72);
}

.about-facts__title {
  margin-bottom: 0.5rem;
  color: var(--about-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.about-facts dl > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) 1fr;
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--about-line);
}

.about-facts dt {
  color: var(--about-muted);
  font-size: 0.9375rem;
}

.about-facts dd {
  font-size: 0.9375rem;
  font-weight: 500;
}

@media (min-width: 880px) {
  .about-hero {
    --orbit-cx: -7.56rem;
    --orbit-cy: -11.56rem;
    --orbit-size: 44rem;

    grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 1fr);
    align-items: end;
    gap: 4.5rem;
  }
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.about-section {
  display: grid;
  gap: 1.25rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--about-line);
}

.about-section h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.about-section__body {
  display: grid;
  gap: 1.25rem;
  max-width: var(--about-measure);
}

@media (min-width: 880px) {
  .about-section {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 4.5rem;
  }
}

.about-muted {
  color: var(--about-muted);
  font-size: 0.9375rem;
}

/* Features: term/description pairs on ruled rows. */
.about-features {
  display: grid;
  gap: 0 2.5rem;
  margin-top: 0.5rem;
}

.about-feature {
  padding-block: 1.125rem 1.25rem;
  border-top: 1px solid var(--about-line);
}

.about-feature dt {
  font-weight: 600;
}

.about-feature dd {
  margin-top: 0.375rem;
  color: var(--about-muted);
}

@media (min-width: 640px) {
  .about-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Routes and sources: link-led rows. */
.about-routes,
.about-sources {
  border-bottom: 1px solid var(--about-line);
}

.about-route,
.about-source {
  padding-block: 1rem 1.25rem;
  border-top: 1px solid var(--about-line);
}

.about-route p,
.about-source p {
  margin-top: 0.25rem;
  color: var(--about-muted);
}

.about-route__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  color: var(--about-fg);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.about-route__link::after {
  content: '→';
  content: '→' / '';
  color: var(--about-accent);
  transition: transform var(--about-ease);
}

.about-route__link:hover {
  color: var(--about-accent-hover);
}

.about-route__link:hover::after {
  transform: translateX(3px);
}

.about-source__name {
  display: inline-flex;
  align-items: center;
  gap: 0.375em;
  min-height: 44px;
  font-weight: 600;
}

.about-source__name::after {
  content: '↗';
  content: '↗' / '';
  font-size: 0.875em;
  text-decoration: none;
}

/* Model notes: small orbit-ring markers instead of bullets. */
.about-points {
  display: grid;
  gap: 0.875rem;
}

.about-points li {
  position: relative;
  padding-left: 1.625rem;
}

.about-points li::before {
  content: '';
  position: absolute;
  left: 0.125rem;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border: 1.5px solid var(--about-accent);
  border-radius: 50%;
}

.about-limit {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--about-radius);
  background: rgba(251, 191, 36, 0.06);
}

.about-limit strong {
  color: var(--about-caution);
  font-weight: 600;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.about-footer {
  border-top: 1px solid var(--about-line);
}

.about-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem 2.5rem;
}

.about-footer__mark {
  color: var(--about-muted);
  font-size: 0.9375rem;
}

.about-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.about-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--about-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.about-footer__links a:hover {
  color: var(--about-fg);
  text-decoration: underline;
}

/* ── Preferences ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .about-arrow-link:hover::after,
  .about-route__link:hover::after {
    transform: none;
  }
}

@media (forced-colors: active) {
  .about-hero::before,
  .about-hero::after {
    display: none;
  }

  .about-button,
  .about-header__open,
  .about-skip {
    border: 1px solid ButtonText;
  }

  .about-lang__link[aria-current='page'] {
    text-decoration-color: currentColor;
  }
}

@media print {
  .about-skip,
  .about-header__end,
  .about-hero::before,
  .about-hero::after {
    display: none;
  }
}
