/* ============================================================
   AttarCo Homes — global brand rules
   Loaded by every page BEFORE its own <style> block, so page-
   specific rules always win. Keep this file to identity-level
   primitives: palette, reset, logo, focus, button identity.
   ============================================================ */

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

/* ---- Brand palette & tokens (canonical values) ---- */
:root {
    --navy:       #0d1f3c;
    --navy-mid:   #152d54;
    --navy-light: #1a3a6b;
    --gold:       #f59e0b;
    --gold-dark:  #d97706;
    --red:        #dc2626;
    --red-dark:   #b91c1c;
    --white:      #ffffff;
    --gray-50:    #f9fafb;
    --gray-100:   #f3f4f6;
    --gray-200:   #e5e7eb;
    --gray-400:   #9ca3af;
    --gray-500:   #6b7280;
    --gray-600:   #4b5563;
    --gray-700:   #374151;
    --gray-800:   #1f2937;
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
    --shadow:     0 4px 24px rgba(0,0,0,0.11);
    --shadow-lg:  0 8px 48px rgba(0,0,0,0.18);
    --radius:     8px;
    --radius-lg:  16px;
}

html { scroll-behavior: smooth; }

/* ---- Logo ---- */
.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-decoration: none;
}
.logo-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    color: var(--navy);
}
.logo-name span { color: var(--gold-dark); }
.logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
    margin-top: 2px;
    white-space: nowrap; /* "EST. 1985" must never wrap */
}

/* ---- Navigation ---- */
.nav-links a { white-space: nowrap; } /* "Why Us" must never stack */

/* ---- Button identity (structure/padding stays per-page) ---- */
.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    white-space: nowrap;
    text-align: center;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn-orange { background: var(--gold-dark); color: var(--white); }
.btn-orange:hover { background: #b45309; }
/* Sizing for the shared footer "Free Estimate" button (and any other small/full
   buttons) — must live here, not per-page, so sub pages aren't left unpadded. */
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-full { display: block; width: 100%; }

/* ---- Accessibility ---- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

.cf-turnstile { margin: 14px 0 4px; }

/* ---- Service Areas by county — header + responsive tile grid ----
   Shared by homepage, /service-areas, and the county pages. */
.county-block { max-width: 1000px; margin: 0 auto 42px; text-align: center; }
.county-block:last-child { margin-bottom: 0; }
.county-header {
    display: flex; width: fit-content; align-items: center; gap: 10px;
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem;
    color: var(--navy); text-decoration: none; margin: 0 auto 16px;
}
a.county-header:hover { color: var(--gold-dark); }
.county-flag {
    font-family: 'Montserrat', sans-serif; font-size: .58rem; font-weight: 800;
    letter-spacing: .5px; text-transform: uppercase;
    background: var(--gold); color: var(--navy); padding: 3px 7px; border-radius: 4px;
}
.area-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .area-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .area-tiles { grid-template-columns: repeat(4, 1fr); } }
.area-tile {
    display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
    min-height: 58px; padding: 10px 14px;
    background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .87rem; line-height: 1.2;
    color: var(--navy); text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
a.area-tile:hover { border-color: var(--gold); background: var(--gold); color: var(--navy); }
.area-tile .at-pin { color: var(--gold); font-weight: 800; flex-shrink: 0; }
a.area-tile:hover .at-pin { color: var(--navy); }
/* Dark band variant: navy section behind the white tiles (owner request) —
   add .areas-dark to the <section> that holds .county-block groups. */
.section.areas-dark { background: var(--navy); }
.section.areas-dark h2, .section.areas-dark .county-header { color: var(--white); }
.section.areas-dark a.county-header:hover { color: var(--gold); }
.section.areas-dark .section-header p, .section.areas-dark .lead, .section.areas-dark .tier-sub { color: rgba(255,255,255,0.85); }
.section.areas-dark .eyebrow { color: var(--gold); }

/* ============================================================
   SITE HEADER / NAV — shared by every page. One source of
   truth so the header never has to be kept in sync by hand
   across the marketing pages again.
   ============================================================ */
.header {
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
    position: sticky;
    top: 0;
    z-index: 1000;
}
/* Chrome width is independent of whatever a page sets .container to for its
   own prose/content (some pages narrow it for readability) — the header and
   footer always lay out at the same width. */
.header .container, .footer .container { max-width: 1180px; }
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
    position: relative;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 26px;
    align-items: center;
}
.nav-links a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-700);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--navy); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-phone {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--red);
    white-space: nowrap;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s;
}
/* ---- Service Areas nav dropdown (details/summary: works without JS) ---- */
.nav-dd details { position: relative; }
.nav-dd summary {
    list-style: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-700);
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-dd summary::-webkit-details-marker { display: none; }
.nav-dd summary:hover { color: var(--navy); }
.dd-caret { font-size: 0.7rem; color: var(--gold-dark); }
.nav-dd details[open] .dd-caret { display: inline-block; transform: rotate(180deg); }
.nav-dd-panel {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 22px 20px;
    min-width: 400px;
    z-index: 1001;
}
.dd-all {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--gold-dark) !important;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}
.dd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.dd-tier {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin: 0 0 6px;
}
.dd-tier-gap { margin-top: 14px; }
.dd-cols a {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--gray-700);
    padding: 4px 0;
}
.dd-cols a:hover { color: var(--gold-dark); }

/* ============================================================
   SITE FOOTER — shared by every page.
   ============================================================ */
.footer {
    background: #070f1e;
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 48px;
}
.footer-brand .logo-name { color: var(--white); font-size: 1.3rem; }
.footer-brand .logo-sub { color: rgba(255,255,255,0.4); margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.55); margin-bottom: 18px; }
.footer-badges-row { display: flex; flex-wrap: wrap; gap: 8px; }
.f-badge {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.85rem; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.f-contact-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; }
.f-contact-row a { color: var(--gold); font-weight: 700; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-bottom a { color: rgba(255,255,255,0.35); margin-left: 16px; font-size: 0.78rem; }
.footer-bottom a:hover { color: rgba(255,255,255,0.6); }

/* ---- Header / footer responsive ---- */
@media (max-width: 1060px) {
    .footer-grid > * { min-width: 0; }
}
@media (max-width: 1024px) {
    /* mobile AND tablet: the nav bar is the whole of navigation — everything
       lives behind the hamburger, no separate desktop link row squeezed in */
    .nav-links { display: none; }
    .nav-phone { display: none; } /* phone lives in top bar + floating call bar on mobile */
    .nav-right .btn { display: none; } /* logo + button + hamburger overflow the header otherwise */
    .hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px 24px;
        box-shadow: var(--shadow);
        z-index: 999;
        gap: 18px;
    }
    /* land anchor-linked sections below the sticky header */
    section[id] { scroll-margin-top: 78px; }
    /* inside the hamburger menu the dropdown panel renders inline, full-width */
    .nav-dd details { position: static; }
    .nav-dd summary { text-align: center; }
    .nav-dd-panel {
        position: static;
        transform: none;
        min-width: 0;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--gold);
        border-radius: 0;
        padding: 12px 0 4px 14px;
        margin-top: 10px;
    }
}
