/* ============================================
   Texas Orthodontics — Editorial Style
   Emerald Green + Cream Palette
   ============================================ */

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

:root {
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --cream-50: #faf9f6;
    --cream-100: #f5f3ed;
    --cream-200: #ece8dd;
    --cream-300: #e0dbce;
    --charcoal: #1a1a1a;
    --charcoal-light: #2d2d2d;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b6b6b;
    --white: #ffffff;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--cream-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    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 24px;
}

/* ============================================
   Typography
   ============================================ */

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--emerald-700);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--emerald-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--emerald-700);
    border: 1.5px solid var(--emerald-700);
}

.btn-secondary:hover {
    background-color: var(--emerald-700);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ============================================
   Header / Navigation
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-200);
    transition: box-shadow 0.3s ease;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    background: var(--emerald-700);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--charcoal);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--emerald-700);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--emerald-700);
}

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

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

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.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);
}

/* ============================================
   Hero
   ============================================ */

.hero {
    padding-top: 72px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background: var(--cream-50);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 16px;
}

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

.hero-headline br {
    display: block;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 480px;
}

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

.hero-image {
    position: relative;
}

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

/* ============================================
   Intro Bar
   ============================================ */

.intro-bar {
    background: var(--emerald-800);
    padding: 32px 0;
}

.intro-grid {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.intro-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cream-100);
    font-size: 0.9375rem;
    font-weight: 500;
}

.intro-icon {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream-200);
    flex-shrink: 0;
}

/* ============================================
   About
   ============================================ */

.about {
    padding: 100px 0;
}

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

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

.about-content .section-title {
    margin-bottom: 24px;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-content .btn {
    margin-top: 24px;
}

/* ============================================
   Services
   ============================================ */

.services {
    padding: 100px 0;
    background: var(--cream-100);
}

.services .section-header {
    margin-bottom: 56px;
}

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

.service-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--emerald-50);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-700);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Patients
   ============================================ */

.patients {
    padding: 100px 0;
}

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

.patients-content .section-title {
    margin-bottom: 24px;
}

.patients-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.patients-images {
    position: relative;
    height: 500px;
}

.patient-img {
    position: absolute;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.patient-img--large {
    width: 300px;
    height: 400px;
    top: 0;
    right: 0;
}

.patient-img--small {
    width: 260px;
    height: 200px;
    bottom: 0;
    left: 0;
}

/* ============================================
   Visit
   ============================================ */

.visit {
    padding: 100px 0;
    background: var(--emerald-900);
    color: var(--white);
}

.visit .section-eyebrow {
    color: var(--emerald-400);
}

.visit .section-sub {
    color: rgba(255,255,255,0.7);
}

.visit .section-header {
    margin-bottom: 64px;
}

.visit-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.visit-step {
    position: relative;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.08);
    line-height: 1;
    margin-bottom: 12px;
}

.visit-step h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.visit-step p {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

.visit-step a {
    color: var(--emerald-400);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.visit-step a:hover {
    color: var(--emerald-300);
}

/* ============================================
   Contact
   ============================================ */

.contact {
    padding: 100px 0;
    background: var(--cream-100);
}

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

.contact-info .section-title {
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 32px;
}

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

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

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-value {
    font-size: 1rem;
    color: var(--charcoal);
}

.contact-value a {
    color: var(--emerald-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--emerald-600);
    text-decoration: underline;
}

.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.contact-form-wrapper h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--cream-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--cream-50);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

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

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

.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success svg {
    margin: 0 auto 16px;
    color: var(--emerald-600);
}

.form-success p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--charcoal);
    color: var(--cream-200);
    padding: 64px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand .logo-mark {
    background: var(--emerald-600);
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    margin-top: 12px;
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s ease;
}

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

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

.footer-phone {
    color: var(--emerald-400);
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-phone:hover {
    color: var(--emerald-300);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
}

/* ============================================
   Mobile Menu Overlay
   ============================================ */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(250,249,246,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-overlay a {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--charcoal);
    transition: color 0.2s ease;
}

.mobile-menu-overlay a:hover {
    color: var(--emerald-700);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .visit-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        height: 400px;
    }

    .about-container,
    .patients-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .about-image img,
    .patients-images {
        height: 320px;
    }

    .patients-images {
        height: 360px;
    }

    .patient-img--large {
        width: 220px;
        height: 280px;
    }

    .patient-img--small {
        width: 200px;
        height: 160px;
    }

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

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

    .contact-form-wrapper {
        padding: 28px;
    }

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

    .intro-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

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

    .hero {
        padding-top: 72px;
    }

    .hero-headline {
        font-size: 2rem;
    }

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

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

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

/* ============================================
   Reduced Motion
   ============================================ */

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

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

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