/*
  style.css
  Theme: Retro Eco-Minimalism
  Color Scheme: Split-Complementary
  Animation Style: Micro-animations
*/

/* -------------------------------------------------- */
/* # CSS Variables & Root Configuration
/* -------------------------------------------------- */

:root {
  --color-primary-dark: #2A3D2A;  /* eco-dark */
  --color-primary-light: #F1F5F9; /* eco-light */
  --color-accent: #D97706;        /* retro-accent */
  --color-accent-dark: #B45309;   /* darker retro for hover */

  --color-text-primary: #1E293B;  /* text-primary */
  --color-text-secondary: #475569;/* text-secondary */
  --color-text-light: #FFFFFF;
  
  --font-heading: 'Space Grotesk', 'sans-serif';
  --font-body: 'DM Sans', 'sans-serif';

  --transition-fast: all 0.2s ease-in-out;
  --transition-medium: all 0.4s ease-in-out;

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------- */
/* # Base & Typography Styles (using @layer for Tailwind)
/* -------------------------------------------------- */

@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    background-color: var(--color-primary-light);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary-dark);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
  }

  h1 { @apply text-4xl md:text-5xl lg:text-6xl; }
  h2 { @apply text-3xl md:text-4xl; }
  h3 { @apply text-xl md:text-2xl; }
  p { @apply leading-relaxed; }
}


/* -------------------------------------------------- */
/* # Component Styles
/* -------------------------------------------------- */

@layer components {
  /* Global Button Styles */
  .btn, button, input[type='submit'] {
    @apply inline-block px-6 py-3 rounded-md font-bold text-center transition-all duration-300 ease-in-out;
    @apply focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-primary-light focus:ring-accent;
  }

  .btn-primary, button[type='submit'] {
    @apply bg-retro-accent text-white;
    @apply hover:bg-amber-700 hover:scale-105;
  }

  /* Form Input Styles */
  .form-input, .form-textarea {
    @apply w-full mt-2 px-4 py-3 bg-white border border-gray-300 rounded-md shadow-sm;
    @apply focus:outline-none focus:ring-2 focus:ring-retro-accent focus:border-transparent;
    transition: var(--transition-fast);
  }

  .form-textarea {
    resize: vertical;
  }

  /* Card Styles */
  .card {
    @apply bg-white rounded-lg shadow-md overflow-hidden transition-all duration-300;
    @apply flex flex-col items-center; /* STRICT: center content */
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
  }
  
  .card-image {
    @apply w-full overflow-hidden;
    /* Fixed height is applied via Tailwind classes like h-64 */
  }

  .card-image img {
    @apply w-full h-full object-cover transition-transform duration-300;
  }

  .card:hover .card-image img {
    transform: scale(1.05);
  }
  
  .card-content {
    @apply p-6 w-full text-center; /* STRICT: center text content */
  }

  /* External Resources Links */
  .resource-link {
    @apply inline-block bg-white text-eco-dark font-semibold py-2 px-5 rounded-full border-2 border-eco-dark;
    @apply hover:bg-eco-dark hover:text-white transition-colors duration-300;
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  }

  .resource-link:hover {
      animation-name: hvr-wobble-horizontal;
      animation-duration: 1s;
      animation-timing-function: ease-in-out;
      animation-iteration-count: 1;
  }
}

/* -------------------------------------------------- */
/* # Utility & Specific Page Styles
/* -------------------------------------------------- */

/* Hero Text Color */
#hero h1, #hero p {
  color: var(--color-text-light);
}

/* Parallax Background Effect */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Mobile Menu (Hamburger) */
.hamburger {
  cursor: pointer;
  width: 24px;
  height: 24px;
  transition: all 0.25s;
  position: relative;
}

.hamburger-top,
.hamburger-middle,
.hamburger-bottom {
  position: absolute;
  width: 24px;
  height: 2px;
  top: 0;
  left: 0;
  background: var(--color-primary-dark);
  transform: rotate(0);
  transition: all 0.5s;
}

.hamburger-middle {
  transform: translateY(7px);
}

.hamburger-bottom {
  transform: translateY(14px);
}

.open .hamburger-top {
  transform: rotate(45deg) translateY(6px) translateX(6px);
}

.open .hamburger-middle {
  display: none;
}

.open .hamburger-bottom {
  transform: rotate(-45deg) translateY(6px) translateX(-6px);
}

/* Page Transitions (Barba.js) */
.barba-leave-active,
.barba-enter-active {
  transition: opacity 0.5s ease;
}

.barba-leave-to,
.barba-enter-from {
  opacity: 0;
}

/* Animate on Scroll */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll[data-animation="fade-in"] { transform: translateY(20px); }
.animate-on-scroll[data-animation="fade-in-up"] { transform: translateY(30px); }
.animate-on-scroll[data-animation="fade-in-right"] { transform: translateX(-30px); }
.animate-on-scroll[data-animation="fade-in-left"] { transform: translateX(30px); }
.animate-on-scroll[data-animation="zoom-in"] { transform: scale(0.95); }

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Success Page Styles */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-color: var(--color-primary-light);
}

.success-card {
  background-color: white;
  padding: 3rem 4rem;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
}

/* Legal Pages (Privacy & Terms) */
.legal-content {
  padding-top: 100px;
}

.legal-content .container {
    max-width: 800px;
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 4rem;
}

.legal-content h1 {
    margin-bottom: 1.5rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p, .legal-content li {
    margin-bottom: 1rem;
}

/* Wobble Animation for Resource Links */
@keyframes hvr-wobble-horizontal {
  16.65% {
    transform: translateX(8px);
  }
  33.3% {
    transform: translateX(-6px);
  }
  49.95% {
    transform: translateX(4px);
  }
  66.6% {
    transform: translateX(-2px);
  }
  83.25% {
    transform: translateX(1px);
  }
  100% {
    transform: translateX(0);
  }
}