/* ========================================
   James F. Melzer DMD — Dental Website
   Classic & Elegant • Navy + Gold
======================================== */

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

:root {
    --navy-900: #0a1628;
    --navy-800: #0f2140;
    --navy-700: #152d56;
    --navy-600: #1a3a6e;
    --navy-500: #1e4d8e;
    --gold-500: #c9a84c;
    --gold-400: #d4b965;
    --gold-300: #e0ca85;
    --gold-200: #f0e0a8;
    --cream-50: #faf8f4;
    --cream-100: #f5f0e8;
    --cream-200: #ede5d5;
    --warm-gray-100: #f7f5f2;
    --warm-gray-200: #ede8e0;
    --warm-gray-300: #d4cec4;
    --warm-gray-400: #a89e90;
    --warm-gray-500: #7a7066;
    --warm-gray-600: #5a5248;
    --warm-gray-700: #3d3730;
    --warm-gray-800: #2a2520;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', 'Segoe UI', system-ui, sans-serif;
    --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
    --shadow-md: 0 4px 20px rgba(10, 22, 40, 0.10);
    --shadow-lg: 0 10px 40px rgba(10, 22, 40, 0.14);
    --shadow-xl: 0 20px 60px rgba(10, 22, 40, 0.18);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    color: var(--warm-gray-700);
    background-color: var(--cream-50);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--gold-500);
}

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

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--navy-800);
    line-height: 1.2;
    font-weight: 700;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-900);
    border-color: var(--gold-500);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    border-color: var(--gold-400);
    color: var(--navy-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-navy {
    background: var(--navy-800);
    color: #fff;
    border-color: var(--navy-800);
}

.btn-navy:hover {
    background: var(--navy-700);
    border-color: var(--navy-700);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: #fff;
    color: var(--navy-800);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ---------- HEADER ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--warm-gray-200);
    transition: all var(--transition);
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy-800);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon::after {
    content: '';
    width: 16px;
    height: 20px;
    background: var(--gold-500);
    border-radius: 50% 50% 40% 40%;
    clip-path: polygon(20% 0%, 80% 0%, 100% 40%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 40%);
}

.logo-main {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.logo-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-500);
}

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

.nav a {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--warm-gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav a:hover {
    color: var(--navy-800);
    background: var(--cream-100);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--navy-800);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(
            135deg,
            var(--navy-900) 0%,
            var(--navy-700) 30%,
            #1a3a6e 50%,
            var(--navy-600) 70%,
            #1e3a5f 100%
        );
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 77, 142, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(201, 168, 76, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: #fff;
    margin-bottom: 24px;
    line-height: 1.15;
    font-weight: 700;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold-300);
}

.hero-desc {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color var(--transition);
}

.hero-scroll:hover {
    color: var(--gold-400);
}

.hero-scroll svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    margin-bottom: 20px;
}

.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
    margin: 0 auto 24px;
    border-radius: 2px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--warm-gray-500);
    line-height: 1.8;
}

/* ---------- SERVICES ---------- */
.services {
    background: var(--cream-50);
}

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

.service-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 40px 32px;
    border: 1px solid var(--warm-gray-200);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

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

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

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon svg {
    width: 26px;
    height: 26px;
    color: var(--gold-400);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--navy-800);
}

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

/* ---------- ABOUT ---------- */
.about {
    background: var(--warm-gray-100);
}

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

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(201, 168, 76, 0.3);
    pointer-events: none;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 6/7;
}

.about-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 20px;
}

.about-content .section-divider {
    margin: 0 0 24px;
}

.about-content p {
    color: var(--warm-gray-600);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--warm-gray-200);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-800);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-gray-400);
}

/* ---------- NEW PATIENTS ---------- */
.new-patients {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    position: relative;
    overflow: hidden;
}

.new-patients::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(30, 77, 142, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.new-patients-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.new-patients-content h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    margin-bottom: 20px;
}

.new-patients-content .section-divider {
    margin: 0 auto 24px;
}

.new-patients-intro {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 56px;
}

.new-patients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 56px;
}

.np-step {
    text-align: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.np-step:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.np-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-900);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 20px;
}

.np-step h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.np-step p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.new-patients-cta {
    text-align: center;
}

.new-patients-cta .btn-gold {
    margin-bottom: 16px;
}

.new-patients-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- CONTACT ---------- */
.contact {
    background: var(--cream-50);
}

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

.contact-info h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 20px;
}

.contact-info > p {
    color: var(--warm-gray-500);
    margin-bottom: 40px;
    line-height: 1.8;
}

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

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

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: var(--gold-400);
}

.contact-item strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--navy-800);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.95rem;
    color: var(--warm-gray-500);
    line-height: 1.7;
}

.contact-item a {
    color: var(--navy-600);
}

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

.contact-form-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 48px;
    border: 1px solid var(--warm-gray-200);
    box-shadow: var(--shadow-md);
}

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

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

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-gray-600);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--warm-gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--warm-gray-700);
    background: var(--cream-50);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
    background: #fff;
}

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

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

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, #f0f9e8, #e8f5e0);
    border-radius: var(--radius-md);
    border: 1px solid #c8e6c0;
}

.form-success svg {
    width: 48px;
    height: 48px;
    color: #4a9e4a;
}

.form-success p {
    font-size: 1rem;
    color: var(--warm-gray-700);
    line-height: 1.7;
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--navy-900);
    padding: 64px 0 0;
    color: rgba(255, 255, 255, 0.6);
}

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

.footer-brand .footer-logo {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-400);
    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.5);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 8px;
}

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

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

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

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

/* ---------- REVEAL ANIMATIONS ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

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

    .about-grid {
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(250, 248, 244, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--warm-gray-200);
        padding: 24px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav ul {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .nav a {
        display: block;
        padding: 12px 16px;
        width: 100%;
    }

    .nav .btn-gold {
        text-align: center;
        margin-top: 16px;
    }

    .hero {
        min-height: 90vh;
        padding: 100px 24px 60px;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .section {
        padding: 72px 0;
    }

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

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

    .about-image {
        max-height: 400px;
    }

    .about-image img {
        height: 100%;
    }

    .about-stats {
        gap: 24px;
    }

    .new-patients-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-form-wrapper {
        padding: 32px 24px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header .container {
        height: 70px;
    }

    .logo-main {
        font-size: 1rem;
    }

    .logo-sub {
        font-size: 0.6rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .stat {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 12px;
    }
}
