/* ============================================
   E.J. DAVIES INC. — DESIGN SYSTEM
   Heavy Transport | Industrial Premium
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,900;1,300;1,400&family=Barlow+Condensed:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --black:       #0a0a0a;
  --dark:        #111111;
  --charcoal:    #1a1a1a;
  --steel:       #2a2a2a;
  --iron:        #3d3d3d;
  --grey:        #888888;
  --silver:      #c0c0c0;
  --white:       #f5f0eb;
  --gold:        #d4a843;
  --gold-light:  #e8c060;
  --gold-dark:   #a07820;
  --amber:       #e8841a;
  --danger:      #c0392b;

  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-cond:    'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;

  --nav-h: 80px;
  --radius: 4px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-gold: 0 0 30px rgba(212, 168, 67, 0.3);
}

/* ── Light Theme ── */
[data-theme="light"] {
  --black:    #f0ebe4;
  --dark:     #e8e2da;
  --charcoal: #ddd7ce;
  --steel:    #c8c0b4;
  --iron:     #a89e90;
  --grey:     #6b6058;
  --silver:   #3d3530;
  --white:    #1a1410;
  --gold:        #a07820;
  --gold-light:  #c09030;
  --gold-dark:   #7a5c10;
}
[data-theme="light"] body {
  background: var(--black);
  color: var(--white);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(240, 235, 228, 0.96);
}
[data-theme="light"] .nav-mobile {
  background: rgba(240, 235, 228, 0.98);
}
[data-theme="light"] body::before { opacity: 0.15; }
[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse at 20% 50%, rgba(160,120,32,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(160,120,32,0.05) 0%, transparent 50%),
              var(--black);
}
[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
[data-theme="light"] .map-strip {
  background: var(--dark);
}
[data-theme="light"] .map-strip::before {
  background-image:
    linear-gradient(rgba(160,120,32,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160,120,32,0.06) 1px, transparent 1px);
}

/* ── Theme Toggle Button ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  cursor: none;
  flex-shrink: 0;
}

.theme-toggle-track {
  display: flex;
  align-items: center;
  width: 52px;
  height: 26px;
  background: var(--steel);
  border: 1px solid var(--iron);
  border-radius: 999px;
  position: relative;
  transition: background 0.35s, border-color 0.35s;
  overflow: hidden;
}

.theme-toggle:hover .theme-toggle-track {
  border-color: var(--gold);
  background: rgba(212,168,67,0.15);
}

.theme-toggle-thumb {
  position: absolute;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
  color: var(--black);
}

/* Dark mode = moon visible (default state, thumb left) */
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* Light mode = sun visible, thumb slides right */
[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(26px);
  background: var(--gold);
  color: #fff;
}
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* subtle glow on light mode thumb */
[data-theme="light"] .theme-toggle-track {
  background: rgba(160,120,32,0.18);
  border-color: var(--gold);
}

/* Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* ── Custom Cursor ── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(212, 168, 67, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s, transform 0.1s, border-color 0.2s;
}
.cursor.active { width: 18px; height: 18px; }
.cursor-ring.active { width: 60px; height: 60px; border-color: var(--gold); }

/* ── Noise Texture Overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.4;
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.96);
  border-bottom-color: rgba(212, 168, 67, 0.2);
  backdrop-filter: blur(12px);
}
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.nav-logo .logo-main {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--white);
  transition: color var(--transition);
}
.nav-logo .logo-sub {
  font-family: var(--font-cond);
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}
.nav-logo:hover .logo-main { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-family: var(--font-cond);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  font-family: var(--font-cond);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold) !important; color: var(--black) !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: none;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.nav-mobile {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(10, 10, 10, 0.98);
  border-bottom: 1px solid rgba(212, 168, 67, 0.3);
  padding: 2rem 5vw;
  z-index: 999;
  transform: translateY(-110%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
}
.nav-mobile.open { transform: translateY(0); }
.nav-mobile a {
  display: block;
  font-family: var(--font-cond);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--transition), padding-left var(--transition);
}
.nav-mobile a:hover { color: var(--gold); padding-left: 0.5rem; }

/* ── Page Wrapper ── */
main { padding-top: var(--nav-h); }

/* ── Section Base ── */
.section {
  padding: 6rem 5vw;
}
.section-sm { padding: 4rem 5vw; }

/* ── Gold Divider ── */
.gold-line {
  display: inline-block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  margin-bottom: 1.2rem;
}

/* ── Section Labels ── */
.section-label {
  font-family: var(--font-cond);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--gold);
}

/* ── Headings ── */
.h-display {
  font-family: var(--font-display);
  line-height: 0.92;
  letter-spacing: 0.02em;
}
.h-cond {
  font-family: var(--font-cond);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-cond);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.btn:hover::before { transform: translateX(0); }

.btn-gold {
  background: var(--gold);
  color: var(--black);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,168,67,0.4);
}
.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
}
.btn-white {
  background: var(--white);
  color: var(--black);
}
.btn-white:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,168,67,0.3);
}
.btn svg, .btn-arrow::after {
  transition: transform 0.25s;
}
.btn-arrow::after {
  content: '→';
  font-size: 1rem;
  display: inline-block;
}
.btn-arrow:hover::after { transform: translateX(5px); }

/* ── Cards ── */
.card {
  background: var(--charcoal);
  border: 1px solid var(--steel);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,67,0.15);
}

/* ── Stats Strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--steel);
  border-bottom: 1px solid var(--steel);
}
.stat-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--steel);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-item:last-child { border-right: none; }
.stat-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.5s;
}
.stat-item:hover::before { transform: scaleX(1); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--gold);
  line-height: 1;
  display: block;
}
.stat-label {
  font-family: var(--font-cond);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 0.3rem;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  min-height: 38vh;
  display: flex;
  align-items: flex-end;
  padding: 4rem 5vw;
  position: relative;
  overflow: hidden;
  background: var(--dark);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,168,67,0.08) 0%, transparent 60%);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: grayscale(100%);
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
}

/* ── Marquee ── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--steel);
  border-bottom: 1px solid var(--steel);
  background: var(--charcoal);
  padding: 1rem 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 25s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-cond);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0 2.5rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.marquee-item .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Grid Utilities ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.container { max-width: 1300px; margin: 0 auto; }

/* ── Footer ── */
.footer {
  background: var(--dark);
  border-top: 1px solid var(--steel);
  padding: 4rem 5vw 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--steel);
}
.footer-brand .logo-main {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--white);
  display: block;
}
.footer-brand .logo-sub {
  font-family: var(--font-cond);
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.footer-title {
  font-family: var(--font-cond);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a {
  font-size: 0.88rem;
  color: var(--grey);
  transition: color var(--transition), padding-left var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-links a::before {
  content: '›';
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--transition);
}
.footer-links a:hover { color: var(--white); padding-left: 0.4rem; }
.footer-links a:hover::before { opacity: 1; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.88rem;
  color: var(--grey);
}
.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--gold);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--iron);
  font-family: var(--font-cond);
  letter-spacing: 0.1em;
}
.footer-union-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-cond);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212,168,67,0.3);
  padding: 0.4rem 0.8rem;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-family: var(--font-cond);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 0.5rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--charcoal);
  border: 1px solid var(--steel);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  border-radius: var(--radius);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { appearance: none; cursor: none; }

/* ── Tag / Badge ── */
.badge {
  display: inline-block;
  font-family: var(--font-cond);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  background: rgba(212,168,67,0.12);
  border: 1px solid rgba(212,168,67,0.3);
  color: var(--gold);
}

/* ── Utility ── */
.text-gold { color: var(--gold); }
.text-grey { color: var(--grey); }
.text-silver { color: var(--silver); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-h: 65px; }
  .section { padding: 4rem 5vw; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  .theme-toggle { cursor: pointer; }
}