/* ============================================
   CINEMATIC.CSS — Cutting-Edge Visual Layer
   Loading screen, custom cursor, grain, orbs,
   scroll progress, horizontal scroll, split text
   ============================================ */


/* ===========================================
   LOADING SCREEN — Cinematic Ring Design
   =========================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #faf7f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.loader.done {
  pointer-events: none;
  animation: loaderExit 0.8s cubic-bezier(0.76, 0, 0.24, 1) 0.2s forwards;
}

@keyframes loaderExit {
  0%   { clip-path: circle(150% at 50% 50%); opacity: 1; }
  100% { clip-path: circle(0% at 50% 50%); opacity: 0; }
}

/* Ambient glowing orbs behind the ring */
.loader__glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  animation: loaderGlowPulse 3s ease-in-out infinite;
}

.loader__glow--2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(196,160,212,0.08) 0%, transparent 70%);
  animation-delay: 1.5s;
  animation-duration: 4s;
}

@keyframes loaderGlowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.2); }
}

/* Center container */
.loader__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  z-index: 2;
}

/* Ring wrapper — contains both the SVG ring and the centered logo */
.loader__ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: loaderRingSpin 8s linear infinite;
}

@keyframes loaderRingSpin {
  to { transform: rotate(360deg); }
}

/* The progress arc — animated via JS, but also has a CSS fallback spin */
.loader__ring-progress {
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.3));
}

/* Orbiting dot glow */
.loader__ring-dot {
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}

/* Logo — perfectly centered inside the ring */
.loader__logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader__logo-img {
  height: 55px;
  width: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: loaderLogoReveal 1s cubic-bezier(0.23, 1, 0.32, 1) 0.3s forwards;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.2));
}

@keyframes loaderLogoReveal {
  to { opacity: 1; transform: scale(1); }
}

/* Info section below the ring */
.loader__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: loaderInfoIn 0.6s ease 0.8s forwards;
}

@keyframes loaderInfoIn {
  to { opacity: 1; }
}

.loader__counter {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 200;
  letter-spacing: 0.15em;
  color: rgba(201, 168, 76, 0.9);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.loader__divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.4), transparent);
}

.loader__tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: rgba(45, 42, 62, 0.35);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
}


/* ===========================================
   CUSTOM CURSOR — Subtle trailing accent
   =========================================== */
.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99990;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.23,1,0.32,1),
              height 0.4s cubic-bezier(0.23,1,0.32,1),
              border-color 0.3s ease,
              background 0.3s ease,
              opacity 0.4s ease;
  opacity: 0;
}

.cursor.visible { opacity: 1; }

.cursor__text {
  display: none;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: rgba(201, 168, 76, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99991;
  transform: translate(-50%, -50%);
}

/* Hide custom cursor on touch devices */
@media (pointer: coarse) {
  .cursor, .cursor-dot { display: none !important; }
}

/* Keep the normal cursor visible — don't hide it */


/* ===========================================
   NOISE / GRAIN OVERLAY
   =========================================== */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: multiply;
}


/* ===========================================
   FLOATING GRADIENT ORBS — soft pastels
   =========================================== */
.ambient-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
}

.orb--gold {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(240,213,144,0.6) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: orbFloat1 25s ease-in-out infinite;
}

.orb--emerald {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232,180,200,0.5) 0%, transparent 70%);
  bottom: 10%;
  left: -10%;
  animation: orbFloat2 30s ease-in-out infinite;
}

.orb--blue {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(196,160,212,0.4) 0%, transparent 70%);
  top: 40%;
  right: 20%;
  animation: orbFloat3 20s ease-in-out infinite;
  opacity: 0.08;
}

.orb--purple {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(240,213,144,0.3) 0%, transparent 70%);
  bottom: 30%;
  left: 30%;
  animation: orbFloat4 22s ease-in-out infinite;
  opacity: 0.08;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-40px, 60px) scale(1.1); }
  50% { transform: translate(-80px, 30px) scale(0.95); }
  75% { transform: translate(-20px, 80px) scale(1.05); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.05); }
  50% { transform: translate(30px, -80px) scale(1.1); }
  75% { transform: translate(80px, -20px) scale(0.95); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-50px, 40px); }
  66% { transform: translate(30px, -50px); }
}

@keyframes orbFloat4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -60px); }
}


/* ===========================================
   SCROLL PROGRESS BAR
   =========================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient-gold);
  z-index: 10001;
  transition: none;
  will-change: width;
}

.navbar__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s;
}

.navbar.scrolled .navbar__progress {
  opacity: 1;
}


/* ===========================================
   HERO ENHANCEMENTS
   =========================================== */
.hero {
  position: relative;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-tertiary);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.3; }
}

/* Decorative grid lines in hero */
.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.grid-line {
  position: absolute;
  background: rgba(201, 168, 76, 0.06);
}

.grid-line--v {
  width: 1px;
  height: 100%;
  top: 0;
}

.grid-line--v:nth-child(1) { left: 25%; }
.grid-line--v:nth-child(2) { left: 75%; }

.grid-line--h {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}


/* ===========================================
   FEATURE CARD ENHANCEMENTS
   =========================================== */
.feature-card__icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: var(--space-4);
  transition: all 0.4s var(--ease-smooth);
}

.feature-card:hover .feature-card__icon-wrap {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.1);
}

.feature-card__icon-wrap--emerald {
  background: rgba(92, 184, 163, 0.08);
  border-color: rgba(92, 184, 163, 0.15);
  color: var(--emerald);
}

.feature-card:hover .feature-card__icon-wrap--emerald {
  background: rgba(92, 184, 163, 0.12);
  border-color: rgba(92, 184, 163, 0.3);
  box-shadow: 0 0 30px rgba(92, 184, 163, 0.1);
}

.feature-card__icon-wrap--blue {
  background: rgba(107, 140, 204, 0.08);
  border-color: rgba(107, 140, 204, 0.15);
  color: var(--blue);
}

.feature-card:hover .feature-card__icon-wrap--blue {
  background: rgba(107, 140, 204, 0.12);
  border-color: rgba(107, 140, 204, 0.3);
  box-shadow: 0 0 30px rgba(107, 140, 204, 0.1);
}

.feature-card__number {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  font-family: var(--font-heading);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-2);
  line-height: 1;
}


/* ===========================================
   SCIENCE CARD ENHANCEMENTS
   =========================================== */
.science__card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.science__card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid #e8e0d8;
}

.science__card[data-color="emerald"] .science__card-icon { color: var(--emerald); border-color: rgba(92, 184, 163, 0.2); }
.science__card[data-color="gold"] .science__card-icon { color: var(--gold); border-color: rgba(201, 168, 76, 0.2); }
.science__card[data-color="blue"] .science__card-icon { color: var(--blue); border-color: rgba(107, 140, 204, 0.2); }
.science__card[data-color="purple"] .science__card-icon { color: var(--purple); border-color: rgba(150, 120, 196, 0.2); }

.science__total-card {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding: var(--space-12);
}

.science__total-number {
  font-size: clamp(5rem, 10vw, 10rem);
  font-weight: 900;
  font-family: var(--font-heading);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.science__total-label {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-2);
}

.science__total-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}


/* ===========================================
   HORIZONTAL SCROLL PRODUCTS
   =========================================== */
.products-section {
  overflow: hidden;
}

.products-hscroll {
  position: relative;
  padding: var(--space-8) 0;
}

.products-hscroll__progress {
  max-width: 200px;
  height: 2px;
  background: #e8e0d8;
  margin: 0 auto var(--space-8);
  border-radius: 2px;
  overflow: hidden;
}

.products-hscroll__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-gold);
  border-radius: 2px;
}

.products-hscroll__track {
  display: flex;
  gap: var(--space-8);
  padding: var(--space-4) clamp(2rem, 5vw, 6rem);
  will-change: transform;
}

.products-hscroll__track .product-card {
  min-width: 340px;
  max-width: 340px;
  flex-shrink: 0;
}


/* ===========================================
   SPLIT TEXT ANIMATION STYLES
   =========================================== */
.split-text .char,
.split-words .word {
  display: inline-block;
  will-change: transform, opacity;
}

.split-text .word {
  display: inline-block;
  overflow: hidden;
}

/* Line reveal */
.line-reveal {
  overflow: hidden;
  display: inline-block;
}

.line-reveal > span,
.line-reveal__inner {
  display: inline-block;
  transform: translateY(100%);
  will-change: transform;
}


/* ===========================================
   NAV BUTTON ENHANCEMENT
   =========================================== */
.btn-nav {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
}

/* Navbar Shop link */
.navbar__shop-link {
  color: var(--gold) !important;
  font-weight: var(--weight-semibold) !important;
}


/* ===========================================
   MAGNETIC BUTTON STYLES
   =========================================== */
.magnetic {
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}


/* ===========================================
   IMAGE REVEAL ANIMATION
   =========================================== */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-gold);
  transform: translateX(-101%);
  z-index: 2;
}

.img-reveal.revealed::after {
  animation: imgRevealWipe 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes imgRevealWipe {
  0% { transform: translateX(-101%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(101%); }
}

.img-reveal img {
  transform: scale(1.3);
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.img-reveal.revealed img {
  transform: scale(1);
}


/* ===========================================
   ENHANCED PRODUCT CARD HOVER STATES
   =========================================== */
.product-card {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s ease,
              border-color 0.4s ease;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(201, 168, 76, 0.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08),
              0 0 40px rgba(201, 168, 76, 0.06);
}


/* ===========================================
   PHONE CTA ENHANCEMENT
   =========================================== */
.phone-cta__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin: 0 auto var(--space-6);
  animation: phonePulse 3s ease-in-out infinite;
}

@keyframes phonePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.15); }
  50% { box-shadow: 0 0 0 20px rgba(201, 168, 76, 0); }
}


/* ===========================================
   BODY STATE: LOADING
   =========================================== */
body.is-loading {
  overflow: hidden;
  height: 100vh;
}


/* ===========================================
   REDUCED MOTION OVERRIDE
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  .loader { display: none !important; }
  .cursor, .cursor-dot { display: none !important; }
  .grain-overlay { display: none !important; }
  .orb { animation: none !important; }
  .hero__scroll-line { animation: none !important; }
  .split-text .char, .split-words .word { 
    opacity: 1 !important; 
    transform: none !important; 
  }
  body { cursor: auto !important; }
}
