:root {
  --bg-canvas: #13261d;
  --bg-surface: #1c3629;
  --bg-surface-elevated: #244434;
  --text-primary: #efe6d2;
  --text-muted: #c4b9a3;
  --accent-brass: #b8923a;
  --accent-brass-light: #d8af4e;
  --border-subtle: #2d5541;
  --border-brass: #b8923a;
  --shadow-brass: 0 14px 28px rgba(184, 146, 58, 0.12), 0 6px 12px rgba(0, 0, 0, 0.35);
  --font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Georgia, serif;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

img, svg, picture, video {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--accent-brass);
  color: #13261d;
  font-weight: 800;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  text-decoration: none;
  border: 1px solid #ffffff;
}
.skip-link:focus {
  top: 1rem;
}

a {
  color: var(--accent-brass-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
a:hover {
  color: #ffffff;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-brass-light);
  outline-offset: 3px;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION (Responsive across Mobile, Tablet, Desktop)
   ========================================================================== */
.site-header {
  position: relative;
  width: min(calc(100% - 2rem), 1240px);
  margin: 0.75rem auto 1.5rem auto;
  padding: 0.65rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0,0,0,0.4);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--accent-brass);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}
.nav-link {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
  padding: 0.35rem 0.2rem;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-brass-light);
}

.btn-inspect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-brass);
  border: 1px solid var(--accent-brass);
  border-radius: 0;
  padding: 0.45rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 40px;
}
.btn-inspect:hover {
  background: var(--accent-brass);
  color: #13261d;
  box-shadow: 0 0 12px rgba(184, 146, 58, 0.4);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  border-radius: 4px;
}

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

/* ==========================================================================
   LAYOUT CONTAINERS & HERO
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-condensed {
  padding: 1.75rem 0 2.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}
.hero-tagline {
  color: var(--accent-brass);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  max-width: 980px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.lead-para {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 780px;
}

/* ==========================================================================
   STEPPED SEQUENCE (HOME PAGE)
   ========================================================================== */
.stepped-sequence {
  position: relative;
  padding-left: 2.5rem;
}
.stepped-sequence::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 15px;
  bottom: 25px;
  width: 2px;
  background: var(--accent-brass);
  opacity: 0.65;
}

.step-item {
  position: relative;
  margin-bottom: 3.5rem;
}
.step-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--bg-canvas);
  border: 2px solid var(--accent-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-brass-light);
}

.card-elevated {
  background: var(--bg-surface);
  border-radius: 0;
  padding: 2rem;
  box-shadow: var(--shadow-brass);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.card-elevated:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(184, 146, 58, 0.18), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.step-numeral {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent-brass);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.step-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.card-split-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: start;
}
.card-split-body {
  min-width: 0;
}
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d1a13;
  border: 1px solid var(--border-subtle);
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.card-split-body p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.spec-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}
.spec-box {
  background: var(--bg-canvas);
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  min-width: 0;
}
.spec-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-brass);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spec-val {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ==========================================================================
   FEATURE TRIAD SECTION
   ========================================================================== */
.clip-section-poly {
  background: var(--bg-surface-elevated);
  clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
  padding: 4.5rem 0;
  margin: 3.5rem 0;
}
.clip-section-inner {
  padding: 1rem 0;
}

.grid-triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.card-accent-grid {
  background: var(--bg-surface);
  border-radius: 0;
  padding: 1.5rem;
  box-shadow: var(--shadow-brass);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-accent-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 1.25rem;
  background: #0f1f17;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.card-accent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-accent-grid h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.card-accent-grid p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ==========================================================================
   TABLES & DATA LOGS
   ========================================================================== */
.data-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  width: 100%;
  max-width: 100%;
}
.sharp-data-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
.sharp-data-table th, .sharp-data-table td {
  padding: 0.9rem 1.15rem;
  border-right: 1px solid var(--border-subtle);
}
.sharp-data-table th:last-child, .sharp-data-table td:last-child {
  border-right: none;
}
.sharp-data-table th {
  background: #112018;
  color: var(--accent-brass-light);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  border-bottom: 2px solid var(--accent-brass);
}
.sharp-data-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   FAQ STACK
   ========================================================================== */
.faq-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.faq-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-brass);
  padding: 1.5rem;
}
.faq-q {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}
.faq-a {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

/* ==========================================================================
   EDITORIAL & ARTICLE LAYOUT
   ========================================================================== */
.editorial-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  margin: 2.5rem 0;
  align-items: start;
}
.editorial-prose {
  min-width: 0;
}
.editorial-prose p {
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.editorial-prose h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 2rem 0 1rem 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.editorial-prose ul {
  padding-left: 1.25rem;
}
.sidebar-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
  min-width: 0;
}
.sidebar-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-brass);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}
.sidebar-list {
  list-style: none;
}
.sidebar-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
  overflow-wrap: break-word;
}
.sidebar-list li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   DISPATCH FORM TOOL (CONTACT)
   ========================================================================== */
.dispatch-tool {
  background: var(--bg-surface);
  border: 1px solid var(--border-brass);
  padding: 2rem;
  margin: 2rem 0;
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.form-group.full {
  grid-column: 1 / -1;
}
.form-group label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-brass);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  max-width: 100%;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  color: var(--text-primary);
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-brass);
}
.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.feedback-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #0d1912;
  border-left: 3px solid var(--accent-brass);
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: none;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
  overflow-x: auto;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #0c1812;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 100%;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: block;
  text-decoration: none;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  display: inline-block;
  padding: 0.15rem 0;
}
.footer-links a:hover {
  color: var(--accent-brass);
}
.footer-legal-bar {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
}

/* ==========================================================================
   MEDIA QUERIES FOR ADAPTIVE RESPONSIVENESS
   ========================================================================== */

/* Tablet & Smaller Desktop Screens (<= 980px) */
@media (max-width: 980px) {
  .site-header {
    width: calc(100% - 1.5rem);
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-brass);
    border-radius: 12px;
    padding: 1.25rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 14px 30px rgba(0,0,0,0.7);
    z-index: 1000;
  }
  .primary-nav.is-open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    width: 100%;
  }
  .nav-link {
    display: block;
    padding: 0.6rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .btn-inspect {
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .card-split-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .grid-triad {
    grid-template-columns: repeat(2, 1fr);
  }
  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .sidebar-panel {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Medium Tablets & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
  .stepped-sequence {
    padding-left: 2rem;
  }
  .stepped-sequence::before {
    left: 9px;
  }
  .step-marker {
    left: -2rem;
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }
  .card-elevated {
    padding: 1.5rem;
  }
  .spec-matrix {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .clip-section-poly {
    clip-path: none;
    padding: 3rem 0;
    margin: 2.5rem 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Phones & Small Screens (<= 640px) */
@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 1rem);
    padding: 0.5rem 1rem;
    border-radius: 12px;
  }
  .brand-name {
    font-size: 0.95rem;
  }
  .brand-mark {
    width: 12px;
    height: 12px;
  }
  .hero-condensed {
    padding: 1.5rem 0 2rem 0;
    margin-bottom: 2rem;
  }
  .hero-tagline {
    font-size: 0.75rem;
  }
  .stepped-sequence {
    padding-left: 1.5rem;
  }
  .stepped-sequence::before {
    left: 7px;
  }
  .step-marker {
    left: -1.5rem;
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
  }
  .card-elevated {
    padding: 1.25rem 1rem;
  }
  .spec-matrix {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .grid-triad {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .dispatch-tool {
    padding: 1.25rem 1rem;
    margin: 1.5rem 0;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn-inspect {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .footer-legal-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Narrow Handsets (<= 400px) */
@media (max-width: 400px) {
  .container {
    padding: 0 0.85rem;
  }
  .site-header {
    width: calc(100% - 0.75rem);
    padding: 0.45rem 0.75rem;
  }
  .brand-name {
    font-size: 0.85rem;
    letter-spacing: -0.01em;
  }
  .stepped-sequence {
    padding-left: 1.25rem;
  }
  .stepped-sequence::before {
    left: 5px;
  }
  .step-marker {
    left: -1.25rem;
    width: 16px;
    height: 16px;
    font-size: 0.5rem;
  }
  .card-elevated {
    padding: 1rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}