/* ========================================
   Dr. Michael Kruscke — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Geometric Background Shapes
   ======================================== */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
}

.shape-circle-1 {
    top: 15%;
    right: 5%;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(192, 86, 64, 0.15);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-2 {
    bottom: 20%;
    left: 8%;
    width: 80px;
    height: 80px;
    background: rgba(232, 184, 40, 0.08);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite reverse;
}

.shape-triangle {
    top: 40%;
    right: 12%;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid rgba(192, 86, 64, 0.08);
    animation: spin 20s linear infinite;
}

.shape-square {
    bottom: 35%;
    left: 5%;
    width: 50px;
    height: 50px;
    background: rgba(232, 184, 40, 0.06);
    border-radius: 8px;
    transform: rotate(45deg);
    animation: float 10s ease-in-out infinite;
}

.shape-arc {
    top: 60%;
    right: 3%;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(192, 86, 64, 0.1);
    border-radius: 50%;
    border-top-color: transparent;
    border-left-color: transparent;
    animation: spin 12s linear infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Hero Geometric Elements
   ======================================== */
.hero-geo {
    transition: transform 0.6s ease-out;
}

.hero-geo-1 {
    animation: heroFloat1 12s ease-in-out infinite;
}

.hero-geo-2 {
    animation: heroFloat2 15s ease-in-out infinite;
}

.hero-geo-3 {
    animation: heroFloat3 20s ease-in-out infinite;
}

@keyframes heroFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes heroFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 30px); }
}

@keyframes heroFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* ========================================
   Navigation
   ======================================== */
.nav-header {
    background: rgba(255, 250, 243, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-header.scrolled {
    background: rgba(255, 250, 243, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #C05640;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ========================================
   Hero Badge
   ======================================== */
.hero-badge {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ========================================
   Parallax on scroll
   ======================================== */
.hero-geo {
    will-change: transform;
}

/* ========================================
   Focus styles
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C05640;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Selection
   ======================================== */
::selection {
    background: rgba(192, 86, 64, 0.2);
    color: #2E160F;
}

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

/* ========================================
   Tablet adjustments
   ======================================== */
@media (max-width: 768px) {
    .shape-circle-1,
    .shape-circle-2,
    .shape-triangle,
    .shape-square,
    .shape-arc {
        display: none;
    }
}
