/* ============================================================
   SimmVanDesign — homepage showpiece layer
   Loaded on index.html on top of style.css
   ============================================================ */

:root {
  --yellow: #e8c33a;
  --graphite: #2b2e2b;
}

/* Lenis owns scrolling on this page. Native CSS smooth-scrolling must be OFF,
   otherwise the browser animates every frame Lenis writes and the two fight. */
html { scroll-behavior: auto !important; }

body.home { background: var(--cream); overflow-x: hidden; }

body.is-intro { overflow: hidden; }

/* GSAP owns these reveals; keep content visible if JS fails */
.no-js .g-hidden { opacity: 1 !important; transform: none !important; }

/* ---------- intro overlay ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0e100b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 26px;
}

.intro-badge { width: 150px; opacity: 0; transform: scale(1.6) rotate(-14deg); filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45)); }

.intro-line {
  font-family: var(--font-body);
  color: var(--sage-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0;
}

.intro.done { display: none; }

/* ---------- hero ---------- */

.hero-x {
  position: relative;
  height: calc(100svh - 71px); /* sticky nav sits above; keep the meta strip on the fold */
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
}

.hero-x .hx-bg {
  position: absolute;
  inset: -12% 0;
  z-index: -3;
  will-change: transform;
}

.hero-x .hx-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 44%;
  animation: kenburns 26s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.02); }
  to   { transform: scale(1.14) translateX(-1.5%); }
}

.hero-x::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 30% 96%, rgba(14,16,11,0.94) 0%, rgba(14,16,11,0.42) 46%, rgba(14,16,11,0.12) 72%),
    linear-gradient(to right, rgba(14,16,11,0.5), transparent 52%),
    linear-gradient(to bottom, rgba(14,16,11,0.5), transparent 26%);
}

#snow {
  position: absolute; inset: 0;
  z-index: -2;
  pointer-events: none;
}

.hx-content {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 90px;
  color: var(--paper);
}

.hx-eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 26px;
}

.hx-eyebrow::before { content: ""; width: 44px; height: 2px; background: var(--amber); }

.hx-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 6.5vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper);
  max-width: 15ch;
}

.hx-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 22px;
}

.hx-kicker::before {
  content: "";
  width: 42px; height: 1.5px;
  background: var(--amber);
  flex: none;
}

/* scroll cue */
.hx-cue {
  position: absolute;
  left: 50%; bottom: 74px;
  transform: translateX(-50%);
  color: var(--amber);
  opacity: 0.85;
  z-index: 2;
}
.hx-cue svg { width: 26px; height: 15px; animation: cue 2s ease-in-out infinite; }
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

.hx-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-top: 1px solid rgba(236, 231, 216, 0.22);
  background: rgba(13, 15, 10, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  gap: 14px 26px;
  flex-wrap: wrap;
  padding: 14px clamp(24px, 5vw, 60px);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(236, 231, 216, 0.75);
}

.hx-title .w { display: inline-block; }
.hx-title .wi { display: inline-block; }

.hx-sub {
  margin: 26px 0 38px;
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  max-width: 52ch;
  color: rgba(251,249,242,0.9);
}

.hx-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hx-badge {
  position: absolute;
  right: clamp(18px, 7vw, 110px);
  top: 13vh;
  width: clamp(110px, 15vw, 190px);
  z-index: 2;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,0.4));
  will-change: transform;
}

/* ---------- marquee ---------- */

.marquee {
  background: #0e100b;
  color: var(--paper);
  overflow: hidden;
  padding: 13px 0;
  border-top: 1px solid rgba(236,231,216,0.14);
  border-bottom: 1px solid rgba(236,231,216,0.14);
  position: relative;
  z-index: 5;
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee span {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  white-space: nowrap;
  padding-right: 30px;
}

.marquee .dot { color: var(--amber); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- our story (pinned chapter deck) ---------- */

.story {
  background: var(--night, #131610);
  border-bottom: 1px solid rgba(236, 231, 216, 0.12);
}

.story-pin {
  min-height: min(760px, calc(100svh - 71px));
  display: flex;
  flex-direction: column;
}

/* autoplay progress: active segment fills over the rotation interval */
.st-seg i { transition: none; }
.st-seg.is-running i { transition: width 5.2s linear; }

.story-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 0;
}

.story-media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.sm-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.sm-img.is-active { opacity: 1; transform: scale(1); }

.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 62%, rgba(19, 22, 16, 0.85) 100%);
}

.story-panel {
  position: relative;
  padding: clamp(40px, 6vw, 90px);
  display: flex;
  align-items: center;
}

.story-ch { max-width: 54ch; }

.story-ch h2 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); margin-bottom: 20px; }

.story-copy {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  font-weight: 600;
  color: var(--bone-dim);
}

.story-copy em { font-style: normal; color: var(--amber); }

/* deck mode (JS): chapters stack + fade */
.story.is-deck .story-panel { min-height: 380px; }
.story.is-deck .story-ch {
  position: absolute;
  top: 50%;
  left: clamp(40px, 6vw, 90px);
  right: clamp(40px, 6vw, 90px);
  transform: translateY(calc(-50% + 26px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.story.is-deck .story-ch.is-active {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

/* timeline */
.story-timeline {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px clamp(24px, 5vw, 60px) 26px;
  border-top: 1px solid rgba(236, 231, 216, 0.14);
  background: #0e100b;
}

.st-item { display: flex; flex-direction: column; gap: 3px; flex: none; }

.st-item .num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(236, 231, 216, 0.4);
}

.st-item .lbl {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(236, 231, 216, 0.45);
  transition: color 0.4s ease;
}

.st-item.is-active .num { color: var(--amber); }
.st-item.is-active .lbl { color: var(--paper); }

.st-seg { flex: 1; height: 2px; background: rgba(236, 231, 216, 0.14); position: relative; overflow: hidden; }
.st-seg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--amber); }


/* ---------- craft accordion (reference layout) ---------- */

.craft-x { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.craft-grid {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  min-height: min(820px, 92svh);
}

.craft-left {
  padding: clamp(48px, 6vw, 96px) clamp(28px, 4.5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.craft-left h2 { margin: 0 0 34px; max-width: 14ch; }

.craft-list { border-top: 1px solid rgba(236, 231, 216, 0.16); }

.craft-item { border-bottom: 1px solid rgba(236, 231, 216, 0.16); position: relative; }

.craft-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--amber);
  transform: scaleY(0);
  transition: transform 0.35s ease;
}

.craft-item.is-open::before { transform: scaleY(1); }

.ci-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 6px 20px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease;
}

.craft-item:not(.is-open) .ci-head:hover { background: rgba(236, 231, 216, 0.05); }
.craft-item:not(.is-open) .ci-head:hover .ci-title { color: var(--paper); }
.craft-item:not(.is-open) .ci-head:hover .ci-num { color: var(--amber-soft); }
.craft-item:not(.is-open) .ci-head:hover .ci-dash { width: 18px; }

.ci-chev {
  width: 15px; height: 15px;
  flex: none;
  margin-right: 12px;
  color: rgba(236, 231, 216, 0.45);
  transition: transform 0.35s ease, color 0.25s ease;
}
.ci-head:hover .ci-chev { color: var(--amber); }
.craft-item.is-open .ci-chev { transform: rotate(180deg); color: var(--amber); }

.ci-num {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(236, 231, 216, 0.45);
  transition: color 0.3s ease;
}

.ci-dash { width: 0; height: 1.5px; background: var(--amber); transition: width 0.35s ease; }
.craft-item.is-open .ci-dash { width: 30px; }

.ci-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(236, 231, 216, 0.62);
  transition: color 0.3s ease;
  flex: 1;
}

.craft-item.is-open .ci-num, .craft-item.is-open .ci-title { color: var(--amber); }
.craft-item.is-open .ci-title { color: var(--paper); }
.craft-item.is-open .ci-num { color: var(--amber); }

.ci-icon { width: 30px; height: 30px; flex: none; opacity: 0; transition: opacity 0.3s ease; }
.ci-icon :is(path, circle, rect) { stroke: var(--amber); }
.craft-item.is-open .ci-icon { opacity: 1; }

.ci-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.4s ease;
  opacity: 0;
}

.craft-item.is-open .ci-body { max-height: 200px; opacity: 1; }

.ci-body p {
  padding: 0 46px 22px 74px;
  font-size: 0.98rem;
  color: var(--bone-dim);
  max-width: 52ch;
}

.craft-right { position: relative; min-height: 380px; }

.craft-media { position: absolute; inset: 0; margin: 0; }

.craft-media img { width: 100%; height: 100%; object-fit: cover; }

.craft-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(19, 22, 16, 0.55), transparent 34%);
}

.craft-corner {
  position: absolute;
  left: 26px; bottom: 26px;
  width: 68px; height: 68px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  z-index: 2;
}

.craft-count {
  position: absolute;
  right: 26px; bottom: 22px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(236, 231, 216, 0.75);
  z-index: 2;
}

.craft-count b { color: var(--amber); font-weight: 700; }

@media (max-width: 940px) {
  .craft-grid { grid-template-columns: 1fr; }
  .craft-right { min-height: 46svh; order: -1; }
  .craft-media { position: relative; inset: auto; height: 100%; }
}


/* ---------- build log preview: shop-and-road backdrop ---------- */

#log-preview {
  background: #131610 url("/assets/img/log-bg.jpg?v=4") center / cover no-repeat;
}

#log-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, #131610 0%, rgba(19, 22, 16, 0.35) 22%, rgba(19, 22, 16, 0.35) 78%, #131610 100%);
}

#log-preview { position: relative; }
#log-preview .wrap { position: relative; z-index: 1; }

/* ---------- supply section dressing ---------- */

.supply { position: relative; overflow: hidden; }

.supply-scene {
  position: absolute;
  top: 0; right: 0;
  width: min(56%, 780px);
  height: min(52%, 430px);
  background: url("/assets/img/merch/supply-bg.jpg?v=4") right center / cover no-repeat;
  pointer-events: none;
}

.supply-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to left, rgba(23, 26, 18, 0) 30%, #171a12 96%),
    linear-gradient(to bottom, rgba(23, 26, 18, 0.25), #171a12 94%);
}

.supply .wrap { position: relative; z-index: 1; }

.m-counter {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--amber-soft);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

.merch-card.is-first { border-color: rgba(217, 140, 63, 0.55); }

.merch-media { position: relative; }
.merch-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.merch-card:hover .merch-media img { transform: scale(1.05); }

.supply-indicator {
  height: 2px;
  background: rgba(236, 231, 216, 0.14);
  margin-top: 44px;
  position: relative;
  overflow: hidden;
}

.supply-indicator i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 24%;
  background: var(--amber);
  animation: indicator-drift 7s ease-in-out infinite alternate;
}

@keyframes indicator-drift { to { transform: translateX(316%); } }

@media (max-width: 940px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-media { min-height: 40svh; }
  .story.is-deck .story-panel { min-height: 460px; }
  .st-item .lbl { display: none; }
  .supply-scene { width: 100%; height: 38%; opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .supply-indicator i { animation: none; }
  .sm-img, .story.is-deck .story-ch { transition: none; }
}

/* ---------- rigs (tilt cards) ---------- */

.rigs-x { padding: 16vh 0; }

.tilt-wrap { perspective: 1100px; }

.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.3s ease;
}

.tilt .card-body, .tilt .rig-media { transform: translateZ(0); }

.tilt:hover { box-shadow: 14px 18px 0 rgba(51,61,40,0.18); }

.rig-media .shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.22) 48%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.tilt:hover .rig-media .shine { animation: shine 0.9s ease; }

@keyframes shine { to { transform: translateX(120%); } }

/* ---------- craft icons draw ---------- */

.craft svg path, .craft svg circle, .craft svg rect { stroke-dasharray: 240; }

/* ---------- CTA ---------- */

.cta-x {
  position: relative;
  background: var(--basalt, #1a1d16);
  color: var(--paper);
  text-align: center;
  padding: 18vh 0;
  overflow: hidden;
}

.cta-x h2 {
  color: var(--paper);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
  max-width: 14ch;
  margin: 0 auto;
}

.cta-x .sub { max-width: 52ch; margin: 24px auto 44px; color: rgba(244,240,228,0.85); font-size: 1.1rem; }

.orbit {
  position: relative;
  width: 190px; height: 190px;
  margin: 0 auto 40px;
}

.orbit img { position: absolute; inset: 24%; width: 52%; }

.orbit svg { position: absolute; inset: 0; animation: spin 24s linear infinite; }

.orbit svg text {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.32em;
  fill: var(--amber-soft);
  text-transform: uppercase;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* topo drift inside pine sections */
.cta-x::before {
  content: "";
  position: absolute; inset: -40%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23f4f0e4' stroke-opacity='0.05' stroke-width='1.4'%3E%3Cpath d='M0 320 Q 90 260 180 300 T 420 280'/%3E%3Cpath d='M0 350 Q 100 290 200 330 T 420 310'/%3E%3Cpath d='M0 380 Q 110 320 220 360 T 420 340'/%3E%3Cpath d='M60 0 Q 140 60 100 150 T 160 320'/%3E%3Cpath d='M300 0 Q 260 90 320 160 T 300 300'/%3E%3C/g%3E%3C/svg%3E");
  animation: drift 60s linear infinite;
}

@keyframes drift { to { transform: translate(420px, 420px); } }

/* ---------- footer marquee ---------- */

.foot-marquee {
  background: var(--ink);
  overflow: hidden;
  padding: 30px 0 6px;
}

.foot-marquee .marquee-track { animation-duration: 40s; }

.foot-marquee span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244,240,228,0.22);
  white-space: nowrap;
  padding-right: 40px;
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 34px 20px; }
  .journey-pin { height: auto; min-height: 100svh; }
}

@media (max-width: 640px) {
  .hx-badge { top: 10vh; width: 96px; }
  .jstop { width: 130px; }
  .jstop .t { font-size: 0.85rem; }
  .jstop .d { display: none; }
  .jvan { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-x .hx-bg img, .marquee-track, .orbit svg, .cta-x::before, .hx-scrollcue .wheel { animation: none !important; }
  .manifesto .mw { color: var(--pine); }
  .intro { display: none !important; }
}
