/* ============================================
   Scott K. Miller, DDS — Style System
   Palette: Terracotta + Sand | Minimalist
   ============================================ */

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

:root {
    --terracotta: #B85C3E;
    --terracotta-deep: #9A4B30;
    --terracotta-light: #D4856A;
    --sand: #F5F0EB;
    --sand-light: #FAF7F4;
    --sand-dark: #E8E0D8;
    --cream: #FDFBF9;
    --charcoal: #2A2522;
    --charcoal-light: #4A4440;
    --warm-gray: #8A8078;
    --warm-gray-light: #B8AEA6;
    --white: #FFFFFF;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Karla', 'Helvetica Neue', Arial, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--charcoal);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

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

/* ============================================
   Header
   ============================================ */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 249, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

#site-header.scrolled {
    border-bottom-color: var(--sand-dark);
    box-shadow: 0 1px 20px rgba(42, 37, 34, 0.04);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
}

.logo-mark {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--terracotta);
    border: 1px solid var(--terracotta);
    padding: 0.35rem 0.5rem;
    line-height: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.logo-tagline {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--warm-gray);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Navigation */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-list a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-light);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    transition: color 0.3s var(--ease-smooth);
    position: relative;
}

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

.nav-list a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out);
}

.nav-list a:not(.nav-cta):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    color: var(--white) !important;
    background: var(--terracotta);
    padding: 0.6rem 1.25rem !important;
    border-radius: 2px;
    transition: background 0.3s var(--ease-smooth), transform 0.2s var(--ease-smooth) !important;
}

.nav-cta:hover {
    background: var(--terracotta-deep) !important;
    transform: translateY(-1px);
}

.nav-cta::after {
    display: none !important;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--charcoal);
    position: relative;
    transition: background 0.3s, transform 0.3s var(--ease-out);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 1px;
    background: var(--charcoal);
    left: 0;
    transition: transform 0.3s var(--ease-out);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    position: relative;
    overflow: hidden;
    background: var(--cream);
    padding-top: 80px;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(184, 92, 62, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 80% 20%, rgba(245, 240, 235, 0.8) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    padding: 4rem 2rem 4rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    line-height: 1;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 4.5vw, 3.75rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--charcoal);
    max-width: 580px;
    letter-spacing: -0.01em;
}

.hero-headline em {
    font-style: italic;
    color: var(--terracotta);
}

.hero-sub {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--warm-gray);
    max-width: 440px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sand-dark);
    max-width: 320px;
}

.hero-detail {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.85rem;
    color: var(--warm-gray);
    line-height: 1.4;
}

.hero-detail a {
    color: var(--charcoal-light);
    transition: color 0.3s;
}

.hero-detail a:hover {
    color: var(--terracotta);
}

.hero-detail svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Hero image */
.hero-image {
    position: relative;
    height: 100%;
    min-height: 600px;
    overflow: hidden;
}

.hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) brightness(1.02);
}

.hero-image-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, var(--cream), transparent);
    pointer-events: none;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.9rem 2rem;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

.btn-primary:hover {
    background: var(--terracotta-deep);
    border-color: var(--terracotta-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 92, 62, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}

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

.btn-full {
    width: 100%;
}

/* ============================================
   Section shared
   ============================================ */
.section-eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1.25rem;
    line-height: 1;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    line-height: 1.25;
    color: var(--charcoal);
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

.section-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--warm-gray);
    max-width: 500px;
    line-height: 1.8;
}

/* ============================================
   About
   ============================================ */
.about {
    padding: 8rem 0;
    background: var(--sand-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.about-image-wrap {
    position: relative;
}

.about-image-wrap img {
    width: 100%;
    height: 620px;
    object-fit: cover;
    filter: saturate(0.85);
    border-radius: 2px;
}

.about-image-border {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid var(--terracotta-light);
    border-radius: 2px;
    z-index: -1;
    pointer-events: none;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-content p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--charcoal-light);
    line-height: 1.85;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.value-line {
    width: 32px;
    height: 1px;
    background: var(--terracotta-light);
    flex-shrink: 0;
}

.value-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--charcoal);
    letter-spacing: 0.01em;
}

/* ============================================
   Services
   ============================================ */
.services {
    padding: 8rem 0;
    background: var(--cream);
}

.services .section-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

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

.service-card {
    padding: 2.5rem 2rem;
    background: var(--sand-light);
    border: 1px solid var(--sand-dark);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

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

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

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

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--terracotta);
    opacity: 0.85;
}

.service-icon svg {
    stroke: currentColor;
}

.service-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.service-desc {
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--warm-gray);
    line-height: 1.75;
}

/* ============================================
   New Patients
   ============================================ */
.new-patients {
    padding: 8rem 0;
    background: var(--sand);
}

.new-patients-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.new-patients-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.new-patients-content > p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--charcoal-light);
    line-height: 1.85;
}

.new-patient-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.new-patient-steps li {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--terracotta-light);
    line-height: 1;
    min-width: 2.5rem;
    padding-top: 0.15rem;
}

.step-number strong {
    font-weight: 500;
    display: block;
    font-size: 0.95rem;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.step-number span {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--warm-gray);
    line-height: 1.6;
}

.new-patients-image {
    position: relative;
}

.new-patients-image img {
    width: 100%;
    height: 640px;
    object-fit: cover;
    filter: saturate(0.85);
    border-radius: 2px;
}

/* ============================================
   Contact
   ============================================ */
.contact {
    padding: 8rem 0;
    background: var(--cream);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-intro {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--charcoal-light);
    line-height: 1.85;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1rem;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sand-dark);
    border-radius: 50%;
    color: var(--terracotta);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.2rem;
}

.contact-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--charcoal);
}

.contact-value a {
    color: var(--charcoal);
    transition: color 0.3s;
}

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

/* Form */
.contact-form-wrap {
    background: var(--sand-light);
    border: 1px solid var(--sand-dark);
    border-radius: 2px;
    padding: 3rem;
}

.form-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--white);
    border: 1px solid var(--sand-dark);
    border-radius: 2px;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(184, 92, 62, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--warm-gray-light);
}

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

.form-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(184, 92, 62, 0.06);
    border: 1px solid rgba(184, 92, 62, 0.15);
    border-radius: 2px;
    color: var(--terracotta-deep);
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 1rem;
}

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

/* ============================================
   Footer
   ============================================ */
#site-footer {
    background: var(--charcoal);
    color: var(--sand);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(245, 240, 235, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--terracotta-light);
    border: 1px solid var(--terracotta-light);
    padding: 0.3rem 0.5rem;
    line-height: 1;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    color: var(--sand);
}

.footer-tagline {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-top: 0.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.footer-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--warm-gray-light);
    transition: color 0.3s;
}

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: right;
}

.footer-contact p {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--warm-gray-light);
    line-height: 1.6;
}

.footer-contact a {
    color: var(--warm-gray-light);
    transition: color 0.3s;
}

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

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--warm-gray);
    letter-spacing: 0.05em;
}

/* ============================================
   Scroll animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.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) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 80px;
    }

    .hero-inner {
        padding: 5rem 2rem 4rem;
        order: 2;
    }

    .hero-image {
        height: 400px;
        min-height: 300px;
        order: 1;
    }

    .hero-details {
        max-width: none;
    }

    .about-grid,
    .new-patients-inner,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-wrap img,
    .new-patients-image img {
        height: 400px;
    }

    .about-image-border {
        top: 12px;
        left: 12px;
        right: -12px;
        bottom: -12px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-links {
        flex-direction: row;
        gap: 1.5rem;
    }

    .footer-contact {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 1.25rem;
        height: 70px;
    }

    .logo-tagline {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(253, 251, 249, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.5s var(--ease-out);
    }

    .nav-list.open {
        transform: translateX(0);
    }

    .nav-list a {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    .nav-cta {
        margin-top: 1rem;
    }

    .hero {
        padding-top: 70px;
    }

    .hero-inner {
        padding: 3rem 1.25rem 2.5rem;
        gap: 1.5rem;
    }

    .hero-headline {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrap {
        padding: 2rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about,
    .services,
    .new-patients,
    .contact {
        padding: 5rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-image {
        height: 280px;
    }

    .about-image-wrap img,
    .new-patients-image img {
        height: 280px;
    }

    .logo-mark {
        font-size: 0.95rem;
        padding: 0.25rem 0.4rem;
    }

    .logo-name {
        font-size: 0.95rem;
    }
}
