/* =====================================================================
   ASTRUM — pre-launch teaser page
   Edit ME notes are marked with "EDITABLE:" throughout this file.
   ===================================================================== */

:root {
  /* ---- Palette (EDITABLE: swap these to retheme the whole site) ---- */
  --void: #05060f;
  --navy-deep: #090c1c;
  --navy: #0e1330;
  --purple-deep: #1c1240;
  --purple: #2b1a55;
  --cyan: #5fd8ff;
  --cyan-soft: #9fe8ff;
  --magenta: #ff6fd8;
  --amber: #ffcf6b;

  --text-primary: #eef3ff;
  --text-muted: #a9b3d6;
  --text-faint: #6f7aa0;

  --glass-bg: rgba(16, 20, 44, 0.55);
  --glass-bg-strong: rgba(10, 13, 30, 0.85);
  --glass-border: rgba(150, 205, 255, 0.22);

  --status-warn: #ffb454;
  --status-pending: #7fd4ff;
  --status-nominal: #7dffc0;

  --focus-ring: #ffe083;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  color-scheme: dark;
}

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

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

html {
  height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--text-primary);
  background: var(--void);
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p {
  margin: 0;
}

button {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--amber);
  color: #1a1305;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Visible, consistent focus styling for keyboard users */
a:focus-visible,
button:focus-visible,
.checklist-item:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- */
/* Ambient background layers                                         */
/* ---------------------------------------------------------------- */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Planet / nebula glow.
   EDITABLE: If you add the reference art (psu_astrum_reference.png) to
   this folder, it will layer in automatically beneath the gradients
   below. If the file is missing, the gradients alone still render the
   full background — nothing breaks. */
.bg-glow {
  background-image:
    radial-gradient(ellipse 60% 45% at 78% 15%, rgba(255, 111, 216, 0.16), transparent 60%),
    radial-gradient(ellipse 90% 70% at 20% 110%, rgba(95, 216, 255, 0.28), transparent 65%),
    radial-gradient(ellipse 120% 90% at 50% 0%, var(--purple-deep), transparent 55%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--void) 70%),
    url("psu_astrum_reference.png");
  background-repeat: no-repeat;
  background-size: cover, cover, cover, cover, cover;
  background-position: center, center, center, center, center 30%;
  opacity: 0.9;
}

.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.55) 0%, rgba(5, 6, 15, 0.75) 55%, var(--void) 100%);
}

/* Starfield made from two repeating radial-gradient dot layers */
.bg-stars {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 90px 140px, #ffffff 100%, transparent),
    radial-gradient(1.2px 1.2px at 160px 60px, #cfe8ff 100%, transparent),
    radial-gradient(1px 1px at 220px 200px, #ffffff 100%, transparent),
    radial-gradient(1.5px 1.5px at 260px 20px, #ffffff 100%, transparent),
    radial-gradient(1px 1px at 40px 190px, #cfe8ff 100%, transparent);
  background-repeat: repeat;
  background-size: 300px 300px;
  opacity: 0.7;
  animation: drift-stars 90s linear infinite;
}

.bg-stars--far {
  background-size: 480px 480px;
  background-position: 60px 60px;
  opacity: 0.35;
  animation-duration: 160s;
  animation-direction: reverse;
}

@keyframes drift-stars {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: -300px 300px; }
}

/* Faint sci-fi data grid */
.bg-grid {
  background-image:
    linear-gradient(rgba(150, 205, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 205, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 85%);
}

/* Scanlines for the terminal feel */
.bg-scanlines {
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  color: var(--cyan);
  flex-shrink: 0;
  animation: spin-slow 24s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.wordmark {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, var(--cyan-soft), var(--text-primary) 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--cyan-soft);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.discord-tile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.discord-tile:hover {
  border-color: #5865f2;
  color: #b7bbfb;
  transform: translateY(-1px);
}

.discord-icon {
  color: #5865f2;
  flex-shrink: 0;
}

.status-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-nominal);
  box-shadow: 0 0 8px 1px var(--status-nominal);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

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

main {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.transmission-line {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--cyan-soft);
  letter-spacing: 0.06em;
  min-height: 1.2em;
}

.transmission-line::after {
  content: "";
}

.transmission-line.is-typing::after {
  content: "\258A";
  animation: cursor-blink 1s steps(1) infinite;
  margin-left: 2px;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.headline {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 30px rgba(95, 216, 255, 0.25);
}

.lede {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--text-muted);
  max-width: 54ch;
}

.launch-window {
  font-size: 0.95rem;
  color: var(--amber);
  padding: 0.55rem 0.9rem;
  border-left: 3px solid var(--amber);
  background: rgba(255, 207, 107, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  width: fit-content;
}

.launch-window strong {
  color: #ffdd94;
}

/* Countdown that pointedly refuses to count down */
.countdown {
  margin-top: 0.25rem;
}

.countdown-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}

.countdown-blocks {
  display: flex;
  gap: 0.5rem;
}

.countdown-block {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  min-width: 3ch;
  text-align: center;
  animation: countdown-flicker 3.2s ease-in-out infinite;
}

.countdown-block:nth-child(2) { animation-delay: 0.4s; }
.countdown-block:nth-child(3) { animation-delay: 0.8s; }
.countdown-block:nth-child(4) { animation-delay: 1.2s; }

.countdown-block small {
  color: var(--text-faint);
  font-size: 0.65rem;
  margin-left: 2px;
}

@keyframes countdown-flicker {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.45; }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--cyan), #7fb8ff);
  color: #051022;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 8px 24px -8px rgba(95, 216, 255, 0.6);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 10px 28px -6px rgba(95, 216, 255, 0.75);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  padding: 0.7rem 1.4rem;
}

.btn-ghost:hover {
  color: var(--cyan-soft);
  border-color: var(--cyan);
}

.status-result {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--cyan-soft);
  min-height: 2.4em;
  max-width: 52ch;
}

/* ---------------------------------------------------------------- */
/* Glass status panel                                                 */
/* ---------------------------------------------------------------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.hero-panel {
  padding: 1.5rem clamp(1.1rem, 2vw, 1.6rem);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.panel-heading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 1px var(--cyan);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.checklist-item:hover,
.checklist-item:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-warn {
  background: var(--status-warn);
  box-shadow: 0 0 8px 1px rgba(255, 180, 84, 0.6);
}

.status-pending {
  background: var(--status-pending);
  box-shadow: 0 0 8px 1px rgba(127, 212, 255, 0.6);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.status-nominal {
  background: var(--status-nominal);
  box-shadow: 0 0 8px 1px rgba(125, 255, 192, 0.6);
}

.checklist-label {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.checklist-value {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

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

.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1.25rem 1rem 1.75rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  max-width: 700px;
  margin: 0 auto;
}

.psu-logo {
  display: block;
  width: 35px;
  height: auto;
  margin: 0 auto 0.6rem;
  opacity: 0.85;
}

.site-footer p + p {
  margin-top: 0.35rem;
}

/* ---------------------------------------------------------------- */
/* Modal (Emergency Rappy Protocol)                                   */
/* ---------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 12, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.modal h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--amber);
}

.modal p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------- */
/* Rappy burst (Emergency Rappy Protocol gag)                        */
/* ---------------------------------------------------------------- */

.rappy-burst-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
}

.rappy {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.rappy-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

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

@media (max-width: 900px) {
  main {
    min-height: 0;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: 2;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1rem;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .countdown-blocks {
    flex-wrap: wrap;
  }

  .checklist-item {
    grid-template-columns: auto 1fr;
  }

  .checklist-value {
    grid-column: 2 / 3;
    text-align: left;
    white-space: normal;
  }
}

/* ---------------------------------------------------------------- */
/* Reduced motion                                                     */
/* ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .bg-stars,
  .bg-stars--far,
  .brand-icon,
  .status-chip-dot,
  .status-pending,
  .countdown-block {
    animation: none !important;
  }
}
