/* =====================================================
   CARBON VANS — Rivian-Inspired Design System
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Bebas+Neue&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #0a0a0a;
  --off-black:  #111111;
  --dark-grey:  #1a1a1a;
  --mid-grey:   #333333;
  --light-grey: #888888;
  --white:      #ffffff;
  --off-white:  #f0ede8;
  --accent:     #a8d080;   /* earthy green — adventure accent */
  --accent-dim: rgba(168, 208, 128, 0.15);

  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-height: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --max-width: 1400px;
  --gutter: clamp(24px, 4vw, 80px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--mid-grey); border-radius: 2px; }

/* =====================================================
   NAVIGATION
   ===================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 55px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--white);
  color: var(--black) !important;
  padding: 10px 22px;
  border-radius: 2px;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--black) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  z-index: 999;
  padding: 40px var(--gutter);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-drawer a {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 44px);
  letter-spacing: 0.04em;
  color: var(--white);
  display: block;
  transition: color 0.2s;
}

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

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) clamp(48px, 8vw, 96px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: scale(1.06);
  transition: transform 8s ease-out;
}

.hero-bg.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.4) 40%,
    rgba(0,0,0,0.15) 70%,
    rgba(0,0,0,0.05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s var(--ease-out) 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease-out) 0.7s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease-out) 0.9s forwards;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: var(--gutter);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
}

.hero-scroll span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 2s ease-in-out 1.6s infinite;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--black);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  padding: 0;
  border-radius: 0;
  gap: 10px;
  letter-spacing: 0.1em;
}

.btn-ghost::after {
  content: '→';
  font-size: 16px;
  transition: transform 0.2s;
}

.btn-ghost:hover::after { transform: translateX(4px); }

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
  padding: var(--section-pad) var(--gutter);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 24px;
}

.section-body {
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  max-width: 600px;
}

/* Divider */
.divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 32px;
}

/* =====================================================
   FEATURE SPLIT — image left, text right (or reverse)
   ===================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
}

.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.split-image {
  position: relative;
  overflow: hidden;
  min-height: 480px;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.split-image:hover img { transform: scale(1.04); }

.split-content {
  background: var(--off-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 100px) clamp(40px, 5vw, 80px);
}

.split-content .section-body { max-width: 480px; }

/* =====================================================
   FULL-BLEED CINEMATIC SECTION
   ===================================================== */
.cinematic {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) clamp(48px, 6vw, 80px);
  overflow: hidden;
}

.cinematic-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 0.1s linear;
}

.cinematic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.05) 100%
  );
}

.cinematic-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

/* =====================================================
   STATS BAR
   ===================================================== */
.stats-bar {
  background: var(--dark-grey);
  border-top: 1px solid var(--mid-grey);
  border-bottom: 1px solid var(--mid-grey);
  padding: 48px var(--gutter);
}

.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  color: var(--white);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-top: 8px;
}

/* =====================================================
   CARD GRID
   ===================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.card:hover img { transform: scale(1.06); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .card-overlay { opacity: 1; }

.card-label {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.card:hover .card-label { opacity: 1; transform: translateY(0); }

/* =====================================================
   PROCESS STEPS
   ===================================================== */
.steps {
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60vh;
  counter-increment: step;
}

.step:nth-child(even) .step-image { order: 2; }
.step:nth-child(even) .step-content { order: 1; }

.step-image {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.step-image:hover img { transform: scale(1.04); }

.step-content {
  background: var(--off-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 100px) clamp(40px, 5vw, 80px);
  position: relative;
}

.step-number {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  color: rgba(255,255,255,0.05);
  position: absolute;
  top: 24px;
  right: 32px;
  pointer-events: none;
  user-select: none;
}

.step-number::before { content: "0" counter(step); }

.step-content .section-title { font-size: clamp(28px, 4vw, 52px); }

/* =====================================================
   GALLERY GRID
   ===================================================== */
.gallery-masonry {
  columns: 3;
  column-gap: 4px;
  padding: 0 var(--gutter) var(--section-pad);
  max-width: 100%;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 22px;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* =====================================================
   FORM
   ===================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-grey);
}

.form-control {
  background: var(--dark-grey);
  border: 1px solid var(--mid-grey);
  color: var(--white);
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.form-control::placeholder { color: var(--light-grey); }

.form-control:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.03);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

select.form-control { cursor: pointer; }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--off-black);
  border-top: 1px solid var(--mid-grey);
  padding: 80px var(--gutter) 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--mid-grey);
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--light-grey);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 28px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px; height: 40px;
  border: 1px solid var(--mid-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--light-grey);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}

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

.footer-links a {
  font-size: 14px;
  color: var(--light-grey);
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--light-grey);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 12px;
  color: var(--light-grey);
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--white); }

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =====================================================
   KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.3; }
}

/* =====================================================
   PAGE HERO (non-home pages)
   ===================================================== */
.page-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) 60px;
  overflow: hidden;
  margin-bottom: 0;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.65) 50%,
    rgba(0,0,0,0.45) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

/* =====================================================
   CONTACT PAGE
   ===================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  margin-bottom: 16px;
  color: var(--white);
}

.contact-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.contact-detail-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--mid-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-detail-text {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.contact-detail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 6px;
}

/* =====================================================
   WORD FLICKER
   ===================================================== */
.word-flicker {
  display: inline-block;
  color: var(--accent);
  min-width: 3ch;
  transition: opacity 0.05s;
}

.word-flicker.glitching {
  animation: glitch 0.06s steps(1) infinite;
}

@keyframes glitch {
  0%   { opacity: 1; }
  25%  { opacity: 0.2; }
  50%  { opacity: 1; }
  75%  { opacity: 0.4; }
  100% { opacity: 1; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-masonry { columns: 2; }
}

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

  .split,
  .step {
    grid-template-columns: 1fr;
  }

  .step:nth-child(even) .step-image { order: 0; }
  .step:nth-child(even) .step-content { order: 1; }

  .stats-grid { grid-template-columns: 1fr; gap: 32px; }

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

  .gallery-masonry { columns: 1; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
}
