/* twistopher.ai — Architectural Minimalist Stylesheet */

:root {
  --bg: #090a0d;
  --bg-surface: #111317;
  --bg-surface-elevated: #181b22;
  --border-subtle: #21252e;
  --border-hover: #323846;
  --border-accent: rgba(240, 90, 26, 0.35);

  --text-primary: #f2f4f8;
  --text-secondary: #9da3af;
  --text-tertiary: #656c7a;

  /* BMW Lava Orange */
  --lava: #f05a1a;
  --lava-hot: #ff7033;
  --lava-glow: rgba(240, 90, 26, 0.18);
  --lava-subtle: rgba(240, 90, 26, 0.08);

  /* Clean Aluminum Neutrals */
  --alu-hi: #eef1f5;
  --alu: #b9bec7;
  --alu-lo: #5d636f;

  --font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --max-width: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--lava);
  color: #000;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

p {
  margin: 0;
}

/* Subtle background illumination */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55rem 35rem at 80% -5%, rgba(240, 90, 26, 0.08), transparent 70%),
    radial-gradient(40rem 30rem at 10% 90%, rgba(240, 90, 26, 0.04), transparent 70%);
}

/* ==========================================================================
   MINIMAL NAVIGATION
   ========================================================================== */

.nav-minimal {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 13, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 0.9;
}

.brand-dot {
  color: var(--lava);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-item {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}

.nav-item:hover, .nav-item:focus-visible {
  color: var(--text-primary);
}

.nav-ext {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--alu-hi);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.nav-ext:hover {
  border-color: var(--border-hover);
  color: var(--lava);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.2s, opacity 0.2s;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-arch {
  padding: 4rem 1.5rem 5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-kicker {
  margin-bottom: 1.25rem;
}

.kicker-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--lava);
  background: var(--lava-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
}

.hero-heading {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

.highlight-warm {
  color: var(--lava);
}

.hero-statement {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   TOOL CARDS DECK
   ========================================================================== */

.tool-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tool-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tool-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lava);
  font-weight: 600;
}

.tool-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tool-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-arrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--alu-hi);
  transition: color 0.2s;
}

.tool-card:hover .tool-arrow {
  color: var(--lava);
}

/* Hero Visual */
.visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.visual-meta {
  padding: 1rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--lava);
  letter-spacing: 0.08em;
}

.meta-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.meta-specs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   THE RIDE LIBRARY (FILMS)
   ========================================================================== */

.section-films {
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--lava);
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 640px;
}

.films-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.film-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.film-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.film-meta {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.film-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--alu);
}

.tag-bike {
  color: var(--lava);
  border-color: var(--border-accent);
}

.film-title {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.film-summary {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.film-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.films-cta {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  text-align: center;
}

.btn-clean {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, color 0.2s;
}

.btn-clean:hover {
  border-color: var(--lava);
  color: var(--lava);
}

/* ==========================================================================
   REGIONAL EXPEDITIONS ARCHIVE
   ========================================================================== */

.section-expeditions {
  padding: 5rem 1.5rem 6rem;
}

.expedition-block {
  max-width: var(--max-width);
  margin: 0 auto 4.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.expedition-block:last-child {
  margin-bottom: 0;
}

.expedition-intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}

.expedition-photo-frame {
  position: relative;
  background: #000;
}

.expedition-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.expedition-photo-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(9, 10, 13, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--alu-hi);
}

.expedition-profile {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.expedition-header-meta {
  margin-bottom: 1rem;
}

.region-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lava);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.35rem;
}

.expedition-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.expedition-machine {
  font-size: 0.9375rem;
  color: var(--alu);
}

.expedition-machine strong {
  color: var(--text-primary);
}

.expedition-narrative {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.expedition-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.highlight-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* ==========================================================================
   RESPONSIVE DATA TABLE (CONTAINER QUERIES)
   ========================================================================== */

.table-container {
  overflow: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  padding: 0;
  background: var(--bg);
}

.pass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
}

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

.pass-table thead th {
  background: var(--bg-surface-elevated);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pass-table tbody th {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.pass-table tbody td {
  color: var(--text-secondary);
}

.pass-table tbody tr:hover td, .pass-table tbody tr:hover th {
  background: rgba(255, 255, 255, 0.02);
}

/* Container query transformation for responsive stacked cards */
@container (max-width: 720px) {
  .pass-table, 
  .pass-table thead, 
  .pass-table tbody, 
  .pass-table tr, 
  .pass-table th, 
  .pass-table td {
    display: block;
  }

  .pass-table thead {
    display: none;
  }

  .pass-table tr {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .pass-table tbody th {
    padding: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--lava);
    border-bottom: none;
  }

  .pass-table tbody td {
    padding: 0.35rem 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-align: right;
  }

  .pass-table tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
  }
}

/* ==========================================================================
   MINIMAL ARCHITECTURAL FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 4rem 1.5rem 3rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 380px;
  margin-bottom: 0.75rem;
}

.footer-location {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--lava);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
}

/* ==========================================================================
   MOBILE & TABLET MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .films-grid {
    grid-template-columns: 1fr;
  }

  .expedition-intro {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .tool-deck {
    grid-template-columns: 1fr;
  }

  .hero-arch {
    padding: 2.5rem 1rem 3.5rem;
  }

  .section-films, .section-expeditions {
    padding: 3.5rem 1rem;
  }
}

/* ==========================================================================
   REVMATCH BACKWARD COMPATIBILITY STYLES
   ========================================================================== */

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-logo {
  border-radius: 8px;
  border: 1px solid var(--alu-lo);
  box-shadow: 0 0 14px rgba(240, 90, 26, 0.25);
  transition: transform 0.2s var(--ease), border-color 0.2s;
  display: block;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark-revmatch {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wordmark-revmatch span {
  color: var(--lava);
}

.wordmark-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--alu-mid, #8f949b);
  margin-top: 3px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nle-pill-nav {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--alu);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--lava);
  color: #fff;
  border: 1px solid var(--lava);
}

.btn-primary:hover {
  background: var(--lava-hot);
  box-shadow: 0 4px 14px var(--lava-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

/* ==========================================================================
   REVMATCH DETAIL & RIG COMPONENT STYLES
   ========================================================================== */

.nle-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.nle-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .75rem;
  background: #111215;
  border: 1px solid #282a30;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--alu-hi);
  letter-spacing: .02em;
}
.nle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lava);
  box-shadow: 0 0 8px var(--lava);
}

.signup {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
  max-width: 440px;
}
.signup input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: .75rem 1rem;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font: 500 0.9375rem var(--font-display);
}
.signup input::placeholder { color: var(--text-tertiary); }

.fine { margin: .9rem 0 0 0.5rem; font: .78rem var(--font-mono); color: var(--text-tertiary); }
.lede { max-width: 34rem; margin: 1.5rem 0 2rem; font-size: 1.15rem; color: var(--text-secondary); line-height: 1.6; }

.rig {
  --sync-x: 35%;
  position: relative;
  padding: 1.25rem;
  background: linear-gradient(180deg, #141416, #0d0d0e);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  font-family: var(--font-mono);
}

.rig-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border-subtle);
}
.rig-head .rig-status { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }

.rig-hud-telemetry {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-mono);
  font-size: .72rem;
}
.hud-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .45rem;
  background: #111215;
  border: 1px solid #23252a;
  border-radius: 4px;
}
.hud-k { color: var(--alu); font-weight: 600; }
.hud-v { color: var(--alu-hi); }
.rig.is-synced .hud-v { color: var(--lava-hot); }

.rig-tc-wrap {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--alu-hi);
  letter-spacing: .08em;
  background: #090a0b;
  padding: .25rem .55rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.rig-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--alu);
  margin-top: 1rem;
  margin-bottom: .45rem;
  text-transform: uppercase;
}
.rig-subtag {
  color: #555860;
  font-size: .6rem;
  letter-spacing: .06em;
}

.cams-viewports {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: .4rem;
}
.cam-box {
  background: #0d0e11;
  border: 1px solid #22242a;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .3s;
}
.cam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem .45rem;
  background: #15171c;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--alu);
  border-bottom: 1px solid #1f2127;
}
.cam-fps { color: #5a5d64; }
.cam-screen {
  position: relative;
  height: 48px;
  background: radial-gradient(circle at 50% 50%, #15181f 0%, #0a0b0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cam-view-svg {
  width: 100%;
  height: 100%;
  opacity: .75;
}
.cam-pip-label {
  position: absolute;
  bottom: 2px;
  left: 4px;
  font-size: .5rem;
  color: #727680;
  letter-spacing: .04em;
}
.cam-drift-badge {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: .5rem;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(245, 176, 65, 0.15);
  color: #f5b041;
  border: 1px solid rgba(245, 176, 65, 0.3);
  font-family: var(--font-mono);
  font-weight: 600;
  transition: all .3s;
}
.cam-drift-badge.synced {
  background: rgba(240, 90, 26, 0.2);
  color: var(--lava-hot);
  border-color: var(--lava);
}

.tracks { display: grid; gap: 5px; }
.track {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: .65rem;
}
.track-label { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--alu); font-weight: 600; }

.lane {
  position: relative;
  height: 38px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255, 255, 255, 0.025) calc(10% - 1px) 10%),
    #0b0b0d;
  border: 1px solid #1e2025;
  border-radius: 5px;
  overflow: hidden;
}
.lane::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: var(--sync-x);
  width: 2px;
  margin-left: -1px;
  background: var(--lava);
  box-shadow: 0 0 14px 2px rgba(240, 90, 26, 0.8);
  opacity: 1;
  z-index: 5;
}

.clip {
  position: absolute;
  top: 3px; bottom: 3px;
  left: 10%;
  width: 80%;
  display: flex;
  align-items: center;
  padding: 0;
  background: linear-gradient(180deg, #1f2126, #141519);
  border: 1px solid #2b2e35;
  border-radius: 4px;
  transition: transform 0.6s var(--ease), border-color .4s;
}

.bar {
  flex: 1;
  height: var(--h, 30%);
  padding: 0 1px;
  background: #50545c;
  background-clip: content-box;
  border-radius: 1px;
}
.bar.spike {
  background-color: var(--lava-hot);
  height: 94%;
  box-shadow: 0 0 8px rgba(240, 90, 26, 0.6);
}

.rig-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--alu);
}
.rig-foot-left {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.sync-lock-indicator {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--lava);
}
.rig-metric strong { color: var(--alu-hi); }

/* ==========================================================================
   REVMATCH REVAMPED ARCHITECTURAL STYLES
   ========================================================================== */

.revmatch-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.revmatch-copy {
  display: flex;
  flex-direction: column;
}

.revmatch-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s var(--ease);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

/* Pipeline / How It Works */
.section-pipeline {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pipeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.pipeline-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.pipeline-step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lava);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.pipeline-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.pipeline-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Timeline Sandbox & Visualizer */
.section-sandbox {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sandbox-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.sandbox-header {
  padding: 1.25rem 1.75rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.sandbox-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sandbox-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.sandbox-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.sandbox-btn.active {
  background: var(--lava);
  border-color: var(--lava);
  color: #fff;
}

.sandbox-workspace {
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.timeline-view {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.timeline-track-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.timeline-track-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--alu);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-track-lane {
  position: relative;
  height: 32px;
  background: #111317;
  border: 1px solid #20232a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.timeline-block {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
}

.block-v1 {
  left: 0%;
  width: 90%;
  background: rgba(240, 90, 26, 0.2);
  border: 1px solid var(--lava);
  color: var(--lava-hot);
}

.block-v2 {
  left: 8%;
  width: 85%;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

.block-v3 {
  left: 3%;
  width: 92%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.block-v4 {
  left: 12%;
  width: 80%;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid #a855f7;
  color: #d8b4fe;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 38%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  z-index: 10;
}

.xml-preview-box {
  background: #060709;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.xml-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.xml-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: #9da3af;
  overflow-x: auto;
  white-space: pre;
}

.xml-code .kw { color: #f05a1a; }
.xml-code .tag { color: #3b82f6; }
.xml-code .attr { color: #10b981; }
.xml-code .str { color: #f59e0b; }

/* Specs / Capabilities Grid */
.section-specs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.spec-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.spec-icon-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--lava);
  background: var(--lava-subtle);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.85rem;
}

.spec-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.spec-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Mobile responsive adjustments for RevMatch */
@media (max-width: 992px) {
  .revmatch-hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .sandbox-workspace {
    grid-template-columns: 1fr;
  }

  .pipeline-grid, .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cams-viewports {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .track {
    grid-template-columns: 4.5rem 1fr !important;
  }
  
  .track-label {
    font-size: 0.55rem !important;
  }
  
  .rig {
    padding: 1rem 0.75rem !important;
  }
  
  .rig-head {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-track-row {
    grid-template-columns: 4rem 1fr;
  }
}
