/* ==========================================================================
   Koala Cloud Hosting — design system
   Near-black + neon-green "infrastructure readout" language.
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #05070a;
  --bg-raised: #0a0d0b;
  --card: #0b100d;
  --card-border: rgba(57, 255, 122, 0.16);
  --card-border-hover: rgba(57, 255, 122, 0.36);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #39ff7a;
  --accent-dim: #1fae57;
  --accent-glow: rgba(57, 255, 122, 0.35);
  --text: #f2f6f4;
  --text-muted: #9db0a8;
  --text-faint: #5f7269;
  --danger: #ff6b6b;
  --warn: #ffcc66;

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --maxw: 1240px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- Ambient grid + glow backdrop -------------------------------------- */
.grid-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57, 255, 122, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 122, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 40%, transparent 85%);
}
.grid-glow::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(10px);
  opacity: 0.55;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

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

/* ---- Top nav ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* ---- Buttons -------------------------------------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #04170a;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 28px var(--accent-glow); }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--card-border-hover); }
.btn-ghost {
  background: rgba(57, 255, 122, 0.08);
  border-color: var(--card-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--card-border-hover); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---- Pills / badges ------------------------------------------------------*/
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(57, 255, 122, 0.06);
  font-size: 12.5px;
  color: var(--text-muted);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
.dot.offline { background: var(--text-faint); box-shadow: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.status-tag {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(57, 255, 122, 0.08);
}
.status-tag.offline { color: var(--text-faint); border-color: var(--line); background: transparent; }
.status-tag.degraded { color: var(--warn); border-color: rgba(255, 204, 102, 0.3); background: rgba(255, 204, 102, 0.08); }

/* ---- Cards ---------------------------------------------------------------*/
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--card-border-hover); }

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-card .stat-label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 6px;
}
.stat-card .stat-value small { font-size: 14px; color: var(--text-muted); font-weight: 500; }

.meter {
  margin-top: 12px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: inherit;
  transition: width 0.6s ease;
}

/* ---- Sections --------------------------------------------------------- */
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; max-width: 640px; }
.section-head p { color: var(--text-muted); max-width: 420px; font-size: 15px; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- Footer ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 13.5px; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-actions { display: flex; gap: 12px; }

/* ---- Utility ------------------------------------------------------------*/
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.mono { font-family: var(--font-mono); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04170a;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---- Responsive ---------------------------------------------------------*/
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
  }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    padding: 20px 28px 26px;
    gap: 18px;
  }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr !important; }
}

/* ---- Hero ---------------------------------------------------------------*/
.hero { padding: 64px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 700;
  line-height: 1.04;
}
.hero h1 .accent { color: var(--accent); text-shadow: 0 0 34px var(--accent-glow); }
.hero p.lede {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 480px;
  margin-top: 22px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.hero-strip .stat-card { padding: 16px 16px; }
.hero-strip .stat-value { font-size: 22px; }

.hero-panel {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.hero-panel .panel-frame {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(57,255,122,.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(57,255,122,.06) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(57,255,122,.06) 0 1px, transparent 1px 26px),
    #070a08;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
}
.hero-panel .panel-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.hero-fleet {
  margin-top: 16px;
}
.hero-fleet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hero-fleet-head .who { display: flex; gap: 10px; align-items: center; }
.hero-fleet-head .who img { width: 30px; height: 30px; border-radius: 7px; }
.hero-fleet-head .who .name { font-weight: 600; font-size: 14px; }
.hero-fleet-head .who .sub { font-size: 12px; color: var(--text-faint); }

/* ---- Node card ------------------------------------------------------------*/
.node-card { }
.node-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.node-head .node-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.node-head .node-loc { color: var(--text-faint); font-size: 13px; margin-top: 4px; }
.node-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.node-metrics .stat-card { padding: 14px 16px; }
.node-bars { margin-top: 14px; display: grid; gap: 14px; }
.node-bar-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.node-bar-row .label { font-weight: 600; }
.node-bar-row .value { color: var(--text-muted); font-family: var(--font-mono); font-size: 12.5px; }

/* ---- Game / product cards ------------------------------------------------*/
.game-chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  font-size: 13.5px;
  color: var(--text-muted);
  background: var(--card);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

.game-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.game-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(57,255,122,.1);
  border: 1px solid var(--card-border);
  font-size: 20px;
}
.game-card h3 { font-size: 18px; font-weight: 600; }
.game-card .desc { color: var(--text-muted); font-size: 14px; flex-grow: 1; }
.game-card .from { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.game-card .price { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.game-card .price small { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.game-card .specs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); }

/* ---- Table (plans) --------------------------------------------------------*/
.plan-table { width: 100%; border-collapse: collapse; }
.plan-table th, .plan-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.plan-table th { color: var(--text-faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.plan-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: var(--radius); background: var(--card); }
.table-wrap .plan-table { min-width: 640px; }

/* ---- Steps / process -----------------------------------------------------*/
.step-list { display: grid; gap: 16px; }
.step {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
}
.step .num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  min-width: 26px;
}
.step h4 { font-size: 15.5px; font-weight: 600; }
.step p { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

/* ---- Page header (non-home pages) ----------------------------------------*/
.page-header { padding: 56px 0 8px; }
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 650; max-width: 720px; }
.page-header p.lede { color: var(--text-muted); font-size: 16px; max-width: 560px; margin-top: 16px; }

/* ---- Support -------------------------------------------------------------*/
.contact-card { display: flex; flex-direction: column; gap: 10px; }
.contact-card h3 { font-size: 16.5px; }
.contact-card p { color: var(--text-muted); font-size: 14px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--text-muted); font-size: 14.5px; margin-top: 12px; }

/* ---- Service checks -------------------------------------------------------*/
.check-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}
.check-card .svc-name { font-weight: 600; font-size: 15px; }
.check-card .svc-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-top: 3px; }

.banner {
  border: 1px solid var(--card-border);
  background: rgba(57,255,122,.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Embedded WHMCS / Pterodactyl frame ----------------------------------*/
.embed-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 76px);
  min-height: 560px;
}
.embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.embed-bar .embed-title { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-muted); }
.embed-frame-shell { flex: 1; position: relative; background: var(--bg-raised); }
.embed-frame-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
@media (max-width: 720px) {
  .embed-wrap { height: calc(100vh - 76px); min-height: 480px; }
  .embed-bar { padding: 12px 20px; }
}
