/* ==========================================================================
   ToggleBoards — Design System
   Graphite + brass industrial control-panel aesthetic
   ========================================================================== */

:root {
  /* Color */
  --graphite: #101826;
  --panel: #16202F;
  --panel-inset: #1E2A3D;
  --panel-raised: #1B2636;
  --brass: #B8863E;
  --brass-bright: #D4A15C;
  --signal-green: #5CB87D;
  --signal-amber: #E0A64B;
  --ink: #E7ECF2;
  --ink-muted: #93A1B0;
  --hairline: #2A3648;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --panel-radius: 6px;
  --edge: 1px solid var(--hairline);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle brushed-metal texture on the base layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
  opacity: 0.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink); }
.muted { color: var(--ink-muted); }

a { color: var(--brass-bright); text-decoration: none; }
a:hover { color: var(--signal-green); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ---- Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16,24,38,0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--edge);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-switch {
  width: 22px;
  height: 12px;
  border-radius: 6px;
  background: var(--panel-inset);
  border: var(--edge);
  position: relative;
  flex-shrink: 0;
}
.logo-switch::after {
  content: '';
  position: absolute;
  top: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 6px var(--signal-green);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-links a { color: var(--ink-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--brass-bright); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  padding: 9px 18px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
.nav-cta:hover {
  background: var(--brass);
  color: var(--graphite);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 28px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s;
}
.btn-primary {
  background: var(--brass);
  color: var(--graphite);
  font-weight: 600;
}
.btn-primary:hover { background: var(--brass-bright); color: var(--graphite); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--hairline);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-bright); }

/* ---- Sections ---- */
section { padding: 96px 0; position: relative; z-index: 1; }
.section-tight { padding: 64px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass-bright);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--brass);
}

/* ---- Panel card ---- */
.panel {
  background: var(--panel);
  border: var(--edge);
  border-radius: var(--panel-radius);
  padding: 28px;
  position: relative;
}
.panel::before {
  /* screw-head corner detail */
  content: '';
  position: absolute;
  top: 10px; left: 10px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--hairline);
  box-shadow: 4px 0 0 var(--hairline);
}

/* ---- Toggle switch (real interactive element) ---- */
.switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--panel-inset);
  border: 1px solid var(--hairline);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.switch .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: transform 0.2s ease, background 0.2s;
}
.switch.on {
  background: rgba(92,184,125,0.18);
  border-color: var(--signal-green);
}
.switch.on .knob {
  transform: translateX(20px);
  background: var(--signal-green);
  box-shadow: 0 0 8px rgba(92,184,125,0.6);
}

/* ---- Capability grid ---- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
@media (max-width: 900px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cap-grid { grid-template-columns: 1fr; } }

.cap-card {
  background: var(--panel);
  border: var(--edge);
  border-radius: var(--panel-radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s;
}
.cap-card:hover { border-color: var(--brass); }

.cap-try-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-bright);
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}
.cap-try-link:hover { color: var(--signal-green); }

.cap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cap-card h3 { margin-bottom: 4px; font-size: 1.05rem; }
.cap-card p { color: var(--ink-muted); font-size: 0.92rem; margin: 0; }

.cap-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.switch.on ~ .cap-status,
.cap-card:has(.switch.on) .cap-status {
  color: var(--signal-green);
}

/* ---- Readout counter ---- */
.readout {
  font-family: var(--font-mono);
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.readout-item {
  border-left: 2px solid var(--brass);
  padding-left: 14px;
}
.readout-num {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1;
}
.readout-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* ---- Hero ---- */
.hero {
  padding: 120px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-panel {
  background: var(--panel);
  border: var(--edge);
  border-radius: 10px;
  padding: 26px;
}
.hero-panel-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
}
.hero-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline);
}
.hero-switch-row:last-child { border-bottom: none; }
.hero-switch-row span { font-size: 0.9rem; }

/* ---- Model/Engagement cards ---- */
.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 800px) { .model-grid { grid-template-columns: 1fr; } }

.model-card {
  background: var(--panel);
  border: var(--edge);
  border-radius: var(--panel-radius);
  padding: 34px;
}
.model-card.featured { border-color: var(--brass); background: var(--panel-raised); }
.model-price {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  color: var(--brass-bright);
  margin: 8px 0 20px;
}
.model-list { list-style: none; padding: 0; margin: 0 0 24px; }
.model-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.94rem;
  color: var(--ink-muted);
  display: flex;
  gap: 10px;
}
.model-list li::before { content: '—'; color: var(--brass); }

/* ---- Vertical strip ---- */
.vertical-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 40px;
}
@media (max-width: 900px) { .vertical-strip { grid-template-columns: repeat(2, 1fr); } }

.vertical-tile {
  background: var(--panel);
  border: var(--edge);
  border-radius: var(--panel-radius);
  padding: 18px;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s;
}
.vertical-tile:hover { transform: translateY(-3px); border-color: var(--brass); }
.vertical-tile .v-name { font-family: var(--font-display); font-weight: 600; display: block; margin-bottom: 4px; }
.vertical-tile .v-sector { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- Footer ---- */
.site-footer {
  border-top: var(--edge);
  padding: 56px 0 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Forms ---- */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--panel-inset);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brass);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---- Utility ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.center { text-align: center; }
.mt-lg { margin-top: 48px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
