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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #B85D42;
    color: #FAF7F4;
    padding: 8px 16px;
    z-index: 100;
    font-size: 14px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Preloader */
#preloader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Hero */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
}

.hero-gradient {
    background: radial-gradient(ellipse at 70% 50%, rgba(107, 47, 26, 0.4) 0%, rgba(107, 47, 26, 0.15) 40%, transparent 70%),
                radial-gradient(ellipse at 20% 80%, rgba(184, 93, 66, 0.15) 0%, transparent 50%);
}

.grid-pattern {
    background-image: linear-gradient(rgba(184, 93, 66, 0.08) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(184, 93, 66, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-title {
    line-height: 0.95;
}

.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-actions {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-stats {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.hero-image {
    animation: fadeInRight 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-img {
    transition: transform 0.8s ease;
}

.hero-image:hover .hero-img {
    transform: scale(1.03);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    cursor: pointer;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(227, 206, 186, 0.6), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(0.6);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Header */
#site-header {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
    background-color: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(184, 93, 66, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #E0A88A;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #E0A88A !important;
}

/* Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    position: relative;
}

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

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

.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #B85D42;
    color: #FAF7F4;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    background: #C4724F;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 93, 66, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #E2D8CC;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(226, 216, 204, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #E0A88A;
    color: #E0A88A;
    transform: translateY(-2px);
}

/* Section Styles */
.section-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #D4916A;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    color: #FAF7F4;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.section-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #9A8B7A;
    line-height: 1.7;
    max-width: 520px;
    margin-top: 16px;
}

/* Service Cards */
.service-card {
    padding: 2rem;
    background: rgba(28, 25, 23, 0.6);
    border: 1px solid rgba(107, 47, 26, 0.15);
    border-radius: 4px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #B85D42, #E0A88A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: rgba(184, 93, 66, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(184, 93, 66, 0.25);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrap {
    background: rgba(184, 93, 66, 0.1);
    border-color: rgba(184, 93, 66, 0.5);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #D4916A;
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-link:hover {
    color: #E0A88A;
    gap: 10px;
}

.service-link svg {
    transition: transform 0.3s ease;
}

/* About */
.about-feature {
    transition: transform 0.3s ease;
}

.about-feature:hover {
    transform: translateX(4px);
}

.about-img-1 {
    transition: transform 0.6s ease;
}

.about-image-grid:hover .about-img-1 {
    transform: scale(1.02);
}

/* Patient Cards */
.patient-card {
    padding: 1.25rem;
    background: rgba(28, 25, 23, 0.5);
    border: 1px solid rgba(107, 47, 26, 0.12);
    border-radius: 4px;
    transition: all 0.4s ease;
}

.patient-card:hover {
    border-color: rgba(184, 93, 66, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.patient-card-img {
    height: 200px;
}

.patient-card-img-inner {
    transition: transform 0.6s ease;
    width: 100%;
    height: 100%;
}

.patient-card:hover .patient-card-img-inner {
    transform: scale(1.05);
}

/* Contact Form */
.form-input,
.form-select,
.form-textarea {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(122, 107, 90, 0.25);
    border-radius: 3px;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #E2D8CC;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #5C4D3C;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #B85D42;
    box-shadow: 0 0 0 3px rgba(184, 93, 66, 0.1);
    background: rgba(20, 20, 20, 0.95);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A8B7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: #1C1917;
    color: #E2D8CC;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Contact Info */
.contact-info-item {
    transition: transform 0.3s ease;
}

.contact-info-item:hover {
    transform: translateX(4px);
}

/* Map CTA */
.map-cta {
    transition: transform 0.3s ease;
}

.map-cta:hover {
    transform: translateY(-2px);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #1C1917;
    border: 1px solid rgba(184, 93, 66, 0.3);
    border-radius: 3px;
    color: #E0A88A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 20;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #B85D42;
    border-color: #B85D42;
    color: #FAF7F4;
    transform: translateY(-2px);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Stats */
.stat-number {
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    color: #E0A88A;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 8rem 0 4rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem !important;
    }

    .about-image-grid {
        margin-bottom: 2rem;
    }

    .patient-card-img {
        height: 180px;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 14px;
    }
}

/* 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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
