/* ==========================================================================
   Hero Preview — ported from app/hero-preview/page.tsx
   All selectors are prefixed .hp-* (or scoped inside .hp-root) so they do
   not collide with the rest of styles.css.
   ========================================================================== */

.hp-root {
  font-family: 'Inter', sans-serif;
  background-color: #f7f7f5;
  color: #1a1a1a;
  overflow: hidden;
  min-height: 100vh;
  position: relative;
  /* Keep this section from inheriting the dark global text color. */
}

.hp-root .serif { font-family: 'Playfair Display', serif; }
.hp-root .heading { font-family: 'Archivo Black', sans-serif; }

@keyframes hpModelFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-15px) scale(1.01); }
}
.hp-model-anim {
  animation: hpModelFloat 8s ease-in-out infinite;
  transform-origin: bottom;
  height: 98vh;
  width: min(58vw, 70vh, calc(100vw - 440px));
  /* Sit the model slightly below the hero edge so the float bounce never
     reveals a gap between the model's bottom and the blue stats strip. */
  margin-bottom: -20px;
}

/* ── Header ─────────────────────────────────────────────── */
.hp-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 48px;
  z-index: 50;
}
.hp-logo { font-size: 24px; letter-spacing: -0.02em; }
.hp-menu-btn {
  background: #000;
  color: #fff;
  padding: 12px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  line-height: 0;
}

/* ── Main layout ────────────────────────────────────────── */
.hp-main {
  position: relative;
  width: 100%;
  height: calc(100vh - 120px);
  padding: 0 48px;
  display: flex;
  align-items: center;
}

.hp-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.hp-accent-plate {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(54vh, 520px);
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  z-index: 5;
  background-color: transparent;
  transition: background-color 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Model image ────────────────────────────────────────── */
.hp-model-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}
.hp-model-img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,0.25));
}

/* ── Text layer (hero title + video thumb) ──────────────── */
.hp-text-layer {
  width: 100%;
  position: relative;
  z-index: 30;
}
.hp-hero-title {
  font-size: clamp(2.75rem, 8.5vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  pointer-events: none;
  margin: 0;
  mix-blend-mode: darken;
  white-space: nowrap;
}
.hp-video-row {
  margin-top: 80px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hp-thumb-wrap { position: relative; }

/* ── Video thumb (hover to play, click to open modal) ─── */
.hp-thumb {
  position: relative;
  width: 176px;
  height: 112px;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: block;
  background: #1a1a1a;
  border: 3px solid #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25),
              0 0 0 1px rgba(0,0,0,0.06);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s ease;
}
.hp-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.7s ease;
}
.hp-thumb.is-hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 35px 60px -15px rgba(0,0,0,0.4),
              0 0 0 1px rgba(0,0,0,0.08);
}
.hp-thumb.is-hover video { filter: grayscale(0); }
.hp-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
  color: #fff;
  opacity: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.hp-thumb-play.hidden { opacity: 0; }
.hp-thumb-play svg {
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.92);
  color: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* ── Glass product card ─────────────────────────────────── */
.hp-glass {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 50px 100px -20px rgba(0,0,0,0.08);
}
.hp-product-card {
  position: absolute;
  right: 32px;
  bottom: 32px;
  width: 320px;
  padding: 32px;
  border-radius: 2.5rem;
  z-index: 30;
}
.hp-product-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.hp-product-name {
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0;
}
.hp-product-ref {
  font-size: 9px;
  color: #9ca3af;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 4px;
  margin-bottom: 0;
  letter-spacing: 0.08em;
}
.hp-product-price {
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
}
.hp-product-ctl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
}
.hp-color-dots { display: flex; gap: 20px; }
.hp-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  border: none;
  padding: 0;
}
.hp-color-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.hp-color-dot.active::after { border-color: #000; }
.hp-details-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
}
.hp-details-icon {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #1a1a1a;
}
.hp-details-btn:hover .hp-details-icon { background: #000; color: #fff; }
.hp-details-icon svg {
  transition: transform 0.4s ease;
}
.hp-details-btn.is-expanded .hp-details-icon svg { transform: rotate(45deg); }

.hp-preview-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.hp-preview-wrapper.expanded { grid-template-rows: 1fr; }
.hp-preview-inner { overflow: hidden; }
.hp-variant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 32px;
}
.hp-variant-img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
  background: #fafafa;
  transition: opacity 0.5s ease;
}
.hp-explore-btn {
  width: 100%;
  margin-top: 32px;
  background: #000;
  color: #fff;
  padding: 16px 0;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

/* ── "View All Models" tab — sits above the dots/arrows nav in the hero. ── */
.hp-view-all-btn {
  position: absolute;
  bottom: 112px;   /* nav-row bottom (48) + row height (~40) + spacer (~24) */
  left: 48px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 9999px;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
  transition: background 0.25s ease, gap 0.25s ease, border-color 0.25s ease;
}
.hp-view-all-btn:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.4);
  gap: 16px;
}
.hp-view-all-arrow {
  font-size: 13px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.hp-view-all-btn:hover .hp-view-all-arrow { transform: translateX(2px); }

/* ── Bottom nav (dots + arrows) ─────────────────────────── */
.hp-nav-row {
  position: absolute;
  bottom: 48px;
  left: 48px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hp-dots { display: flex; gap: 12px; }
.hp-dot {
  width: 40px;
  height: 2px;
  background: #ddd;
  cursor: pointer;
  transition: all 0.4s ease;
  border: none;
  padding: 0;
}
.hp-dot.active { background: #000; width: 80px; }
.hp-arrows { display: flex; align-items: center; gap: 16px; }
.hp-arrow-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease;
  color: #1a1a1a;
}
.hp-arrow-btn:hover { background: #fff; }

/* ── Slide transition (drives opacity/blur/translate) ──── */
.hp-accent-plate,
.hp-hero-title,
.hp-video-row,
.hp-product-card,
.hp-model-img {
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.9s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.8s ease;
  will-change: opacity, transform, filter;
}
.hp-root.is-out .hp-accent-plate,
.hp-root.is-out .hp-hero-title,
.hp-root.is-out .hp-video-row,
.hp-root.is-out .hp-product-card {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
}
/* Model gets a slightly more dramatic exit. */
.hp-root.is-out .hp-model-img {
  opacity: 0;
  transform: scale(0.9) translateY(40px);
  filter: blur(10px);
}

/* ── Video modal ────────────────────────────────────────── */
@keyframes hpVideoBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes hpVideoPanel {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.hp-video-modal {
  position: fixed;
  inset: 0;
  z-index: 600; /* above .fs-menu (500) just in case */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(15, 15, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: hpVideoBackdrop 0.35s ease both;
}
.hp-video-modal[hidden] { display: none; }
.hp-video-modal-panel {
  position: relative;
  width: min(420px, 86vw);
  aspect-ratio: 9 / 16;
  max-height: 78vh;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0a0a;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 50px 120px -20px rgba(0,0,0,0.6),
              0 0 0 1px rgba(255,255,255,0.1);
  animation: hpVideoPanel 0.45s cubic-bezier(0.23, 1, 0.32, 1) both;
}
.hp-video-modal-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.hp-video-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease;
  z-index: 2;
}
.hp-video-close:hover { background: rgba(0,0,0,0.8); transform: scale(1.05); }
