/* Custom properties and animations — migrated from Astro global.css */

@layer base {
  html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
  }
  body {
    overflow-x: hidden;
    position: relative;
  }
  ::selection {
    background-color: #c8943e;
    color: #110d07;
  }
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: #1e1610; }
  ::-webkit-scrollbar-thumb { background: #4a3828; border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: #c8943e; }
}

/* Wallpaper pattern — background-image set inline via template (uses MEDIA_URL) */
.wallpaper {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-repeat: repeat;
  background-size: 60px 60px;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='6' 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;
  animation: grain-shift 8s steps(10) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -15%); }
  40% { transform: translate(-5%, 15%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 10%); }
  80% { transform: translate(3%, -15%); }
  90% { transform: translate(-10%, 5%); }
}

@keyframes steam-rise {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  15% { opacity: 0.6; }
  50% { transform: translateY(-60px) scaleX(1.3); opacity: 0.3; }
  100% { transform: translateY(-120px) scaleX(1.8); opacity: 0; }
}

@keyframes steam-rise-slow {
  0% { transform: translateY(0) scaleX(1) rotate(0deg); opacity: 0; }
  20% { opacity: 0.4; }
  60% { transform: translateY(-80px) scaleX(1.5) rotate(5deg); opacity: 0.15; }
  100% { transform: translateY(-140px) scaleX(2) rotate(-3deg); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.steam-wisp {
  position: absolute;
  width: 20px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(245, 230, 208, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: steam-rise 3s ease-out infinite;
}
.steam-wisp:nth-child(2) {
  animation: steam-rise-slow 4s ease-out infinite;
  animation-delay: 0.8s;
  left: 12px;
}
.steam-wisp:nth-child(3) {
  animation: steam-rise 3.5s ease-out infinite;
  animation-delay: 1.6s;
  left: -8px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
@media (min-width: 768px) {
  .reveal {
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #4a3828, transparent);
  margin: 0 auto;
  max-width: 200px;
}

.warm-glow { box-shadow: 0 0 60px rgba(200, 148, 62, 0.08); }
.warm-glow:hover { box-shadow: 0 0 80px rgba(200, 148, 62, 0.15); }
