/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================== BASE ===================== */
body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  /* FIX: Prevent any element (header padding, nav drawer) causing horizontal scroll */
  overflow-x: hidden;
}

/* ===================== HEADER ===================== */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  /* FIX: Replaced fixed 50px horizontal padding with a fluid clamp
     so the header never causes overflow on small screens */
  padding: 20px clamp(16px, 4vw, 50px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  background: #ffffff;
  color: #000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* When scrolled, darken all text in the header */
header.scrolled .nav-left a,
header.scrolled .logo,
header.scrolled .icon {
  color: #000;
}

/* ===================== NAV LEFT ===================== */
.nav-left a {
  margin-right: 25px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  transition: opacity 0.2s ease;
}
.nav-left a:hover {
  opacity: 0.7;
}

/* ===================== LOGO ===================== */
.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  /* FIX: Ensure logo never overlaps clickable icons on mobile */
  pointer-events: none;
  white-space: nowrap;
}

/* ===================== NAV RIGHT ===================== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon {
  margin-left: 10px;
  cursor: pointer;
  font-size: 18px;
}

/* ===================== HAMBURGER ===================== */
/* FIX: Changed from ☰ character to three <span> bars for
   proper animation and better cross-browser consistency */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: 14px;
  padding: 6px;
  border-radius: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: all 0.3s ease;
}

/* Animated X state */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================== MOBILE NAV DRAWER ===================== */
/* FIX: Brand-new mobile nav panel — was completely absent from original.
   Hamburger clicked but nothing opened. */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #1a1a1a;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  padding: 0 0 40px;
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}

.mobile-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: #fff;
}

.mobile-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.mobile-nav a {
  display: block;
  padding: 14px 28px;
  color: #dcdcdc;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav a:hover {
  color: #d4af8c;
  padding-left: 34px;
}

/* FIX: Backdrop to close mobile nav by tapping outside */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===================== HERO ===================== */
.hero {
  height: 100vh;
  min-height: 500px; /* FIX: Never collapses too short on landscape mobile */
  background: url('jewel-hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* FIX: Renamed from .overlay to .hero-overlay — prevents rule collision
   with .collection-overlay which needs completely different positioning */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* ===================== HERO CONTENT ===================== */
.hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 2;
  padding: 20px clamp(16px, 5vw, 40px);
  /* FIX: Top padding so content is never hidden under the fixed header */
  padding-top: 90px;
}

.tagline {
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.85);
}

/* FIX: Scoped h1 to .hero so it doesn't bleed into other sections.
   Original global h1 rule affected every h1 on the page. */
.hero h1 {
  font-family: 'Playfair Display', serif;
  /* FIX: Fluid font size — no hard jump between desktop and mobile */
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 20px;
}

.subtitle {
  font-size: clamp(14px, 2vw, 16px); /* FIX: Fluid subtitle size */
  line-height: 1.7;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.85);
}

.cta {
  padding: 15px 35px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cta:hover {
  background: #fff;
  color: #000;
}

/* ===================== HERO FADE ANIMATIONS ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards;
}

/* FIX: Renamed delay classes to hero-specific names to avoid
   conflict with story section's transition-delay .delay-1 */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================== COLLECTIONS ===================== */
.collections {
  /* FIX: Replaced fixed 60px horizontal padding with fluid clamp */
  padding: 100px clamp(20px, 5vw, 60px);
  background: #f9f7f4;
  text-align: center;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 4vw, 36px); /* FIX: Fluid section title */
  margin-bottom: 60px;
  color: #1a1a1a;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* FIX: Max-width + auto margin to keep grid well-proportioned on wide screens */
  max-width: 1200px;
  margin: 0 auto;
}

.collection-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
}

.collection-item img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

/* FIX: Renamed from .overlay to .collection-overlay — fully separate
   from the hero overlay rule. Uses inset:0 correctly without conflicts. */
.collection-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.4s ease;
  pointer-events: none;
}

.collection-item h3 {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 16px;
  letter-spacing: 3px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.4s ease;
  font-family: 'Inter', sans-serif;
}

.collection-item:hover img {
  transform: scale(1.08);
}

.collection-item:hover .collection-overlay {
  background: rgba(0, 0, 0, 0.45);
}

.collection-item:hover h3 {
  color: #d4af8c;
}

/* ===================== STORY ===================== */
.story {
  background: #f4f1ec;
  /* FIX: Replaced fixed 60px horizontal padding with fluid clamp */
  padding: 100px clamp(20px, 5vw, 60px);
}

.story-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.story-image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.story-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: #8a8a8a;
  margin-bottom: 20px;
}

.story-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 48px); /* FIX: Fluid story heading */
  font-weight: 400;
  margin-bottom: 25px;
  color: #1a1a1a;
  line-height: 1.2;
}

.story-content .italic {
  font-style: italic;
}

.story-text {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.story-stats {
  display: flex;
  gap: 50px;
  margin-top: 36px;
  flex-wrap: wrap; /* FIX: Stats wrap on very small screens */
}

.stat-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 11px;
  letter-spacing: 2px;
  color: #888;
}

/* ===================== STORY SCROLL ANIMATION ===================== */
/* FIX: Renamed delay class to .delay-story to avoid collision with
   hero animation .delay-1 which uses animation-delay not transition-delay.
   The original .delay-1 was defined twice — second definition silently
   overwrote the first. */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-story {
  transition-delay: 0.2s;
}

/* ===================== FOOTER ===================== */
.footer {
  background: #2c2f36;
  color: #dcdcdc;
  /* FIX: Replaced fixed 60px horizontal padding with fluid clamp */
  padding: 80px clamp(20px, 5vw, 60px) 30px;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin-bottom: 16px;
  color: #fff;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: #b5b5b5;
}

.footer-column h4 {
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-column a {
  display: block;
  margin-bottom: 12px;
  text-decoration: none;
  color: #b5b5b5;
  font-size: 14px;
  transition: color 0.3s ease, padding-left 0.2s ease;
}

.footer-column a:hover {
  color: #d4af8c;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 50px;
  padding-top: 20px;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  font-size: 12px;
  letter-spacing: 2px;
  color: #888;
}

/* ===================== BREAKPOINT: 1024px ===================== */
@media (max-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-content h2 {
    font-size: 34px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

/* ===================== BREAKPOINT: 768px ===================== */
@media (max-width: 768px) {
  header {
    padding: 16px clamp(16px, 4vw, 24px);
  }

  /* FIX: Hide desktop nav links on mobile */
  .nav-left {
    display: none;
  }

  /* FIX: Show hamburger on mobile */
  .hamburger {
    display: flex;
  }

  /* FIX: Logo stays centered but doesn't overlap hamburger icon */
  .logo {
    font-size: 20px;
  }

  .collections {
    padding: 70px clamp(16px, 5vw, 30px);
  }

  .collection-item img {
    height: 360px;
  }

  .story {
    padding: 70px clamp(16px, 5vw, 30px);
  }

  .story-stats {
    gap: 30px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 2; /* FIX: Brand spans full width on mobile */
  }
}

/* ===================== BREAKPOINT: 600px ===================== */
@media (max-width: 600px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .collection-item img {
    height: 300px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }
}

/* ===================== BREAKPOINT: 480px ===================== */
/* FIX: Brand-new breakpoint — original had nothing below 600px
   for the hero, header, and story sections */
@media (max-width: 480px) {
  .hero-content {
    padding-top: 100px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .cta {
    padding: 13px 28px;
    font-size: 11px;
  }

  .story-content h2 {
    font-size: 26px;
  }

  .story-stats {
    flex-direction: column;
    gap: 20px;
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 36px;
  }

  .collection-item img {
    height: 260px;
  }

  .footer {
    padding: 60px 16px 24px;
  }
}