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

:root {
  --bg:        #0d0d0d;
  --surface:   #161616;
  --border:    #2a2a2a;
  --accent:    #007AFF;
  --accent-lo: rgba(0, 122, 255, 0.12);
  --text:      #f0f0f0;
  --muted:     #888;
  --radius:    12px;
  --max:       1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand,
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.nav-brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links,
.nav-actions,
.hero-actions,
.version-links,
.footer-links,
.stage-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover,
.footer-links a:hover { color: var(--text); }

.nav-icon {
  width: 28px;
  height: 28px;
  filter: invert(1);
}

.btn-nav {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-nav:hover { opacity: 0.85; }

.hero {
  text-align: center;
  padding: 100px 24px 80px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge,
.eyebrow,
.kicker,
.resource-eyebrow {
  display: inline-block;
  background: var(--accent-lo);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0,122,255,0.3);
  margin-bottom: 28px;
}

.hero-logo {
  width: 90px;
  height: 90px;
  filter: invert(1);
  margin: 0 auto 24px;
}

.hero h1,
.hero-panel h1 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-panel h2 {
  text-align: left;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.tagline {
  font-size: clamp(18px, 3vw, 22px);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}

.subline,
.lead,
.section-sub,
.footer-copy,
.footer-legal,
.resource-card p,
.surface-card p,
.contact-card p,
.legal-card p,
.credit-card p {
  color: var(--muted);
}

.subline {
  font-size: 16px;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--muted); color: #fff; }

.btn-hero,
.btn-large { font-size: 18px; padding: 16px 40px; }

section { padding: 80px 24px; }
section + section { border-top: 1px solid var(--border); }

.section-shell,
.prose-card,
.footer-shell {
  max-width: var(--max);
  margin: 0 auto;
}

.section-heading {
  max-width: 560px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-sub {
  margin-top: 12px;
}

h2 {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.platforms,
.features { max-width: var(--max); margin: 0 auto; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.platform-card,
.surface-card,
.contact-card,
.legal-card,
.resource-card,
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.platform-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.platform-label.pistorm  { background: rgba(255, 90, 50, 0.15); color: #ff6a3d; border: 1px solid rgba(255,90,50,0.25); }
.platform-label.classic  { background: rgba(100, 180, 255, 0.12); color: #70b8ff; border: 1px solid rgba(100,180,255,0.25); }
.platform-label.mister   { background: rgba(120, 220, 120, 0.12); color: #78e878; border: 1px solid rgba(120,220,120,0.25); }

.platform-card h3,
.surface-card h2,
.contact-card h3,
.legal-card h3,
.resource-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  text-align: left;
}

.platform-card p,
.surface-card p,
.contact-card p,
.legal-card p,
.resource-card p {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.platform-card ul,
.feature-list,
.resource-list,
.contact-list,
.prose ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.platform-card li,
.feature-list li,
.resource-list li,
.contact-list li {
  font-size: 13px;
  color: #bbb;
  padding-left: 16px;
  position: relative;
}

.platform-card li::before,
.feature-list li::before,
.resource-list li::before,
.contact-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 1px;
}

.features-grid,
.split-grid,
.download-grid,
.contact-grid,
.resource-grid,
.story-grid,
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px 48px;
}

.feature {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.feature-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.feature-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.feature h4,
.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  text-align: left;
}

.feature p,
.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.download {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.download-logo {
  width: 64px;
  height: 64px;
  filter: invert(1);
  opacity: 0.4;
  margin: 0 auto 24px;
}

.download h2 { margin-bottom: 12px; }

.download > p {
  color: var(--muted);
  margin-bottom: 32px;
}

.download-links {
  margin-top: 24px;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.15s;
}
.download-links a:hover { color: var(--text); }

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-shell { max-width: 720px; }

.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

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

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 24px;
  height: 24px;
  filter: invert(1);
  opacity: 0.5;
}

footer p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--text); }

.footer-legal {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom { margin-top: 8px; }

.prose-section { max-width: var(--max); margin: 0 auto; }

.prose-card {
  border: none;
  background: transparent;
  padding: 0;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1.1;
}

.prose h2 {
  text-align: left;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 40px;
  margin-bottom: 16px;
}

.prose h3 {
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.prose li {
  font-size: 15px;
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 4px;
}

.prose code {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 13px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}

.prose th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}

.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #ccc;
}

.prose tr:last-child td { border-bottom: none; }

.page-meta,
.prose .page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-back,
.prose .page-back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.page-back:hover,
.prose .page-back:hover { color: var(--text); }

.prose p {
  color: #ccc;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.prose a:not(.btn-primary):not(.btn-secondary):not(.btn-nav) { color: var(--accent); text-decoration: none; }
.prose a:not(.btn-primary):not(.btn-secondary):not(.btn-nav):hover { text-decoration: underline; }

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.credit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.credit-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.credit-header h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.credit-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.credit-link:hover { text-decoration: underline; }

.credit-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.credit-card a { color: var(--accent); text-decoration: none; }
.credit-card a:hover { text-decoration: underline; }

.version-list { display: flex; flex-direction: column; gap: 16px; }

.version-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.version-row.current { border-color: rgba(0,122,255,0.4); }

.version-meta { flex: 1; min-width: 0; }

.version-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.version-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-lo);
  color: var(--accent);
  border: 1px solid rgba(0,122,255,0.3);
}

.version-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.version-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.version-links a:hover { color: var(--text); }

.version-action { flex-shrink: 0; }

.hero-panel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: transparent;
  border: none;
  padding: 0;
}

.hero-panel h2,
.hero-panel h3 { text-align: center; }

.hero-panel .lead {
  max-width: 620px;
  margin: 0 auto 16px;
  font-size: 16px;
  line-height: 1.7;
}

.hero-panel-dark {
  background: transparent;
  border-color: transparent;
}

.hero-copy {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-actions {
  justify-content: center;
  margin-top: 8px;
}

.hero-meta {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 0;
}

.hero-meta li {
  color: var(--muted);
  font-size: 14px;
}

.contact-mail {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.resource-card,
.surface-card,
.contact-card,
.legal-card {
  text-align: left;
}

.workflow-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.workflow-step,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.workflow-step h3,
.metric-card strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.workflow-step p,
.metric-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.legal-note {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  nav {
    min-height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-wrap: wrap;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .hero { padding: 60px 20px 60px; }
  section { padding: 60px 20px; }
  .features-grid,
  .split-grid,
  .download-grid,
  .contact-grid,
  .resource-grid,
  .story-grid,
  .legal-grid { gap: 28px; }
  .version-row { flex-direction: column; align-items: flex-start; }
  .hero-meta { flex-direction: column; gap: 6px; }
}
