/* ============================================
   MD Skin — Clean Minimalist Medical Aesthetics
   Color Palette: Terracotta + Sand
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-terracotta: #C07A5A;
    --color-terracotta-dark: #A06040;
    --color-terracotta-light: #D4977B;
    --color-sand: #F5F0EB;
    --color-sand-dark: #E8E0D8;
    --color-cream: #FAF8F5;
    --color-warm-white: #FFFDF9;
    --color-charcoal: #2C2825;
    --color-text: #3D3530;
    --color-text-light: #6B5E56;
    --color-text-muted: #9A8B82;
    --color-border: #E8E0D8;
    --color-border-light: #F0EBE5;
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-warm-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-charcoal);
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    color: var(--color-text-light);
}

.label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
    display: block;
}

.label--light {
    color: var(--color-terracotta-light);
}

.section-line {
    width: 60px;
    height: 1px;
    background: var(--color-terracotta);
    margin-top: var(--space-sm);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-terracotta);
    color: #fff;
    border: 1.5px solid var(--color-terracotta);
}

.btn--primary:hover {
    background: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(192, 122, 90, 0.25);
}

.btn--outline {
    background: transparent;
    color: var(--color-terracotta);
    border: 1.5px solid var(--color-terracotta);
}

.btn--outline:hover {
    background: var(--color-terracotta);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}

.btn--ghost:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

.btn--light {
    background: #fff;
    color: var(--color-terracotta);
    border: 1.5px solid #fff;
}

.btn--light:hover {
    background: var(--color-sand);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn--ghost-light {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn--ghost-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.btn--full {
    width: 100%;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-light);
    transition: all var(--transition);
}

.header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-charcoal);
}

.logo--light {
    color: #fff;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav a:not(.btn) {
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    transition: color var(--transition);
    position: relative;
}

.nav a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-terracotta);
    transition: width var(--transition);
}

.nav a:not(.btn):hover {
    color: var(--color-terracotta);
}

.nav a:not(.btn):hover::after {
    width: 100%;
}

.btn--nav {
    padding: 0.65rem 1.4rem;
    font-size: 0.72rem;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-charcoal);
    transition: all var(--transition);
    transform-origin: center;
}

.mobile-menu-btn.active span:first-child {
    transform: rotate(45deg) translate(4px, 5px);
}

.mobile-menu-btn.active span:last-child {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-terracotta);
    overflow: hidden;
    padding: var(--space-xl) var(--space-md);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, 
            rgba(160, 96, 64, 0.92) 0%, 
            rgba(192, 122, 90, 0.88) 40%,
            rgba(180, 110, 80, 0.85) 100%),
        url('https://images.pexels.com/photos/11363792/pexels-photo-11363792.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080') center/cover no-repeat;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 780px;
    padding-top: var(--space-lg);
}

.hero-line {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto var(--space-md);
}

.hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-md);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    color: #fff;
    line-height: 1.05;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    max-width: 540px;
    margin: 0 auto var(--space-lg);
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.hero-actions .btn--ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.hero-actions .btn--ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto var(--space-md);
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-meta span {
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Philosophy --- */
.philosophy {
    padding: var(--space-2xl) 0;
    background: var(--color-warm-white);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.philosophy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    aspect-ratio: 4/5;
}

.philosophy-text .label {
    margin-bottom: var(--space-sm);
}

.philosophy-text h2 {
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.philosophy-text p {
    margin-bottom: var(--space-sm);
    line-height: 1.85;
}

.philosophy-signature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* --- Services --- */
.services {
    padding: var(--space-2xl) 0;
    background: var(--color-sand);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    margin-top: var(--space-sm);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.service-card {
    background: var(--color-warm-white);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

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

.service-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--color-terracotta-light);
    line-height: 1;
    margin-bottom: var(--space-sm);
    opacity: 0.6;
}

.service-card h3 {
    margin-bottom: var(--space-xs);
    font-weight: 400;
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--color-text-muted);
}

/* --- About --- */
.about {
    padding: var(--space-2xl) 0;
    background: var(--color-warm-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-image {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    aspect-ratio: 7/5;
}

.about-text .label {
    margin-bottom: var(--space-sm);
}

.about-text h2 {
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.about-text p {
    margin-bottom: var(--space-sm);
    line-height: 1.85;
}

.about-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--color-terracotta);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* --- CTA --- */
.cta {
    position: relative;
    padding: var(--space-2xl) 0;
    background: var(--color-charcoal);
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, 
            rgba(44, 40, 37, 0.95) 0%,
            rgba(61, 53, 48, 0.9) 100%),
        url('https://images.pexels.com/photos/4047054/pexels-photo-4047054.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=600') center/cover no-repeat;
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta .label {
    margin-bottom: var(--space-md);
}

.cta h2 {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3rem);
    max-width: 640px;
    margin: 0 auto var(--space-lg);
    line-height: 1.3;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* --- Contact --- */
.contact {
    padding: var(--space-2xl) 0;
    background: var(--color-sand);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.contact-info .label {
    margin-bottom: var(--space-sm);
}

.contact-info h2 {
    margin-bottom: var(--space-sm);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.contact-info > p {
    margin-bottom: var(--space-lg);
    line-height: 1.85;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.contact-item svg {
    color: var(--color-terracotta);
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-item strong {
    display: block;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-charcoal);
    margin-bottom: 0.25rem;
}

.contact-item span,
.contact-item a {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.contact-item a:hover {
    color: var(--color-terracotta);
}

/* Form */
.contact-form-wrapper {
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--color-text);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 122, 90, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group 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='%239A8B82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    text-align: center;
    color: var(--color-terracotta);
}

.form-success svg {
    color: var(--color-terracotta);
}

.form-success p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* --- Footer --- */
.footer {
    background: var(--color-charcoal);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-sm);
    font-size: 0.9rem;
    max-width: 280px;
    line-height: 1.7;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links strong,
.footer-contact strong {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.4rem;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-terracotta-light);
}

.footer-contact p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--color-terracotta-light);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-top: var(--space-md);
}

.footer-bottom p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.6;
}

.footer-legal {
    font-size: 0.72rem !important;
    color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Scroll Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .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; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-warm-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-md);
        transition: right var(--transition);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    }
    
    .nav.open {
        right: 0;
    }
    
    .nav a:not(.btn) {
        font-size: 0.9rem;
    }
    
    .philosophy-grid,
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .philosophy-image {
        order: -1;
    }
    
    .philosophy-image img {
        aspect-ratio: 16/10;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .contact-form-wrapper {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--space-lg) var(--space-sm);
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .hero-divider {
        height: 30px;
        margin-bottom: var(--space-sm);
    }
}
