/* CSS Custom Properties */
:root {
  /* Colors */
  --color-trio-brown: #291901;
  --color-trio-gold: #9A690F;
  --color-trio-cream: #FFE0C1;
  --color-trio-btn: #9B7631;
  --color-trio-btn-hover: #885C09;
  --color-trio-star: #FFA800;
  --color-trio-bg-alt: #FFF7F0;

  /* Typography */
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-body: "Manrope", sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Animations */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-trio-brown);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

p {
  margin-bottom: 1rem;
}

/* Grid Pattern Background */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 224, 193, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 224, 193, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  width: 100%;
  height: 100%;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDelayed {
  0%, 20% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

@keyframes borderBeam {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes textReveal {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delayed {
  animation: fadeInDelayed 1.5s ease-out;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Animated Gradient Text */
.animated-gradient-text {
  background: linear-gradient(
    45deg,
    var(--color-trio-cream),
    var(--color-trio-gold),
    var(--color-trio-cream),
    var(--color-trio-gold)
  );
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
}

/* Text Reveal Animation */
.text-reveal {
  display: inline-block;
  overflow: hidden;
}

.text-reveal::after {
  content: attr(data-text);
  display: block;
  animation: textReveal 0.8s ease-out 0.5s both;
}

/* Shimmer Button */
.shimmer-button {
  position: relative;
  background: linear-gradient(
    90deg,
    var(--color-trio-btn) 0%,
    var(--color-trio-btn) 40%,
    var(--color-trio-cream) 50%,
    var(--color-trio-btn) 60%,
    var(--color-trio-btn) 100%
  );
  background-size: 200% 100%;
  transition: all var(--transition-base);
  overflow: hidden;
}

.shimmer-button:hover {
  animation: shimmer 1.5s ease-in-out;
  box-shadow: 0 10px 30px rgba(155, 118, 49, 0.3);
  transform: translateY(-2px);
}

/* Border Beam Button */
.border-beam-button {
  position: relative;
  overflow: hidden;
}

.border-beam-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-trio-cream),
    transparent
  );
  animation: borderBeam 2s linear infinite;
}

/* Ripple Button */
.ripple-button {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.ripple-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(155, 118, 49, 0.3);
}

.ripple-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple-button:active::before {
  width: 300px;
  height: 300px;
}

/* Magic Card */
.magic-card {
  position: relative;
  transition: all var(--transition-base);
}

.magic-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(41, 25, 1, 0.15);
}

.magic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(45deg, transparent, var(--color-trio-gold), transparent);
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.magic-card:hover::before {
  opacity: 1;
}

/* Border Beam */
.border-beam {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-trio-gold),
    transparent
  );
  animation: borderBeam 3s linear infinite;
}

/* Blur Fade Items */
.blur-fade-item {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(10px);
  transition: all 0.8s ease;
}

.blur-fade-item.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Animated List Item */
.animated-list-item {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.animated-list-item.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Animated Shiny Text */
.animated-shiny-text {
  background: linear-gradient(
    90deg,
    var(--color-trio-cream) 0%,
    white 50%,
    var(--color-trio-cream) 100%
  );
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
}

/* Social Links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-trio-btn);
  color: white;
  border-radius: 0.5rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

.social-link:hover {
  background: var(--color-trio-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(155, 118, 49, 0.3);
}

/* Hero Video Dialog */
.hero-video-dialog .play-button {
  transition: all var(--transition-base);
}

.hero-video-dialog:hover .play-button {
  transform: scale(1.1);
  background: white;
}

/* Navigation Scroll Effect */
.navbar-scrolled {
  background: rgba(41, 25, 1, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-video-dialog .play-button {
    width: 60px;
    height: 60px;
  }

  .magic-card {
    padding: 1.5rem;
  }

  .animated-list-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --space-3xl: 48px;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.1;
  }

  .magic-card {
    padding: 1rem;
  }

  .hero-video-dialog .play-button {
    width: 50px;
    height: 50px;
  }

  .hero-video-dialog .play-button svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-smooth {
    scroll-behavior: auto !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .magic-card {
    border: 2px solid var(--color-trio-brown);
  }

  .social-link {
    border: 1px solid var(--color-trio-cream);
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-trio-gold);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .fixed,
  nav,
  #video-modal {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .bg-trio-brown,
  .bg-trio-gold {
    background: white !important;
    color: black !important;
  }
}