/* ============================================
   CUSTOM CSS — Terracotta & Sand Theme
   Dr. Ryan V. Messiner, MD
   ============================================ */

/* Custom Color Palette */
:root {
    --terracotta: #C05A3A;
    --terracotta-dark: #A0482E;
    --terracotta-light: #E8956F;
    --sand-50: #FBF8F5;
    --sand-100: #F5EDE4;
    --sand-200: #E8D5C0;
    --sand-300: #D4B896;
    --sand-400: #C4A77D;
    --sand-500: #B8956A;
    --stone-800: #1C1917;
    --stone-900: #0C0A09;
}

/* Tailwind Custom Config */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
    /* Typography */
    .font-playfair {
        font-family: 'Playfair Display', serif;
    }
    .font-sans {
        font-family: 'DM Sans', sans-serif;
    }
    
    /* Buttons */
    .btn-primary {
        @apply inline-flex items-center gap-2 bg-terracotta text-white font-semibold px-6 py-3 rounded-2xl hover:bg-terracotta-dark transition-all duration-300 shadow-lg shadow-terracotta/25 hover:shadow-terracotta/40 hover:-translate-y-0.5;
    }
    
    .btn-hero-primary {
        @apply inline-flex items-center gap-2 bg-terracotta text-white font-semibold px-8 py-4 rounded-2xl hover:bg-white hover:text-terracotta transition-all duration-300 shadow-xl hover:shadow-2xl hover:-translate-y-0.5;
    }
    
    .btn-hero-secondary {
        @apply inline-flex items-center gap-2 bg-white/15 backdrop-blur-sm border border-white/30 text-white font-semibold px-8 py-4 rounded-2xl hover:bg-white hover:text-terracotta transition-all duration-300;
    }
    
    .btn-submit {
        @apply relative w-full bg-terracotta text-white font-semibold px-8 py-4 rounded-2xl hover:bg-terracotta-dark transition-all duration-300 shadow-lg shadow-terracotta/25 hover:shadow-terracotta/40;
    }
    
    /* Links */
    .link-terracotta {
        @apply text-terracotta font-semibold hover:text-terracotta-dark transition-colors duration-300;
    }
    
    /* Navigation */
    .nav-link {
        @apply text-stone-600 font-medium hover:text-terracotta transition-colors duration-300;
    }
    
    .navbar-text {
        @apply text-stone-700;
    }
    
    /* Section Labels */
    .section-label {
        @apply inline-flex items-center gap-2 text-terracotta font-semibold text-sm uppercase tracking-widest;
    }
    .section-label::before {
        content: '';
        @apply w-8 h-0.5 bg-terracotta rounded-full;
    }
    
    /* Service Cards */
    .service-card {
        @apply relative overflow-hidden;
    }
    
    .service-card-title {
        @apply relative z-10;
    }
    
    .service-card-text {
        @apply relative z-10;
    }
    
    /* Approach Cards */
    .approach-card {
        @apply relative overflow-hidden;
    }
    
    /* Form Elements */
    .form-label {
        @apply block text-stone-700 font-medium text-sm mb-2;
    }
    
    .form-input {
        @apply w-full px-4 py-3 rounded-xl border border-stone-200 text-stone-800 placeholder-stone-400 focus:outline-none focus:ring-2 focus:ring-terracotta/40 focus:border-terracotta transition-all duration-300 bg-stone-50;
    }
    
    .form-select {
        @apply w-full px-4 py-3 rounded-xl border border-stone-200 text-stone-800 focus:outline-none focus:ring-2 focus:ring-terracotta/40 focus:border-terracotta transition-all duration-300 bg-stone-50 appearance-none cursor-pointer;
    }
    
    .form-textarea {
        @apply w-full px-4 py-3 rounded-xl border border-stone-200 text-stone-800 placeholder-stone-400 focus:outline-none focus:ring-2 focus:ring-terracotta/40 focus:border-terracotta transition-all duration-300 bg-stone-50 resize-none;
    }
    
    /* Mobile Navigation */
    .mobile-nav-link {
        @apply text-stone-800 hover:text-terracotta transition-colors duration-300;
    }
}

@layer utilities {
    /* Scroll Reveal Animation */
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    
    /* Hero Animations */
    .hero-badge {
        animation: fadeInDown 0.8s ease-out both;
    }
    
    .hero-headline {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }
    
    .hero-subtext {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
    
    .hero-cta {
        animation: fadeInUp 0.8s ease-out 0.6s both;
    }
    
    .hero-trust {
        animation: fadeInUp 0.8s ease-out 0.8s both;
    }
    
    /* Floating Shapes */
    .hero-shape-3 {
        animation: float 4s ease-in-out infinite;
    }
    
    .hero-shape-4 {
        animation: float 5s ease-in-out 1s infinite;
    }
    
    .hero-shape-5 {
        animation: spin-slow 12s linear infinite;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(45deg);
    }
    to {
        transform: rotate(405deg);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background-color: var(--stone-900);
}

.hero-bg {
    z-index: 0;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(12, 10, 9, 0.82) 0%,
        rgba(192, 90, 58, 0.45) 50%,
        rgba(12, 10, 9, 0.75) 100%
    );
}

.hero-shape {
    animation: pulse-soft 4s ease-in-out infinite;
}

.hero-shape-1 {
    animation-delay: 0s;
}

.hero-shape-2 {
    animation-delay: 2s;
}

/* Scroll Indicator */
.scroll-indicator {
    animation: fadeInUp 1s ease-out 1.2s both;
}

.scroll-mouse {
    @apply w-6 h-10 border-2 border-white/40 rounded-full flex justify-center;
}

.scroll-wheel {
    @apply w-1 h-2 bg-white/60 rounded-full mt-2;
    animation: scroll-wheel-anim 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel-anim {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background-color: rgba(251, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all duration-300;
}

.navbar.scrolled {
    background-color: rgba(251, 248, 245, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile Menu */
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-image-wrapper {
    position: relative;
}

.about-image-accent {
    box-shadow: 0 20px 40px rgba(192, 90, 58, 0.3);
}

/* ============================================
   GEO ACCENTS
   ============================================ */
.geo-accent {
    transition: transform 0.6s ease-out;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    transition: transform 0.4s ease-out, background-color 0.5s ease-out;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card-shape {
    transition: all 0.5s ease-out;
}

.service-card:hover .service-card-shape {
    transform: scale(1.5);
}

/* ============================================
   APPROACH CARDS
   ============================================ */
.approach-card {
    transition: transform 0.4s ease-out, background-color 0.4s ease-out;
}

.approach-card:hover {
    transform: translateY(-6px);
}

/* ============================================
   LOCATION MAP
   ============================================ */
.location-map-wrapper {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

/* ============================================
   FOOTER
   ============================================ */
.footer-shape {
    transition: transform 0.6s ease-out;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-headline br {
        display: none;
    }
    
    .section-label {
        font-size: 0.75rem;
    }
    
    .about-image-accent {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin-top: 1rem;
    }
    
    .about-image-dots {
        display: none;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal-hidden {
        opacity: 1;
        transform: none;
    }
}
