/* ========================================
   Robert G. McCracken, DMD — Dental Practice
   Bold Editorial Design System
   Charcoal + Coral Palette
======================================== */

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

:root {
    --charcoal-900: #1A1A1A;
    --charcoal-800: #2C2C2C;
    --charcoal-700: #3D3D3D;
    --charcoal-600: #4A4A4A;
    --charcoal-500: #6B6B6B;
    --charcoal-400: #8A8A8A;
    --charcoal-300: #B0B0B0;
    --charcoal-200: #D4D4D4;
    --charcoal-100: #EDEDED;
    --charcoal-50:  #F7F7F7;
    --charcoal-white: #FAFAFA;

    --coral-600: #C44D33;
    --coral-500: #E8644C;
    --coral-400: #F07860;
    --coral-300: #F59885;
    --coral-200: #FABFB5;
    --coral-100: #FDE4DF;
    --coral-50:  #FFF5F3;

    --cream: #FDF8F6;
    --cream-dark: #F7F0EC;

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--charcoal-800);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* --- Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 246, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--charcoal-200);
    box-shadow: 0 1px 20px rgba(26, 26, 26, 0.06);
}

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

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

.logo-mark {
    width: 44px;
    height: 44px;
    background: var(--charcoal-900);
    color: var(--coral-500);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: transform 0.3s var(--ease-out-expo);
}

.logo:hover .logo-mark {
    transform: rotate(-5deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--charcoal-500);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal-600);
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover {
    color: var(--charcoal-900);
    background: var(--charcoal-100);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-left: 12px;
    background: var(--coral-500);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    transition: background 0.25s ease, transform 0.2s var(--ease-out-expo), box-shadow 0.25s ease;
}

.nav-cta:hover {
    background: var(--coral-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 100, 76, 0.35);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--charcoal-800);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo);
}

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

.mobile-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--charcoal-900);
    padding: 12px 24px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav-link:hover {
    color: var(--coral-500);
    background: var(--coral-50);
}

.mobile-nav-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 16px 32px;
    background: var(--coral-500);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--charcoal-900);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.88) 0%,
        rgba(44, 44, 44, 0.72) 50%,
        rgba(26, 26, 26, 0.6) 100%
    );
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--coral-400);
    margin-bottom: 28px;
}

.hero-eyebrow::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--coral-500);
}

.hero-headline {
    font-size: clamp(3rem, 8vw, 6.5rem);
    color: #fff;
    font-weight: 900;
    line-height: 1.0;
    margin-bottom: 28px;
    letter-spacing: -0.03em;
}

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

.hero-sub {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: var(--charcoal-300);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 44px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}

.btn-primary {
    background: var(--coral-500);
    color: #fff;
    box-shadow: 0 4px 20px rgba(232, 100, 76, 0.3);
}

.btn-primary:hover {
    background: var(--coral-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 100, 76, 0.4);
}

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

.btn-outline-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

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

.btn-sm {
    padding: 12px 24px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 20px 40px;
    font-size: 1.05rem;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--charcoal-400);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--coral-500), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

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

/* --- Section Shared --- */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--coral-500);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--charcoal-900);
    margin-bottom: 20px;
    letter-spacing: -0.025em;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--charcoal-500);
    line-height: 1.7;
    max-width: 560px;
}

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

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

.service-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    border: 1px solid var(--charcoal-100);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(26, 26, 26, 0.08);
    border-color: var(--coral-200);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--coral-50);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coral-500);
    margin-bottom: 24px;
    transition: background 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--coral-100);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--charcoal-900);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

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

/* --- About --- */
.about {
    padding: 120px 0;
    background: var(--charcoal-900);
    overflow: hidden;
}

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

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

.about-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: var(--coral-500);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.6;
}

.about .section-label {
    color: var(--coral-400);
}

.about .section-title {
    color: #fff;
}

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

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--charcoal-700);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--coral-500);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--charcoal-400);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Patient Info --- */
.patients {
    padding: 120px 0;
    background: var(--cream);
}

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

.info-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    border: 1px solid var(--charcoal-100);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 26, 26, 0.07);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.info-card-header svg {
    color: var(--coral-500);
}

.info-card-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal-900);
}

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

.info-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--charcoal-100);
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list li span:first-child {
    color: var(--charcoal-600);
    font-weight: 500;
}

.info-list li span:last-child {
    color: var(--charcoal-900);
    font-weight: 600;
}

.info-address {
    font-style: normal;
    font-size: 1.05rem;
    color: var(--charcoal-700);
    line-height: 1.7;
    margin-bottom: 20px;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--coral-500);
    transition: color 0.2s ease, gap 0.2s ease;
}

.info-link:hover {
    color: var(--coral-600);
    gap: 12px;
}

.info-desc {
    font-size: 0.95rem;
    color: var(--charcoal-500);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* --- CTA Banner --- */
.cta-banner {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.9) 0%,
        rgba(44, 44, 44, 0.8) 100%
    );
}

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

.cta-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--coral-400);
    margin-bottom: 20px;
}

.cta-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    margin-bottom: 20px;
}

.cta-banner p {
    font-size: 1.1rem;
    color: var(--charcoal-300);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* --- Contact --- */
.contact {
    padding: 120px 0;
    background: var(--cream-dark);
}

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

.contact-desc {
    font-size: 1.05rem;
    color: var(--charcoal-500);
    line-height: 1.7;
    margin-bottom: 40px;
}

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

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

.contact-item svg {
    color: var(--coral-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal-400);
    margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
    font-size: 1.05rem;
    color: var(--charcoal-800);
    font-weight: 500;
}

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

/* Form */
.contact-form-wrap {
    background: #fff;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(26, 26, 26, 0.06);
    border: 1px solid var(--charcoal-100);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-500);
}

.form-group input,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 14px 18px;
    border: 1.5px solid var(--charcoal-200);
    border-radius: 12px;
    background: var(--charcoal-50);
    color: var(--charcoal-900);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--coral-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 100, 76, 0.1);
}

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

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

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    gap: 16px;
}

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

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

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--charcoal-900);
}

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

/* --- Footer --- */
.footer {
    background: var(--charcoal-900);
    padding: 64px 0 40px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--charcoal-700);
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand .logo-mark {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
}

.footer-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.footer-tagline {
    display: block;
    font-size: 0.85rem;
    color: var(--charcoal-400);
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--charcoal-400);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--charcoal-500);
}

.footer-bottom a {
    color: var(--coral-400);
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--coral-300);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

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

    .about-layout {
        gap: 48px;
    }

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

    .info-grid .info-card:last-child {
        grid-column: span 2;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

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

    .hero-content {
        padding-top: 100px;
    }

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

    .info-grid .info-card:last-child {
        grid-column: span 1;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image-wrap {
        max-width: 400px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .cta-banner {
        padding: 80px 0;
    }
}

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

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

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

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

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

    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
}
