/* moonlit — landing styles
   Sits on top of colors_and_type.css from OpenAfterHours */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--oah-slate-900);
  color: var(--oah-slate-100);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

/* ============== ARTBOARD WRAPPER ============== */
.ml-board {
  width: 100%;
  height: 100%;
  background: var(--oah-slate-900);
  color: var(--oah-slate-100);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============== TOP NAV ============== */
.ml-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  border-bottom: 1px solid rgba(216,222,233,0.08);
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}
.ml-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ml-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--oah-slate-700);
  border: 1px solid rgba(255,145,0,0.25);
  position: relative;
  overflow: hidden;
}
.ml-brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.ml-brand-org {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--oah-slate-300);
  letter-spacing: 0.04em;
}
.ml-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-sans);
  font-size: 13.5px;
}
.ml-nav-links a {
  color: var(--oah-slate-200);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-std);
}
.ml-nav-links a:hover { color: var(--oah-orange); }
.ml-nav-links .ml-nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--oah-orange);
  border: 1px solid rgba(255,145,0,0.35);
  padding: 6px 12px;
  border-radius: var(--radius-md);
}
.ml-nav-links .ml-nav-cta:hover {
  background: rgba(255,145,0,0.10);
  text-decoration: none;
}

/* ============== HERO BASE ============== */
.ml-hero {
  flex: 1;
  position: relative;
  padding: 80px 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.ml-hero-fg { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; width: 100%; }

.ml-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oah-orange);
  font-weight: 600;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.ml-eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--oah-orange);
  opacity: 0.7;
}

h1.ml-h1 {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: #fff;
  margin: 0 0 22px;
  text-wrap: balance;
}
h1.ml-h1 .ml-accent {
  color: var(--oah-orange);
}
h1.ml-h1 .ml-stroke {
  -webkit-text-stroke: 1px var(--oah-orange);
  color: transparent;
}
.ml-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--oah-slate-200);
  margin: 0 0 32px;
  max-width: 56ch;
  text-wrap: pretty;
}
.ml-lede code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(255,145,0,0.10);
  color: var(--oah-orange-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============== CTA ROW ============== */
.ml-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.ml-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background-color 200ms var(--ease-std),
              box-shadow 200ms var(--ease-std),
              border-color 200ms var(--ease-std),
              color 200ms var(--ease-std);
}
/* :link / :visited explicit so global `a:visited` from colors_and_type.css
   (specificity 0,1,1) does not win over the button color. */
.ml-btn-primary,
.ml-btn-primary:link,
.ml-btn-primary:visited {
  background: var(--oah-orange);
  color: #fff;
}
.ml-btn-primary:hover {
  background: var(--oah-orange-bright);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,145,0,0.35);
}
.ml-btn-ghost,
.ml-btn-ghost:link,
.ml-btn-ghost:visited {
  background: transparent;
  color: var(--oah-slate-100);
  border: 1px solid rgba(216,222,233,0.20);
}
.ml-btn-ghost:hover {
  border-color: var(--oah-orange);
  color: var(--oah-orange);
}
.ml-btn .arr { font-family: var(--font-mono); font-size: 14px; }

/* Inline copy-install command */
.ml-install {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(216,222,233,0.14);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--oah-slate-100);
}
.ml-install .ml-prompt { color: var(--oah-terminal-green); }
.ml-install .ml-cmd { color: #fff; }
.ml-install .ml-copy {
  font-size: 11px;
  color: var(--oah-slate-300);
  border-left: 1px solid rgba(216,222,233,0.14);
  padding-left: 10px;
  margin-left: 4px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-std);
  letter-spacing: 0.08em;
}
.ml-install .ml-copy:hover { color: var(--oah-orange); }

/* ============== STATUS PILL ============== */
.ml-status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: rgba(224,168,0,0.12);
  border: 1px solid rgba(224,168,0,0.30);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #f3c34a;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.ml-status .ml-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f3c34a;
  box-shadow: 0 0 8px rgba(243,195,74,0.6);
}

/* ============== BG MOTIFS ============== */
/* Generic glyph scatter (variation A & C) */
.ml-glyph-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.ml-glyph-bg span {
  position: absolute;
  font-family: var(--font-mono);
  white-space: nowrap;
  line-height: 1;
  color: #fff;
  opacity: 0.07;
}

/* Stars (variation A) */
.ml-stars {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.ml-stars i {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.55;
  box-shadow: 0 0 4px rgba(255,255,255,0.5);
}
.ml-stars i.lg { width: 3px; height: 3px; opacity: 0.75; }
.ml-stars i.amber { background: var(--oah-owl-eye); box-shadow: 0 0 5px rgba(255,200,87,0.7); }

@keyframes ml-twinkle {
  0%, 100% { opacity: var(--ml-tw-min, 0.30); }
  50%      { opacity: var(--ml-tw-max, 0.80); }
}
.ml-stars i {
  --ml-tw-min: 0.30;
  --ml-tw-max: 0.80;
  animation: ml-twinkle var(--ml-tw-duration, 3s) ease-in-out
             var(--ml-tw-delay, 0s) infinite;
  will-change: opacity;
}
.ml-stars i.lg    { --ml-tw-min: 0.45; --ml-tw-max: 1.00; }
.ml-stars i.amber { --ml-tw-min: 0.40; --ml-tw-max: 1.00; }
@media (prefers-reduced-motion: reduce) {
  .ml-stars i { animation: none; }
}

/* Crescent moon (variation A) */
.ml-moon-wrap {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

/* ============== TERMINAL ============== */
.ml-term {
  position: relative;
  background: #0a0b0e;
  border: 1px solid rgba(216,222,233,0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45),
              0 0 0 1px rgba(255,145,0,0.05);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}
.ml-term-glow::after {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at 30% 40%, rgba(255,145,0,0.18), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.ml-term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #15171c;
  border-bottom: 1px solid rgba(216,222,233,0.08);
}
.ml-term-dots { display: flex; gap: 6px; }
.ml-term-dots i { width: 10px; height: 10px; border-radius: 50%; }
.ml-term-dots i:nth-child(1) { background: #ff5f57; }
.ml-term-dots i:nth-child(2) { background: #ffbd2e; }
.ml-term-dots i:nth-child(3) { background: #28ca42; }
.ml-term-title {
  font-size: 11px;
  color: var(--oah-slate-300);
  letter-spacing: 0.06em;
}
.ml-term-tag {
  font-size: 10px;
  color: var(--oah-slate-400);
  font-family: var(--font-mono);
}
.ml-term-body {
  padding: 18px 20px;
  color: var(--oah-slate-100);
  min-height: 240px;
}
.ml-term-line { display: flex; gap: 10px; align-items: flex-start; }
.ml-term-line + .ml-term-line { margin-top: 4px; }
.ml-term-line .ml-prompt { color: var(--oah-terminal-green); flex-shrink: 0; }
.ml-term-line .ml-cmd { color: #fff; }
.ml-term-line .ml-out { color: var(--oah-slate-300); }
.ml-term-line .ml-out-em { color: var(--oah-slate-100); }
.ml-term-line .ml-ok { color: var(--oah-success); }
.ml-term-line .ml-warn { color: var(--oah-warn); }
.ml-term-line .ml-info { color: var(--oah-orange-soft); }
.ml-term-line .ml-dim { color: var(--oah-slate-400); }
.ml-term-line .ml-flag { color: var(--oah-orange); }
.ml-term-line .ml-num { color: var(--oah-owl-eye); }

.ml-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  vertical-align: -2px;
  background: var(--oah-orange);
  margin-left: 2px;
  animation: ml-blink 1.05s steps(2,end) infinite;
}
@keyframes ml-blink { 50% { opacity: 0; } }

/* progress bar inside terminal */
.ml-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ml-progress .bar {
  width: 180px; height: 6px;
  background: rgba(216,222,233,0.10);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.ml-progress .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--oah-orange), var(--oah-orange-bright));
  border-radius: 999px;
}

/* ============== FEATURE SHELF ============== */
.ml-shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
  position: relative;
  z-index: 2;
}
.ml-feat {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(216,222,233,0.10);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color 200ms var(--ease-out),
              transform 200ms var(--ease-out),
              background 200ms var(--ease-out);
}
.ml-feat:hover {
  border-color: rgba(255,145,0,0.45);
  transform: translateY(-2px);
  background: rgba(255,145,0,0.04);
}
.ml-feat-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--oah-orange);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.ml-feat-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}
.ml-feat-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--oah-slate-300);
  margin: 0;
}

/* ============== HERO LAYOUT VARIANTS ============== */
/* Variation A — moon hero */
.ml-hero-a .ml-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.ml-hero-a .ml-moon-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 460px;
  margin-left: auto;
}

/* Variation B — terminal-first hero */
.ml-hero-b .ml-hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.1fr;
  gap: 48px;
  align-items: center;
}

/* Variation C — phase pipeline below text */
.ml-hero-c {
  padding-top: 64px;
  padding-bottom: 0;
}
.ml-hero-c .ml-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  text-align: left;
  max-width: 940px;
  margin: 0 auto 32px;
}
.ml-hero-c h1.ml-h1 { font-size: 72px; }

/* ============== PHASE PIPELINE (variation C) ============== */
.ml-phases {
  position: relative;
  margin: 36px auto 0;
  max-width: 1180px;
  padding: 56px 36px 72px;
  border-top: 1px solid rgba(216,222,233,0.08);
}
.ml-phases-rail {
  position: absolute;
  left: 64px;
  right: 64px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(216,222,233,0.05),
    rgba(255,145,0,0.45) 50%,
    rgba(255,145,0,0.85) 100%);
}
.ml-phases-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
  z-index: 2;
}
.ml-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.ml-phase-moon {
  width: 56px; height: 56px;
  flex-shrink: 0;
  background: var(--oah-slate-900);
  border: 1px solid rgba(216,222,233,0.18);
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px var(--oah-slate-900);
}
.ml-phase-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--oah-slate-400);
  letter-spacing: 0.1em;
}
.ml-phase-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.ml-phase-cmd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--oah-slate-300);
}
.ml-phase.is-current .ml-phase-moon {
  border-color: var(--oah-orange);
  box-shadow: 0 0 0 6px var(--oah-slate-900),
              0 0 24px rgba(255,145,0,0.35);
}
.ml-phase.is-current .ml-phase-title { color: var(--oah-orange); }

/* ============== CALLOUT (warning) ============== */
.ml-warn-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(224,168,0,0.08);
  border: 1px solid rgba(224,168,0,0.30);
  border-left: 3px solid var(--oah-warn);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #e8c869;
  margin-top: 28px;
}
.ml-warn-strip strong { color: var(--oah-warn); font-weight: 700; letter-spacing: 0.04em; }

/* ============== FOOTER ============== */
.ml-foot {
  border-top: 1px solid rgba(216,222,233,0.08);
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--oah-slate-400);
  flex-shrink: 0;
}
.ml-foot a { color: var(--oah-slate-300); text-decoration: none; margin-left: 18px; }
.ml-foot a:hover { color: var(--oah-orange); }
.ml-foot .ml-foot-org {
  display: inline-flex; align-items: center; gap: 8px;
}
.ml-foot .ml-foot-pip {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--oah-orange);
  box-shadow: 0 0 6px var(--oah-orange);
}

/* ============== UTILITIES ============== */
.ml-mono { font-family: var(--font-mono); }
.ml-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ml-stack { display: flex; flex-direction: column; gap: 16px; }
.ml-spacer-sm { height: 8px; }
.ml-spacer-md { height: 16px; }
.ml-spacer-lg { height: 32px; }

/* ============== RESPONSIVE ==============
   The desktop layout is the canonical design. These rules scale it down
   without changing the visual identity: hero columns collapse to a single
   column, the crescent moon shrinks below the text, the feature shelf
   reflows, and the top nav hides its text links in favor of the GitHub
   pill on phones. */

/* Tighten oversized desktop padding on laptops below ~1024px. */
@media (max-width: 1024px) {
  .ml-nav  { padding: 18px 32px; }
  .ml-foot { padding: 18px 32px; }
  .ml-hero { padding: 64px 40px 40px; }
  h1.ml-h1 { font-size: 56px; }
}

/* Tablet — collapse the two-column hero. */
@media (max-width: 860px) {
  .ml-nav { padding: 16px 24px; }
  .ml-nav-links { gap: 18px; font-size: 13px; }
  .ml-brand-org { display: none; }

  .ml-hero { padding: 48px 24px 36px; min-height: auto; }
  .ml-hero-fg { max-width: 720px; }

  h1.ml-h1 { font-size: 44px; }
  .ml-lede { font-size: 16.5px; max-width: none; }

  .ml-hero-a .ml-hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
  }
  /* Hide the big crescent below the desktop layout — it's a brand "wow"
     element, but on a single-column hero it forces the user to scroll past
     ~320px of decoration to reach the feature shelf. The brand mark in the
     top-left nav still carries the moon metaphor. */
  .ml-hero-a .ml-moon-stage { display: none; }

  .ml-shelf {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 28px;
  }

  .ml-foot { padding: 16px 24px; }
}

/* Narrow tablet / phablet — single-column shelf, smaller display type. */
@media (max-width: 600px) {
  .ml-shelf { grid-template-columns: 1fr; }
  h1.ml-h1 { font-size: 38px; }
}

/* Phone — compact nav, stacked CTAs, smallest hero footprint. */
@media (max-width: 480px) {
  .ml-nav { padding: 14px 18px; }
  .ml-nav-links { gap: 0; }
  /* Drop text links, keep only the GitHub pill so the nav doesn't wrap. */
  .ml-nav-links a:not(.ml-nav-cta) { display: none; }

  .ml-hero { padding: 36px 18px 28px; }
  .ml-hero-fg { max-width: 100%; }

  .ml-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 14px;
  }
  .ml-status {
    font-size: 10px;
    margin-bottom: 14px;
  }

  h1.ml-h1 {
    font-size: 34px;
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
  }
  .ml-lede {
    font-size: 16px;
    margin-bottom: 24px;
  }

  /* Stack CTAs full-width so the install line and buttons don't fight for
     space on a single row. */
  .ml-cta-row {
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 28px;
  }
  .ml-cta-row > * { width: 100%; }
  .ml-install { justify-content: flex-start; }
  .ml-btn { justify-content: center; }

  .ml-hero-a .ml-moon-stage { max-width: 260px; }

  /* Decorative glyphs cluster too densely at this width — fade them so they
     stay atmosphere, not noise. */
  .ml-glyph-bg { opacity: 0.55; }

  /* Stack footer (org + links columns) so neither column collides. */
  .ml-foot {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ml-foot a {
    margin-left: 0;
    margin-right: 16px;
  }
}
