/* BotStable */

:root {
  --c-primary: #4338CA;
  --c-primary-hover: #4F46E5;
  --c-dark: #17132B;
  --c-accent: #A78BFA;
  --c-ok: #4ADE80;
  --c-white: #FFFFFF;

  --c-surface: #1E1938;
  --c-line: rgba(255, 255, 255, 0.08);
  --c-line-strong: rgba(255, 255, 255, 0.14);
  --c-led-off: #4A4278;

  --c-text: #FFFFFF;
  --c-muted: #C4BFDD;  /* 10.2:1 on dark */
  --c-dim: #9E97C2;    /* 6.6:1 on dark */

  /* Console (Pterodactyl style) */
  --c-con-bg: #0E0D14;
  --c-con-text: #D4D4D8;
  --c-con-prefix: #D9B85F;
  --c-con-time: #8D8B9C;

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;
  --s-16: 128px;

  --r: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1152px;
  --gutter: var(--s-3);
  --section-pad: var(--s-12);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s-10); }
body, h1, h2, h3, p, ul, ol, figure, pre, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-dark);
  color: var(--c-muted);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { color: var(--c-text); font-weight: 500; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 18px; line-height: 28px; }

a { color: var(--c-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-white); }

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: var(--r); }

.mono, code { font-family: var(--f-mono); font-size: 0.9em; }
code { color: var(--c-text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s-2); top: -100px; z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--c-white); color: var(--c-dark);
  border-radius: var(--r); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* LED */
.led {
  display: inline-block; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-led-off);
}
.led-on { background: var(--c-ok); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-3);
  border: 1px solid transparent; border-radius: var(--r);
  font-size: 16px; font-weight: 500; line-height: 24px;
  text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-sm { min-height: 40px; padding: 0 var(--s-2); font-size: 14px; }
.btn-primary { background: var(--c-primary); color: var(--c-white); }
.btn-primary:hover { background: var(--c-primary-hover); color: var(--c-white); }
.btn-secondary { color: var(--c-white); border-color: var(--c-line-strong); }
.btn-secondary:hover { border-color: var(--c-accent); color: var(--c-white); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-dark);
  border-bottom: 1px solid var(--c-line);
}
.nav { display: flex; align-items: center; gap: var(--s-4); height: var(--s-10); }
.brand {
  display: inline-flex; align-items: center; gap: var(--s-1);
  color: var(--c-white); font-size: 18px; font-weight: 600;
  text-decoration: none;
}
.brand:hover { color: var(--c-white); }
.brand img { width: 32px; height: 32px; border-radius: var(--r); }
.site-header nav { margin-left: auto; }
.nav-links { display: flex; gap: var(--s-4); }
.nav-links a { color: var(--c-muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--c-white); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--s-10));
  min-height: calc(100svh - var(--s-10));
  padding-block: var(--s-8);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--s-8);
  align-items: center;
}
.hero > .container { position: relative; z-index: 1; }
.hero-copy { min-width: 0; }

/* Stepped contour rings behind the hero, flat bands from the page color toward primary */
.hero-rings {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.hero-rings-tr { top: 0; right: 0; width: min(60vw, 840px); height: auto; aspect-ratio: 1; }
.hero-rings-bl { bottom: 0; left: 0; width: min(26vw, 360px); height: auto; aspect-ratio: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-1);
  margin-bottom: var(--s-3);
  font-size: 14px; font-weight: 500; color: var(--c-muted);
}
.display {
  margin-bottom: var(--s-3);
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.06;
  text-wrap: balance;
  letter-spacing: -0.03em;
}
.lead { margin-bottom: var(--s-5); font-size: 20px; line-height: 32px; max-width: 30em; }

@keyframes show { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding-block: var(--section-pad); border-top: 1px solid var(--c-line); }
.section-alt { background: var(--c-surface); }
.section-title { margin-bottom: var(--s-6); }
.section-intro { margin-top: var(--s-2); font-size: 18px; line-height: 28px; max-width: 32em; }

/* Features: plain 2-column grid */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-8) var(--s-12);
}
.feature h3 { margin-bottom: var(--s-1); }
.feature p { max-width: 30em; }
.mono-link { font-family: var(--f-mono); font-size: 0.9em; }

/* Discord status embed mockup */
.embed-mock {
  position: relative;
  max-width: 400px;
  margin: var(--s-4) 0 0;
  padding: var(--s-2) var(--s-3) var(--s-3) var(--s-1);
}
.embed-mock::before {
  content: "";
  position: absolute;
  inset: 0 0 0 var(--s-5);
  background: var(--c-primary);
  border-radius: 24px;
}
.embed {
  position: relative;
  padding: 12px var(--s-2) var(--s-2) 12px;
  background: #2B2D31;
  border-left: 4px solid var(--c-ok);
  border-radius: 4px;
  transform: rotate(-3deg);
  color: #DBDEE1;
}
.embed-title { margin-bottom: var(--s-1); font-size: 16px; line-height: 24px; font-weight: 600; color: #F2F3F5; }
.embed-rows { margin: 0; display: grid; gap: 4px; font-size: 14px; line-height: 20px; }
.embed-row { display: grid; grid-template-columns: 6.5rem 5.5rem auto; justify-content: start; gap: var(--s-2); align-items: center; }
.embed-row dt { font-weight: 600; color: #F2F3F5; }
.embed-row dd { margin: 0; }
.embed-status { display: inline-flex; align-items: center; gap: var(--s-1); }
.embed-ping { font-family: var(--f-mono); font-size: 13px; color: #B5BAC1; font-variant-numeric: tabular-nums; }

/* Limits: table */
.limits {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}
.limits-head { grid-column: 1 / span 5; }
.spec-table {
  grid-column: 7 / span 6;
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.spec-table th,
.spec-table td {
  padding: 12px 0;
  text-align: left;
  vertical-align: baseline;
}
.spec-table tr:first-child th,
.spec-table tr:first-child td { padding-top: 0; }
.spec-table tr:last-child th,
.spec-table tr:last-child td { padding-bottom: 0; }
.spec-table th { width: 40%; font-weight: 500; color: var(--c-muted); }
.spec-table td { color: var(--c-white); }
.spec-table td .mono { font-size: 16px; font-weight: 500; }

/* How it works: single-column list, separated by space */
.steps { max-width: 640px; display: grid; gap: var(--s-5); }
.steps h3 { margin-bottom: 4px; }

/* Console demo (hero) */
.console {
  background: var(--c-con-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-1) var(--s-1) var(--s-2);
  border-bottom: 1px solid var(--c-line);
}
.console-title { display: inline-flex; align-items: center; gap: var(--s-1); font-size: 14px; font-weight: 500; color: var(--c-muted); }
.console-tabs { display: flex; gap: 4px; }
.console-tab {
  min-height: 32px; padding: 0 var(--s-2);
  background: transparent; border: 1px solid transparent; border-radius: 4px;
  font-size: 14px; color: var(--c-dim); cursor: pointer;
}
.console-tab:hover { color: var(--c-white); }
.console-tab[aria-selected="true"] { color: var(--c-white); border-color: var(--c-line-strong); }
/* Both logs share one grid cell, so the console keeps the height of the longer one */
.console-panels { display: grid; }
.console-panels > .console-screen { grid-area: 1 / 1; }
.console-panels > .console-screen[hidden] { display: block; visibility: hidden; }
.console-screen { padding: var(--s-2); }
.hero-console { min-width: 0; }
.hero-console .console-screen { padding: var(--s-3); }
.hero-console .console-screen pre { font-size: 14px; line-height: 22px; }
.hero-console .console-input { padding-inline: var(--s-3); font-size: 14px; }
.console-screen pre {
  font-family: var(--f-mono);
  font-size: 13px; line-height: 20px;
  color: var(--c-con-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.console-screen code { font-size: inherit; color: inherit; }
.c-prefix { color: var(--c-con-prefix); }
.c-time { color: var(--c-con-time); }
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  vertical-align: -2px;
  background: var(--c-con-text);
}
.console-input {
  padding: var(--s-1) var(--s-2);
  border-top: 1px solid var(--c-line);
  font-family: var(--f-mono); font-size: 13px; line-height: 24px;
  color: var(--c-con-time);
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-console] .cl { opacity: 0; }
  .js [data-console].is-running .cl { animation: show 1ms linear both; animation-delay: calc(var(--i) * 350ms); }
  .cursor { animation: blink 1s steps(1, end) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

/* FAQ */
.faq-wrap { max-width: calc(800px + var(--gutter) * 2); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3);
  padding-block: var(--s-2);
  font-size: 18px; line-height: 28px; font-weight: 500; color: var(--c-white);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--c-accent); }
.faq details p { padding-bottom: var(--s-2); max-width: 40em; }
.faq-icon { position: relative; flex: none; width: 16px; height: 16px; margin-top: 6px; }
.faq-icon::before,
.faq-icon::after {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 2px; background: var(--c-dim);
  transition: transform 150ms var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq details[open] .faq-icon::after { transform: rotate(0deg); }
.faq-more { margin-top: var(--s-4); }

/* CTA */
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
}

/* Footer */
.site-footer { border-top: 1px solid var(--c-line); padding-block: var(--s-6); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.footer-brand p { margin-top: var(--s-1); font-size: 14px; color: var(--c-dim); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.footer-links a { color: var(--c-muted); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--c-white); text-decoration: underline; }
.footer-meta { font-size: 14px; color: var(--c-dim); }

/* Sub pages */
main { flex: 1 0 auto; }
.page {
  display: flex; align-items: center;
  padding-block: var(--s-12);
}
.page-inner { max-width: 640px; }
.page h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin-bottom: var(--s-3); }
.page p { font-size: 18px; line-height: 28px; }
.page p + p { margin-top: var(--s-2); }
.page .eyebrow { margin-bottom: var(--s-2); }
.page .cta-row { margin-top: var(--s-5); }

/* Legal pages (terms, privacy) */
.legal { padding-block: var(--s-12) var(--s-16); }
.legal-inner { max-width: 720px; }
.legal h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.02em; }
.legal-updated { margin-top: var(--s-1); font-size: 14px; color: var(--c-dim); }
.legal-updated + p { margin-top: var(--s-5); font-size: 18px; line-height: 28px; }
.legal h2 {
  margin-top: var(--s-6);
  font-size: 22px; line-height: 32px; letter-spacing: -0.01em;
  scroll-margin-top: var(--s-12);
}
.legal h3 { margin-top: var(--s-3); font-size: 16px; line-height: 24px; color: var(--c-text); }
.legal h2 + p, .legal h2 + ul, .legal h3 + ul, .legal h3 + p { margin-top: var(--s-1); }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: var(--s-2); }
.legal ul { list-style: disc; padding-left: 20px; }
.legal li + li { margin-top: var(--s-1); }
.legal li::marker { color: var(--c-dim); }
.legal strong { font-weight: 500; color: var(--c-text); }

/* Responsive */
@media (max-width: 1024px) {
  .hero { min-height: 0; padding-block: var(--s-8) var(--s-10); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .hero-copy { max-width: 640px; }
  .limits-head { grid-column: 1 / -1; margin-bottom: var(--s-4); }
  .spec-table { grid-column: 1 / span 8; }
}

@media (max-width: 860px) {
  :root { --section-pad: var(--s-10); }
  .nav-links { display: none; }
  .display { letter-spacing: -0.02em; }
  .spec-table { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: var(--s-2); }
  .lead { font-size: 18px; line-height: 28px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .section-title { margin-bottom: var(--s-5); }
  .cta-row .btn { flex: 1 1 auto; }
  .hero-console .console-screen { padding: var(--s-2); }
  .hero-rings-bl { display: none; }
  .hero-rings-tr { width: 300px; }
  .hero-console .console-screen pre { font-size: 12px; line-height: 20px; }
  .hero-console .console-input { padding-inline: var(--s-2); font-size: 12px; }
  .footer-inner { flex-direction: column; gap: var(--s-3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
