/* ─── RESET & ROOT ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #0d0b14;
  --white:      #ffffff;
  --yellow:     #000000;   /* reference uses #bfee16 – replaced with black */
  --grey-1:     #f5f5f3;
  --grey-2:     #e8e8e6;
  --grey-3:     #c8c8c6;
  --grey-5:     #8a8a88;
  --grey-8:     #3a3a38;
  --font-pixel: lores-12, 'Space Mono', monospace;
  --font-main:  'Manrope', 'Helvetica Neue', sans-serif;
}

html {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  scroll-snap-type: y proximity; /* soft snap — assists without forcing */
}
body {
  min-height: 100%;
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  overflow-x: clip; /* clip instead of hidden — does NOT create a scroll container */
}

/* ─── NAV ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 56px;
  pointer-events: none; /* let clicks pass through the empty space */
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
  /* no background, no blur */
}
.logo {
  align-self: flex-start;
  margin-top: 14px;
}
.logo a {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  pointer-events: all;
}
.logo img {
  height: 64px;
  width: auto;
  filter: invert(1);
}
@font-face {
  font-family: 'Vegapunk';
  src: url('vegapunk-font/VegapunkFree-K7xJe.ttf') format('truetype'),
       url('vegapunk-font/VegapunkFree-2O8WX.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: all;
}

/* Corner-frame button — white text + frames by default, dims on hover */
.corner-btn {
  position: relative;
  padding: 9px 18px;
  background: transparent;
  border: none;
  font-family: 'Vegapunk', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, transform 0.1s ease;
}
.corner-btn:active { transform: scale(0.98); }

/* Corner frame — white L-brackets by default */
.corner-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: background-image 0s, opacity 0.25s ease;
  background-image:
    linear-gradient(to right,  #fff 1.5px, transparent 1.5px),
    linear-gradient(to right,  #fff 1.5px, transparent 1.5px),
    linear-gradient(to left,   #fff 1.5px, transparent 1.5px),
    linear-gradient(to left,   #fff 1.5px, transparent 1.5px),
    linear-gradient(to bottom, #fff 1.5px, transparent 1.5px),
    linear-gradient(to bottom, #fff 1.5px, transparent 1.5px),
    linear-gradient(to top,    #fff 1.5px, transparent 1.5px),
    linear-gradient(to top,    #fff 1.5px, transparent 1.5px);
  background-position:
    0 0, 0 100%, 100% 0, 100% 100%,
    0 0, 100% 0,  0 100%, 100% 100%;
  background-size: 14px 14px;
  background-repeat: no-repeat;
}

/* White corner frames layer — fades in on hover */
.corner-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background-image:
    linear-gradient(to right,  #fff 1.5px, transparent 1.5px),
    linear-gradient(to right,  #fff 1.5px, transparent 1.5px),
    linear-gradient(to left,   #fff 1.5px, transparent 1.5px),
    linear-gradient(to left,   #fff 1.5px, transparent 1.5px),
    linear-gradient(to bottom, #fff 1.5px, transparent 1.5px),
    linear-gradient(to bottom, #fff 1.5px, transparent 1.5px),
    linear-gradient(to top,    #fff 1.5px, transparent 1.5px),
    linear-gradient(to top,    #fff 1.5px, transparent 1.5px);
  background-position:
    0 0, 0 100%, 100% 0, 100% 100%,
    0 0, 100% 0,  0 100%, 100% 100%;
  background-size: 14px 14px;
  background-repeat: no-repeat;
}

.corner-btn:hover::before { opacity: 0.5; }
.corner-btn:hover::after  { opacity: 0; }
.corner-btn:hover { color: rgba(255,255,255,0.5); }

.corner-btn span {
  position: relative;
  z-index: 1;
}

.button-text { line-height: 1; }

/* ─── HERO / PRODUCT PRESENTATION STEP 1 ───────────────────── */
.product-presentation-step-1 {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
  scroll-snap-align: start;
}

.product-presentation-step-1 picture,
.product-presentation-step-1 img#hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* gradient so the product bar reads over the image */
.product-presentation-step-1::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    transparent 25%,
    transparent 45%,
    rgba(0,0,0,0.5) 100%
  );
  pointer-events: none;
}

/* ─── PRODUCT BAR (fixed bottom card) ───────────────────────── */
.custom-card.product-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  align-items: stretch;
  background: var(--white);
  color: var(--black);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  min-height: 72px;
  transition: border-radius 0.25s ease;
}

/* Column 1 – brand name + price */
.product-bar-column-1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 20px;
  min-width: 200px;
  border-right: 1px solid var(--grey-2);
}

.product-details-name {
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black);
}
.product-details-name span {
  display: block;
  font-size: 11px;
  opacity: 0.55;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.product-details-price {
  margin-top: 5px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--grey-5);
  letter-spacing: 0.04em;
}

/* Column 2 – colors (placeholder) */
.product-bar-column-2-3-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.product-bar-column-2 {
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  border-right: 1px solid var(--grey-2);
  min-width: 140px;
}

.product-details-colors {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-swatch-label {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-5);
  white-space: nowrap;
}

.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.color-dot.active,
.color-dot:hover { border-color: var(--black); }

/* Column 3 – size */
.product-bar-column-3 {
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  border-right: 1px solid var(--grey-2);
  min-width: 200px;
}

.product-details-sizes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.size-label {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-5);
  white-space: nowrap;
}

.custom-select-wrapper {
  position: relative;
}

.custom-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--grey-3);
  border-radius: 4px;
  padding: 6px 28px 6px 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--black);
  cursor: pointer;
  outline: none;
}

.custom-select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  pointer-events: none;
  color: var(--grey-5);
}

/* Column 4 – price + add to cart */
.product-bar-column-patches-4-wrapper {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.product-bar-column-4 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-details-button.add-to-cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow); /* was #bfee16, now black */
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 0 20px;
  height: 44px;
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.product-details-button.add-to-cart-button:hover { opacity: 0.8; }

/* ─── TEXT SCROLL SECTION ───────────────────────────────────── */
.index-text-scroll {
  background: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 40px;
}

.index-text-scroll-wrapper {
  max-width: 900px;
  text-align: center;
}

.big-text {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: clamp(24px, 3.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.85);
}

/* ─── SHOP POPUP ────────────────────────────────────────────── */
.shop-button-popup {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--white);
  color: var(--black);
  z-index: 450;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}
.shop-button-popup.open { transform: translateX(0); }

.grey-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--grey-2);
  font-family: var(--font-pixel);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#closeProductsPopup {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-family: var(--font-pixel);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#closeProductsPopup:hover { opacity: 1; }

.popup-product-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--grey-2);
  align-content: start;
}

.popup-product-grid-cell {
  background: var(--white);
  cursor: pointer;
}

.popup-product-grid-cell .--content--image {
  overflow: hidden;
}
.popup-product-grid-cell .--content--image img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.popup-product-grid-cell:hover .--content--image img {
  transform: scale(1.03);
}

.popup-product-grid-cell .--content--name {
  padding: 10px 14px 16px;
}
.popup-product-grid-cell .--content--name h3 {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.popup-product-grid-cell .--content--name h3 .first-word {
  display: block;
}
.popup-product-grid-cell .--content--name h3 .remaining-words {
  display: block;
  opacity: 0.5;
  font-size: 11px;
}

/* popup overlay */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 440;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
#popup-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── PIECE CARDS (exact reference method) ──────────────────── */

/* Each section is full-viewport, contains its own background + card */
/* ─── STACKED PIECE CARDS ──────────────────────────────────── */
/* Outer section is tall — gives the scroll distance for 2 transitions */
#pieces-section {
  height: 300vh;
  scroll-snap-align: start;
  position: relative;
  z-index: 2;           /* sits on top of footer until scrolled past */
  background: var(--black);
}

/* Stage is sticky — stays locked to the top of the viewport while
   the outer section scrolls. This is 100% reliable, no JS pinning. */
#pieces-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

#pieces-bg-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.piece-bg {
  position: absolute;
  inset: 0;
}
.piece-bg-1 { background: #1c2535; }
.piece-bg-2 { background: #1a1a1a; }
.piece-bg-3 { background: #141820; }

/* Cards sit at the bottom of the sticky stage, all stacked */
.explainer-wrapper {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  padding: 0 32px;
  will-change: transform;
}

/* The dark card itself – matches the Nivis screenshot aesthetic */
.piece-card {
  max-width: 1300px;
  margin: 0 auto;
  height: 60vh;
  min-height: 420px;
  background: #1a1c22;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 28fr 44fr 28fr;
  color: var(--white);
}

/* Col 1 – heading + brand label */
.pc-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 32px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.pc-left__heading {
  font-family: var(--font-main);
  font-size: clamp(26px, 3vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
}

.pc-left__brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc-left__brand-label {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
}

.pc-left__piece-num {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

/* Col 2 – image placeholder */
.pc-image {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252830;
}

.pc-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 14px;
}

.pc-image-placeholder svg { opacity: 0.18; }

.pc-image-placeholder span {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}

/* Col 3 – details */
.pc-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 32px;
  border-left: 1px solid rgba(255,255,255,0.08);
  gap: 14px;
}

.pc-details__name {
  font-family: var(--font-main);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pc-details__desc {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
}

.pc-details__price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.pc-details__price {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
}

.pc-details__stock {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
}

.pc-details__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-atc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-atc:hover { background: var(--grey-1); }

.btn-learn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 11px 20px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-learn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
}

@media (max-width: 900px) {
  .piece-card {
    grid-template-columns: 1fr;
    height: auto;
    min-height: unset;
  }
  .pc-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .pc-details { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
  .pc-image { min-height: 240px; }
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .showcase-product-slogan { border-right: none; border-bottom: 1px solid var(--grey-2); }
  .showcase-product-details { border-left: none; border-top: 1px solid var(--grey-2); }
  .showcase-product-image .placeholder-img { min-height: 260px; }
}

@media (max-width: 768px) {
  .pop-up-menu { display: none; }

  .custom-card.product-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .product-bar-column-1 {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--grey-2);
    min-width: unset;
  }

  .product-bar-column-2-3-wrapper {
    border-bottom: 1px solid var(--grey-2);
  }

  .product-bar-column-2 { border-right: none; }

  .product-bar-column-patches-4-wrapper {
    padding: 12px 16px;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .shop-button-popup { max-width: 100%; }
}

/* ─── STUB PAGE ─────────────────────────────────────────────── */
.stub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 80px 40px;
}

.stub-page__title {
  font-family: 'Vegapunk', monospace;
  font-size: clamp(32px, 6vw, 72px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
}

.stub-page__sub {
  font-family: var(--font-pixel);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}

/* ─── AUTH GATE ──────────────────────────────────────────────────────────── */

#site-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000; /* above everything, including the intro */
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

#auth-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

#auth-logo {
  width: 260px;
  height: auto;
  filter: invert(1);
}

#auth-tagline {
  font-family: var(--font-pixel);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.35);
}

#auth-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  caret-color: #fff;
  width: 180px;
  padding: 10px 0;
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.25em;
  outline: none;
  transition: border-color 0.2s;
}
#auth-input:focus {
  border-bottom-color: rgba(255,255,255,0.55);
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
.auth-shake { animation: auth-shake 0.4s ease; }

/* ─── SITE INTRO ─────────────────────────────────────────────────────────── */

#site-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#intro-bg {
  position: absolute;
  inset: 0;
}

#intro-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms ease;
}

#intro-logo-wrap {
  position: relative;
  z-index: 1;
  opacity: 0; /* entrance animation brings it in */
}

#intro-logo-wrap img {
  width: 95vw;        /* ← logo size in the intro; adjust to taste */
  height: auto;
  display: block;
  filter: invert(1);
}

/* ─────────────────────────────────────────────────────────────────────────
   LOGO ENTRANCE ANIMATIONS
   Uncomment exactly ONE option (A–E). Comment out all others.
   The active class is .intro-logo--enter, triggered by intro.js.
   ───────────────────────────────────────────────────────────────────────── */

/* ── OPTION A: Fade in ── (active by default) */
.intro-logo--enter {
  animation: intro-fadein 0.5s ease forwards;
}
@keyframes intro-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── OPTION B: Scale up from center
.intro-logo--enter {
  animation: intro-scalein 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes intro-scalein {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
*/

/* ── OPTION C: Slide up
.intro-logo--enter {
  animation: intro-slideup 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes intro-slideup {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
*/

/* ── OPTION D: Blur to sharp
.intro-logo--enter {
  animation: intro-blur 0.65s ease forwards;
}
@keyframes intro-blur {
  from { opacity: 0; filter: invert(1) blur(20px); }
  to   { opacity: 1; filter: invert(1) blur(0px); }
}
*/

/* ── OPTION E: Glitch flicker
.intro-logo--enter {
  animation: intro-flicker 0.45s steps(1) forwards;
}
@keyframes intro-flicker {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  35%  { opacity: 0; }
  55%  { opacity: 1; }
  70%  { opacity: 0; }
  88%  { opacity: 1; }
  100% { opacity: 1; }
}
*/

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 40px 0;
  gap: 60px;
}

/* Link columns */
.footer-links {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 80px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col__title {
  font-family: 'Vegapunk', monospace;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-col a {
  font-family: var(--font-main);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

/* Logo at bottom — video shows through letter shapes via multiply blend */
#footer-logo-wrap {
  position: relative;
  width: 50vw;
  height: calc(50vw * 172 / 585); /* SVG aspect ratio: 585×172 */
  overflow: hidden;
  z-index: 2;
  flex-shrink: 0;
}

#footer-logo-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

/* Black bg + white logo with multiply blend: black areas block video,
   white letter shapes let the video show through */
#footer-logo-knockout {
  position: absolute;
  inset: 0;
  background: #000;
  mix-blend-mode: multiply;
  display: flex;
  align-items: center;
  justify-content: center;
}

#footer-logo-knockout img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1); /* black SVG → white so multiply reveals video through letters */
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE  (≤ 768 px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ──────────────────────── */
#nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  pointer-events: all;
}
#nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #fff;
}

/* ── Full-screen mobile menu ───────────────────────────────────── */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { transform: translateX(0); }

#mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  pointer-events: all;
  padding: 8px;
  line-height: 1;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.mobile-menu-links a {
  font-family: 'Vegapunk', monospace;
  font-size: clamp(32px, 9vw, 52px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
}
.mobile-menu-links a:active { opacity: 0.5; }

/* ── Carousel position dots ────────────────────────────────────── */
#card-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 18px;
  background: var(--black);
}
.card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.25s;
}
.card-dot.active { background: #fff; }

@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav buttons */
  #nav-hamburger { display: flex; }
  .nav-buttons    { display: none;  }

  /* iOS viewport height fix — prevents address-bar resize jumps */
  .product-presentation-step-1 {
    height: 100vh;
    height: 100svh;
  }

  /* ── Cards: vertical scroll, background changes per card ───────── */
  #pieces-section {
    height: auto;
    scroll-snap-align: none; /* wrappers each snap individually */
    background: #1c2535;     /* card 1 colour — JS updates this */
    transition: background-color 0.5s ease;
  }

  #pieces-stage {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    display: block;
  }

  /* Hide absolute bg-crossfade layer — section bg-color handles it */
  #pieces-bg-container { display: none; }

  /* Each wrapper = one full-screen vertical panel */
  .explainer-wrapper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    will-change: auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: 72px 16px 40px;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .piece-card {
    width: 100%;
    height: auto;
    min-height: unset;
  }

  /* Tighter padding inside card columns on small screens */
  .pc-left    { padding: 20px; }
  .pc-details { padding: 20px; gap: 10px; }
  .pc-image   { min-height: 120px; }

  /* ── Footer ────────────────────────────────────────────────────── */
  #site-footer {
    padding: 48px 24px 0;
    gap: 36px;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 36px 48px;
    justify-content: center;
  }
  #footer-logo-wrap {
    width: 80vw;
    height: calc(80vw * 172 / 585);
  }
}
