/* ==========================
   TERRAGRAIN ORGANICA THEME
   Dark Luxury Style
   ========================== */

:root{
  --bg:#0e1412;            /* Deep evergreen */
  --bg-2:#101d18;          /* Slightly lighter evergreen */
  --elev:#16261f;          /* Card surface */
  --text:#f3f6f2;          /* Primary text */
  --muted:#cfd8d0;         /* Secondary text */
  --gold:#c0a668;          /* Accent (brushed brass) */
  --gold-2:#e5d5a1;        /* Lighter accent */
  --leaf:#2d7a57;          /* Botanical accent */
  --max:1200px;            /* max content width */
  --radius:20px;           /* roundedness */
  --shadow:0 10px 30px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.25);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Manrope", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 70% -20%, rgba(45,122,87,.25), transparent 60%),
    radial-gradient(800px 600px at -10% 10%, rgba(192,166,104,.14), transparent 50%),
    linear-gradient(180deg, #0b120f 0%, var(--bg) 30%, #0b120f 100%);
  overflow-x:hidden;
}

/* ================
   GLOBAL CONTAINER
   ================ */
.container{width:min(100%, var(--max)); margin-inline:auto; padding-inline:24px}

/* ===========
   HEADER
   =========== */
header{position:sticky; top:0; z-index:100; backdrop-filter:saturate(140%) blur(10px); transition:all .3s ease;}
header.with-shadow{box-shadow: 0 10px 30px rgba(0,0,0,.25); background: rgba(15,22,19,.55); border-bottom:1px solid rgba(255,255,255,.08)}
.nav{display:flex; align-items:center; justify-content:space-between; padding:16px 0}
.brand{display:flex; align-items:center; gap:12px}
.logo{width:36px; height:36px; border-radius:50%; background:conic-gradient(from 120deg, var(--gold), var(--leaf), var(--gold)); box-shadow:inset 0 0 0 2px rgba(255,255,255,.06)}
.brand h1{margin:0; font-family:"Cormorant Garamond", serif; letter-spacing:.6px; font-weight:600; font-size:20px}
nav a{color:var(--muted); text-decoration:none; margin-left:20px; font-weight:600; font-size:14px}
nav a:hover{color:var(--text)}
.cta-btn{padding:10px 16px; border-radius:999px; border:1px solid rgba(255,255,255,.18); background:linear-gradient(180deg, rgba(192,166,104,.15), rgba(192,166,104,.05)); color:var(--gold-2); font-weight:700; text-decoration:none;}
.cta-btn:hover{transform:translateY(-1px); box-shadow:0 8px 20px rgba(192,166,104,.18)}

/* ===========
   HERO
   =========== */
.hero{position:relative; z-index:1; padding:84px 0 36px}
.hero-inner{display:grid; grid-template-columns:1.1fr .9fr; gap:min(6vw,64px); align-items:center}
.eyebrow{display:inline-block; font-size:12px; letter-spacing:.18em; text-transform:uppercase; color:var(--gold-2); padding:.4rem .8rem; border:1px solid rgba(255,255,255,.12); border-radius:999px; background:rgba(22,38,31,.35)}
.hero h2{font-family:"Cormorant Garamond", serif; font-size:clamp(36px,7vw,72px); line-height:1.02; margin:18px 0 12px}
.hero p{color:var(--muted); font-size: clamp(16px,2.2vw,18px)}
.actions{display:flex; gap:12px; margin-top:24px}
.btn{display:inline-flex; align-items:center; gap:10px; padding:14px 18px; border-radius:14px; font-weight:700; text-decoration:none; transition:transform .2s ease, box-shadow .3s ease, background .3s ease}
.btn-primary{color:#0f140f; background:linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow:0 10px 20px rgba(192,166,104,.25)}
.btn-primary:hover{transform:translateY(-2px)}
.btn-ghost{color:var(--gold-2); border:1px solid rgba(255,255,255,.18); background:rgba(16,29,24,.35)}
.btn-ghost:hover{background:rgba(192,166,104,.08)}

.hero-card{position:relative; border-radius:var(--radius); overflow:hidden; background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.12); box-shadow:var(--shadow)}
.hero-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
  filter: saturate(94%) contrast(105%);
}
, .hero-card video{display:block; width:100%; height:100%; object-fit:cover; aspect-ratio:4/5; filter:saturate(94%) contrast(105%)}
.seal{position:absolute; right:18px; bottom:18px; background:rgba(16,29,24,.75); color:var(--gold-2); padding:10px 14px; border-radius:999px; font-weight:800; letter-spacing:.08em; border:1px solid rgba(255,255,255,.12)}

/* ===========
   PRODUCT CARDS
   =========== */
.grid{display:grid; gap:18px}
.grid-3{grid-template-columns: repeat(3, 1fr)}
.grid-2{grid-template-columns: repeat(2, 1fr)}
.card{background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.12); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow)}
.card img, .card video{width:100%; height:240px; object-fit:cover}
.card-body{padding:18px}
.meta{color:var(--gold-2); font-size:12px; letter-spacing:.14em; text-transform:uppercase}

/* ===========
   SPLIT SECTION
   =========== */
.split{display:grid; grid-template-columns:1.1fr .9fr; gap:min(6vw,64px); align-items:center}
.split .image{border-radius:var(--radius); overflow:hidden; border:1px solid rgba(255,255,255,.12); box-shadow:var(--shadow)}
.split .image img, .split .image video{width:100%; height:100%; object-fit:cover}

/* ===========
   TESTIMONIALS / HIGHLIGHTS
   =========== */
.testimonial{padding:18px; border-radius:var(--radius); background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08)}
.quote{font-size:16px; line-height:1.6}

/* ===========
   CTA
   =========== */
.cta{display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; background:linear-gradient(180deg, rgba(192,166,104,.12), rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.12); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow)}

/* ===========
   FOOTER
   =========== */
footer{padding:56px 0 80px; color:var(--muted)}
.foot-grid{display:grid; grid-template-columns:2fr 1fr 1fr; gap:24px}
.foot h4{margin:0 0 12px; color:var(--text)}
.foot a{color:var(--muted); text-decoration:none}
.foot a:hover{color:var(--text)}
.copy{margin-top:28px; font-size:12px; color:#9bb3a5}

/* ===========
   ANIMATIONS
   =========== */
.reveal{opacity:0; transform: translateY(18px); transition:opacity .8s ease, transform .8s ease}
.reveal.show{opacity:1; transform:none}
.lift{transition: transform .2s ease, box-shadow .3s ease}
.lift:hover{transform: translateY(-4px)}

/* ===========
   RESPONSIVE
   =========== */
@media (max-width: 980px){
  .hero-inner,.split{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .grid-2{grid-template-columns:1fr}
  .foot-grid{grid-template-columns:1fr 1fr}
}
@media (max-width: 560px){
  nav{display:none}
  .foot-grid{grid-template-columns:1fr}
}
@media (prefers-reduced-motion: reduce){
  .reveal{transition:none}
}
/* Fix for square images like map.jpg and contact.jpg */
.map-image,
.contact-image {
  width: 100%;
  height: auto;
  max-height: 400px; /* prevents image from being too tall */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #0b120f; /* matches dark theme background */
  border-radius: var(--radius);
}
/* --- PREMIUM ANIMATION UPGRADES --- */

/* 1. Smooth Fade-Up Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.25, .8, .25, 1),
              transform .9s cubic-bezier(.25, .8, .25, 1);
}

/* 2. Luxury Button Hover Glow */
.btn-primary:hover {
  box-shadow: 0 0 12px rgba(192,166,104,0.5);
}

/* 3. Card Hover Depth */
.card.lift:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0,0,0,0.4),
              0 4px 12px rgba(192,166,104,0.15);
}

/* 4. Subtle Nav Underline Animation */
nav a {
  position: relative;
}
nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold-2);
  transition: width 0.3s ease, left 0.3s ease;
}
nav a:hover::after {
  width: 100%;
  left: 0;
}

/* 5. Fix for square images like map.jpg & contact.jpg */
.map-image,
.contact-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #0b120f;
  border-radius: var(--radius);
}
/* Hero video fade-in */
.hero-card video {
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-card.video-loaded video {
  opacity: 1;
}
/* Product video fade-in */
.card video {
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.card.video-loaded video {
  opacity: 1;
}
/* Subtle zoom on video hover */
.hero-card video,
.card video {
  transition: transform 0.6s ease, opacity 1.2s ease-in-out;
}

.hero-card:hover video,
.card:hover video {
  transform: scale(1.03);
}
/* Gold shimmer effect on primary buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(192,166,104,0.4),
    transparent
  );
  transform: skewX(-20deg);
}

.btn-primary:hover::before {
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}
/* Gold glow on nav link hover */
nav a {
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover {
  color: var(--gold-2);
  text-shadow: 0 0 8px rgba(192,166,104,0.5);
}
/* ==========================
   ULTRA-PREMIUM ENHANCEMENTS
   ========================== */

/* Smooth global page fade-in */
body {
  opacity: 0;
  animation: bodyFadeIn 1s ease forwards;
}
@keyframes bodyFadeIn {
  to { opacity: 1; }
}

/* Elegant gradient border glow on cards */
.card, .hero-card {
  position: relative;
}
.card::before, .hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(192,166,104,0.5), rgba(45,122,87,0.4));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover::before, .hero-card:hover::before {
  opacity: 1;
}

/* Floating lift on hero headline */
.hero h2 {
  animation: headlineFloat 6s ease-in-out infinite;
}
@keyframes headlineFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Luxurious glassy backdrop for seals */
.seal {
  backdrop-filter: blur(8px) saturate(150%);
  background: rgba(16, 29, 24, 0.65);
}

/* Soft gold glow for section titles */
.section-title {
  position: relative;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 42px;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  border-radius: 2px;
}

/* Delicate scroll-triggered scale-up on reveal elements */
.reveal.show {
  transform: translateY(0) scale(1.02);
  transition: transform 0.8s cubic-bezier(.25, .8, .25, 1), opacity 0.8s ease;
}

/* Floating hover effect for footer links */
footer a:hover {
  color: var(--gold-2);
  text-shadow: 0 0 6px rgba(192,166,104,0.6);
}
/* ==========================
   ULTRA-PREMIUM BACKGROUND TEXTURE
   ========================== */

/* Subtle fabric-like texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 3px 3px, 6px 6px;
  mix-blend-mode: overlay;
  z-index: 0;
}

/* Richer radial lighting to add depth */
body {
  background:
    radial-gradient(1200px 800px at 70% -20%, rgba(45,122,87,.25), transparent 60%),
    radial-gradient(800px 600px at -10% 10%, rgba(192,166,104,.12), transparent 50%),
    linear-gradient(180deg, #0b120f 0%, var(--bg) 30%, #0b120f 100%);
}

/* Ensure main content stays above texture */
header, section, footer {
  position: relative;
  z-index: 1;
}
/* ==========================
   LIQUID GOLD CTA BUTTON HOVER
   ========================== */

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 20px rgba(192,166,104,.25);
  transition: transform 0.3s ease, box-shadow 0.4s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255,255,255,0.4) 45%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0.4) 55%,
    transparent 100%
  );
  transition: left 0.8s ease-in-out;
}

.btn-primary:hover::before {
  left: 150%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 28px rgba(192,166,104,0.35);
}
/* ==========================
   ENGRAVED GOLD TITLE SHIMMER
   ========================== */

.section-title {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--gold-2) 0%,
    var(--gold) 20%,
    var(--gold-2) 40%,
    var(--gold) 60%,
    var(--gold-2) 80%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 6s linear infinite;
}

@keyframes goldShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.section-title::after {
  display: none; /* disable underline from previous enhancement if any */
}
/* ==========================
   PREMIUM PRELOADER
   ========================== */

#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOutPreloader 0.8s ease forwards;
  animation-delay: 1.2s; /* how long preloader stays visible */
}

.preloader-ring {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(192,166,104,0.2);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin-bottom: 18px;
}

.preloader-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeInText 0.8s ease forwards;
  animation-delay: 0.5s;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeInText {
  to { opacity: 1; }
}
@keyframes fadeOutPreloader {
  to { opacity: 0; visibility: hidden; }
}
/* ==========================
   INTEGRATED HERO PRELOADER
   ========================== */
#preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
  animation: fadeOutPreloader 0.8s ease forwards;
  animation-delay: 2.2s;
}

.preloader-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(90%) brightness(50%);
}

.preloader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 19, 0.65);
  backdrop-filter: blur(8px);
}

.preloader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.preloader-ring {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(192,166,104,0.2);
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.preloader-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeInText 0.8s ease forwards;
  animation-delay: 0.5s;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeInText {
  to { opacity: 1; }
}
@keyframes fadeOutPreloader {
  to { opacity: 0; visibility: hidden; }
}
/* ==========================
   LUXURY UX UPGRADES
   ========================== */

/* --- 1. Smooth Page Transitions --- */
body.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}
body {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* --- Smooth Trailing Cursor Glow --- */
#cursorGlow 
/* Glow boost when hovering interactive elements */
#cursorGlow.active {
  background: radial-gradient(circle, rgba(192,166,104,0.6) 0%, transparent 75%);
  width: 36px;
  height: 36px;
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
}
{
  position: fixed;
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, rgba(192,166,104,0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out;
}


/* --- 3. Back-to-Top Button --- */
#backToTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(192,166,104,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.3s ease;
  z-index: 9997;
}
#backToTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(192,166,104,0.4);
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* --- 4. Ambient Scroll Lighting --- */
body {
  background-attachment: fixed;
}
body.lit {
  background: radial-gradient(circle at var(--lightX, 50%) var(--lightY, 0%), rgba(192,166,104,0.08), transparent 60%), 
              radial-gradient(1200px 800px at 70% -20%, rgba(45,122,87,.25), transparent 60%),
              radial-gradient(800px 600px at -10% 10%, rgba(192,166,104,.12), transparent 50%),
              linear-gradient(180deg, #0b120f 0%, var(--bg) 30%, #0b120f 100%);
}

/* --- 5. Scroll Progress Bar --- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold-2);
  width: 0%;
  z-index: 9999;
  box-shadow: 0 0 6px rgba(192,166,104,0.6);
}
/* ==========================
   Gold Ripple Click Effect
   ========================== */
.gold-ripple {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,166,104,0.4) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: goldRippleAnim 0.6s ease-out forwards;
  z-index: 9997;
}

@keyframes goldRippleAnim {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.5);
  }
}
