/* ========================================
   GLOBAL STYLES — Miller Tree Experts
   Shared across all pages
   ======================================== */

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

:root {
    --green: #1A7A3D;
    --green-light: #22994D;
    --green-pale: #E8F5ED;
    --green-wash: #F2FAF5;
    --slate: #1D1D1F;
    --slate-mid: #424245;
    --slate-light: #6E6E73;
    --gray-100: #F5F5F7;
    --gray-200: #E8E8ED;
    --gray-300: #D2D2D7;
    --white: #FFFFFF;
    --warm: #FAFAF8;

    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --space-2xl: 8rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.1);

    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 639px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 3rem;
        --space-2xl: 3.5rem;
    }
}

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

body {
    font-family: var(--font-body);
    color: var(--slate);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container--wide {
    max-width: 1400px;
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* ========================================
   NAV
   ======================================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav__logo img {
    height: 44px;
    width: auto;
}
.nav__links {
    display: none;
    align-items: center;
    gap: 0;
}
.nav__links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-mid);
    padding: 0.5rem 1.15rem;
    border-radius: 100px;
    transition: color var(--transition), background var(--transition);
    letter-spacing: -0.01em;
}
.nav__links a:hover {
    color: var(--slate);
    background: var(--gray-100);
}
.nav__links a.active {
    color: var(--green);
    background: var(--green-pale);
}
.nav__cta {
    display: none;
}
.nav__cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.35rem;
    border-radius: 100px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.nav__cta a:hover {
    background: var(--green-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,122,61,0.25);
}
.nav__cta svg { width: 16px; height: 16px; }

.nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.nav__toggle:hover { background: var(--gray-100); }
.nav__toggle span {
    display: block;
    position: relative;
    width: 18px; height: 2px;
    background: var(--slate);
    transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle span::before,
.nav__toggle span::after {
    content: '';
    position: absolute;
    left: 0; width: 100%; height: 2px;
    background: var(--slate);
    transition: transform 0.3s;
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__toggle.active span { background: transparent; }
.nav__toggle.active span::before { transform: rotate(45deg) translate(4px, 4px); }
.nav__toggle.active span::after { transform: rotate(-45deg) translate(4px, -4px); }

.nav__mobile {
    position: absolute;
    top: calc(100% + 8px);
    left: 1rem;
    right: 1rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-8px);
    pointer-events: none;
}
.nav__mobile.open {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nav__mobile-inner {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0;
}
.nav__mobile a {
    font-size: 0.925rem;
    font-weight: 500;
    padding: 0.7rem 1rem;
    color: var(--slate-mid);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav__mobile a:hover {
    color: var(--slate);
    background: var(--gray-100);
}
.nav__mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.25rem 0.5rem 0.5rem;
    padding: 0.7rem 1rem !important;
    background: var(--green);
    color: var(--white) !important;
    font-weight: 600;
    font-size: 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.nav__mobile-phone:hover {
    background: var(--green-light);
    color: var(--white) !important;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
    background: var(--green);
    color: var(--white);
}
.btn--primary:hover {
    background: var(--green-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,122,61,0.3);
}
.btn--glass {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
}
.btn--glass:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.btn--outline {
    background: transparent;
    color: var(--green);
    border: none;
    padding: 0.9rem 0;
    margin-left: 1rem;
}
.btn--outline:hover {
    background: transparent;
    color: var(--green-dark, #2a3a1a);
    transform: translateY(-2px);
}

/* ========================================
   PAGE HERO (shorter than homepage)
   ======================================== */
.page-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-top: 72px;
}
.page-hero__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.page-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-hero__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%),
        linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 60%);
}
.page-hero__content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl) 0 var(--space-lg);
    width: 100%;
}
.page-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: var(--space-sm);
    animation: heroFadeUp 0.8s 0.1s both cubic-bezier(0.16, 1, 0.3, 1);
}
.page-hero__breadcrumb a {
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}
.page-hero__breadcrumb a:hover {
    color: var(--white);
}
.page-hero__breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}
.page-hero__breadcrumb span {
    color: var(--white);
    font-weight: 500;
}
.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    color: var(--white);
    max-width: 20ch;
    margin-bottom: var(--space-sm);
    animation: heroFadeUp 0.8s 0.25s both cubic-bezier(0.16, 1, 0.3, 1);
}
.page-hero__subtitle {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: rgba(255,255,255,0.75);
    max-width: 55ch;
    line-height: 1.7;
    font-weight: 300;
    animation: heroFadeUp 0.8s 0.4s both cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section {
    padding: var(--space-xl) 0;
}
.section--lg {
    padding: var(--space-2xl) 0;
}
.section--gray {
    background: var(--gray-100);
}
.section--green-wash {
    background: var(--green-wash);
}
.section--green {
    background: var(--slate);
    color: var(--white);
}

.section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.75rem;
}
.section--green .section__eyebrow { color: var(--green-light); }

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.2;
    color: var(--slate);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.section--green .section__title { color: var(--white); }

.section__desc {
    font-size: 1.05rem;
    color: var(--slate-light);
    line-height: 1.7;
    max-width: 58ch;
    font-weight: 300;
}
.section--green .section__desc { color: rgba(255,255,255,0.6); }

.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-lg);
}
.section__header .section__desc {
    margin: 0 auto;
}

/* ========================================
   CTA
   ======================================== */
.cta {
    padding: var(--space-2xl) 0;
    background: var(--slate);
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%; height: 200%;
    background: radial-gradient(ellipse, rgba(26,122,61,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.cta .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: start;
}
.cta__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.cta__text {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    max-width: 48ch;
    font-weight: 300;
    margin-bottom: var(--space-md);
}
.cta__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--green-light);
    margin-bottom: 0.5rem;
    transition: color var(--transition);
}
.cta__phone:hover { color: white; }
.cta__phone svg { width: 22px; height: 22px; }
.cta__hours {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
}

.cta__form {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.cta__form-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: var(--space-md);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-group {
    margin-bottom: 0.75rem;
}
.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition), background var(--transition);
    outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.25);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
    background: rgba(255,255,255,0.1);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2322994D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}
.form-group select option {
    background: var(--slate);
    color: var(--white);
}
.form-group textarea {
    resize: vertical;
    min-height: 90px;
}
.cta__form .btn {
    width: 100%;
    justify-content: center;
    padding: 0.95rem;
    border-radius: var(--radius-sm);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #111113;
    padding: var(--space-lg) 0 0;
}
.footer .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}
.footer__brand { max-width: 280px; }
.footer__brand img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--space-sm);
}
.footer__brand-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
    font-weight: 300;
}
.footer__social {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--space-sm);
}
.footer__social a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    transition: all var(--transition);
}
.footer__social a:hover {
    background: var(--green);
    border-color: var(--green);
    color: white;
}
.footer__social svg { width: 16px; height: 16px; }

.footer__col-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.75rem;
}
.footer__col ul li { margin-bottom: 0.35rem; }
.footer__col a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    transition: color var(--transition);
    font-weight: 300;
}
.footer__col a:hover { color: var(--green-light); }

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    font-weight: 300;
}
.footer__contact-item svg {
    width: 15px; height: 15px;
    margin-top: 3px;
    flex-shrink: 0;
    color: var(--green-light);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: var(--space-lg);
    padding: var(--space-sm) 0;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.2);
    font-weight: 300;
}

/* ========================================
   SHARED RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .footer .container {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .nav__links { display: flex; }
    .nav__cta { display: block; }
    .nav__toggle { display: none; }
    .cta .container { grid-template-columns: 1fr 1fr; }
}
