/* ============================================================
   Oasis — Home page premium styles & motion
   Scoped extras on top of Tailwind (Play CDN) + style.css
   ============================================================ */

:root {
  --oasis-espresso: #241812;
  --oasis-primary: #8B4513;
  --oasis-gold: #C0A062;
  --oasis-cream: #F8F5F2;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--oasis-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fine paper-grain texture for a gallery feel */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, var(--oasis-primary), var(--oasis-gold));
  box-shadow: 0 0 12px rgba(192, 160, 98, 0.7);
  transition: width 0.1s linear;
}

/* ---------- Custom cursor (desktop, fine pointers only) ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--oasis-primary);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(139, 69, 19, 0.45);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
}
.cursor-ring.is-hover {
  width: 60px; height: 60px;
  background: rgba(192, 160, 98, 0.12);
  border-color: rgba(192, 160, 98, 0.8);
}
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor { cursor: none; }
  body.has-custom-cursor a,
  body.has-custom-cursor button { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible,
[data-reveal="scale"].is-visible { transform: none; }

/* ---------- Gradient + shimmer text ---------- */
.text-gradient-gold {
  background: linear-gradient(100deg, #8B4513 0%, #C0A062 45%, #E4CFA1 60%, #8B4513 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textshine 6s linear infinite;
}
@keyframes textshine { to { background-position: 200% center; } }

/* ---------- Hero floating gallery ---------- */
.hero-stage { perspective: 1400px; }
.float-card {
  position: absolute;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(36, 24, 18, 0.55);
  border: 6px solid #fff;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.float-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.float-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.25), transparent 40%);
  pointer-events: none;
}

/* ---------- Marquee ---------- */
.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: inline-flex; white-space: nowrap; will-change: transform; }
.marquee-track:hover { animation-play-state: paused; }

/* ---------- Artwork cards ---------- */
.art-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px -16px rgba(36, 24, 18, 0.25);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.art-card:hover {
  box-shadow: 0 36px 70px -28px rgba(36, 24, 18, 0.5);
}
.art-card .art-media { overflow: hidden; background-color: #EFE7DD; }
.float-card { background-color: #EFE7DD; }
.art-card .art-media img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.art-card:hover .art-media img { transform: scale(1.08); }
.art-card .quick-actions {
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.art-card:hover .quick-actions { transform: translateY(0); opacity: 1; }

/* Like button heart pop */
.like-btn.liked svg { fill: #e0245e; stroke: #e0245e; }
.like-btn.pop { animation: heartpop 0.4s ease; }
@keyframes heartpop {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ---------- Countdown pills ---------- */
.countdown { display: inline-flex; gap: 6px; }
.countdown .unit {
  min-width: 42px;
  text-align: center;
  background: rgba(36, 24, 18, 0.06);
  border: 1px solid rgba(36, 24, 18, 0.08);
  border-radius: 10px;
  padding: 6px 4px;
  font-variant-numeric: tabular-nums;
}
.countdown .unit .num { font-weight: 700; font-size: 1.1rem; line-height: 1; color: #241812; }
.countdown .unit .lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8a7a6c; }
.countdown.on-dark .unit { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.countdown.on-dark .num { color: #fff; }
.countdown.on-dark .lbl { color: rgba(228, 207, 161, 0.85); }
.countdown.ended .num { color: #b06a2e; }

/* ---------- Magnetic buttons ---------- */
.magnetic { will-change: transform; transition: transform 0.2s ease; }

.btn-glow {
  position: relative;
  overflow: hidden;
}
.btn-glow::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-glow:hover::before { left: 140%; }

/* ---------- Artist avatars ---------- */
.artist-card { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.artist-card:hover { transform: translateY(-6px); }
.artist-ring {
  background: conic-gradient(from 180deg, #8B4513, #C0A062, #E4CFA1, #8B4513);
  padding: 3px;
  border-radius: 9999px;
}

/* ---------- Step / value cards ---------- */
.step-card { transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; }
.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(192, 160, 98, 0.6);
  box-shadow: 0 30px 50px -28px rgba(36, 24, 18, 0.4);
}

/* ---------- Toast ---------- */
#toast-stack {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 9998;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: #241812;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(192,160,98,0.4);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.45s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }

/* ---------- Skeleton loading ---------- */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: skel 1.4s ease infinite;
}
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Navbar scroll state (enhances injected navbar on home) ---------- */
body.home-scrolled #navbar-container header {
  background-color: rgba(248, 245, 242, 0.92) !important;
  box-shadow: 0 10px 30px -18px rgba(36, 24, 18, 0.35);
}

/* ---------- Section eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: #8B4513;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, #8B4513, transparent);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .float-card { animation: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  body.has-custom-cursor { cursor: auto !important; }
}
