/* ============================================
   Meehan Dental - Classic & Elegant Design
   Palette: Terracotta + Sand
   ============================================ */

:root {
    --terracotta: #C2704E;
    --terracotta-dark: #A85A3A;
    --terracotta-light: #D4916F;
    --sand: #F5F0EB;
    --sand-dark: #E8DFD5;
    --sand-light: #FAF7F4;
    --charcoal: #2C2C2C;
    --charcoal-light: #4A4A4A;
    --cream: #FDFCFA;
    --white: #FFFFFF;
    --gold: #C9A962;
    --shadow-sm: 0 2px 8px rgba(44, 44, 44, 0.08);
    --shadow-md: 0 8px 30px rgba(44, 44, 44, 0.12);
    --shadow-lg: 0 20px 60px rgba(44, 44, 44, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Lato', sans-serif;
    color: var(--charcoal);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--charcoal);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--sand-dark);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

.logo-sub {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--terracotta);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--charcoal-light);
    letter-spacing: 0.02em;
    position: relative;
}

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

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

.nav-links a::after {
    width: 100%;
}

.btn-nav {
    background: var(--terracotta);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-nav::after {
    display: none;
}

.btn-nav:hover {
    background: var(--terracotta-dark);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--charcoal);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sand) 0%, var(--sand-dark) 100%);
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: url('https://images.pexels.com/photos/29110703/pexels-photo-29110703.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1200&h=1600') center/cover no-repeat;
    opacity: 0.15;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--sand) 0%, transparent 60%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

.hero-content {
    max-width: 560px;
}

.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 24px;
    line-height: 1.15;
}

.hero-accent {
    display: block;
    font-style: italic;
    color: var(--terracotta);
    font-weight: 400;
    font-size: 0.85em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--charcoal-light);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Lato', sans-serif;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(194, 112, 78, 0.35);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(194, 112, 78, 0.45);
}

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

.btn-outline:hover {
    background: var(--charcoal);
    color: var(--white);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Floating Stat Cards */
.hero-stats {
    position: relative;
    height: 420px;
}

.stat-card {
    position: absolute;
    background: var(--white);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stat-card--1 {
    top: 0;
    right: 0;
}

.stat-card--2 {
    top: 140px;
    right: 40px;
}

.stat-card--3 {
    bottom: 0;
    right: 10px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    background: var(--sand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--terracotta);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--charcoal-light);
    letter-spacing: 0.02em;
}

/* ============================================
   Section Common
   ============================================ */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
    position: relative;
}

.section-tag::before,
.section-tag::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--terracotta);
    vertical-align: middle;
    margin: 0 12px;
    opacity: 0.5;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--charcoal-light);
    line-height: 1.8;
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: 120px 0;
    background: var(--cream);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    border: 1px solid var(--sand-dark);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

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

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--terracotta-light);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--sand) 0%, var(--sand-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--charcoal-light);
    line-height: 1.7;
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 120px 0;
    background: var(--sand);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 20px;
    width: 100%;
    height: 700px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.about-accent {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 200px;
    height: 200px;
    background: var(--terracotta);
    border-radius: 20px;
    opacity: 0.1;
    z-index: -1;
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 1.05rem;
    color: var(--charcoal-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--charcoal);
    font-weight: 500;
}

.about-feature svg {
    flex-shrink: 0;
}

/* ============================================
   New Patients Section
   ============================================ */
.new-patients {
    padding: 120px 0;
    background: var(--cream);
}

.patients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.patient-step {
    text-align: center;
    padding: 48px 32px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--sand-dark);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.patient-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.patient-step:hover {
    box-shadow: var(--shadow-md);
}

.step-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--terracotta);
    opacity: 0.2;
    margin-bottom: 16px;
    line-height: 1;
}

.patient-step h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.patient-step p {
    font-size: 0.95rem;
    color: var(--charcoal-light);
    line-height: 1.7;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--charcoal) 0%, #3a3a3a 100%);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact .section-tag {
    color: var(--terracotta-light);
}

.contact .section-tag::before,
.contact .section-tag::after {
    background: var(--terracotta-light);
}

.contact .section-title {
    color: var(--white);
}

.contact-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 20px;
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: rgba(194, 112, 78, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--white);
}

.contact-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

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

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--white);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 32px;
    color: var(--charcoal);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--sand-dark);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    color: var(--charcoal);
    background: var(--sand-light);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(194, 112, 78, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.form-success {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.form-success.show {
    display: block;
}

.form-success svg {
    margin: 0 auto 20px;
}

.form-success h4 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.form-success p {
    color: var(--charcoal-light);
    line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-light);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.footer-contact p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-delay="0"] { transition-delay: 0ms; }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="150"] { transition-delay: 150ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }

@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-stats {
        height: auto;
        display: flex;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stat-card {
        position: relative;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .about-image img {
        height: 500px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--cream);
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--sand-dark);
        transform: translateY(-120%);
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .services-grid,
    .patients-grid {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .contact-form-wrapper {
        padding: 32px 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-card {
        min-width: 100%;
    }
}
