/* ============================================================
   CRYSTALLIINE JEWELS — Shared stylesheet
   Theme: heritage red + gold luxury, cinematic motion
   ============================================================ */

:root {
  --red-950: #1c0205;
  --red-900: #2e060a;
  --red-800: #4a0a10;
  --red-700: #6a0f17;
  --red-600: #8b1018;
  --red: #9c0d12;
  --crimson: #b3121a;

  --gold-100: #fff4cf;
  --gold-300: #f3d27a;
  --gold: #e3b53c;
  --gold-deep: #c9952a;
  --gold-dark: #8a6418;

  --ivory: #f6ead2;
  --cream: #f4ecdc;
  --ink: #1a0608;

  --maxw: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gold-grad: linear-gradient(135deg, #8a6418 0%, #e3b53c 22%, #fff4cf 48%, #e3b53c 70%, #8a6418 100%);

  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Jost", "Poppins", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--red-950);
  color: var(--ivory);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Deep textured backdrop that sits behind every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(227,181,60,0.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(155,13,18,0.55), transparent 60%),
    radial-gradient(ellipse 70% 60% at 0% 80%, rgba(74,10,16,0.7), transparent 60%),
    linear-gradient(160deg, #2e060a 0%, #1c0205 55%, #14060a 100%);
}
/* Subtle grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: var(--red-900); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Typography helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.01em;
}
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-300);
  display: inline-block;
}
.script { font-style: italic; }

/* gold hairline ornament */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  width: clamp(40px, 12vw, 120px);
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament span { color: var(--gold); font-size: 1.1rem; transform: rotate(45deg); }

.wrap { width: min(92%, var(--maxw)); margin-inline: auto; }

/* ============================================================
   NAVBAR + BURGER + FULLSCREEN MENU
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease);
}
.nav__spacer { width: 54px; }
.nav.scrolled {
  background: rgba(20, 4, 6, 0.72);
  backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 1px 0 rgba(227,181,60,0.18);
}
.nav__brand { display: flex; align-items: center; gap: 12px; z-index: 210; justify-self: center; }
.burger { justify-self: start; }
.nav__brand img { height: 46px; width: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(227,181,60,0.5), 0 6px 18px rgba(0,0,0,0.5); }
.nav__brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ivory);
  padding-left: 4px;
}
.nav__brand .wordmark small { display: block; font-size: 0.5rem; letter-spacing: 0.55em; color: var(--gold-300); padding-left: 4px; }

/* Burger */
.burger {
  z-index: 210;
  width: 54px; height: 54px;
  border: 1px solid rgba(227,181,60,0.4);
  border-radius: 50%;
  background: rgba(28,2,5,0.4);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.4s var(--ease), border-color 0.4s;
}
.burger:hover { background: rgba(227,181,60,0.12); border-color: var(--gold); }
.burger span {
  display: block;
  width: 22px; height: 1.6px;
  background: var(--gold-300);
  margin: 3.5px 0;
  transition: transform 0.45s var(--ease), opacity 0.3s, width 0.45s var(--ease);
}
.burger.open span:nth-child(1) { transform: translateY(5.1px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; width: 0; }
.burger.open span:nth-child(3) { transform: translateY(-5.1px) rotate(-45deg); }

/* Drop-down menu (anchored to burger, top-left) */
.menu {
  position: fixed;
  top: 80px;
  left: clamp(16px, 5vw, 52px);
  z-index: 205;
  min-width: 268px;
  padding: 10px;
  background: linear-gradient(160deg, #2c070b, #160609 85%);
  border: 1px solid rgba(227,181,60,0.3);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,244,207,0.04);
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.nav.scrolled + .menu { top: 68px; }
.menu__list { list-style: none; }
.menu__list li { opacity: 0; transform: translateX(-12px); }
.menu__list li + li { border-top: 1px solid rgba(227,181,60,0.12); }
.menu.open .menu__list li { animation: dropItem 0.45s var(--ease) forwards; }
.menu.open .menu__list li:nth-child(1) { animation-delay: 0.06s; }
.menu.open .menu__list li:nth-child(2) { animation-delay: 0.12s; }
.menu.open .menu__list li:nth-child(3) { animation-delay: 0.18s; }
.menu.open .menu__list li:nth-child(4) { animation-delay: 0.24s; }
@keyframes dropItem { to { opacity: 1; transform: none; } }
.menu__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  padding: 15px 20px;
  border-radius: 10px;
  color: var(--ivory);
  transition: background 0.35s var(--ease), color 0.35s, padding-left 0.4s var(--ease);
}
.menu__list a::after {
  content: "→";
  font-family: var(--font-body);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.menu__list a:hover { background: var(--gold-grad); color: var(--red-900); padding-left: 26px; }
.menu__list a:hover::after { opacity: 0.85; transform: none; }
.menu__list li.current a { color: var(--gold-300); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --pad: 16px 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: var(--pad);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-100);
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(227,181,60,0.14), rgba(227,181,60,0.02));
  overflow: hidden;
  transition: color 0.4s, transform 0.4s var(--ease), box-shadow 0.5s;
  cursor: pointer;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gold-grad);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--red-900); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(227,181,60,0.28); }
.btn:hover::before { transform: translateY(0); }
.btn--solid { color: var(--red-900); }
.btn--solid::before { transform: translateY(0); }
.btn--solid:hover::before { transform: translateY(-101%); }
.btn--solid:hover { color: var(--gold-100); }

/* ============================================================
   SCROLL REVEAL primitives
   ============================================================ */
.reveal { opacity: 0; transform: translateY(46px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }
.reveal.d4 { transition-delay: 0.48s; }
.reveal-x { opacity: 0; transform: translateX(-60px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal-x.right { transform: translateX(60px); }
.reveal-x.in { opacity: 1; transform: none; }
.reveal-zoom { opacity: 0; transform: scale(1.12); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
.reveal-zoom.in { opacity: 1; transform: none; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section { padding: clamp(80px, 12vh, 150px) 0; position: relative; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 7vh, 80px); }
.section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin-top: 14px;
}
.section__head p { margin-top: 18px; opacity: 0.78; font-size: 1.02rem; }

/* ============================================================
   PAGE HERO (about / products / contact banners)
   ============================================================ */
.pagehero {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  padding: 160px 20px 90px;
  overflow: hidden;
}
.pagehero h1 { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 7rem); line-height: 1; }
.pagehero p { margin-top: 20px; max-width: 620px; opacity: 0.82; font-size: 1.05rem; }
.pagehero .glow {
  position: absolute; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(227,181,60,0.16), transparent 65%);
  top: -10%; left: 50%; transform: translateX(-50%);
  filter: blur(20px); pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  padding: 80px 0 40px;
  border-top: 1px solid rgba(227,181,60,0.18);
  background: linear-gradient(180deg, transparent, rgba(20,4,6,0.6));
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 60px; width: 60px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(227,181,60,0.4); }
.footer__brand .wm { font-family: var(--font-display); letter-spacing: 0.3em; text-transform: uppercase; margin: 16px 0 8px; font-size: 1.2rem; }
.footer__brand p { opacity: 0.6; font-size: 0.88rem; max-width: 320px; }
.footer h5 { font-family: var(--font-display); color: var(--gold-300); font-size: 1.15rem; margin-bottom: 16px; font-weight: 500; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; opacity: 0.75; font-size: 0.9rem; transition: color 0.3s, padding-left 0.3s; }
.footer li a:hover { color: var(--gold-300); }
.footer__bottom { margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.78rem; opacity: 0.55; letter-spacing: 0.05em; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ============================================================
   FLOATING SPARKLE / PARTICLE LAYER
   ============================================================ */
.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.spark {
  position: absolute;
  width: 6px; height: 6px;
  background: radial-gradient(circle, #fff 0%, var(--gold-300) 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: twinkle linear infinite;
}
@keyframes twinkle {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.9; }
  50% { opacity: 0.3; }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.1); }
}

/* Scroll progress + cursor halo */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300; background: var(--gold-grad); box-shadow: 0 0 12px rgba(227,181,60,0.7); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-x, .reveal-zoom { opacity: 1 !important; transform: none !important; }
}
