/* ========================================
   Modern CSS Variables & Design System
======================================== */
:root {
  /* Color Palette */
  --gold-primary: #FFD700;
  --gold-secondary: #FFA500;
  --gold-dark: #B8860B;
  --gold-light: #FFFF99;
  --gold-accent: #DAA520;
  
  /* Text Colors */
  --text-white: #FFFFFF;
  --text-gold: #FFD700;
  --text-shadow: rgba(0, 0, 0, 0.8);
  
  /* Background & Effects */
  --bg-overlay: rgba(0, 0, 0, 0.65);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glow-gold: 0 0 30px rgba(255, 215, 0, 0.6);
  
  /* Typography */
  --font-primary: 'Arial', 'Helvetica Neue', 'Segoe UI', sans-serif;
  --font-bold: 'Arial Black', 'Impact', 'Arial', sans-serif;
  
  /* Spacing System */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Animation & Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Dynamic viewport height variable for JS */
  --vh: 1vh;
}

/* ========================================
   Reset & Base Styles
======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  background: #000;
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Main Hero Container
======================================== */
.hero-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
}

/* ========================================
   Background System
======================================== */
.background-image {
  position: absolute;
  inset: 0;
  background-image: url('../images/background.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(2px);
  z-index: 2;
}

/* ========================================
   Content Container
======================================== */
.content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: min(90vw, 800px);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  animation: fadeInUp 1s var(--transition-smooth);
}

/* ========================================
   Logo Section
======================================== */
.branding-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.logo-image {
  max-width: 100%;
  height: auto;
  max-height: 120px;
  filter: drop-shadow(var(--shadow-soft)) brightness(1.1);
  transition: transform var(--transition-smooth);
  will-change: transform;
}

.logo-image:hover {
  transform: scale(1.05) translateY(-2px);
  filter: drop-shadow(var(--shadow-strong)) brightness(1.2);
}

/* ========================================
   Main Title - Enhanced Gold Effect
======================================== */
.title {
  font-family: var(--font-bold);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: clamp(1px, 0.5vw, 3px);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  
  /* Enhanced Premium Gold Gradient */
  background: linear-gradient(
    135deg,
    #FFD700 0%,
    #FFA500 15%,
    #FFFF99 30%,
    #FFD700 45%,
    #DAA520 60%,
    #FFD700 75%,
    #FFA500 90%,
    #FFD700 100%
  );
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-primary);
  
  /* Enhanced 3D Shadow Effect */
  filter: 
    drop-shadow(2px 2px 0 var(--gold-dark))
    drop-shadow(4px 4px 0 #996515)
    drop-shadow(6px 6px 0 #664d0e)
    drop-shadow(8px 8px 25px rgba(0, 0, 0, 0.8));
  
  /* Enhanced Animation */
  animation: goldShimmer 6s ease-in-out infinite, textFloat 8s ease-in-out infinite;
}

/* ========================================
   Enhanced CTA Button
======================================== */
.cta-button-container {
  position: relative;
  display: inline-block;
  margin-top: var(--space-md);
}

.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* Dimensions - ไม่มี padding เพื่อให้รูปเต็มปุ่ม */
  min-width: 320px;
  height: 80px;
  padding: 0;
  
  /* Button Image Background - เต็มขนาดปุ่ม */
  background-image: url('../images/Button.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  border: none;
  outline: none;
  
  /* Typography */
  font-family: var(--font-bold);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-white);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 1px;
  text-shadow: 2px 2px 6px var(--text-shadow);
  
  /* Interactive States */
  cursor: pointer;
  transition: transform var(--transition-smooth);
  will-change: transform;
}

.cta-button:hover {
  transform: scale(1.05);
}

.cta-button:active {
  transform: scale(0.98);
  transition: all var(--transition-fast);
}

.cta-button:focus {
  outline: none;
}

/* Fallback if button image doesn't load */
.cta-button:not([style*="background-image"]) {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
  border: none;
}

/* ========================================
   Enhanced Animations & Keyframes
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes goldShimmer {
  0%, 100% {
    background-position: 0% 50%;
    filter: 
      drop-shadow(2px 2px 0 var(--gold-dark))
      drop-shadow(4px 4px 0 #996515)
      drop-shadow(6px 6px 0 #664d0e)
      drop-shadow(8px 8px 25px rgba(0, 0, 0, 0.8));
  }
  50% {
    background-position: 100% 50%;
    filter: 
      drop-shadow(3px 3px 0 var(--gold-dark))
      drop-shadow(6px 6px 0 #996515)
      drop-shadow(9px 9px 0 #664d0e)
      drop-shadow(12px 12px 30px rgba(0, 0, 0, 0.9))
      drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
  }
}

@keyframes textFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.02);
  }
}

/* ========================================
   Touch Device Optimizations
======================================== */
@media (hover: none) and (pointer: coarse) {
  .cta-button {
    min-height: 48px;
  }
  
  .cta-button:hover {
    transform: none;
    filter: drop-shadow(var(--shadow-soft));
  }
  
  .cta-button:active {
    transform: scale(0.95);
    filter: brightness(0.9);
    transition: all var(--transition-fast);
  }
  
  .logo-image:hover {
    transform: none;
    filter: drop-shadow(var(--shadow-soft)) brightness(1.1);
  }
}

/* ========================================
   Accessibility & Reduced Motion
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .title {
    animation: none;
  }
  
  .logo-image:hover,
  .cta-button:hover {
    transform: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --bg-overlay: rgba(0, 0, 0, 0.8);
  }
  
  .title {
    color: var(--gold-primary) !important;
    -webkit-text-fill-color: var(--gold-primary) !important;
  }
  
  .cta-button {
    border: 4px solid var(--gold-primary);
  }
}

/* ========================================
   Print Styles
======================================== */
@media print {
  .hero-container {
    height: auto;
    background: white;
    color: black;
  }
  
  .background-image,
  .overlay {
    display: none;
  }
  
  .title {
    color: black !important;
    background: none !important;
    -webkit-text-fill-color: black !important;
    filter: none !important;
  }
  
  .cta-button {
    background: none !important;
    border: 2px solid black !important;
    color: black !important;
    filter: none !important;
    box-shadow: none !important;
  }
}