/* =============================================
   TruckClearance — styles.css
   Aesthetic: Industrial utilitarian
   Palette: Asphalt dark + highway yellow + white
   Fonts: Barlow Condensed (headings) + Barlow (body)
   ============================================= */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --asphalt:      #1a1c1e;
  --asphalt-mid:  #242729;
  --asphalt-light:#2e3134;
  --yellow:       #f5c400;
  --yellow-dim:   #c49e00;
  --white:        #f0ede8;
  --white-dim:    #b0aca5;
  --danger:       #e03e3e;
  --safe:         #2e9e5b;
  --border:       rgba(245, 196, 0, 0.18);
  --font-head:    'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --radius:       4px;
  --max-w:        1180px;
  --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--asphalt);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER === */
.site-header {
  background: var(--asphalt);
  border-bottom: 2px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { display: none; } /* shown when image is provided */

.logo-fallback {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--white);
  text-transform: uppercase;
}
.logo-fallback.small { font-size: 1.1rem; }
.logo-fallback .accent { color: var(--yellow); }

.main-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.main-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color var(--transition);
}
.main-nav a:hover {
  color: var(--yellow);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 1.3rem;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--radius);
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26,28,30,0.95) 0%,
    rgba(26,28,30,0.7) 60%,
    rgba(26,28,30,0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  max-width: 720px;
}

.route-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.badge {
  background: var(--yellow);
  color: var(--asphalt);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 2px;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
h1 .accent { color: var(--yellow); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--white-dim);
  max-width: 560px;
  margin-bottom: 30px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  display: inline-block;
}

.btn-primary {
  background: var(--yellow);
  color: var(--asphalt);
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: #ffd700;
  border-color: #ffd700;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--yellow);
  border-color: var(--yellow);
}
.btn-secondary:hover {
  background: rgba(245,196,0,0.1);
  text-decoration: none;
}

/* === STATS BAR === */
.stats-bar {
  background: var(--yellow);
  padding: 18px 0;
}

.stats-inner {
  display: flex;
  gap: 0;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
}

.stat {
  text-align: center;
  padding: 0 16px;
}

.stat-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--asphalt);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--asphalt-mid);
  margin-top: 4px;
}

/* === SECTIONS === */
.section {
  padding: 72px 0;
}

.section-dark {
  background: var(--asphalt-mid);
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  display: block;
  width: 52px;
  height: 3px;
  background: var(--yellow);
  position: absolute;
  bottom: 0;
  left: 0;
}

.section-sub {
  color: var(--white-dim);
  margin-top: 18px;
  margin-bottom: 36px;
  max-width: 680px;
  line-height: 1.65;
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.filter-btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white-dim);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--yellow);
  color: var(--asphalt);
  border-color: var(--yellow);
}

/* === CORRIDOR HEADING === */
.corridor-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin: 44px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.corridor-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === ROUTE TAGS === */
.route-tag {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 2px;
}

.i75 { background: #1a4fa0; color: #fff; }
.i71 { background: #2e7d32; color: #fff; }

/* === STATION GRID === */
.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 20px;
}

/* === STATION CARD === */
.station-card {
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.station-card:hover {
  border-color: rgba(245,196,0,0.45);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.card-title-block h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 5px;
}

.card-location {
  font-size: 0.82rem;
  color: var(--white-dim);
  letter-spacing: 0.03em;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

/* === TAGS === */
.tag {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
}

.tag-prepass  { background: rgba(46,158,91,0.2);  color: #5dba81; border: 1px solid rgba(46,158,91,0.35); }
.tag-open     { background: rgba(46,158,91,0.15);  color: #5dba81; border: 1px solid rgba(46,158,91,0.3); }
.tag-limited  { background: rgba(245,196,0,0.15);  color: var(--yellow); border: 1px solid rgba(245,196,0,0.3); }
.tag-poe      { background: rgba(224,62,62,0.15);  color: #e87272; border: 1px solid rgba(224,62,62,0.3); }
.tag-nopre    { background: rgba(100,100,100,0.2); color: var(--white-dim); border: 1px solid rgba(150,150,150,0.2); }

/* === CARD BODY === */
.card-body { padding: 18px 20px; }

.card-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.detail-item { display: flex; flex-direction: column; gap: 2px; }

.detail-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
}

.detail-val {
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.55;
}

/* === INFO GRID === */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.info-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  line-height: 1;
}

.info-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.65;
}

/* === TABLE === */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.limits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.limits-table th {
  background: var(--asphalt-light);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--yellow);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 2px solid var(--yellow);
  white-space: nowrap;
}

.limits-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

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

.limits-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

.highlight-row td {
  background: rgba(224,62,62,0.06) !important;
  color: #e87272;
}

/* === PERMIT CALLOUT === */
.permit-callout {
  display: flex;
  gap: 20px;
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 24px;
  align-items: flex-start;
}

.callout-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }

.callout-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.callout-body p {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.65;
  margin-bottom: 10px;
}
.callout-body p:last-child { margin-bottom: 0; }

/* === CALCULATOR === */
.calculator-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.calc-form {
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.calc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.calc-row label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--yellow);
}

.calc-row input {
  background: var(--asphalt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
  width: 100%;
}

.calc-row input:focus {
  outline: none;
  border-color: var(--yellow);
}

.calc-btn { width: 100%; margin-top: 6px; }

.calc-result {
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-placeholder {
  color: var(--white-dim);
  font-size: 0.9rem;
  text-align: center;
}

.result-ok, .result-over { width: 100%; }

.result-icon { font-size: 2.2rem; margin-bottom: 12px; line-height: 1; }

.result-ok h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--safe);
  margin-bottom: 10px;
}

.result-over h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--danger);
  margin-bottom: 10px;
}

.result-ok p, .result-over p {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.6;
  margin-bottom: 8px;
}

.result-over ul {
  list-style: none;
  margin-bottom: 14px;
}

.result-over ul li {
  font-size: 0.88rem;
  color: #e87272;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.result-note {
  font-size: 0.82rem !important;
  color: var(--white-dim) !important;
  font-style: italic;
}

/* === FAQ === */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: var(--asphalt-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover { border-color: rgba(245,196,0,0.35); }

.faq-item summary {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--white);
  transition: color var(--transition);
}

.faq-item summary:hover { color: var(--yellow); }

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--yellow);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-body {
  padding: 0 20px 18px;
  border-top: 1px solid var(--border);
}

.faq-body p {
  font-size: 0.92rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-top: 14px;
}

/* === CORRIDOR REFERENCE === */
.corridor-ref {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.corridor-col h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.corridor-list {
  list-style: none;
  counter-reset: corridor;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.corridor-list li {
  counter-increment: corridor;
  padding: 11px 0 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--white-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.corridor-list li:last-child { border-bottom: none; }

.mm {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--yellow);
  white-space: nowrap;
}

/* === FOOTER === */
.site-footer {
  background: #111214;
  border-top: 2px solid var(--yellow);
  padding-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--white-dim);
  line-height: 1.65;
  margin-top: 14px;
  max-width: 320px;
}

.footer-links h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}

.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-links a {
  font-size: 0.88rem;
  color: var(--white-dim);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--yellow); text-decoration: none; }

.footer-bottom {
  background: rgba(0,0,0,0.3);
  padding: 18px 0;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--white-dim);
  line-height: 1.55;
  opacity: 0.7;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .station-grid { grid-template-columns: 1fr; }
  .calculator-wrap { grid-template-columns: 1fr; }
  .corridor-ref { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--asphalt);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    gap: 14px;
    z-index: 99;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }

  .info-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .permit-callout { flex-direction: column; }
  .hero { min-height: 380px; }
}

@media (max-width: 480px) {
  .stats-inner { gap: 8px; justify-content: center; }
  .stat { padding: 0 10px; }
  .card-header { flex-direction: column; }
}
