/* constellation: signature marks for the real site markup. Tokens live in
   design-system.css. Every rule starts with [data-theme="constellation"].

   Constellation (2026-11-26): the gold starfield of the old constellation
   view (and the pre-rebrand site), site-wide. Near-black ground under a
   fixed field of faint stars that twinkle, gold hairlines (double-ruled
   cards like a star chart's border), Cinzel caps for headings over Inter.
   Under this theme /constellation shows its Original style. */

/* ---------- Page ---------- */
[data-theme="constellation"] {
  scrollbar-color: #2a2a2f #0a0a0c;
}
[data-theme="constellation"] body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(212, 175, 55, 0.08), transparent 60%),
    var(--cm-bg);
  background-attachment: fixed;
}
/* The star field: two fixed layers of tiny dots; the second twinkles. */
[data-theme="constellation"] body::before,
[data-theme="constellation"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
[data-theme="constellation"] body::before {
  background-image:
    radial-gradient(circle at 8% 12%, rgba(244, 244, 245, 0.7) 0 1px, transparent 1.6px),
    radial-gradient(circle at 23% 64%, rgba(244, 244, 245, 0.5) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 41% 28%, rgba(245, 215, 126, 0.7) 0 1px, transparent 1.6px),
    radial-gradient(circle at 57% 83%, rgba(244, 244, 245, 0.55) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 72% 41%, rgba(244, 244, 245, 0.6) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 88% 9%, rgba(212, 175, 55, 0.75) 0 1px, transparent 1.6px),
    radial-gradient(circle at 93% 71%, rgba(244, 244, 245, 0.45) 0 0.8px, transparent 1.4px);
  background-size: 380px 340px;
}
[data-theme="constellation"] body::after {
  background-image:
    radial-gradient(circle at 15% 40%, rgba(245, 215, 126, 0.85) 0 1.2px, rgba(212, 175, 55, 0.2) 2.5px, transparent 5px),
    radial-gradient(circle at 63% 18%, rgba(244, 244, 245, 0.85) 0 1.1px, rgba(244, 244, 245, 0.15) 2.5px, transparent 5px),
    radial-gradient(circle at 81% 88%, rgba(245, 215, 126, 0.8) 0 1px, rgba(212, 175, 55, 0.2) 2.5px, transparent 5px);
  background-size: 610px 520px;
  animation: constellation-twinkle var(--cm-breath) ease-in-out infinite alternate;
}
@keyframes constellation-twinkle {
  from { opacity: 0.25; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-theme="constellation"] body::after {
    animation: none;
    opacity: 0.7;
  }
}
[data-theme="constellation"] ::selection {
  background: #5c4d1a;
  color: #fffbea;
}
[data-theme="constellation"] input[type="checkbox"],
[data-theme="constellation"] input[type="radio"],
[data-theme="constellation"] input[type="range"],
[data-theme="constellation"] progress {
  accent-color: var(--cm-accent);
}

/* Cinzel is all small caps and wide: roomy line height. */
[data-theme="constellation"] h1,
[data-theme="constellation"] h2,
[data-theme="constellation"] h3 {
  line-height: 1.2;
  overflow-wrap: break-word;
}
[data-theme="constellation"] h1 {
  color: var(--cm-brand-2);
}
@media (max-width: 560px) {
  [data-theme="constellation"] h1 {
    font-size: clamp(1.5rem, 7vw, 2.1rem);
  }
  /* Pushover's HUD title: Cinzel's wide caps need a smaller size. */
  [data-theme="constellation"] .push-title {
    font-size: 1rem;
    letter-spacing: 0;
  }
}

/* ---------- Header: a gold hairline that fades at both ends ---------- */
[data-theme="constellation"] .app-header {
  background: var(--cm-surface);
  border-bottom: 0;
  box-shadow: none;
}
[data-theme="constellation"] .app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #d4af37 18%, #f5d77e 50%, #d4af37 82%, transparent);
}
[data-theme="constellation"] .logo,
[data-theme="constellation"] .logo span {
  color: var(--cm-brand-2);
}
[data-theme="constellation"] .logo::before {
  content: "\2726\00a0";
  color: #d4af37;
}
[data-theme="constellation"] .mobile-nav-menu {
  background: var(--cm-bg-2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}
[data-theme="constellation"] .theme-menu__button {
  background: var(--cm-bg-2);
  border-color: rgba(212, 175, 55, 0.5);
}
[data-theme="constellation"] .theme-menu__button:focus-visible {
  box-shadow: var(--cm-focus);
}
[data-theme="constellation"] .theme-switch--compact {
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: var(--cm-bg-2);
}
[data-theme="constellation"] .theme-switch input:checked + label {
  background: var(--cm-accent);
  color: var(--cm-on-accent);
}
[data-theme="constellation"] .theme-switch--compact input:checked + label:hover {
  background: var(--cm-accent);
}
[data-theme="constellation"] .theme-switch__swatch {
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4);
}

/* ---------- Buttons ---------- */
[data-theme="constellation"] .btn {
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px -10px rgba(212, 175, 55, 0.8);
}
[data-theme="constellation"] .btn:hover {
  background: #f5d77e;
  color: #0a0a0c;
}
[data-theme="constellation"] .btn.secondary,
[data-theme="constellation"] .home-page .btn.secondary,
[data-theme="constellation"] .btn-secondary {
  background: transparent;
  color: var(--cm-link-hover);
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: none;
}
[data-theme="constellation"] .btn.secondary:hover,
[data-theme="constellation"] .home-page .btn.secondary:hover,
[data-theme="constellation"] .btn-secondary:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #fff3cc;
}
[data-theme="constellation"] .btn:focus-visible {
  box-shadow: var(--cm-focus);
}

/* ---------- Chips ---------- */
[data-theme="constellation"] .chip:not(.active) {
  background: transparent;
  border-color: rgba(212, 175, 55, 0.35);
}
[data-theme="constellation"] .chip.active,
[data-theme="constellation"] .filter-button.active {
  background: var(--cm-accent);
  color: var(--cm-on-accent);
  border-color: var(--cm-accent);
}

/* ---------- Home hero ---------- */
[data-theme="constellation"] .home-eyebrow {
  color: var(--cm-brand);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}
[data-theme="constellation"] .home-eyebrow::before {
  content: "\2726\00a0";
}
[data-theme="constellation"] .home-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
}
[data-theme="constellation"] .art-garden {
  display: none;
}
/* A star chart: gold lines between stars round a glowing orb. */
[data-theme="constellation"] .home-hero__art {
  aspect-ratio: 420 / 340;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 340' fill='none'%3E%3Cdefs%3E%3CradialGradient id='o'%3E%3Cstop offset='0' stop-color='%23f5d77e'/%3E%3Cstop offset='.35' stop-color='%23d4af37' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%23d4af37' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='210' cy='170' r='150' stroke='%23d4af37' stroke-opacity='.18'/%3E%3Ccircle cx='210' cy='170' r='104' stroke='%23d4af37' stroke-opacity='.28' stroke-dasharray='2 6'/%3E%3Cpath d='M60 170h300M210 20v300' stroke='%23d4af37' stroke-opacity='.12'/%3E%3Cpath d='M84 96L150 70 210 120 286 84 346 132M210 120l-10 80 -72 52M200 200l92 40 40-56M292 240l-18 54' stroke='%23d4af37' stroke-width='1.2' stroke-opacity='.75'/%3E%3Ccircle cx='210' cy='170' r='46' fill='url(%23o)'/%3E%3Ccircle cx='210' cy='170' r='9' fill='%23f5d77e'/%3E%3Cg fill='%23f4f4f5'%3E%3Ccircle cx='84' cy='96' r='3'/%3E%3Ccircle cx='150' cy='70' r='3.5'/%3E%3Ccircle cx='286' cy='84' r='3'/%3E%3Ccircle cx='346' cy='132' r='4'/%3E%3Ccircle cx='128' cy='252' r='3.5'/%3E%3Ccircle cx='292' cy='240' r='3'/%3E%3Ccircle cx='332' cy='184' r='3'/%3E%3Ccircle cx='274' cy='294' r='2.5'/%3E%3C/g%3E%3Cg fill='%23d4af37'%3E%3Ccircle cx='210' cy='120' r='4'/%3E%3Ccircle cx='200' cy='200' r='4'/%3E%3C/g%3E%3Cg fill='%23f4f4f5' opacity='.55'%3E%3Ccircle cx='40' cy='40' r='1.2'/%3E%3Ccircle cx='120' cy='30' r='1'/%3E%3Ccircle cx='380' cy='60' r='1.4'/%3E%3Ccircle cx='372' cy='260' r='1'/%3E%3Ccircle cx='40' cy='300' r='1.2'/%3E%3Ccircle cx='100' cy='180' r='1'/%3E%3Ccircle cx='250' cy='40' r='1'/%3E%3Ccircle cx='330' cy='320' r='1.2'/%3E%3Ccircle cx='170' cy='310' r='1'/%3E%3C/g%3E%3Cpath d='M346 116v32M330 132h32' stroke='%23f5d77e' stroke-opacity='.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Home app cards: plates in a star atlas ---------- */
[data-theme="constellation"] .app-card {
  background: var(--cm-surface);
  border: 0;
}
[data-theme="constellation"] .app-card:hover {
  box-shadow: 0 0 0 1px #d4af37, 0 0 0 5px #0a0a0c, 0 0 0 6px rgba(212, 175, 55, 0.4), 0 0 60px -16px rgba(212, 175, 55, 0.5);
}
/* Card art: the pre-rebrand gold-on-black set this look was made with
   (/images/cards/classic/). Wired like Night's --nt (pages/index.astro). */
[data-theme="constellation"] .app-image-link {
  margin: 10px 10px 0;
  border-radius: var(--cm-radius-sm);
  background: #0a0a0c var(--cl) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}
[data-theme="constellation"] .app-image-link picture {
  display: none;
}
[data-theme="constellation"] .app-chip {
  color: var(--cm-brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}
[data-theme="constellation"] .app-pips {
  display: flex;
  gap: 5px;
}
[data-theme="constellation"] .app-pips i {
  width: 7px;
  height: 7px;
  display: block;
  background: #2a2a2f;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
[data-theme="constellation"] .app-pips i.on {
  background: #f5d77e;
}

/* ---------- Generic cards and panels ---------- */
[data-theme="constellation"] .card,
[data-theme="constellation"] .container {
  border-color: rgba(212, 175, 55, 0.25);
}
[data-theme="constellation"] details > summary::marker {
  color: var(--cm-brand);
}
[data-theme="constellation"] hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

/* ---------- Footer: the horizon line ---------- */
[data-theme="constellation"] .page-footer {
  background: linear-gradient(transparent 0 5rem, var(--cm-bg-2) 5rem);
}
[data-theme="constellation"] .footer-clouds {
  top: 5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af37 20%, #f5d77e 50%, #d4af37 80%, transparent);
}
[data-theme="constellation"] .footer-ad {
  background: var(--cm-surface);
}
