/* ============================================================
   NELRC.com — site styles. Built on the design-system tokens.
   ============================================================ */
@import url('../styles.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--brg-900);
  color: var(--cream-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--khaki-600); color: var(--ink-900); }

/* ---------- Shared bits ---------- */
.wrap { max-width: var(--container-xl); margin: 0 auto; padding: 0 var(--space-6); }
.wrap-md { max-width: var(--container-md); margin: 0 auto; padding: 0 var(--space-6); }

.stamp {
  font-family: var(--font-cond); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-stamp); font-size: 13px; color: var(--khaki-500);
  display: inline-flex; align-items: center; gap: 12px;
}
.stamp::before, .stamp.rules::after {
  content: ""; width: 30px; height: 1px; background: currentColor; opacity: .55;
}
.stamp.solo::before { display: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; margin: 0; line-height: 1.04; }
.serif { font-family: var(--font-serif); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 26px; font-family: var(--font-cond); font-weight: 600;
  font-size: 15px; letter-spacing: .07em; text-transform: uppercase; line-height: 1;
  border-radius: var(--radius-md); cursor: pointer; border: 2px solid transparent;
  transition: filter var(--dur) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.09); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brg-700); color: var(--cream-50); border-color: var(--brg-700); }
.btn-accent  { background: var(--khaki-600); color: var(--ink-900); border-color: var(--khaki-600); }
.btn-outline { background: transparent; color: var(--cream-50); border-color: var(--cream-300); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(14,36,25,0); transition: background var(--dur) var(--ease-standard), border-color var(--dur);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14,36,25,0.93); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-on-dark);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav-logo img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-cond); font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; font-size: 14px; padding: 8px 14px; color: var(--text-body);
  border-bottom: 2px solid transparent; transition: color var(--dur);
}
.nav-links a:hover { color: var(--cream-50); }
.nav-links a.active { color: var(--khaki-500); border-bottom-color: var(--khaki-500); }
.nav-toggle { display: none; }

/* ---------- Sections ---------- */
section { position: relative; }
.section-pad { padding: var(--space-9) 0; }
.eyebrow-block { margin-bottom: 36px; }
.h-lead { font-size: clamp(40px, 5vw, 60px); margin-top: 10px; line-height: 1.05; }
.eyebrow-block .h-lead { margin-bottom: 0; }

/* ---------- Reveal on scroll — content is ALWAYS visible (opacity:1) ----------
   The entrance only slides up; an un-revealed element is merely offset 24px,
   never invisible, so visibility never depends on JS/IO/frames running. */
.js .reveal { transform: translateY(24px); transition: transform .7s var(--ease-out); }
.js .reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transform: none; transition: none; } }

/* ============================================================
   PARALLAX TRAIL SCENE
   ============================================================ */
.hero {
  position: relative; height: 100vh; min-height: 640px; overflow: hidden;
  background: linear-gradient(180deg, #1d4b33 0%, #143a26 38%, #0e2a1c 100%);
}
.layer { position: absolute; left: 0; right: 0; bottom: 0; will-change: transform; pointer-events: none; }
.layer svg { display: block; width: 100%; height: auto; }

/* mist bands */
.mist { position: absolute; left: -5%; right: -5%; height: 200px; background: radial-gradient(ellipse at center, rgba(223,207,166,0.13), transparent 70%); filter: blur(8px); }

/* mud-on-the-lens canvas — splats fly in and streak down as you scroll */
.mud-screen { position: absolute; inset: 0; z-index: 15; pointer-events: none; }

/* ---------- Load screen (windshield wiper) ---------- */
.intro-lock, .intro-lock body { overflow: hidden; height: 100%; }
#loader { position: fixed; inset: 0; z-index: 9999; background: #0e2419; overflow: hidden; }
#loader canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#load-base { z-index: 1; }
#load-mud { z-index: 2; }
#load-wiper {
  position: absolute; left: 50%; bottom: -4%; width: 16px; height: 116%;
  transform: translateX(-50%); transform-origin: 50% 100%; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, #15150f, #34342a 45%, #15150f);
  border-radius: 8px 8px 3px 3px; box-shadow: 0 0 18px rgba(0,0,0,.5);
}
#load-wiper .blade-rubber {
  position: absolute; left: 50%; top: 0; bottom: 8%; width: 7px; transform: translateX(-50%);
  background: #0b0b08; border-radius: 6px;
}

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(11,28,18,.74); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card { position: relative; width: 100%; max-width: 460px; text-align: center;
  background: var(--brg-800); color: var(--cream-50); border: 1px solid var(--border-on-dark); border-top: 3px solid var(--khaki-600);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 40px 36px 34px; }
.modal-overlay.open .modal-card { animation: modalRise .32s var(--ease-out); }
@keyframes modalRise { from { transform: translateY(16px) scale(.97); } to { transform: none; } }
.modal-crest { height: 84px; margin-bottom: 14px; }
.modal-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--cream-50); margin: 8px 0 12px; }
.modal-card p { font-family: var(--font-serif); font-style: italic; font-size: 18px; line-height: 1.55; color: var(--text-body); margin: 0 0 24px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--text-muted); font-size: 30px; line-height: 1; cursor: pointer; padding: 4px 8px; transition: color .15s; }
.modal-close:hover { color: var(--cream-50); }

.hero-content {
  position: relative; z-index: 20; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  will-change: transform, opacity;
}
.hero-content .wrap { width: 100%; }
.hero-title { font-size: clamp(52px, 9vw, 116px); color: var(--cream-50); line-height: 0.96; text-shadow: 0 6px 30px rgba(0,0,0,.45); }
.hero-sub { font-family: var(--font-serif); font-style: italic; font-size: clamp(18px, 2.4vw, 26px); color: var(--khaki-300); max-width: 540px; margin: 22px 0 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 20;
  font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .2em; font-size: 11px;
  color: var(--text-body); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint .chev { width: 12px; height: 12px; border-right: 2px solid var(--khaki-500); border-bottom: 2px solid var(--khaki-500); transform: rotate(45deg); animation: bob 1.6s var(--ease-standard) infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0) rotate(45deg);} 50%{ transform: translateY(6px) rotate(45deg);} }

/* trail break divider — thin parallax forest band between sections */
.trail-break { position: relative; height: 260px; overflow: hidden; background: linear-gradient(180deg, var(--brg-900), var(--brg-800)); }
.trail-break .layer svg { opacity: .9; }

/* ---------- About ---------- */
.about { background: var(--cream-100); color: var(--ink-900); }
.about p { font-family: var(--font-sans); font-size: 18px; line-height: 1.72; color: var(--ink-800); max-width: 760px; margin: 0 0 20px; text-wrap: pretty; }
.about p em { font-style: italic; color: var(--mud-700); }
.about p strong { color: var(--brg-700); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-aside { background: var(--brg-800); color: var(--cream-50); border-radius: var(--radius-md); border-top: 3px solid var(--khaki-600); padding: 28px; box-shadow: var(--shadow-md); }
.about-aside h3 { font-size: 22px; margin-bottom: 14px; color: var(--cream-50); }
.about-aside .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-on-dark); font-family: var(--font-sans); font-size: 15px; }
.about-aside .row:last-child { border-bottom: 0; }
.about-aside .row span:first-child { color: var(--text-muted); font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.about-aside .row span:last-child { color: var(--khaki-300); font-weight: 600; white-space: nowrap; text-align: right; }

/* ---------- Gallery ---------- */
.gallery { background: var(--brg-900); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-grid .tile { position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4/3; background: var(--brg-800); }
.gallery-grid .tile.tall { grid-row: span 2; aspect-ratio: 4/6; }
.gallery-grid .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.gallery-grid .tile:hover img { transform: scale(1.06); }
.gallery-grid .tile::after { content:""; position:absolute; inset:0; background: var(--tint-green); opacity:0; transition: opacity .4s; }
.gallery-grid .tile:hover::after { opacity: 1; }

/* ---------- Events ---------- */
.events { background: var(--brg-800); }
.event-empty { border: 2px dashed var(--border-on-dark); border-radius: var(--radius-md); padding: 48px; text-align: center; }
.event-empty p { font-family: var(--font-serif); font-style: italic; font-size: 20px; color: var(--text-body); margin: 0 0 22px; }

/* ---------- Gear teaser ---------- */
.teaser { background: var(--mud-900); }
.teaser-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.teaser-grid .h-lead { margin-bottom: 18px; }
.teaser-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.teaser-thumbs .t { background: var(--cream-50); border-radius: var(--radius-md); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 18px; box-shadow: var(--shadow-md); }
.teaser-thumbs .t img { max-height: 100%; object-fit: contain; }

/* ---------- Quote band ---------- */
.quote-band { background: var(--ink-900); text-align: center; }
.quote-band .q { font-family: var(--font-serif); font-style: italic; font-size: clamp(28px, 4vw, 46px); color: var(--cream-50); line-height: 1.3; max-width: 900px; margin: 18px auto 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: var(--text-muted); padding: var(--space-8) 0 var(--space-6); border-top: 1px solid rgba(244,238,223,.1); }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; padding-bottom: var(--space-6); border-bottom: 1px solid rgba(244,238,223,.1); }
.footer-top img { height: 46px; margin-bottom: 16px; }
.footer-tag { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--khaki-300); max-width: 320px; margin: 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-cols h4 { font-family: var(--font-cond); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--khaki-500); margin: 0 0 12px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-cols a { font-size: 14px; color: var(--text-body); }
.footer-cols a:hover { color: var(--cream-50); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; flex-wrap: wrap; gap: 12px; }
.footer-bottom span { font-family: var(--font-cond); letter-spacing: .06em; font-size: 12.5px; text-transform: uppercase; }
.sponsor { display: inline-flex; align-items: center; gap: 8px; color: var(--khaki-500) !important; }

/* ---------- Page header (sub-pages) ---------- */
.page-head { position: relative; padding: 140px 0 60px; overflow: hidden; background: linear-gradient(180deg, #143a26, #0e2a1c); }
.page-head .layer svg { opacity: .8; }
.page-head .ph-inner { position: relative; z-index: 5; }
.page-head h1 { font-size: clamp(44px, 6vw, 76px); color: var(--cream-50); }
.page-head .lede { font-family: var(--font-serif); font-style: italic; font-size: clamp(18px, 2.2vw, 24px); color: var(--khaki-300); max-width: 720px; margin: 18px 0 0; line-height: 1.5; }

/* ---------- Products ---------- */
.products { background: var(--cream-100); }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product {
  display: flex; flex-direction: column; background: var(--cream-50);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md);
  border-top: 3px solid var(--khaki-600);
  transition: transform var(--dur) var(--ease-standard), box-shadow var(--dur) var(--ease-standard);
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img { background: #fff; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 24px; }
.product-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product .ptag { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--mud-600); }
.product h3 { font-size: 21px; color: var(--ink-900); line-height: 1.12; }
.product p { font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.55; color: var(--ink-400); margin: 0; flex: 1; text-wrap: pretty; }
.product .btn { margin-top: 4px; align-self: flex-start; }
.product-note { text-align: center; font-family: var(--font-sans); font-size: 13px; color: var(--ink-400); margin-top: 44px; }

@media (max-width: 900px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .products-grid { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .teaser-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .tile.tall { grid-row: span 1; aspect-ratio: 4/3; }
  .nav-links { position: fixed; inset: 76px 0 auto 0; flex-direction: column; background: rgba(14,36,25,.98); padding: 16px 24px 24px; gap: 2px; transform: translateY(-130%); transition: transform .3s var(--ease-standard); border-bottom: 1px solid var(--border-on-dark); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 0; width: 100%; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 26px; height: 2px; background: var(--cream-50); display: block; }
}
