/* ============================================
   BRUTALIST INDUSTRIAL — Custom Styles
   No radius. No shadows. No easing.
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #0A0A0A;
  --secondary: #1A1A1A;
  --accent: #FF4D00;
  --accent-alt: #0047FF;
  --bg: #F0EEE9;
  --surface: #FFFFFF;
  --text: #0A0A0A;
  --text-inv: #F0EEE9;
  --text-muted: #777777;
  --border: #0A0A0A;
  --grid-line: #CCCCCC;
}

/* --- Reset radius and shadows globally --- */
*, *::before, *::after {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* --- Base --- */
html {
  scroll-behavior: auto; /* No smooth scroll — brutalist */
}

body {
  font-family: 'Barlow Condensed', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* --- Grid Overlay --- */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent calc(100% / 12 - 1px),
      var(--grid-line) calc(100% / 12 - 1px),
      var(--grid-line) calc(100% / 12)
    );
  opacity: 0.15;
}

@media (max-width: 768px) {
  .grid-overlay {
    display: none;
  }
}

/* --- Typography --- */
.font-display {
  font-family: 'Space Mono', monospace;
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.font-h1 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  text-transform: uppercase;
}

.font-h2 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.125;
  font-weight: 700;
  text-transform: uppercase;
}

.font-h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  line-height: 28px;
  font-weight: 600;
  text-transform: uppercase;
}

.font-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  line-height: 14px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.font-body {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
}

.font-body-lg {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
}

.font-code {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

/* --- Structural Borders --- */
.border-structural {
  border: 1px solid var(--border);
}

.border-emphasis {
  border: 2px solid var(--border);
}

.border-section {
  border: 3px solid var(--border);
}

.border-b-structural {
  border-bottom: 1px solid var(--border);
}

.border-b-emphasis {
  border-bottom: 2px solid var(--border);
}

.border-b-section {
  border-bottom: 3px solid var(--border);
}

.border-t-section {
  border-top: 3px solid var(--border);
}

.border-r-structural {
  border-right: 1px solid var(--border);
}

.border-l-structural {
  border-left: 1px solid var(--border);
}

/* --- Inverted Surfaces --- */
.surface-inverted {
  background-color: var(--primary);
  color: var(--text-inv);
}

.surface-accent {
  background-color: var(--accent);
  color: var(--surface);
}

/* --- Buttons --- */
.btn-brutalist {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 32px;
  background-color: var(--primary);
  color: var(--text-inv);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 150ms linear;
  text-decoration: none;
}

.btn-brutalist:hover {
  background-color: var(--bg);
  color: var(--primary);
}

.btn-brutalist:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-brutalist-inv {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 32px;
  background-color: var(--bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 150ms linear;
  text-decoration: none;
}

.btn-brutalist-inv:hover {
  background-color: var(--primary);
  color: var(--text-inv);
}

/* --- Data Row --- */
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-row .data-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.data-row .data-value {
  font-weight: 700;
}

/* --- Stat Number --- */
.stat-number {
  font-family: 'Space Mono', monospace;
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

/* --- Tag Label --- */
.tag-label {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--border);
}

/* --- Index Number --- */
.index-number {
  font-family: 'Space Mono', monospace;
  font-size: clamp(60px, 8vw, 100px);
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
}

/* --- Image Placeholder --- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --- Screen Reader Only --- */
.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;
}

/* --- Nav Link Hover --- */
.nav-link {
  transition: all 150ms linear;
  text-decoration: none;
}

.nav-link:hover {
  background-color: var(--primary) !important;
  color: var(--text-inv) !important;
}

.nav-link-active {
  background-color: var(--primary);
  color: var(--text-inv);
}

/* --- Form Inputs --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  background-color: var(--surface);
  border: 2px solid var(--primary);
  padding: 12px 16px;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 150ms linear;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* --- Table Brutalist --- */
.table-brutalist {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.table-brutalist th {
  background-color: var(--primary);
  color: var(--text-inv);
  padding: 12px 16px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  border: 1px solid var(--primary);
}

.table-brutalist td {
  padding: 12px 16px;
  border: 1px solid var(--border);
}

.table-brutalist tr:nth-child(even) {
  background-color: var(--surface);
}

.table-brutalist tr:nth-child(odd) {
  background-color: var(--bg);
}

/* --- Mobile Nav Overlay --- */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  z-index: 9998;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

.mobile-nav-overlay.active {
  display: flex;
}

.mobile-nav-overlay a {
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-inv);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 150ms linear;
}

.mobile-nav-overlay a:hover {
  color: var(--accent);
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 9999;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  position: absolute;
  left: 0;
  transition: all 150ms linear;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.hamburger.active span {
  background-color: var(--text-inv);
}

.hamburger.active span:nth-child(1) {
  top: 10px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 10px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .desktop-nav {
    display: none;
  }
}

/* --- Scrollbar Brutalist --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
}

/* --- Selection --- */
::selection {
  background-color: var(--accent);
  color: var(--surface);
}
