/* MechaLinters — Minimalist Cyber-Mechanical Editorial Stylesheet
   Design System matching jefflunt.com and mecharuby.com */

:root {
  /* Dark Cyber-Mechanical Palette Tokens */
  --bg: #090b10;
  --surface: #111520;
  --surface-2: #181d2c;
  --surface-3: #22293d;
  --text: #f0f3f8;
  --muted: #919bb0;
  --border: #242c3f;
  --border-subtle: #1b2130;

  /* Primary Brand: Mecha Electric Cyan */
  --accent: #00e5ff;
  --accent-hover: #5ef0ff;
  --accent-tint: #07232d;
  --accent-border: #0e5e78;
  --accent-glow: rgba(0, 229, 255, 0.15);

  /* Secondary: Ruby Accent (Direct MechaRuby linkage) */
  --ruby: #ff4757;
  --ruby-hover: #ff6b78;
  --ruby-tint: #2b1115;
  --ruby-border: #7a202d;

  /* Warning / Law Amber */
  --amber: #f59e0b;
  --amber-tint: #241804;
  --amber-border: #6d4508;

  /* Terminal & Code Engine Tokens */
  --term-bg: #07090d;
  --term-header: #10141f;
  --term-border: #21293a;
  --term-text: #e6edf3;
  --term-muted: #798396;
  --term-green: #3fb950;
  --term-red: #ff5c67;
  --term-purple: #c297ff;
  --term-cyan: #38d6e3;
  --term-yellow: #f0b72f;

  color-scheme: dark;
  accent-color: var(--accent);

  /* Typography Stacks */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Chakra Petch", var(--font-sans);
  --font-body: "Atkinson Hyperlegible", var(--font-sans);
  --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (forced-colors: active) {
  :root {
    --bg: Canvas;
    --surface: Canvas;
    --text: CanvasText;
    --muted: GrayText;
    --border: CanvasText;
    --accent: LinkText;
    --accent-border: Highlight;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(17, 21, 32, 0.4) 0%, transparent 100%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 11, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mascot {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--accent-border);
  box-shadow: 0 0 12px var(--accent-glow);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem !important;
  background: var(--surface-2);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  color: var(--accent) !important;
  transition: all 0.2s ease !important;
}

.nav-cta:hover {
  background: var(--accent-tint) !important;
  border-color: var(--accent) !important;
  color: var(--accent-hover) !important;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.accent-text {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

.ruby-accent {
  color: var(--ruby);
}

.hero-lede {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 2rem;
}

.hero-lede strong {
  color: var(--text);
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pill-link:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.dot-ruby {
  background: var(--ruby);
  box-shadow: 0 0 8px var(--ruby);
}

.dot-amber {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.hero-mascot-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-mascot {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--accent-glow);
}

/* Sections */
section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 760px;
  margin-bottom: 3rem;
}

h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Split grids */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* Dialogue / Quote Callout */
.dialogue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.dialogue-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--accent));
}

.tweet-thread {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.tweet-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
}

.tweet-bubble-amber {
  border-left: 4px solid var(--amber);
}

.tweet-bubble-accent {
  border-left: 4px solid var(--accent);
}

.tweet-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.tweet-author-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tweet-author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text);
}

.tweet-author-handle {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.tweet-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  text-decoration: none;
}

.tweet-badge:hover {
  color: var(--accent);
}

.tweet-text {
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0;
  color: var(--text);
}

.dialogue-verdict {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--amber-tint);
  border: 1px solid var(--amber-border);
  border-radius: 8px;
  font-size: 1.05rem;
  color: #fed7aa;
}

.dialogue-verdict strong {
  color: #fff;
}

/* Feature & Architecture Cards */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-glow);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}

.card-num-ruby {
  color: var(--ruby);
}

.feature-card p {
  color: var(--muted);
  font-size: 1.025rem;
  line-height: 1.6;
  margin: 0;
}

.feature-card p strong {
  color: var(--text);
}

/* Code Windows */
.code-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.code-window {
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--term-header);
  border-bottom: 1px solid var(--term-border);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--term-muted);
}

.code-bar-tag {
  text-transform: uppercase;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.code-bar-tag-ruby {
  color: var(--ruby);
  background: var(--ruby-tint);
  border-color: var(--ruby-border);
}

pre {
  margin: 0;
  padding: 1.25rem 1.25rem;
  overflow-x: auto;
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--term-text);
}

pre code {
  font-family: var(--font-mono);
}

/* Terminal syntax tokens */
.t-key { color: var(--term-cyan); font-weight: 600; }
.t-str { color: #a5d6ff; }
.t-bool { color: var(--term-yellow); }
.t-ok { color: var(--term-green); font-weight: 600; }
.t-err { color: var(--term-red); font-weight: 600; }
.t-dim { color: var(--term-muted); }
.t-accent { color: var(--accent); font-weight: 600; }

/* Comparison Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 1rem;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

th.th-highlight {
  color: var(--accent);
  background: var(--accent-tint);
  border-bottom: 2px solid var(--accent);
}

td.td-highlight {
  background: rgba(0, 229, 255, 0.04);
  font-weight: 600;
  color: var(--text);
  border-left: 1px solid var(--accent-border);
  border-right: 1px solid var(--accent-border);
}

tr:last-child td {
  border-bottom: none;
}

/* Reference Showcase (MechaRuby) */
.showcase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
}

.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
}

.tool-badge:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.tool-badge-ruby {
  color: var(--ruby);
}

.tool-badge-ruby:hover {
  background: var(--ruby-tint);
  border-color: var(--ruby);
}

/* Call to action panel */
.cta-panel {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--accent-glow);
}

.cta-panel h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-panel p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #05070a;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #000;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0;
  background: var(--term-bg);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.site-version {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2.25rem;
  }
  .site-nav {
    display: none;
  }
}
