/* ==========================================================================
   Astronym Registry — shared stylesheet
   Visual system derived from corporatetools.com
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */

:root {
  /* Colour */
  --navy-900: #00065d;
  --navy-700: #413e8d;
  --navy-400: #8080b0;
  --slate-900: #232f3b;
  --ink-900: #212529;
  --ink-600: #4a4a4a;
  --surface-white: #ffffff;
  --surface-tint: #f8f9ff;
  --border-hairline: #e3e3ea;
  --accent-teal: #3ec7c2;
  --accent-gold: #f2b705;

  /* Type */
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;

  /* Fluid type scale — clamp(min, preferred, max) */
  --fs-display: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --fs-h3: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-tiny: 0.875rem;
  --fs-micro: 0.8125rem;

  /* Spacing */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  --section-y: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --max-width: 1440px;
  --measure: 56rem;

  /* Misc */
  --radius: 4px;
  --pill: 999px;
  --transition: 160ms ease;
}

/* --- Reset -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--surface-white);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

/* --- Accessibility ------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--navy-700);
  outline-offset: 3px;
}

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

/* --- Layout primitives -------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--surface-tint);
}

.section--center {
  text-align: center;
}

.measure {
  max-width: var(--measure);
  margin-inline: auto;
}

.measure--wide {
  max-width: 60rem;
}

/* --- Typography --------------------------------------------------------- */

.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-400);
}

.page-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-900);
}

.display {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.18;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.25;
  color: var(--slate-900);
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.35;
  color: var(--slate-900);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--ink-600);
}

.prose {
  color: var(--ink-600);
  line-height: 1.7;
}

.prose + .prose {
  margin-top: 1.25rem;
}

.section-heading,
.section-intro {
  margin-top: 1.5rem;
}

.inline-link {
  color: var(--navy-900);
  font-weight: 700;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.875rem;
  border: 1px solid var(--navy-900);
  border-radius: var(--pill);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn--solid {
  background: var(--navy-900);
  color: #fff;
}

.btn--solid:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
}

.btn--ghost {
  background: transparent;
  color: var(--navy-900);
}

.btn--ghost:hover {
  background: var(--navy-900);
  color: #fff;
}

.btn--light {
  background: #fff;
  border-color: #fff;
  color: var(--navy-900);
}

.btn--light:hover {
  background: var(--surface-tint);
  border-color: var(--surface-tint);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.text-link {
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--navy-900);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.5rem;
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 300;
  color: var(--slate-900);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark sup {
  font-size: 0.55em;
  top: -0.5em;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__list a {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  text-decoration: none;
  transition: color var(--transition);
}

.nav__list a:hover,
.nav__list a[aria-current="page"] {
  color: var(--navy-900);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle > span:not(.visually-hidden) {
  display: block;
  height: 2px;
  background: var(--slate-900);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] > span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] > span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] > span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  text-align: center;
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem)
    clamp(3rem, 1.75rem + 4.5vw, 5.5rem);
}

.hero__caption {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.75rem;
}

.hero .display {
  max-width: 58rem;
  margin-inline: auto;
}

.hero .lead {
  max-width: 52rem;
  margin: 1.75rem auto 0;
}

.hero .btn-row {
  margin-top: 2.75rem;
}

/* --- Hero illustration band --------------------------------------------- */

/* Full-bleed band matching the Figma "Section / Hero art" frames: tint
   background, 40px above and below, artwork capped at the 1440 layout width
   and centred. Art is ~3:1 in every case. */

.hero-art {
  background: var(--surface-tint);
  padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
}

.hero-art picture {
  display: block;
}

.hero-art img {
  display: block;
  width: 100%;
  max-width: var(--max-width);
  height: auto;
  margin-inline: auto;
}

/* Missing-asset fallback: if the export hasn't been dropped in yet, the band
   still reserves the right amount of space instead of collapsing. */
.hero-art--pending {
  min-height: clamp(9rem, 4rem + 18vw, 18.5rem);
  display: grid;
  place-items: center;
}

.hero-art--pending::after {
  content: "Illustration pending export";
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-400);
}

/* --- Cards -------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 2.5rem;
  text-align: left;
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 2rem;
  background: var(--surface-tint);
  border-left: 3px solid var(--navy-900);
  border-radius: var(--radius);
}

.card--white {
  background: var(--surface-white);
  padding: 1.75rem;
}

.card p {
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--ink-600);
}

.card .text-link {
  margin-top: auto;
  padding-top: 0.25rem;
}

/* --- Panels and lists --------------------------------------------------- */

.panel {
  background: var(--surface-white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.panel > * + * {
  border-top: 1px solid var(--border-hairline);
}

.empty-state {
  padding: 3.5rem 3rem;
  text-align: center;
}

.empty-state p {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  font-size: 1rem;
  color: var(--ink-600);
}

.panel-spaced {
  margin-top: 1.75rem;
}

.notice {
  margin-top: 2.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-tint);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius);
  text-align: left;
}

.notice strong {
  display: block;
  color: var(--slate-900);
}

.notice p {
  margin-top: 0.25rem;
  color: var(--ink-600);
}

.status-panel {
  max-width: 60rem;
  margin-inline: auto;
}

.status-panel .dot {
  width: 12px;
  height: 12px;
  margin: 0 auto 1rem;
}

.status-panel .h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

/* Press releases */

.release {
  display: grid;
  grid-template-columns: 10.625rem 1fr;
  gap: 2.5rem;
  padding: 1.75rem 2rem;
}

.release__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

.release__date {
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--navy-900);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--surface-tint);
  border: 1px solid var(--border-hairline);
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-400);
}

.release__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.release__body p {
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--ink-600);
}

.press-release__header {
  border-bottom: 1px solid var(--border-hairline);
}

.press-release__measure {
  max-width: 58rem;
}

.press-release__header .display {
  max-width: 52rem;
  margin-top: 1rem;
}

.press-release__deck {
  max-width: 46rem;
  margin-top: 1.5rem;
}

.press-release__date {
  margin-top: 1.5rem;
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--navy-900);
}

.press-release__body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-600);
}

.press-release__body > p + p,
.press-release__contact p + p,
.press-release__about p + p {
  margin-top: 1.5rem;
}

.press-release__body h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.3;
  color: var(--slate-900);
}

.press-release__quote {
  margin: 2.5rem 0;
  padding: 0.25rem 0 0.25rem 1.75rem;
  border-left: 4px solid var(--accent-teal);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.65;
  color: var(--slate-900);
}

.press-release__contact {
  margin-top: 3.5rem;
  padding: 2rem;
  background: var(--surface-white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
}

.press-release__about {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-hairline);
}

.press-release__about h2 {
  margin-top: 0;
}

/* --- Report panel (Abuse) ----------------------------------------------- */

.report-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 3rem 3.5rem;
  background: var(--navy-900);
  border-radius: var(--radius);
  text-align: center;
  color: #fff;
}

.report-panel h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  font-weight: 300;
  line-height: 1.3;
}

.report-panel p {
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.report-panel .btn {
  margin-top: 0.5rem;
}

/* --- Status board ------------------------------------------------------- */

.board-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.service-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.75rem;
  padding: 1.25rem 1.75rem;
}

.service-row__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-900);
}

.service-row__state {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--slate-900);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-teal);
  flex: none;
}

.dot--maintenance {
  background: var(--accent-gold);
}

.dot--idle {
  background: var(--navy-400);
}

.uptime {
  min-width: 5.25rem;
  font-size: var(--fs-tiny);
  color: var(--ink-600);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Maintenance card */

.maint-card {
  padding: 1.625rem 1.75rem;
  background: var(--surface-tint);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius);
}

.maint-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.625rem;
}

.maint-card__when {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-400);
}

.maint-card p {
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--ink-600);
}

.maint-card .posted {
  margin-top: 0.625rem;
  font-size: var(--fs-micro);
  color: var(--navy-400);
}

/* Incident log */

.incident {
  padding: 1.375rem 1.75rem;
}

.incident__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.625rem;
}

.incident__date {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy-400);
}

.incident__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.1875rem 0.625rem;
  background: var(--surface-tint);
  border: 1px solid var(--border-hairline);
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-900);
}

.incident__badge .dot {
  width: 7px;
  height: 7px;
}

.incident__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.45;
  color: var(--slate-900);
}

.incident__quiet {
  font-size: var(--fs-small);
  color: var(--ink-600);
}

.update {
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-hairline);
}

.update__label {
  font-size: var(--fs-micro);
  font-weight: 700;
  color: var(--navy-900);
}

.update p {
  margin-top: 0.25rem;
  font-size: var(--fs-tiny);
  line-height: 1.65;
  color: var(--ink-600);
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  padding-block: 4rem 3.5rem;
  background: var(--navy-900);
  color: #fff;
}

/* Wordmark left, link row right, hairline rule beneath, copyright last. */

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.site-footer .wordmark {
  font-size: 1.5rem;
  color: #fff;
}

.site-footer hr {
  height: 1px;
  margin-block: 1.5rem;
  border: 0;
  background: rgba(255, 255, 255, 0.25);
}

.site-footer__copy {
  font-size: var(--fs-tiny);
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

.footer-links a {
  font-size: var(--fs-tiny);
  color: var(--navy-400);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links .sep {
  color: var(--navy-400);
  opacity: 0.5;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1080px) {
  .header-left {
    gap: 2rem;
  }
  .nav__list {
    gap: 1.5rem;
  }
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
    min-height: 4.5rem;
    padding-block: 0.75rem;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }

  .header-left {
    display: contents;
  }

  .wordmark {
    order: 1;
  }

  .nav {
    order: 4;
    flex-basis: 100%;
    display: none;
  }

  .nav[data-open="true"] {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 0.5rem;
  }

  .nav__list a {
    display: block;
    padding: 0.875rem 0;
    border-top: 1px solid var(--border-hairline);
  }

  .header-actions {
    order: 2;
    gap: 0.625rem;
  }

  .header-actions .btn {
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
  }

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

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

  .release__meta {
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    gap: 0.75rem;
  }

  .site-header__inner > .wordmark,
  .header-left > .wordmark {
    font-size: 1.1rem;
  }

  .nav-toggle {
    order: 2;
    margin-left: auto;
  }

  .header-actions {
    order: 3;
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
  }

  .nav {
    order: 4;
  }

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

  .card,
  .card--white {
    padding: 1.5rem;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .report-panel {
    padding: 2.25rem 1.5rem;
  }

  .empty-state {
    padding: 2.5rem 1.5rem;
  }

  .service-row,
  .incident,
  .release {
    padding: 1.25rem;
  }

  .service-row__state {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 1rem;
  }

  .board-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Print -------------------------------------------------------------- */

@media print {
  .site-header,
  .nav-toggle,
  .btn-row {
    display: none;
  }
  .section {
    padding-block: 1.5rem;
  }
  body {
    color: #000;
  }
}
