/* ===================================================
   Lockhart Ops Institute — Base Styles
   Dark / Retro Terminal Theme
   =================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
  background-color: #020617;
  color: #e2e8f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-weight: 700;
  line-height: 1.2;
}

.font-mono,
.mono-label {
  font-family: 'Space Grotesk', ui-monospace, monospace;
}

p, li, td, th, label, input, textarea, select {
  font-family: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
}

/* --- Links --- */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
details:focus-visible summary {
  outline: 2px solid #475569;
  outline-offset: 2px;
}

/* --- Sharp Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 2px solid #475569;
  background: transparent;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.5;
}

.btn:hover {
  background: #475569;
  color: #f8fafc;
}

.btn-primary {
  background: #475569;
  border-color: #475569;
  color: #f8fafc;
}

.btn-primary:hover {
  background: #334155;
  border-color: #334155;
}

.btn-amber {
  border-color: #d97706;
  color: #fbbf24;
}

.btn-amber:hover {
  background: #d97706;
  color: #020617;
}

/* --- Terminal Code Block --- */
.terminal-block {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0;
  padding: 1.5rem;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-block .prompt {
  color: #22c55e;
}

.terminal-block .flag {
  color: #fbbf24;
}

.terminal-block .comment {
  color: #64748b;
}

.terminal-block .output {
  color: #94a3b8;
}

/* --- Number Badge Cards --- */
.number-card {
  position: relative;
  padding-top: 1rem;
}

.number-card .badge-number {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 3.75rem;
  font-weight: 700;
  color: rgba(51, 65, 85, 0.3);
  line-height: 1;
  position: absolute;
  top: 0;
  left: 0;
}

.number-card .card-body {
  position: relative;
  padding-left: 2.5rem;
  padding-top: 1.5rem;
}

/* --- Full-Width Bar Headings --- */
.section-bar {
  background: #1e293b;
  padding: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}

.section-bar h2 {
  color: #f8fafc;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Comparison Table --- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid #334155;
}

.compare-table thead th {
  background: #1e293b;
  color: #f8fafc;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
}

.compare-table tbody tr {
  background: #0f172a;
}

.compare-table tbody tr:nth-child(even) {
  background: #1e293b;
}

.compare-table td:first-child {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  color: #cbd5e1;
  font-weight: 500;
}

/* --- FAQ Accordion --- */
details {
  border-bottom: 1px solid #334155;
}

details summary {
  padding: 1rem 0;
  cursor: pointer;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #e2e8f0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '+';
  font-size: 1.5rem;
  color: #64748b;
  flex-shrink: 0;
  font-weight: 400;
  line-height: 1;
}

details[open] summary::after {
  content: '−';
}

details .faq-answer {
  padding: 0 0 1.25rem 0;
  color: #94a3b8;
  line-height: 1.7;
}

/* --- Forms (dark) --- */
.form-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 2px solid #334155;
  color: #f8fafc;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  outline: none;
}

.form-field input:focus {
  border-color: #475569;
}

.form-field input::placeholder {
  color: #475569;
}

.form-field input.invalid {
  border-color: #ef4444;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-field input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #475569;
  flex-shrink: 0;
}

.checkbox-field label {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  font-family: 'Source Sans 3', sans-serif;
}

.form-error {
  color: #ef4444;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #0f172a;
  border-top: 1px solid #334155;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner p {
  color: #94a3b8;
  font-size: 0.875rem;
  flex: 1 1 300px;
}

.cookie-banner p a {
  color: #cbd5e1;
  text-decoration: underline;
}

/* --- Scroll indicator arrow --- */
.scroll-arrow {
  animation: bounce-arrow 2s infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Mobile overlay --- */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-overlay a {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mobile-overlay a:hover {
  color: #fbbf24;
}

.mobile-overlay .close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #f8fafc;
  cursor: pointer;
}

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

/* --- Responsive table wrapper --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Pill badges --- */
.pill {
  display: inline-block;
  padding: 0.375rem 1rem;
  border: 1px solid #334155;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.pill-amber {
  border-color: #d97706;
  color: #fbbf24;
}

.pill-green {
  border-color: #16a34a;
  color: #22c55e;
}

/* --- Testimonial metric --- */
.metric-highlight {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: #22c55e;
  line-height: 1.2;
}

/* --- Dark section utilities --- */
.bg-brand-950 { background-color: #020617; }
.bg-brand-900 { background-color: #0f172a; }
.bg-brand-800 { background-color: #1e293b; }
.bg-brand-700 { background-color: #334155; }

/* --- Media queries --- */
@media (max-width: 768px) {
  .terminal-block {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .number-card .badge-number {
    font-size: 2.5rem;
  }

  .number-card .card-body {
    padding-left: 1.75rem;
  }

  .compare-table {
    font-size: 0.8125rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.625rem 0.75rem;
  }

  .metric-highlight {
    font-size: 1.75rem;
  }
}
