/* GolfMate Pro — Dark theme with electric blue accents */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a2e;
  --bg-surface: #1e1e2e;
  --bg-surface-light: #252538;

  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-ring: rgba(59, 130, 246, 0.25);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(59, 130, 246, 0.15);
  --border-strong: rgba(59, 130, 246, 0.3);

  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  --shadow-glow-sm: 0 0 15px rgba(59, 130, 246, 0.15);
  --shadow-glow-md: 0 0 30px rgba(59, 130, 246, 0.2);
  --shadow-glow-lg: 0 4px 40px rgba(59, 130, 246, 0.3);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ==================== BASE ==================== */

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active {
  opacity: 1;
  transform: scale(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; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }
.stagger-9 { transition-delay: 0.9s; }

/* ==================== CTA GLOW PULSE ==================== */

.glow-pulse {
  animation: glowPulse 2.8s ease-out infinite;
}
@keyframes glowPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  70% { box-shadow: 0 0 0 18px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.btn-glow {
  position: relative;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
}
.btn-glow:active {
  transform: translateY(0);
}

/* Pulse ring behind CTA */
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(59, 130, 246, 0.7);
  opacity: 0;
  animation: ctaRing 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaRing {
  0% { transform: scale(0.92); opacity: 0.6; }
  60% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* ==================== HERO ==================== */

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0.75) 0%,
    rgba(10, 10, 15, 0.45) 40%,
    rgba(10, 10, 15, 0.6) 70%,
    rgba(10, 10, 15, 0.9) 100%
  );
}

/* Hero animated entrance */
.hero-fade-1 { opacity: 0; animation: heroFadeUp 0.8s ease-out 0.2s forwards; }
.hero-fade-2 { opacity: 0; animation: heroFadeUp 0.8s ease-out 0.4s forwards; }
.hero-fade-3 { opacity: 0; animation: heroFadeUp 0.8s ease-out 0.6s forwards; }
.hero-fade-4 { opacity: 0; animation: heroFadeUp 0.8s ease-out 0.8s forwards; }
.hero-fade-5 { opacity: 0; animation: heroFadeUp 0.8s ease-out 1.0s forwards; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero-section { min-height: 80vh; }
}

/* ==================== LOGO ==================== */

.logo-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 6px;
}

/* ==================== NAVIGATION ==================== */

#mainNav {
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}
#mainNav.nav-scrolled {
  background: rgba(10, 10, 15, 0.95) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

/* Mobile menu */
.mobile-menu {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

/* Hamburger animation */
.hamburger-line {
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==================== FEATURE CARDS ==================== */

.feature-card-hover {
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.feature-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-glow-sm);
}

/* Mobile features horizontal scroll */
@media (max-width: 640px) {
  .features-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
  }
  .features-scroll::-webkit-scrollbar { display: none; }
  .features-scroll > * {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
}

/* ==================== GALLERY ==================== */

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}
.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.15);
}
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.8) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Mobile gallery scroll */
@media (max-width: 640px) {
  .gallery-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }
  .gallery-scroll::-webkit-scrollbar { display: none; }
  .gallery-scroll > * {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }
}

/* ==================== FAQ ACCORDION ==================== */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  opacity: 1;
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-item {
  transition: border-color var(--transition-base);
}
.faq-item.open {
  border-color: rgba(59, 130, 246, 0.3);
}

/* ==================== CHECKOUT ==================== */

/* Square card container */
.pay-card-container {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface);
}

/* Divider line */
.form-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 1rem 0;
}
.form-sep::before, .form-sep::after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}

/* Pay section */
.pay-section { margin-bottom: 0.75rem; }
.pay-section-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.checkout-trust {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.checkout-trust i { color: var(--accent); }
.checkout-total { font-weight: 700; color: var(--text-primary); }

/* Custom select (dark) */
.select-custom { position: relative; }
.select-trigger {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.select-trigger:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-surface-light);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
  margin: 0;
  list-style: none;
  display: none;
  z-index: 1050;
}
.select-custom.open .select-menu { display: block; }
.select-option {
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--transition-fast);
}
.select-option:hover { background: rgba(59, 130, 246, 0.12); }

/* Qty stepper */
.qty-group {
  display: flex;
  align-items: center;
}
.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.qty-btn:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
}
.qty-btn:first-child { border-radius: 0.75rem 0 0 0.75rem; }
.qty-btn:last-child { border-radius: 0 0.75rem 0.75rem 0; }

/* Form inputs (dark) */
.input-dark {
  width: 100%;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary) !important;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input-dark::placeholder { color: var(--text-muted) !important; }
.input-dark:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-ring) !important;
}

/* Alert styles for checkout */
.alert-dark-info { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.alert-dark-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-dark-danger { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-dark-success { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }

/* ==================== MOBILE STICKY CTA ==================== */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-top: 1px solid var(--border);
}

@media (max-width: 767px) {
  body:not(.page-checkout) { padding-bottom: 80px; }
}
@media (min-width: 768px) {
  .sticky-cta { display: none; }
}

/* ==================== UTILITIES ==================== */

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fw-extrabold { font-weight: 800; }

code {
  background: var(--bg-surface);
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.85em;
  color: var(--accent-light);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glow-pulse, .btn-glow::after { animation: none; }
  .hero-fade-1, .hero-fade-2, .hero-fade-3, .hero-fade-4, .hero-fade-5 {
    opacity: 1;
    animation: none;
  }
}

/* ==================== CTA SECTION GLOW ==================== */

.cta-glow-bg {
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
}
