/* ======================================================================
   skoffroad — styles
   palette: dirt, mud, headlight amber, forest accents
   ====================================================================== */

:root {
  --dirt-900: #0c0a09;
  --dirt-800: #1f1409;
  --dirt-700: #2b1d10;
  --dirt-600: #3a2a1c;
  --dirt-500: #4b3622;
  --mud-500:  #d97706;
  --mud-400:  #f59e0b;
  --mud-300:  #fbbf24;
  --headlight: #fef3c7;
  --moss:     #65a30d;
  --bone:     #fafaf9;
  --steel:    #a8a29e;
  --steel-d:  #57534e;

  --display: 'Bebas Neue', 'Impact', sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-hard: 0 12px 0 0 var(--dirt-900);
  --shadow-soft: 0 24px 60px -20px rgba(0,0,0,0.6);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone);
  background: var(--dirt-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* Subtle film grain across the whole page */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
  mix-blend-mode: overlay;
}

/* ============================ NAV ============================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 60px);
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(12, 10, 9, 0.75);
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--bone);
}
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.06em;
}

.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--steel); transition: color .15s ease; }
.nav-links a:hover { color: var(--mud-400); }
.nav-cta {
  padding: 8px 16px;
  border: 1.5px solid var(--mud-500);
  border-radius: 999px;
  color: var(--mud-400) !important;
}
.nav-cta:hover { background: var(--mud-500); color: var(--dirt-900) !important; }

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================ HERO ============================ */

.hero {
  position: relative;
  min-height: 92vh;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 60px) 240px;
  overflow: hidden;
  isolation: isolate;
}

.hero-sky {
  position: absolute; inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(245, 158, 11, 0.25), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(101, 163, 13, 0.12), transparent 60%),
    linear-gradient(180deg, #1a0f06 0%, #2b1d10 35%, #0c0a09 100%);
}

/* tiny stars */
.hero-sky::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 18%, var(--bone) 50%, transparent),
    radial-gradient(1px 1px at 65% 12%, var(--bone) 50%, transparent),
    radial-gradient(1px 1px at 82% 28%, var(--bone) 50%, transparent),
    radial-gradient(1px 1px at 14% 32%, var(--bone) 50%, transparent),
    radial-gradient(1.5px 1.5px at 48% 8%, var(--mud-300) 50%, transparent);
  opacity: 0.5;
}

.hero-mountains {
  position: absolute; left: 0; right: 0; bottom: 180px;
  z-index: -2;
  pointer-events: none;
}
.hero-mountains svg { display: block; width: 100%; height: 220px; }
.hero-mountains-near { bottom: 120px; z-index: -1; }
.hero-mountains-near svg { height: 240px; }

.hero-content {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mud-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  background: rgba(217, 119, 6, 0.08);
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  margin: 0 0 28px;
  text-transform: uppercase;
}
.hero-title .word {
  display: inline-block;
  background: linear-gradient(180deg, var(--bone) 0%, var(--mud-300) 60%, var(--mud-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 0 rgba(0,0,0,0.25);
  animation: wobble 6s ease-in-out infinite;
}
.hero-title .word:nth-child(2) { animation-delay: 0.5s; }

@keyframes wobble {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

.hero-tagline {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--steel);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-tagline .rust {
  color: var(--mud-400);
  font-weight: 700;
}

.hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
  border: none;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--mud-500);
  color: var(--dirt-900);
  box-shadow: 0 6px 0 0 #92400e, 0 14px 24px -10px rgba(217, 119, 6, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 0 #92400e, 0 18px 30px -10px rgba(217, 119, 6, 0.7);
  background: var(--mud-400);
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 0 #92400e; }

.btn-ghost {
  color: var(--bone);
  border: 1.5px solid var(--steel-d);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--mud-400); color: var(--mud-400); }

.hero-meta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  font-size: 14px;
  color: var(--steel);
}
.hero-meta strong { color: var(--mud-300); font-weight: 700; }
.hero-meta .dot { color: var(--steel-d); }

/* The bouncing jeep */
.hero-jeep {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(200px, 28vw, 360px);
  z-index: 1;
  filter: drop-shadow(0 18px 0 rgba(0,0,0,0.4));
  animation: bounce 1.2s ease-in-out infinite;
}
.hero-jeep svg { width: 100%; height: auto; display: block; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  50% { transform: translateX(-50%) translateY(-8px) rotate(1deg); }
}

.tire {
  transform-box: fill-box;
  transform-origin: center;
  animation: roll 0.6s linear infinite;
}
@keyframes roll {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

/* dust trail behind */
.dust {
  position: absolute;
  bottom: 6px;
  left: 4%;
  width: 30%;
  height: 26px;
  pointer-events: none;
}
.dust span {
  position: absolute;
  bottom: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(180, 140, 90, 0.35);
  filter: blur(2px);
  animation: puff 1.4s ease-out infinite;
}
.dust span:nth-child(1) { left: 0%;  animation-delay: 0.0s; }
.dust span:nth-child(2) { left: 18%; animation-delay: 0.2s; }
.dust span:nth-child(3) { left: 36%; animation-delay: 0.4s; }
.dust span:nth-child(4) { left: 54%; animation-delay: 0.6s; }
.dust span:nth-child(5) { left: 72%; animation-delay: 0.8s; }
@keyframes puff {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translate(-40px, -16px) scale(1.6); opacity: 0; }
}

/* mud splats decoration */
.mud-splat {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--mud-500), var(--dirt-700) 60%, transparent 75%);
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.splat-1 { width: 280px; height: 280px; top: 12%; left: -60px; transform: rotate(20deg); }
.splat-2 { width: 220px; height: 220px; top: 40%; right: -60px; transform: rotate(-30deg); }

/* ============================ SECTIONS ============================ */

.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 60px);
  z-index: 2;
}

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mud-400);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
  color: var(--bone);
}
.section-head p {
  color: var(--steel);
  font-size: clamp(15px, 1.4vw, 18px);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================ FEATURES ============================ */

.section-features {
  background: linear-gradient(180deg, var(--dirt-900) 0%, var(--dirt-800) 100%);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature {
  position: relative;
  padding: 28px 26px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(43, 29, 16, 0.6), rgba(31, 20, 9, 0.6));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 20px 40px -20px rgba(217, 119, 6, 0.3);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 14px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(217,119,6,0.35));
}
.feature h3 {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  color: var(--mud-300);
}
.feature p {
  margin: 0;
  color: var(--steel);
  font-size: 15px;
}

/* ============================ STACK ============================ */

.section-stack { background: var(--dirt-800); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}
.stack-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px;
  border: 1px solid var(--dirt-600);
  border-radius: var(--radius);
  background: var(--dirt-700);
  transition: transform .15s ease, border-color .15s ease;
}
.stack-card:hover { border-color: var(--mud-500); transform: translateY(-2px); }
.stack-version {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--moss);
  margin-bottom: 6px;
}
.stack-card strong {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--bone);
  margin-bottom: 4px;
}
.stack-card span:last-child { color: var(--steel); font-size: 13px; }

/* ============================ STATS ============================ */

.section-stats {
  background: linear-gradient(135deg, var(--mud-500) 0%, #b45309 100%);
  color: var(--dirt-900);
  padding: clamp(50px, 6vw, 80px) clamp(20px, 5vw, 60px);
  border-top: 4px solid var(--dirt-900);
  border-bottom: 4px solid var(--dirt-900);
  position: relative;
  overflow: hidden;
}
.section-stats::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 18px,
    rgba(0,0,0,0.06) 18px 24px
  );
  pointer-events: none;
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  color: var(--dirt-900);
  letter-spacing: 0.02em;
}
.stat-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dirt-700);
}

/* ============================ PLAY ============================ */

.section-play {
  background: var(--dirt-900);
}

.code-block {
  max-width: 760px;
  margin: 0 auto 60px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #161312;
  border: 1px solid var(--dirt-600);
  box-shadow: var(--shadow-soft);
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--dirt-700);
  border-bottom: 1px solid var(--dirt-600);
}
.code-head .dot {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
}
.code-head .dot-r { background: #ef4444; }
.code-head .dot-y { background: #facc15; }
.code-head .dot-g { background: #22c55e; }
.code-title {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--steel);
}
.code-block pre {
  margin: 0;
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--bone);
  overflow-x: auto;
}
.code-block .c { color: var(--moss); user-select: none; margin-right: 6px; }
.code-block .cm { color: var(--steel-d); }

.controls {
  max-width: 760px;
  margin: 0 auto;
}
.controls h3 {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.04em;
  margin: 0 0 24px;
  text-align: center;
  color: var(--mud-300);
}
.key-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.key-grid li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid var(--dirt-600);
  border-radius: 10px;
  background: var(--dirt-800);
}
.key-grid li span {
  margin-left: auto;
  color: var(--steel);
  font-size: 14px;
}
kbd {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
  background: var(--dirt-700);
  border: 1px solid var(--dirt-500);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--mud-300);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* ============================ CTA ============================ */

.section-cta {
  background: var(--dirt-900);
  padding-top: 0;
}
.cta-card {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.3), transparent 50%),
    linear-gradient(135deg, var(--dirt-700), var(--dirt-800));
  border: 1px solid var(--dirt-600);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--mud-400), transparent 70%);
  opacity: 0.4;
}
.cta-card h2 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 60px);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.cta-card p {
  color: var(--steel);
  font-size: 16px;
  margin: 0 0 30px;
}
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================ FOOTER ============================ */

.footer {
  background: var(--dirt-900);
  border-top: 1px solid var(--dirt-700);
  padding: 40px clamp(20px, 5vw, 60px);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  gap: 28px;
  align-items: center;
}
.footer-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--bone);
}
.footer-brand span { color: var(--steel-d); font-size: 13px; }

.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 14px;
}
.footer-links a {
  color: var(--steel);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--mud-400); }

.footer-meta {
  font-size: 13px;
  color: var(--steel-d);
  text-align: right;
}
.footer-meta a { color: var(--mud-400); text-decoration: none; }

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-meta { text-align: center; }
  .footer-links { justify-content: center; }
}

/* ============================ MOTION RESPECT ============================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
