/* ==========================================================================
   Friedrich Psicólogo - Design System & Modern Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette */
  --color-espresso: #2C1E14;
  --color-espresso-light: #3D2A1A;
  --color-espresso-dark: #1E140D;
  --color-cream: #FAF8F5;
  --color-cream-dark: #F3EFEA;
  --color-terracotta: #C88258;
  --color-terracotta-dark: #B26E45;
  --color-gold: #D4AF37;
  --color-gold-dark: #B8860B;
  --color-charcoal: #1F2421;
  --color-muted: #767B77;
  --color-warm-grey: #D8D2C9;
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Shadows & Glassmorphism */
  --shadow-soft: 0 10px 30px -10px rgba(44, 30, 20, 0.05);
  --shadow-hover: 0 20px 40px -15px rgba(44, 30, 20, 0.12);
  --shadow-glow: 0 0 25px rgba(200, 130, 88, 0.25);
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & General Normalization
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  line-height: 1.6;
  overflow-x: hidden;
  word-wrap: break-word;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-warm-grey);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-terracotta);
}

/* --------------------------------------------------------------------------
   3. Utility Color & Typography Classes
   -------------------------------------------------------------------------- */
.bg-cream { background-color: var(--color-cream); }
.bg-espresso { background-color: var(--color-espresso); }
.bg-espresso-dark { background-color: var(--color-espresso-dark); }
.bg-espresso-light { background-color: var(--color-espresso-light); }

.text-espresso { color: var(--color-espresso); }
.text-cream { color: var(--color-cream); }
.text-terracotta { color: var(--color-terracotta); }
.text-gold { color: var(--color-gold); }
.text-gold-dark { color: var(--color-gold-dark); }
.text-charcoal { color: var(--color-charcoal); }
.text-muted { color: var(--color-muted); }

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

.gradient-text {
  background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation Glassmorphism
   -------------------------------------------------------------------------- */
#header.header-scrolled > div {
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-color: rgba(200, 130, 88, 0.2);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. Buttons & CTAs
   -------------------------------------------------------------------------- */
.btn-cta {
  background: linear-gradient(90deg, #B8860B 0%, #D4AF37 50%, #B8860B 100%);
  background-size: 200% 100%;
  animation: gradientLoop 4s ease infinite;
  box-shadow: 0 10px 25px -5px rgba(184, 134, 11, 0.4);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-cta:hover {
  box-shadow: 0 15px 35px -5px rgba(184, 134, 11, 0.6);
  transform: translateY(-2px);
}

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

/* --------------------------------------------------------------------------
   6. Keyframe Animations (Marquee, Float, Reveal)
   -------------------------------------------------------------------------- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

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

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Scroll Reveal Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
}

/* --------------------------------------------------------------------------
   7. Cards & Hover Effects
   -------------------------------------------------------------------------- */
.feature-card {
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 130, 88, 0.3);
}

/* --------------------------------------------------------------------------
   8. Accordion Transition Helpers
   -------------------------------------------------------------------------- */
.faq-item.active {
  background-color: #ffffff;
  border-color: rgba(200, 130, 88, 0.3);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* --------------------------------------------------------------------------
   9. 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;
    scroll-behavior: auto !important;
  }
  
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
