/* =========================================================
   AETHERSTRATA OS — Pre-launch site
   Four4 Interactive, LLC

   Design system:
   - Gold/black = Four4 Interactive "presenting" frame
   - Phosphor green / near-black mono = AS-COS, the OS itself
   ========================================================= */

:root {
  /* Colors */
  --black: #000000;
  --near-black: #0a0a0a;
  --panel: #111111;
  --gold: #e0bf70;
  --gold-soft: #c8af74;
  --gold-deep: #987829;
  --phosphor: #00ff41;
  --phosphor-dim: #0a3318;
  --ink: #e8e6e0;
  --muted: #9a958a;
  --line: rgba(224, 191, 112, 0.12);
  --line-soft: rgba(224, 191, 112, 0.06);

  /* Era colors for the five-stage strip */
  --era-ascos: #00ff41;
  --era-1: #2e4a8f;
  --era-3: #ffb000;
  --era-xc: #00bfff;
  --era-prime-a: #e0bf70;
  --era-prime-b: #00bfff;
  --era-prime-c: #9d4edd;

  /* Type */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Share Tech Mono", "Courier New", monospace;

  /* Layout */
  --max-width: 1100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--phosphor);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   TOP BAR — "Four4 Interactive presents"
   ========================================================= */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.topbar-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.topbar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.topbar-spacer {
  flex: 1;
}

.topbar-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 2px;
  color: var(--gold);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar-link:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

/* =========================================================
   HERO — CRT terminal boot sequence
   ========================================================= */

.hero {
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crt-frame {
  width: 100%;
  max-width: 860px;
  background: linear-gradient(160deg, #2b2b2b 0%, #161616 55%, #050505 100%);
  border-radius: 18px;
  padding: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 80px -30px rgba(0, 255, 65, 0.15),
    0 10px 40px rgba(0, 0, 0, 0.6);
}

.crt-screen {
  position: relative;
  background: radial-gradient(ellipse at center, #0d1c10 0%, var(--near-black) 70%);
  border-radius: 8px;
  overflow: hidden;
  min-height: 420px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.crt-screen::after {
  /* scanlines */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  mix-blend-mode: multiply;
}

.crt-screen::before {
  /* vignette */
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.boot-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--phosphor);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.55);
  white-space: pre-wrap;
  min-height: 1em;
  position: relative;
  z-index: 1;
}

.boot-text .dim {
  color: rgba(0, 255, 65, 0.45);
}

.boot-text .note {
  color: rgba(0, 255, 65, 0.75);
}

.wordmark-reveal {
  position: relative;
  z-index: 1;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  margin-top: 28px;
}

.wordmark-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.wordmark-reveal h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(224, 191, 112, 0.25);
}

.wordmark-reveal h1 .os {
  color: var(--phosphor);
  text-shadow: 0 0 18px rgba(0, 255, 65, 0.55);
}

.wordmark-reveal .tagline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--phosphor);
  margin-top: 14px;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.scroll-cue {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fade-in 1.5s ease forwards;
  animation-delay: 3.5s;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

/* =========================================================
   SECTION SHELL
   ========================================================= */

section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line-soft);
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--phosphor);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.35);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.section-lede {
  max-width: 640px;
  color: var(--ink);
  font-size: 1.05rem;
}

.section-lede + .section-lede {
  margin-top: 16px;
}

/* =========================================================
   CONCEPT SECTION
   ========================================================= */

.concept-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 40px;
}

@media (min-width: 760px) {
  .concept-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.concept-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(224, 191, 112, 0.03), transparent);
}

.concept-card .proc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.concept-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.concept-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================================
   FIVE OS STAGES
   ========================================================= */

.stages-track {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .stages-track {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
}

.stage-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.stage-swatch {
  height: 5px;
  width: 100%;
  border-radius: 2px;
}

.stage-swatch.ascos {
  background: var(--era-ascos);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

.stage-swatch.os1 {
  background: var(--era-1);
}

.stage-swatch.os3 {
  background: var(--era-3);
}

.stage-swatch.osxc {
  background: var(--era-xc);
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.stage-swatch.prime {
  background: linear-gradient(90deg, var(--era-prime-a), var(--era-prime-b), var(--era-prime-c));
}

.stage-card .stage-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.stage-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.stage-card .stage-era {
  font-size: 0.85rem;
  color: var(--muted);
}

.stage-card .stage-status {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 0 0;
  border-top: 1px solid var(--line-soft);
}

.stage-status.active {
  color: var(--phosphor);
}

.stage-status.locked {
  color: var(--gold-deep);
}

/* =========================================================
   DEV LOG
   ========================================================= */

.devlog-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.devlog-entry {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 18px 20px;
  font-family: var(--font-mono);
  background: rgba(224, 191, 112, 0.02);
}

.devlog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.devlog-date {
  color: var(--gold-soft);
}

.devlog-tag {
  color: var(--phosphor);
}

.devlog-entry p {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--ink);
  letter-spacing: normal;
  text-transform: none;
}

.devlog-empty {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 20px;
  margin-top: 12px;
}

/* =========================================================
   JOIN THE OPERATION
   ========================================================= */

.join-panel {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(160deg, rgba(224, 191, 112, 0.04), transparent 60%);
}

@media (min-width: 760px) {
  .join-panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.join-copy .platform-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  max-width: none;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 12px;
}

.join-copy h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.join-copy p {
  color: var(--muted);
  max-width: 440px;
}

.join-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 14px 22px;
  border-radius: 4px;
  border: 1px solid var(--gold);
  color: var(--black);
  background: var(--gold);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: var(--black);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.4);
}

.social-row {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.social-row a {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--ink);
}

.social-row a:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding: 48px 0 60px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 760px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  height: 32px;
  width: 32px;
  border-radius: 4px;
}

.footer-brand .name {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

.footer-brand .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: rgba(0, 255, 65, 0.55);
  max-width: 420px;
}

.footer-note .label {
  color: var(--phosphor);
  letter-spacing: 0.15em;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 24px;
  text-transform: uppercase;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wordmark-reveal,
  .scroll-cue {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
}
