/* ============================================================
   UI LAYOUT COMPONENTS — from DESIGN.md
   All 5 components: Hover Expand, Clip-Path Carousel,
   3D Coverflow, State Machine Carousel, Scroll-Hijack Pan
   ============================================================ */

/* Fix: overflow-x:clip lets position:sticky work where hidden breaks it */
body { overflow-x: clip; }

/* ────────────────────────────────────────────────────────────
   1. HOVER EXPAND ACCORDION
   ──────────────────────────────────────────────────────────── */
.hover-expand-section {
  background: #000;
  padding: 0 48px 48px;
}
.hover-expand-section .he-label {
  text-align: center;
  padding: 48px 0 0;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.hover-expand-section .he-heading {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: #f5f5f7;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.he-track {
  display: flex;
  height: 500px;
  gap: 8px;
}
.he-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  width: 72px;
  border-radius: 20px;
  transition: width 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.he-card.active { flex: 1; width: auto; }
.he-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.65s ease;
}
.he-card:hover .he-bg,
.he-card.active .he-bg { transform: scale(1.04); }
.he-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.he-card.active .he-overlay { opacity: 1; }
.he-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.he-card.active .he-pill { opacity: 0; }
.he-info {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
  pointer-events: none;
}
.he-card.active .he-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.he-cat {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.he-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: #fff;
  line-height: 1.08;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.he-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 320px;
}
.he-cta {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.he-cta:hover { background: rgba(255,255,255,0.85); color: #111; }
.he-accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  transition: height 0.22s ease;
}
.he-card.active .he-accent-bar { height: 3px; }

@media (max-width: 768px) {
  .he-track { flex-direction: column; height: auto; }
  .he-card { width: 100%; height: 60px; flex-shrink: 0; transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  .he-card.active { width: 100%; height: 380px; flex: none; }
  .he-pill { top: 50%; left: 50%; transform: translate(-50%,-50%); writing-mode: horizontal-tb; }
}

/* ────────────────────────────────────────────────────────────
   2. CLIP-PATH CAROUSEL
   ──────────────────────────────────────────────────────────── */
.cc-section {
  padding: 80px 0 64px;
  background: var(--cream-2);
  overflow: hidden;
}
.cc-eyebrow {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.cc-heading {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 44px;
  letter-spacing: -0.01em;
}
.cc-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 48px;
  height: 420px;
  user-select: none;
  cursor: grab;
}
.cc-stage.cc-dragging { cursor: grabbing; }
.cc-card {
  position: relative;
  flex-shrink: 0;
  width: 240px;
  height: 380px;
  border-radius: 24px;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.cc-img-wrap {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  transition: clip-path 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
  clip-path: inset(14% 0% 14% 0% round 24px);
}
.cc-card.active .cc-img-wrap {
  clip-path: inset(0% 0% 0% 0% round 24px);
}
.cc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cc-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 18px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 100%);
  border-radius: 0 0 24px 24px;
  z-index: 2;
}
.cc-tag {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}
.cc-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.4s ease, filter 0.4s ease;
  white-space: nowrap;
}
.cc-card.active .cc-name {
  opacity: 1;
  filter: blur(0);
}
.cc-price {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.4s ease 0.05s;
}
.cc-card.active .cc-price { opacity: 1; }
.cc-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.cc-dots {
  display: flex;
  gap: 6px;
}
.cc-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.2);
  transition: width 0.35s var(--ease-standard, ease), background 0.35s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.cc-dot.active {
  width: 24px;
  background: var(--gold);
}
.cc-nav {
  display: flex;
  gap: 10px;
}
.cc-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-2);
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.cc-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

@media (max-width: 860px) {
  .cc-stage { padding: 0 16px; height: 360px; gap: 8px; }
  .cc-card { width: 200px; height: 310px; }
}
@media (max-width: 600px) {
  .cc-stage { height: 300px; }
  .cc-card { width: 160px; height: 250px; }
  .cc-heading { font-size: 28px; }
}

/* ────────────────────────────────────────────────────────────
   3. 3D COVERFLOW
   ──────────────────────────────────────────────────────────── */
.cf-section {
  padding: 80px 0 64px;
  background: var(--dark);
  overflow: hidden;
}
.cf-eyebrow {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.cf-heading {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 44px;
}
.cf-stage {
  position: relative;
  height: 360px;
  perspective: 1200px;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: grab;
}
.cf-stage.cf-dragging { cursor: grabbing; }
.cf-card {
  position: absolute;
  width: 220px;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.5s ease;
  backface-visibility: hidden;
  will-change: transform;
}
.cf-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cf-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
}
.cf-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}
.cf-price {
  font-size: 11.5px;
  color: var(--gold);
}
.cf-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.cf-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: none;
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.cf-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

@media (max-width: 600px) {
  .cf-stage { height: 280px; }
  .cf-card { width: 180px; height: 240px; }
  .cf-heading { font-size: 28px; }
}

/* ────────────────────────────────────────────────────────────
   4. STATE MACHINE 3D CAROUSEL
   ──────────────────────────────────────────────────────────── */
.cr-section {
  padding: 80px 0 64px;
  background: #000;
  overflow: hidden;
}
.cr-eyebrow {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.cr-heading {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  color: #f5f5f7;
  margin-bottom: 44px;
}
.cr-stage {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  cursor: grab;
}
.cr-stage.cr-dragging { cursor: grabbing; }
.cr-card {
  position: absolute;
  width: 270px;
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.52s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.52s ease;
  will-change: transform;
}
.cr-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cr-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.cr-tag {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}
.cr-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}
.cr-price {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.cr-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.cr-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.cr-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

@media (max-width: 600px) {
  .cr-stage { height: 320px; }
  .cr-card { width: 220px; height: 290px; }
  .cr-heading { font-size: 28px; }
}

/* ────────────────────────────────────────────────────────────
   5. SCROLL-HIJACK HORIZONTAL PAN
   ──────────────────────────────────────────────────────────── */
.hijack-outer {
  position: relative;
  height: 400vh;
  margin-top: 32px;
  margin-left: 32px;
  margin-right: 32px;
}
.hijack-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
}
.hijack-track {
  display: flex;
  width: 400%;
  height: 100%;
  will-change: transform;
}
.hijack-slide {
  width: 25%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.hijack-bg {
  position: absolute;
  inset: 16px;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
}
.hijack-overlay {
  position: absolute;
  inset: 16px;
  border-radius: 20px;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.62) 100%
  );
}
.hijack-content {
  position: relative;
  z-index: 2;
  padding: 0 80px;
  max-width: 580px;
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.hijack-slide-num {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.hijack-slide-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 300;
  color: #fff;
  line-height: 1.04;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hijack-slide-title em {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 300;
}
.hijack-slide-sub {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.52);
  margin-bottom: 32px;
  max-width: 380px;
}
.hijack-slide-btn {
  display: inline-block;
  padding: 13px 30px;
  background: var(--gold);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
}
.hijack-slide-btn:hover { background: var(--gold-dark); }
.hijack-progress {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hijack-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.28);
  transition: width 0.35s ease, background 0.35s ease;
  pointer-events: none;
}
.hijack-dot.active {
  width: 24px;
  background: var(--gold);
}
.hijack-hint {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  z-index: 10;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .hijack-slide-title { font-size: clamp(32px,8vw,52px); }
  .hijack-content { padding: 0 32px; }
}
@media (max-width: 600px) {
  .hijack-outer { height: 300vh; }
  .hijack-track { width: 400%; }
  .hijack-slide { width: 25%; }
  .hijack-content { padding: 0 20px; max-width: 100%; }
  .hijack-slide-sub { font-size: 13px; max-width: 100%; }
}
