/**
 * Copyright (c) 2026 Costas Kirgoussios
 *
 * This software is licensed under the PolyForm Noncommercial License 1.0.0.
 * You may obtain a copy of the License at:
 * https://polyformproject.org/licenses/noncommercial/1.0.0/
 */

:root {
  --bg: #020713;
  --bg-mid: #052b70;
  --bg-deep: #001333;
  --driver: #ff4b18;
  --driver-soft: #ffb14a;
  --peer: #00cfff;
  --peer-soft: #00eaff;
  --text: #eaf2ff;
  --muted: #9db3d6;
  --panel: rgba(5, 43, 112, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg) linear-gradient(180deg, var(--bg) 0, var(--bg-deep) 60%, var(--bg) 100%) fixed;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--peer-soft); }
a:hover { color: var(--driver-soft); }
:focus-visible { outline: 3px solid var(--driver-soft); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.15; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.6rem; margin: 3rem 0 1rem; border-bottom: 2px solid var(--bg-mid); padding-bottom: 0.4rem; }
h3 { margin: 0 0 0.25rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--bg-deep); padding: 0.1em 0.4em; border-radius: 4px; }
.banner { width: 100%; }
.subline { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.5rem; }

.stages { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-direction: column; gap: 1.4rem; }
.stages li { padding: 0.6rem 0.9rem; border-radius: 0.6rem; border: 2px solid; background: var(--panel); display: flex; flex-direction: column; }
.stages .driver, .card.driver { border-color: var(--driver); }
.stages .peer, .card.peer { border-color: var(--peer); }
.stage { font-weight: 700; }
.driver .role { color: var(--driver-soft); }
.peer .role { color: var(--peer-soft); }
.role { font-size: 0.85rem; }
.stages code { align-self: flex-start; margin-top: 0.25rem; font-size: 0.75rem; }
@media (min-width: 640px) {
  .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem 1.6rem; }
}
@media (min-width: 960px) {
  .stages { grid-template-columns: repeat(6, 1fr); }
}

.cta { display: inline-block; padding: 0.7rem 1.6rem; font-weight: 700; font-size: 1.1rem; color: var(--bg); background: linear-gradient(90deg, var(--driver), var(--driver-soft)); border-radius: 999px; text-decoration: none; transition: transform 0.15s; }
.cta:hover { color: var(--bg); transform: translateY(-2px); }

blockquote { margin: 1rem 0; padding: 0.1rem 1rem; border-left: 4px solid var(--peer); background: var(--panel); border-radius: 0 0.5rem 0.5rem 0; }

.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { border: 2px solid; border-radius: 0.8rem; padding: 1rem; background: var(--panel); }
.card p { margin: 0.3rem 0; }
.tag { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.commands { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.commands li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; background: var(--panel); border-radius: 0.5rem; }
.commands code { font-size: 0.95em; }
.commands small { color: var(--muted); }
button { margin-left: auto; font: inherit; font-weight: 700; padding: 0.35rem 1rem; color: var(--bg); background: var(--peer); border: 0; border-radius: 0.4rem; cursor: pointer; transition: background 0.15s; }
button:hover { background: var(--peer-soft); }

footer { margin-top: 4rem; padding: 2rem 0; border-top: 2px solid var(--bg-mid); background: var(--bg-deep); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.footer-grid img { border-radius: 50%; flex: none; }
.footer-grid > div { flex: 1 1 16rem; }
.fine { color: var(--muted); font-size: 0.85rem; }

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

/* Arrow links between stage chips (decorative, not read by assistive tech) */
.stages li { position: relative; }
.stages li:not(:last-child)::after {
  content: "\2193" / "";
  position: absolute; left: 50%; bottom: -0.95rem; transform: translateX(-50%);
  color: var(--peer-soft); font-weight: 700; line-height: 1;
}
@media (min-width: 640px) {
  .stages li:not(:last-child)::after {
    content: "\2192" / "";
    left: auto; right: -1.15rem; bottom: auto; top: 50%; transform: translateY(-50%);
  }
  .stages li:nth-child(3n)::after { display: none; }
}
@media (min-width: 960px) {
  .stages li:nth-child(3n):not(:last-child)::after { display: block; }
}
.legend { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.5rem; }
.note { padding: 0.6rem 0.9rem; border-left: 4px solid var(--driver); background: var(--panel); border-radius: 0 0.5rem 0.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Global Navigation */
.site-nav { background: rgba(2, 7, 19, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bg-mid); position: sticky; top: 0; z-index: 100; }
.nav-wrap { max-width: 60rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { padding: 0.4rem 1rem; font-size: 0.9rem; }
.cta-secondary { display: inline-block; padding: 0.6rem 1.4rem; font-weight: 600; font-size: 1rem; color: var(--text); background: var(--panel); border: 1px solid var(--bg-mid); border-radius: 999px; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.cta-secondary:hover { border-color: var(--peer-soft); color: var(--text); transform: translateY(-2px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.5rem; }

/* Breadcrumbs */
.breadcrumb { margin: 1.5rem 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--peer-soft); }
.breadcrumb span { margin: 0 0.4rem; }

/* Value Propositions */
.value-grid { list-style: none; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 2rem 0; }
@media (min-width: 768px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { background: var(--panel); border: 1px solid var(--bg-mid); border-radius: 0.8rem; padding: 1.25rem; }
.value-card h3 { font-size: 1.15rem; color: var(--text); margin-bottom: 0.5rem; }
.value-card p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* Terminal Simulation / Demo Placeholder */
.demo-window { background: #000c1f; border: 1px solid var(--bg-mid); border-radius: 0.8rem; overflow: hidden; margin: 2.5rem 0; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.demo-header { background: #001333; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--bg-mid); }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.demo-dot.red { background: #ff5f56; }
.demo-dot.yellow { background: #ffbd2e; }
.demo-dot.green { background: #27c93f; }
.demo-title { margin-left: auto; margin-right: auto; font-size: 0.8rem; color: var(--muted); font-family: ui-monospace, monospace; }
.demo-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .demo-grid { grid-template-columns: 1fr 1fr; } }
.demo-pane { padding: 1.25rem; font-family: ui-monospace, monospace; font-size: 0.85rem; line-height: 1.5; }
.demo-pane.driver-pane { border-bottom: 1px solid var(--bg-mid); }
@media (min-width: 768px) { .demo-pane.driver-pane { border-bottom: 0; border-right: 1px solid var(--bg-mid); } }
.pane-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; margin-bottom: 0.75rem; display: block; }
.driver-pane .pane-title { color: var(--driver-soft); }
.peer-pane .pane-title { color: var(--peer-soft); }

/* Badges & Tables */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.badge-driver { background: rgba(255, 75, 24, 0.15); color: var(--driver-soft); border: 1px solid var(--driver); }
.badge-peer { background: rgba(0, 207, 255, 0.15); color: var(--peer-soft); border: 1px solid var(--peer); }
.badge-addon { background: rgba(157, 179, 214, 0.15); color: var(--muted); border: 1px solid var(--muted); }
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.spec-table th, .spec-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--bg-mid); }
.spec-table th { background: var(--bg-deep); color: var(--muted); font-size: 0.85rem; text-transform: uppercase; }

/* Forms & Status Feedback */
.form-card { background: var(--panel); border: 1px solid var(--bg-mid); border-radius: 0.8rem; padding: 1.5rem; max-width: 36rem; margin: 2rem 0; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--text); }
.form-help { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; display: block; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 0.65rem 0.85rem; background: var(--bg-deep); border: 1px solid var(--bg-mid); border-radius: 0.4rem; color: var(--text); font-family: inherit; font-size: 0.95rem; transition: border-color 0.15s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--peer-soft); box-shadow: 0 0 0 2px rgba(0, 207, 255, 0.2); }
.form-textarea { resize: vertical; min-height: 80px; }
.checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.checkbox-item { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.checkbox-item input { margin-top: 0.25rem; accent-color: var(--peer); }
.status-msg { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 0.4rem; font-size: 0.9rem; display: none; }
.status-msg.error { display: block; background: rgba(255, 75, 24, 0.15); border: 1px solid var(--driver); color: #ff9d80; }
.status-msg.success { display: block; background: rgba(39, 201, 63, 0.15); border: 1px solid #27c93f; color: #7bf58c; }

