/*!
 * Supraide — launch.css
 * Standalone styles for the page-launch.php template (Switch ON/OFF page).
 * All selectors are scoped under .launch-* to avoid touching the rest of the site.
 *
 * The mechanic: one container (.launch-wrap) toggles between data-state="off"
 * and data-state="on". Every visual transformation (color, switch position,
 * reveal stack) is driven by that single attribute.
 */

:root {
  --launch-paper:  #f4ede0;
  --launch-paper-soft: #f8f6ec;
  --launch-ink:    #18181B;
  --launch-ink-2:  #0A0A0A;
  --launch-lime:   #CDFA50;
  --launch-stone:  #5a5340;
  --launch-ash:    #aaa;
  --launch-white:  #FAFAF7;
  --launch-mist:   rgba(0,0,0,0.08);
  --launch-grid-off: rgba(0,0,0,0.05);
  --launch-grid-on:  rgba(205,250,80,0.06);
}

/* ============================================================================
   Page body — own background, override the site's default chrome.
   ============================================================================ */
body.launch-body {
  margin: 0;
  background: var(--launch-paper);
  /* Cancel the global grid pattern from site.css */
  background-image: none !important;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--launch-ink);
  overflow-x: hidden;
}
body.launch-body .nav,
body.launch-body .footer,
body.launch-body .intro-gate { display: none !important; }

.launch-body .mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

/* ============================================================================
   Wrapper — full viewport, holds the on/off state.
   ============================================================================ */
.launch-wrap {
  min-height: 100vh;
  position: relative;
  background-color: var(--launch-paper);
  background-image:
    linear-gradient(var(--launch-grid-off) 1px, transparent 1px),
    linear-gradient(90deg, var(--launch-grid-off) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: background-color 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.launch-wrap[data-state="on"] {
  background-color: var(--launch-ink-2);
  background-image:
    linear-gradient(var(--launch-grid-on) 1px, transparent 1px),
    linear-gradient(90deg, var(--launch-grid-on) 1px, transparent 1px);
}

/* ============================================================================
   Top chrome — window dots + URL bar + status
   ============================================================================ */
.launch-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 32px 0;
  gap: 20px;
}
.launch-dots {
  display: flex; gap: 8px;
}
.launch-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  transition: background 600ms ease;
}
.launch-wrap[data-state="on"] .launch-dots span {
  background: rgba(255,255,255,0.18);
}

.launch-url {
  justify-self: end;
  background: #FFF;
  color: var(--launch-ink);
  padding: 5px 16px;
  border-radius: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: background 600ms ease, color 600ms ease;
  border: 1px solid rgba(0,0,0,0.06);
}
.launch-wrap[data-state="on"] .launch-url {
  background: rgba(0,0,0,0.55);
  color: var(--launch-lime);
  border-color: rgba(205,250,80,0.18);
}

.launch-status {
  grid-column: 1 / -1;
  justify-self: end;
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--launch-stone);
  margin-top: 8px;
  transition: color 600ms ease;
}
.launch-wrap[data-state="on"] .launch-status { color: var(--launch-lime); }
.launch-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--launch-ash);
  transition: background 600ms ease, box-shadow 600ms ease;
}
.launch-wrap[data-state="on"] .launch-status-dot {
  background: var(--launch-lime);
  box-shadow: 0 0 10px var(--launch-lime);
  animation: launchPulse 2s ease-in-out infinite;
}
@keyframes launchPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ============================================================================
   Stage — wordmark + big switch + mono readout
   ============================================================================ */
.launch-stage {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px 120px;
  min-height: calc(100vh - 80px);
}

/* Logo wrapper — uses the real /assets/img/logo.png brand asset
   (switch icon + "supraide." wordmark, lime + black on transparent).

   OFF: grayscale + brightness drop → entire logo reads as a dim
        gray monogram on the cream paper background.
   ON:  invert + 180° hue-rotate → classic "dark-mode image" trick.
        - Black text (rgb 0,0,0) → inverts to white, hue-rotate
          has no effect on neutrals. Result: white text.
        - Lime switch (rgb ~205,250,80, hue ~74°) → inverts to
          a purple (~256°), then hue-rotate(180°) returns it to
          ~76° = back to lime.
        Net effect: same logo, rendered as if it were a "dark
        mode" version. Adds a subtle lime drop-shadow for glow. */
.launch-logo-wrap {
  margin: 0 0 56px;
  display: flex; justify-content: center; align-items: center;
  line-height: 0;
}
.launch-logo {
  width: clamp(340px, 56vw, 680px);
  height: auto;
  display: block;
  filter: grayscale(1) brightness(0.78) contrast(1.05);
  opacity: 0.92;
  transition: filter 700ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 600ms ease,
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.launch-wrap[data-state="on"] .launch-logo {
  filter:
    invert(1) hue-rotate(180deg)
    drop-shadow(0 0 32px rgba(205,250,80,0.4));
  opacity: 1;
  transform: scale(1.02);
}

/* Big switch */
.launch-switch {
  width: 280px; height: 110px;
  background: var(--launch-ink);
  border-radius: 60px;
  position: relative;
  cursor: pointer;
  margin: 0 auto 48px;
  border: 0;
  padding: 0;
  transition: background 600ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 600ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 0 4px 12px rgba(0,0,0,0.55),
    inset 0 -1px 2px rgba(255,255,255,0.05),
    0 8px 24px rgba(0,0,0,0.12);
  outline: none;
}
.launch-switch:focus-visible {
  outline: 2px solid var(--launch-lime);
  outline-offset: 6px;
}
.launch-switch-knob {
  position: absolute;
  top: 14px; left: 18px;
  width: 82px; height: 82px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #c8c8c8 0%, #9a9a9a 100%);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.35),
    inset 0 2px 0 rgba(255,255,255,0.22),
    inset 0 -2px 4px rgba(0,0,0,0.18);
  transition: left 700ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background 600ms ease;
}
.launch-wrap[data-state="on"] .launch-switch {
  background: var(--launch-lime);
  box-shadow:
    0 0 40px rgba(205,250,80,0.5),
    0 0 80px rgba(205,250,80,0.25),
    inset 0 2px 8px rgba(0,0,0,0.08);
}
.launch-wrap[data-state="on"] .launch-switch-knob {
  left: 180px;
  background: linear-gradient(to bottom, #2A2A2D 0%, #0E0E10 100%);
  box-shadow:
    0 4px 14px rgba(0,0,0,0.5),
    inset 0 2px 0 rgba(255,255,255,0.06);
}

/* Readout */
.launch-readout {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 2;
  color: var(--launch-stone);
  transition: color 600ms ease;
}
.launch-wrap[data-state="on"] .launch-readout { color: var(--launch-lime); }
.launch-readout p { margin: 0; }
.launch-cursor {
  display: inline-block; margin-left: 1px;
  animation: launchBlink 1s steps(2) infinite;
}
@keyframes launchBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ============================================================================
   Reveal stack — materialization effect instead of a simple unfold.
   Each section comes in with: opacity + translateY + scale + blur-clear,
   so it reads as "appearing from inside" rather than "sliding open".
   Inner elements (stats, cards, list items) get their own micro-stagger.
   ============================================================================ */
.launch-stack {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 900ms ease 300ms;
}
.launch-wrap[data-state="on"] .launch-stack {
  max-height: 10000px;
  opacity: 1;
}

.launch-section {
  padding: 72px 32px;
  border-top: 1px solid rgba(205,250,80,0.15);
  color: var(--launch-white);
  max-width: 1120px;
  margin: 0 auto;
  /* Materialization: starts blurred, scaled down, shifted, invisible.
     Ends sharp, full scale, in place. */
  opacity: 0;
  transform: translateY(48px) scale(0.96);
  filter: blur(14px);
  transition:
    opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms ease;
}
.launch-wrap[data-state="on"] .launch-section {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.launch-wrap[data-state="on"] .launch-section:nth-child(1) { transition-delay: 500ms; }
.launch-wrap[data-state="on"] .launch-section:nth-child(2) { transition-delay: 750ms; }
.launch-wrap[data-state="on"] .launch-section:nth-child(3) { transition-delay: 1000ms; }
.launch-wrap[data-state="on"] .launch-section:nth-child(4) { transition-delay: 1250ms; }
.launch-wrap[data-state="on"] .launch-section:nth-child(5) { transition-delay: 1500ms; }
.launch-wrap[data-state="on"] .launch-section:nth-child(6) { transition-delay: 1750ms; }

/* Inner stagger — once a section materializes, its children pop in. */
.launch-section .launch-section-eyebrow,
.launch-section .launch-section-title,
.launch-section .launch-section-lede,
.launch-section .launch-stats,
.launch-section .launch-grid-3,
.launch-section .launch-steps,
.launch-section .launch-cta-row,
.launch-section .launch-cta-meta {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.launch-wrap[data-state="on"] .launch-section .launch-section-eyebrow { transition-delay: 80ms; opacity: 1; transform: none; }
.launch-wrap[data-state="on"] .launch-section .launch-section-title   { transition-delay: 180ms; opacity: 1; transform: none; }
.launch-wrap[data-state="on"] .launch-section .launch-section-lede    { transition-delay: 280ms; opacity: 1; transform: none; }
.launch-wrap[data-state="on"] .launch-section .launch-stats,
.launch-wrap[data-state="on"] .launch-section .launch-grid-3,
.launch-wrap[data-state="on"] .launch-section .launch-steps           { transition-delay: 360ms; opacity: 1; transform: none; }
.launch-wrap[data-state="on"] .launch-section .launch-cta-row         { transition-delay: 420ms; opacity: 1; transform: none; }
.launch-wrap[data-state="on"] .launch-section .launch-cta-meta        { transition-delay: 540ms; opacity: 1; transform: none; }

/* Individual stat tiles, cards, and steps pop in one by one */
.launch-stat,
.launch-card,
.launch-steps li {
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.launch-wrap[data-state="on"] .launch-stat,
.launch-wrap[data-state="on"] .launch-card,
.launch-wrap[data-state="on"] .launch-steps li {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Stagger each tile within its parent section. Inherits the section delay
   plus its own nth-child offset. */
.launch-wrap[data-state="on"] .launch-stat:nth-child(1),
.launch-wrap[data-state="on"] .launch-card:nth-child(1),
.launch-wrap[data-state="on"] .launch-steps li:nth-child(1) { transition-delay: 440ms; }
.launch-wrap[data-state="on"] .launch-stat:nth-child(2),
.launch-wrap[data-state="on"] .launch-card:nth-child(2),
.launch-wrap[data-state="on"] .launch-steps li:nth-child(2) { transition-delay: 540ms; }
.launch-wrap[data-state="on"] .launch-stat:nth-child(3),
.launch-wrap[data-state="on"] .launch-card:nth-child(3),
.launch-wrap[data-state="on"] .launch-steps li:nth-child(3) { transition-delay: 640ms; }
.launch-wrap[data-state="on"] .launch-stat:nth-child(4),
.launch-wrap[data-state="on"] .launch-steps li:nth-child(4) { transition-delay: 740ms; }

.launch-section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--launch-lime);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.launch-section-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 18px;
  color: #FFF;
  max-width: 880px;
}
.launch-section-title-sm { font-size: clamp(28px, 3.6vw, 40px); }
.launch-section-title .hl {
  background: var(--launch-lime);
  color: var(--launch-ink);
  padding: 0 8px;
}
.launch-section-lede {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.7);
  max-width: 720px;
  margin: 0;
}

/* Stats grid */
.launch-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 12px;
}
.launch-stat { border-top: 2px solid var(--launch-lime); padding-top: 14px; }
.launch-stat-num {
  font-weight: 900; font-size: clamp(40px, 5.5vw, 64px);
  letter-spacing: -0.03em; line-height: 1;
  color: #FFF;
}
.launch-stat-lbl {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(205,250,80,0.75);
  margin-top: 8px;
}

/* 3-card grid */
.launch-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.launch-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(205,250,80,0.16);
  border-radius: 10px;
  padding: 24px;
  transition: background 200ms ease, border-color 200ms ease;
}
.launch-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(205,250,80,0.32);
}
.launch-card-num {
  font-size: 11px;
  color: rgba(205,250,80,0.7);
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}
.launch-card-title {
  font-size: 19px; font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFF;
  margin: 0 0 10px;
}
.launch-card-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

/* Steps list */
.launch-steps {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.launch-steps li {
  border-top: 2px solid var(--launch-lime);
  padding-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.launch-step-num {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(205,250,80,0.7);
}
.launch-step-name {
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.08em;
  color: #FFF;
}
.launch-step-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
}

/* CTA section */
.launch-section-cta { text-align: center; padding-bottom: 96px; }
.launch-section-cta .launch-section-title { margin-left: auto; margin-right: auto; }
.launch-section-cta .launch-section-lede { margin-left: auto; margin-right: auto; margin-bottom: 32px; }
.launch-cta-row {
  display: inline-flex; align-items: center; gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap; justify-content: center;
}
.launch-cta-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--launch-ink-2);
  color: #FFF;
  padding: 16px 26px;
  border-radius: 999px;
  border: 1px solid rgba(205,250,80,0.35);
  font-weight: 600; font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease,
              box-shadow 260ms ease,
              border-color 260ms ease,
              background 260ms ease;
}
.launch-cta-btn::after {
  /* Subtle lime knob accent on the right — echoes the brand switch metaphor. */
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--launch-lime);
  box-shadow: 0 0 10px rgba(205,250,80,0.7);
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.launch-cta-btn:hover {
  transform: translateY(-2px);
  background: #161618;
  border-color: rgba(205,250,80,0.8);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5),
              0 0 24px rgba(205,250,80,0.18);
}
.launch-cta-btn:hover::after { transform: translateX(4px) scale(1.15); }
.launch-cta-link {
  color: rgba(205,250,80,0.85);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color 180ms ease;
}
.launch-cta-link:hover { color: var(--launch-lime); text-decoration: underline; }
.launch-cta-meta {
  font-size: 11px;
  color: rgba(205,250,80,0.55);
  letter-spacing: 0.06em;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 968px) {
  .launch-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .launch-grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .launch-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .launch-chrome { padding: 16px 20px 0; }
  .launch-url { font-size: 11px; padding: 4px 12px; }
  .launch-status { font-size: 10px; letter-spacing: 0.14em; }
  .launch-stage { padding: 56px 20px 80px; min-height: calc(100vh - 60px); }
  .launch-wordmark { margin-bottom: 40px; }
  .launch-switch { width: 220px; height: 88px; border-radius: 44px; }
  .launch-switch-knob { width: 64px; height: 64px; top: 12px; left: 12px; }
  .launch-wrap[data-state="on"] .launch-switch-knob { left: 144px; }
  .launch-readout { font-size: 12.5px; line-height: 1.9; }
  .launch-section { padding: 48px 20px; }
  .launch-steps { grid-template-columns: 1fr; }
  .launch-stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================================================
   Reduced motion — everything snaps instantly to its final state
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  .launch-wrap,
  .launch-wrap *,
  .launch-section,
  .launch-stack,
  .launch-switch,
  .launch-switch-knob,
  .launch-wordmark,
  .launch-wordmark-dot,
  .launch-status-dot,
  .launch-cursor {
    transition: none !important;
    animation: none !important;
  }
}
