/* ============================================
   CU Guesthouse — Pattern Overlays & Advanced CSS
   ============================================ */

/* ── GEOMETRIC PATTERN OVERLAY ── */
.pattern-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23A2785B' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── DOT GRID PATTERN ── */
.dot-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: radial-gradient(circle, var(--color-accent) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── DIAGONAL LINES PATTERN ── */
.lines-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.02;
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-accent) 0,
    var(--color-accent) 1px,
    transparent 0,
    transparent 50%
  );
  background-size: 20px 20px;
}

/* ── NOISE TEXTURE ── */
.noise-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── GRADIENT MESH ── */
.gradient-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(at 20% 80%, rgba(201, 169, 98, 0.08) 0%, transparent 50%),
    radial-gradient(at 80% 20%, rgba(220, 215, 201, 0.1) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(63, 78, 79, 0.03) 0%, transparent 70%);
}

/* ── ANIMATED GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-dark) 0%,
    var(--color-accent) 25%,
    var(--color-cream) 50%,
    var(--color-accent) 75%,
    var(--color-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* ── SHIMMER EFFECT ── */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ── GLOW EFFECTS ── */
.glow-accent {
  box-shadow: 0 0 40px rgba(201, 169, 98, 0.3);
}
.glow-text {
  text-shadow: 0 0 40px rgba(201, 169, 98, 0.3);
}

/* ── SCALE ON SCROLL ── */
.scale-reveal {
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.scale-reveal.visible {
  transform: scale(1);
  opacity: 1;
}

/* ── FADE DIRECTIONS ── */
.fade-left {
  transform: translateX(-40px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-right {
  transform: translateX(40px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up {
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-left.visible,
.fade-right.visible,
.fade-up.visible {
  transform: translate(0);
  opacity: 1;
}

/* ── STAGGER DELAYS ── */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ── BORDER GLOW ON HOVER ── */
.border-glow {
  position: relative;
}
.border-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--color-accent), transparent, var(--color-accent));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}
.border-glow:hover::before {
  opacity: 1;
}

/* ── COUNTER TICKER ── */
.ticker {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

/* ── SMOOTH SECTION DIVIDERS ── */
.section-divider {
  position: relative;
  height: 120px;
  overflow: hidden;
}
.section-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lunar);
  clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 100%);
}

/* ── FLOATING BADGE ── */
.floating-badge {
  animation: floatBadge 3s ease-in-out infinite;
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── MAGNETIC HOVER ── */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── TEXT GRADIENT UNDERLINE ── */
.underline-gradient {
  position: relative;
  display: inline-block;
}
.underline-gradient::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cream), var(--color-accent));
  background-size: 200% auto;
  animation: gradientShift 3s ease infinite;
}

/* ── IMAGE REVEAL MASK ── */
.image-reveal {
  position: relative;
  overflow: hidden;
}
.image-reveal img {
  transform: scale(1.2);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-reveal.visible img {
  transform: scale(1);
}
