/* ==========================================================================
   SECTIONS — cinematic scroll, product grid, 3D showcase, collections, story
   ========================================================================== */

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 64px; flex-wrap: wrap; }
.section-head h2 { max-width: 16ch; }
.section-head .text-lede { margin-bottom: 4px; }

/* ---------------------------- Cinematic scroll stage ---------------------------- */
.cinema {
  position: relative;
  height: 380vh; /* pinned scroll runway */
}
.cinema-stage {
  /* No `position: sticky` here on purpose — GSAP ScrollTrigger's `pin`
     option (see cinema3d.js) fully controls this element's position while
     scrolling. Mixing native CSS sticky with GSAP-driven pinning on the
     same element confuses ScrollTrigger's internal measurements and can
     make the whole scroll range collapse to its end state immediately. */
  position: relative; height: 100vh; overflow: hidden;
  display: flex; align-items: center;
  background: var(--bg-0);
}
#cinema-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cinema-caption {
  position: absolute; inset: 0; z-index: 2; width: 100%;
  display: flex; align-items: center; pointer-events: none; opacity: 0;
}
.cinema-caption[data-step="1"] { opacity: 1; }
.cinema-caption .container { display: flex; flex-direction: column; gap: 10px; }
.cinema-index {
  font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase;
}
.cinema-line {
  font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 4rem); font-weight: 600;
  max-width: 20ch; margin: 0;
}

/* ---------------------------- Product grid ---------------------------- */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  position: relative; border-radius: var(--radius-m); overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--line);
  transition: border-color .4s ease, transform .5s var(--ease-out);
}
.product-card:hover { border-color: var(--line-strong); transform: translateY(-6px); }

.product-card .badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--gold); color: #14120c; padding: 5px 10px; border-radius: 999px;
}
.product-card .wish-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: rgba(8,9,11,0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; color: var(--text-1);
  transition: color .3s ease, border-color .3s ease;
}
.product-card .wish-btn:hover, .product-card .wish-btn.is-active { color: var(--gold); border-color: var(--gold); }

.product-media { position: relative; aspect-ratio: 4/3.3; overflow: hidden; background: var(--bg-2); }
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .6s var(--ease-in-out), transform 1s var(--ease-out);
}
.product-media img.img-b { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .product-media img.img-a { opacity: 0; transform: scale(1.06); }
.product-card:hover .product-media img.img-b { opacity: 1; transform: scale(1.06); }

.product-body { padding: 22px 22px 24px; }
.product-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.product-name { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin-top: 8px; }
.product-price { font-family: var(--font-mono); font-size: 15px; color: var(--gold); margin-top: 6px; }

.swatch-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.swatch {
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer; transition: transform .25s var(--ease-out), border-color .25s ease;
}
.swatch:hover, .swatch.is-active { transform: scale(1.18); border-color: var(--text-0); }

.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; gap: 10px; }
.view-btn {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-0); display: inline-flex; align-items: center; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid var(--line-strong); transition: border-color .3s ease, color .3s ease, gap .3s ease;
}
.view-btn:hover { color: var(--gold); border-color: var(--gold); gap: 12px; }

.grid-footer { display: flex; justify-content: center; margin-top: 56px; }

/* ---------------------------- 3D Showcase ---------------------------- */
.showcase { position: relative; }
.showcase-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.showcase-stage {
  position: relative; aspect-ratio: 1/0.92; border-radius: var(--radius-l);
  background: radial-gradient(ellipse at 50% 40%, #171a1f 0%, var(--bg-1) 70%);
  border: 1px solid var(--line); overflow: hidden;
}
#showcase-canvas { width: 100%; height: 100%; }
.showcase-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-2); letter-spacing: .1em;
}

.showcase-controls { position: absolute; bottom: 18px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 3; }
.showcase-controls .group { display: flex; gap: 8px; }

.angle-tabs { display: flex; gap: 8px; margin-top: 30px; }
.angle-tab {
  font-family: var(--font-mono); font-size: 11px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-1); background: transparent;
  transition: all .3s ease;
}
.angle-tab.is-active, .angle-tab:hover { border-color: var(--gold); color: var(--gold); }

.showcase-info h2 { margin-bottom: 20px; }
.color-select-row { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.color-select-row .swatch { width: 26px; height: 26px; }
.color-select-row .label { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); min-width: 90px; }

.spec-list { margin-top: 40px; border-top: 1px solid var(--line); }
.spec-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; }
.spec-row span:first-child { color: var(--text-2); }

@media (max-width: 940px) {
  .showcase-wrap { grid-template-columns: 1fr; }
}

/* ---------------------------- Collections ---------------------------- */
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .collection-grid { grid-template-columns: 1fr; } }

.collection-card {
  position: relative; border-radius: var(--radius-m); overflow: hidden;
  aspect-ratio: 3/4; isolation: isolate;
}
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.collection-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(6,7,8,0.92) 8%, rgba(6,7,8,0.15) 55%, rgba(6,7,8,0.05) 100%);
}
.collection-card:hover img { transform: scale(1.08); }
.collection-label { position: absolute; left: 26px; bottom: 26px; right: 26px; z-index: 2; }
.collection-index { font-family: var(--font-mono); font-size: 11px; color: var(--gold); letter-spacing: .1em; }
.collection-label h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-top: 8px; }
.collection-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-1); }

/* ---------------------------- Brand story ---------------------------- */
.story { position: relative; overflow: hidden; }
.story-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: start; }
.story-heading { position: sticky; top: 120px; }
.story-heading .display-l { margin-top: 20px; }
.story-copy p {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.35;
  color: var(--text-1); margin: 0 0 46px;
}
.story-copy p strong { color: var(--text-0); font-weight: 500; }
.story-copy .story-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; padding-top: 40px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.8rem); color: var(--gold); }
.stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }

@media (max-width: 940px) {
  .story-row { grid-template-columns: 1fr; gap: 30px; }
  .story-heading { position: static; }
}

/* Reveal utility used by GSAP / ScrollTrigger */
.reveal-up { opacity: 0; transform: translateY(48px); }
.reveal-fade { opacity: 0; }
.reveal-line span { display: inline-block; transform: translateY(110%); }
