/* Prostage System Control — download site
 * Colors derived from the app UI (see iad/showcase/). */
:root {
  --purple-900: #2a1830;
  --purple-800: #3b2240;   /* app sidebar / title bar */
  --purple-700: #4c2c53;
  --purple-500: #7a1f8a;   /* app checkbox / slider accent */
  --purple-300: #c79bd2;
  --teal-700: #194c4e;     /* app selected input */
  --teal-600: #214859;     /* app active nav item */
  --teal-400: #3fa3a8;
  --teal-300: #7fd0d3;

  --bg: #1a1a1a;
  --bg-alt: #1f1f1f;       /* app content background */
  --surface: #2b2b2b;      /* app panels */
  --surface-2: #333;
  --border: rgba(255, 255, 255, .08);
  --text: #f2f2f2;
  --text-muted: #a8a3ab;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --container: 1180px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-300); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
.muted { color: var(--text-muted); }
.accent { background: linear-gradient(90deg, var(--purple-300), var(--teal-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-300);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--purple-500); }
.btn-primary:hover { background: #8e2aa0; }
.btn-ghost { border-color: rgba(255, 255, 255, .2); }
.btn-ghost:hover { border-color: var(--teal-300); }
.btn-block { width: 100%; }
.btn-small { padding: 9px 18px; font-size: 14px; background: var(--surface-2); border-color: var(--border); }
.btn-small:hover { background: var(--teal-600); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(59, 34, 64, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-sub {
  padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .25);
  font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: .01em; line-height: 1.2; white-space: nowrap;
}
@media (max-width: 1100px) { .brand-sub { font-size: 17px; } }
@media (max-width: 480px) { .brand-logo { height: 36px; } .brand-sub { display: none; } }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: 8px;
  color: rgba(255, 255, 255, .78); font-size: 15px; font-weight: 500;
}
.site-nav a:hover, .site-nav a.active { color: #fff; background: var(--teal-600); text-decoration: none; }
.site-nav .nav-external { color: var(--text-muted); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px 20px;
    background: var(--purple-800);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 140px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(122, 31, 138, .35), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(33, 72, 89, .45), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 60px); font-weight: 800; margin-bottom: 24px; }
.lead { font-size: 19px; color: var(--text-muted); max-width: 520px; margin: 0 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { margin: 28px 0 0; font-size: 14px; color: var(--text-muted); }
.hero-visual { perspective: 1600px; }
.hero-visual .window-frame { transform: rotateY(-8deg) rotateX(3deg); }

.window-frame {
  display: block; width: 100%; padding: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: var(--bg-alt);
  box-shadow: var(--shadow), 0 0 0 6px rgba(255, 255, 255, .03);
}

@media (max-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual .window-frame { transform: none; }
}

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
.section-lead { margin: 18px 0 0; font-size: 18px; color: var(--text-muted); }
@media (max-width: 640px) { .section { padding: 88px 0; } .section-head { margin-bottom: 44px; } }

/* ---------- Showcase ---------- */
.showcase { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.showcase-tabs {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px; border-radius: var(--radius);
  background: var(--purple-800);
}
.showcase-tab {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border: 0; border-radius: 8px;
  background: transparent; color: rgba(255, 255, 255, .8);
  font: inherit; font-size: 14px; font-weight: 500; text-align: left;
  cursor: pointer; transition: background .15s;
}
.showcase-tab img { display: none; }
.showcase-tab:hover { background: rgba(255, 255, 255, .06); }
.showcase-tab[aria-selected="true"] { background: var(--teal-600); color: #fff; }

.showcase-stage { margin: 0; }
.showcase-open { cursor: zoom-in; }
.showcase-caption { margin-top: 28px; }
.showcase-title { font-size: 22px; margin-bottom: 8px; }
.showcase-text { margin: 0; color: var(--text-muted); max-width: 640px; }

@media (max-width: 960px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase-tabs {
    order: 2; flex-direction: row; overflow-x: auto; gap: 12px;
    padding: 4px; background: none; scroll-snap-type: x mandatory;
  }
  .showcase-tab {
    flex: 0 0 150px; flex-direction: column; align-items: stretch; gap: 8px;
    padding: 8px; background: var(--surface); scroll-snap-align: start; font-size: 13px;
  }
  .showcase-tab img { display: block; border-radius: 6px; }
}

/* ---------- Download ---------- */
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 32px; }
.download-card {
  padding: 48px 40px 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.download-card:hover { border-color: rgba(127, 208, 211, .35); transform: translateY(-2px); }
.platform-icon {
  width: 80px; height: 80px; margin: 0 auto 24px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--purple-700), var(--teal-600));
}
.download-card h3 { font-size: 24px; }
.download-card .muted { margin: 8px 0 28px; font-size: 15px; }
.file-name { margin: 16px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-muted); word-break: break-all; }

.install-steps {
  counter-reset: step;
  list-style: none; padding: 0; margin: 72px auto 0; max-width: 960px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.install-steps li { counter-increment: step; position: relative; padding-top: 52px; color: var(--text-muted); font-size: 15px; }
.install-steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-700); color: var(--teal-300); font-weight: 700; font-size: 15px;
}
.install-steps strong { color: var(--text); }

@media (max-width: 760px) {
  .download-grid { grid-template-columns: 1fr; }
  .install-steps { grid-template-columns: 1fr; }
}

/* ---------- Release notes ---------- */
.notes-card {
  padding: 44px 48px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.notes-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.notes-summary { margin: 0 0 24px; font-size: 18px; }
.notes-list { margin: 0; padding: 0; list-style: none; }
.notes-list li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--border); color: #ddd; }
.notes-list li:first-child { border-top: 0; }
.notes-list li::before {
  content: ""; position: absolute; left: 4px; top: 20px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--purple-500);
}
@media (max-width: 640px) { .notes-card { padding: 32px 24px; } }

.version-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--teal-700); color: var(--teal-300);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--purple-500); color: #fff; font-size: 12px; font-weight: 600;
}

/* ---------- Roadmap ---------- */
.roadmap {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.roadmap-item {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.roadmap-major { background: linear-gradient(160deg, var(--purple-800), var(--surface) 70%); }
.roadmap-version { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.roadmap-version h3 { font-size: 20px; }
.roadmap-item ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 15px; }
.roadmap-item li + li { margin-top: 8px; }

/* ---------- All releases ---------- */
.release-list { display: flex; flex-direction: column; gap: 16px; }
.release {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.release summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 28px; cursor: pointer; list-style: none;
}
.release summary::-webkit-details-marker { display: none; }
.release summary::after { content: "+"; font-size: 22px; color: var(--text-muted); margin-left: 12px; }
.release[open] summary::after { content: "−"; }
.release-title { display: flex; align-items: center; gap: 12px; margin-right: auto; font-size: 18px; }
.release-body { padding: 0 28px 28px; }
.release-body > p { margin: 0 0 16px; color: var(--text-muted); }
.release-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Footer / disclaimer ---------- */
.site-footer { padding: 96px 0 40px; background: var(--purple-900); border-top: 1px solid var(--border); }
.disclaimer { max-width: 860px; }
.disclaimer h2 { font-size: 20px; margin-bottom: 20px; }
.disclaimer p { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-muted);
}

.notice { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--surface); text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(1400px, 94vw); max-width: none; padding: 0;
  border: 0; border-radius: 14px; background: transparent; color: var(--text);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 6, 12, .88); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.lightbox-caption { text-align: center; margin: 16px 0 0; color: var(--text-muted); }
.lightbox-close, .lightbox-nav {
  position: absolute; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--teal-600); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

:focus-visible { outline: 2px solid var(--teal-300); outline-offset: 3px; }
