/* ==========================================================================
   ALT ALIENS — sub-site layer on the homepage design system
   Loaded after ../assets/fonts/fonts.css, ../assets/landing.css and
   ../assets/about.css (hero, section rhythm, cards, grids, CTA panel).
   Only Alt Aliens specific pieces live here: the sub-nav, the Eight roster,
   the observer globe, the demo deck, the feedback form + poll and the
   manifesto blocks. The alien green is the one sub-site accent.
   ========================================================================== */

:root {
  --alien: #5dd62c;
  --alien-glow: rgba(93, 214, 44, 0.4);
  /* globe.js writes its WebGL fallback with var(--hud). */
  --hud: var(--font-label);
}

/* --- Scroll reveal (app.js adds .in; only hides when JS is running) ------- */
html.aa-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}
html.aa-js .reveal.in { opacity: 1; transform: none; }

/* --- Sub-site nav strip under the shared header --------------------------- */
.aa-subnav {
  position: relative;
  z-index: 3;
  border-bottom: 1px dashed rgba(93, 214, 44, 0.35);
  background: rgba(5, 5, 16, 0.7);
}
.aa-subnav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.4rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.aa-subnav-label {
  font-family: var(--font-label);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  color: var(--alien);
  text-shadow: 0 0 6px var(--alien-glow);
  text-decoration: none;
}
.aa-subnav a:not(.aa-subnav-label) {
  font-family: var(--font-label);
  font-size: 1.125rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 140ms, border-color 140ms;
}
.aa-subnav a:not(.aa-subnav-label):hover,
.aa-subnav a[aria-current="page"] {
  color: var(--alien);
  border-bottom-color: var(--alien);
}

/* Root .nav-links has no "current" state; mark ALT ALIENS as the section. */
.nav-links a.cta[aria-current] {
  background: rgba(180, 79, 255, 0.12);
}

/* Hero badge picks up the alien accent on the sub-site. */
.about-hero .hero-badge.aa-badge {
  color: var(--alien);
  border-color: var(--alien);
  background: rgba(93, 214, 44, 0.06);
  text-shadow: 0 0 8px var(--alien-glow);
}

/* Section intro paragraph sits under the title before a grid. */
.about-section .section-desc { margin-top: -0.75rem; margin-bottom: 2rem; }

/* --- The Eight roster ---------------------------------------------------- */
.eight-card { gap: 0.55rem; }
.eight-portrait {
  position: relative;
  display: grid;
  place-items: end center;
  padding: 1.25rem 1rem 0;     /* busts end at the shoulders: sit them on the frame edge */
  margin-bottom: 0.6rem;
  border: 2px solid var(--tone);
  background:
    radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--tone) 18%, transparent), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 16px 16px,
    rgba(10, 10, 26, 0.92);
  box-shadow: 0 0 14px var(--tone-glow);
  overflow: hidden;
}
/* 64x64 game busts at whole-number scales only: 3x, 4x on wide cards. */
.eight-portrait img {
  display: block;
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
  transition: transform 180ms;
}
.eight-card:hover .eight-portrait img { transform: translateY(-4px); }
@media (min-width: 1180px) {
  .eight-portrait img { width: 256px; height: 256px; }
}
.eight-portrait.is-network { place-items: center; padding-bottom: 1.25rem; }
.eight-network {
  display: grid;
  place-items: center;
  width: 192px;
  height: calc(192px - 1.25rem);   /* same frame height as a portrait card */
  font-size: 5rem;
  line-height: 1;
  color: var(--tone);
  text-shadow: 0 0 18px var(--tone-glow);
  animation: aa-pulse 2.4s ease-in-out infinite;
}
@media (min-width: 1180px) {
  .eight-network { width: 256px; height: calc(256px - 1.25rem); font-size: 6.5rem; }
}
@keyframes aa-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.eight-num {
  position: absolute;
  top: 0.4rem;
  left: 0.6rem;
  font-family: var(--font-label);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--tone);
  text-shadow: 0 0 6px var(--tone-glow);
}
.eight-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.eight-tag {
  font-family: var(--font-label);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--tone);
  color: var(--tone);
}
.eight-tag.is-city { border-color: rgba(122, 113, 148, 0.6); color: var(--bone); }

/* --- Route + observer globe ---------------------------------------------- */
@media (min-width: 769px) {
  .featured-card.aa-route { grid-template-columns: 1fr 1.15fr; }
}
.aa-route .section-desc { margin-bottom: 0; }
.globe-wrapper { position: relative; width: 100%; }
.observer-globe {
  width: 100%;
  aspect-ratio: 1 / 0.85;
  max-height: 520px;
  cursor: grab;
  position: relative;
  z-index: 1;
}
.observer-globe:active { cursor: grabbing; }
.observer-globe canvas { display: block; width: 100% !important; height: 100% !important; }

.globe-tooltip {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 10;
  background: rgba(5, 5, 16, 0.92);
  border: 2px solid var(--teal);
  padding: 0.5rem 1rem;
  text-align: center;
  opacity: 0;
  transition: opacity 200ms ease;
  white-space: nowrap;
  box-shadow: 0 0 16px var(--teal-glow);
}
.globe-tooltip.visible { opacity: 1; }
.globe-tooltip-name {
  display: block;
  font-family: var(--font-title);
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 10px var(--teal-glow);
}
.globe-tooltip-city {
  display: block;
  font-family: var(--font-label);
  font-size: 1.0625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone);
}
.globe-tooltip-func {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-top: 0.2rem;
  padding: 0 0.5rem;
  border: 1px solid var(--purple-glow);
}
.globe-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.globe-legend-dot {
  width: 6px;
  height: 6px;
  background: var(--alien);
  box-shadow: 0 0 6px var(--alien);
  animation: aa-pulse 2s ease-in-out infinite;
}
.globe-legend-label {
  font-family: var(--font-label);
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

/* --- Demo deck (play.html) ----------------------------------------------- */
.aa-deck { grid-template-columns: 1fr; gap: 0; text-align: center; }
.aa-deck .featured-badge { margin-bottom: 0.8rem; }
.aa-deck .featured-title { margin-bottom: 1rem; }
.aa-deck .featured-desc { max-width: 52ch; margin: 0 auto 2rem; }
.aa-deck .featured-stats { justify-content: center; flex-wrap: wrap; margin-bottom: 0; }
.aa-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1.2rem;
}
.aa-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
  animation: aa-pulse 1.6s ease-in-out infinite;
}

/* --- Pull line / stamps -------------------------------------------------- */
.aa-pull,
.about-prose .aa-pull {
  font-family: var(--font-title);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--pink);
  text-shadow: 0 0 14px var(--pink-glow);
  margin: 1.6rem 0 0;
}
.aa-pull.is-teal,   .about-prose .aa-pull.is-teal   { color: var(--teal);   text-shadow: 0 0 14px var(--teal-glow); }
.aa-pull.is-purple, .about-prose .aa-pull.is-purple { color: var(--purple); text-shadow: 0 0 14px var(--purple-glow); }
.about-prose .aa-micro { color: var(--ash); margin-top: 1.1rem; }
.about-prose strong { color: var(--purple); font-weight: 400; }

/* --- Feedback form + poll ------------------------------------------------ */
.aa-feedback-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .aa-feedback-grid { grid-template-columns: 1.35fr 1fr; } }
.aa-form { gap: 1.1rem; }
.aa-form label { display: flex; flex-direction: column; gap: 0.4rem; }
.aa-form label > span {
  font-family: var(--font-label);
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
}
.aa-form label > span em { font-style: normal; color: var(--ash); text-transform: none; }
.aa-form input,
.aa-form select,
.aa-form textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: var(--body-tracking);
  color: var(--bone);
  background: rgba(5, 5, 16, 0.85);
  border: 2px solid rgba(0, 245, 212, 0.25);
  border-radius: 0;
  padding: 0.7rem 0.8rem;
  outline: none;
  transition: border-color 140ms, box-shadow 140ms;
}
.aa-form textarea { resize: vertical; line-height: var(--body-leading); }
.aa-form select option { background: var(--deep); color: var(--bone); }
.aa-form input::placeholder,
.aa-form textarea::placeholder { color: var(--ash); opacity: 0.8; }
.aa-form input:focus,
.aa-form select:focus,
.aa-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 12px var(--teal-glow); }
.aa-form .row.two { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .aa-form .row.two { grid-template-columns: 1fr 1fr; } }
.aa-form .row.split { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.2rem; }
.aa-form button.btn { background: transparent; }
.aa-hint { color: var(--ash); font-size: 1rem; line-height: 1.6; }
.aa-hint a, .aa-inline-link {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px dashed var(--teal);
  overflow-wrap: anywhere;
}
.aa-hint a:hover, .aa-inline-link:hover { color: var(--bone); border-bottom-color: var(--bone); }
.aa-note { font-family: var(--font-label); font-size: 1.125rem; letter-spacing: 0.04em; }

.aa-poll-options { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.4rem; }
.poll-option {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 0.8rem 1rem;
  background: rgba(5, 5, 16, 0.7);
  border: 2px solid rgba(180, 79, 255, 0.25);
  color: var(--bone);
  font: inherit;
  transition: border-color 140ms, box-shadow 140ms, transform 140ms;
}
.poll-option strong {
  display: block;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
}
.poll-option span { display: block; color: var(--ash); font-size: 1rem; line-height: 1.6; }
.poll-option:hover,
.poll-option:focus-visible,
.poll-option.voted {
  border-color: var(--purple);
  box-shadow: 0 0 16px var(--purple-glow);
  outline: none;
}
.poll-option.voted strong::after { content: '  \2713'; color: var(--alien); }

/* --- Manifesto blocks (about.html) --------------------------------------- */
.aa-declaration {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-label);
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--bone);
}
.aa-declaration + .aa-declaration { margin-top: 1.6rem; }
.aa-declaration .hot  { color: var(--pink);   text-shadow: 0 0 12px var(--pink-glow); }
.aa-declaration .cool { color: var(--teal);   text-shadow: 0 0 12px var(--teal-glow); }
.aa-declaration .viol { color: var(--purple); text-shadow: 0 0 12px var(--purple-glow); }

.aa-cmd-list { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .aa-cmd-list { grid-template-columns: repeat(2, 1fr); } }
.aa-cmd { flex-direction: row; align-items: flex-start; gap: 1.2rem; }
.aa-cmd-num {
  flex: 0 0 3.6rem;
  font-family: var(--font-title);
  font-size: 2.75rem;
  line-height: 0.9;
  color: var(--tone);
  text-shadow: 0 0 10px var(--tone-glow);
}
.aa-cmd-body { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }

.aa-oath {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-label);
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  line-height: 1.35;
  color: var(--bone);
  max-width: 46ch;
  margin: 0 auto;
}
.aa-oath .dim  { color: var(--ash); }
.aa-oath .cool { color: var(--teal); text-shadow: 0 0 8px var(--teal-glow); }
.aa-oath .viol { color: var(--purple); text-shadow: 0 0 8px var(--purple-glow); }
.aa-oath-close { margin-top: 2.5rem; text-align: center; }
.aa-oath-close .aa-pull { margin: 0 0 1.75rem; }
.about-prose .aa-pull + p,
.about-prose .aa-pull + .aa-micro { margin-top: 1.6rem; }

/* --- Small helpers -------------------------------------------------------- */
.aa-center { text-align: center; }
.aa-after-buttons { margin-top: 1.5rem; }
.about-prose .aa-after-quote { margin-top: 1.6rem; }

/* --- Footer: root footer + an Alt Aliens column --------------------------- */
@media (min-width: 721px) {
  .foot-grid.aa-foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
