/*
Theme Name: Legend Design Child
Template: hello-elementor
Version: 1.0.7
*/

/* ==========================================================================
   Brand tokens (single source of truth for the palette).
   Elementor global kit also carries these; keeping them here lets custom
   CSS and shortcode output stay on-brand.
   ========================================================================== */
:root{
  --lg-cream:#F4EFE7;      /* page background */
  --lg-walnut:#5A3E28;     /* primary / buttons */
  --lg-espresso:#2B2016;   /* headings / ink */
  --lg-brass:#B08D57;      /* accent: eyebrows, rules, hovers */
  --lg-brass-deep:#7A5E30; /* PRIMARY button fill (white text ~6.0:1) */
  --lg-brass-darker:#5F491F; /* primary button hover fill */
  --lg-ink:#2B2016;        /* body text = espresso */
  --lg-paper:#FFFFFF;      /* cards */
  --lg-gutter:22px;        /* single mobile-gutter knob */

  /* Legacy DC var names mapped by role to the Warm Walnut palette so nothing
     in the 928-line stylesheet renders unstyled. */
  --lg-white:#FFFFFF;                        /* cards -> paper */
  --lg-offwhite:#F4EFE7;                     /* warm alt bg -> cream */
  --lg-gold:#B08D57;                         /* accent -> brass */
  --lg-gold-deep:#5A3E28;                    /* accent hover -> walnut */
  --lg-gray:#2B2016;                         /* secondary text -> espresso */
  --lg-hairline:rgba(176, 141, 87, 0.35);    /* thin divider -> brass @ .35 */
}
body{ background:var(--lg-cream); color:var(--lg-ink); }

/* Legend type system: elegant serif for display, clean sans for body. */
h1,h2,h3,.lg-display{ font-family:"Cormorant Garamond",Georgia,serif; }
body,p,li,a,button{ font-family:"Inter",system-ui,sans-serif; }

/* ==========================================================================
   Consistent spacing system (applies site-wide).

   Elementor applies a boxed section's padding to its INNER wrapper
   (.e-con-inner), not the outer container. So we override the inner wrapper
   directly: one consistent horizontal gutter (--lg-gutter) everywhere, and a
   tighter, uniform vertical rhythm on phones (replacing the per-section
   54-90px values). Targeting the inner avoids double-padding. Header/footer
   have their own inner padding and are excluded by the wp-page/single scope.
   ========================================================================== */
[data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner,
[data-elementor-type="single"] > .e-con.e-parent > .e-con-inner {
    padding-left: var(--lg-gutter) !important;
    padding-right: var(--lg-gutter) !important;
}
/* Tablet + desktop: tighter, more intentional vertical rhythm (was 80-90px). */
@media (min-width: 768px) {
    [data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner,
    [data-elementor-type="single"] > .e-con.e-parent > .e-con-inner {
        padding-top: 76px !important;
        padding-bottom: 76px !important;
    }
}
@media (max-width: 767px) {
    /* Phones: compact vertical rhythm to cut down the scroll length. Desktop
       keeps its 76px rhythm (above); phones get ~28px so the page is not one
       long scroll. Dark CTA/process bands get a touch more via .e-con:has()
       below for emphasis. */
    [data-elementor-type="wp-page"] > .e-con.e-parent > .e-con-inner,
    [data-elementor-type="single"] > .e-con.e-parent > .e-con-inner {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }
    /* Dark bands (walnut/espresso backgrounds: process + closing CTAs) keep a
       slightly more generous rhythm so they read as deliberate emphasis. The
       build scripts tag these sections with .legend-dark-band. */
    [data-elementor-type="wp-page"] > .e-con.e-parent.legend-dark-band > .e-con-inner {
        padding-top: 38px !important;
        padding-bottom: 38px !important;
    }
    /* Feature grids -> 2 per row on mobile instead of a tall single column.
       Trust badges (icon-box), Why-choose-us / Benefits (icon-box), and the
       tagged process steps. Halves the height of these text-light sections. */
    .e-con.e-child:has(> .elementor-widget-icon-box),
    .legend-step-col,
    .legend-why-col {
        width: calc(50% - 9px) !important;
    }
    .e-con:has(> .legend-trust-col),
    .e-con:has(> .legend-step-col),
    .e-con:has(> .legend-why-col),
    .e-con:has(> .legend-expect-card),
    .e-con:has(> .e-child > .elementor-widget-icon-box) {
        gap: 18px !important;
    }
    /* About "What You Can Expect": keep the 4 value cards 2-up on phones (not a
       4-tall full-width stack that ran the section to ~1457px). Short copy fits
       comfortably; padding is trimmed via padding_mobile in build-about.php. */
    .legend-expect-card {
        width: calc(50% - 9px) !important;
    }
    .legend-trust-col .elementor-icon-box-icon .elementor-icon {
        font-size: 26px !important;
    }
    /* Trim the generous desktop card padding on phones (testimonials, areas,
       category cards) so tall single-column stacks are less bloated. */
    .legend-card {
        padding: 24px !important;
    }
    /* Cap the heading-to-content spacers on phones (desktop uses 30-40px,
       which reads as a large empty gap on a narrow screen). Tighter here to
       pull the mobile scroll length down further. */
    [data-elementor-type="wp-page"] .elementor-widget-spacer {
        --spacer-size: 14px !important;
    }
}

/* ==========================================================================
   Footer: compact mobile layout.
   The footer was ~1162px on phones: a 70px top pad, three tall stacked columns
   with generous 28px gaps + per-column 10px padding, and a 30px spacer. On
   phones we (a) cut the top padding, (b) tighten the inter-column gap and drop
   the column padding, (c) place the two link columns (Our Services / Explore)
   side by side instead of stacked, and (d) tighten link + text spacing. All
   links + the NAP stay; only the vertical footprint shrinks (~1162 -> ~650).
   ========================================================================== */
@media (max-width: 767px) {
    /* Trim the footer top padding (was 70px). */
    [data-elementor-type="footer"] > .e-con > .e-con-inner {
        padding-top: 32px !important;
        padding-bottom: 18px !important;
        gap: 12px !important;
    }
    /* Tighten the row that holds the three columns + drop its inner padding. */
    [data-elementor-type="footer"] > .e-con > .e-con-inner > .e-con:first-child {
        gap: 12px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    /* Company/brand column full width; the two LINK columns share a row 2-up so
       the footer is not one long stack (this removes the tall empty-feeling band
       below Explore). The !important + high specificity beats Elementor's
       generated per-element width_mobile:100% rule. */
    [data-elementor-type="footer"] .e-con-inner > .e-con .legend-footer-col.legend-footer-col {
        width: calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    /* Tighter internal spacing inside every footer column. */
    [data-elementor-type="footer"] .e-con-full {
        gap: 10px !important;
    }
    /* Link lists: smaller gaps + slightly smaller labels so the longer service
       names wrap less at the 2-up column width (keeps the footer compact). */
    [data-elementor-type="footer"] .legend-footer-col li {
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    [data-elementor-type="footer"] .legend-footer-col li a {
        font-size: 13px !important;
    }
    /* Company blurb + NAP: slightly smaller/tighter on mobile (content kept). */
    [data-elementor-type="footer"] .e-con-inner > .e-con:first-child > .elementor-element:first-child + .elementor-widget-text-editor,
    [data-elementor-type="footer"] .e-con-inner > .e-con:first-child .elementor-widget-text-editor {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    /* Footer headings: trim the space they take on mobile. */
    [data-elementor-type="footer"] .elementor-widget-heading .elementor-heading-title {
        line-height: 1.2 !important;
    }
    /* Brand/company column: tighten its paragraph spacing on mobile. */
    [data-elementor-type="footer"] .e-con-inner > .e-con:first-child > .elementor-element:first-child p {
        margin-bottom: 6px !important;
    }
    /* Pull the spacer above the divider way down on phones. */
    [data-elementor-type="footer"] .elementor-widget-spacer {
        --spacer-size: 6px !important;
    }
    [data-elementor-type="footer"] .elementor-divider {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
    /* Copyright line: keep it compact (one/two tight lines) at the very bottom. */
    [data-elementor-type="footer"] .e-con-inner > .elementor-widget-text-editor:last-child p {
        font-size: 12.5px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
}

/* Footer menus: drop the underline pointer effect, keep the gold hover color */
.legend-footer-menu .elementor-item::before,
.legend-footer-menu .elementor-item::after {
    display: none !important;
}
.legend-footer-menu .elementor-item:hover {
    color: var(--lg-gold) !important;
}

/* Footer social icons (Instagram / Facebook): minimal, gold, subtle hover. */
.legend-social {
    display: inline-flex;
    gap: 16px;
    margin-top: 8px;
}
.legend-social a {
    color: var(--lg-gold);
    display: inline-flex;
    transition: color 0.2s ease, transform 0.2s ease;
}
.legend-social a:hover {
    color: var(--lg-gold-deep);
    transform: translateY(-2px);
}

/* Hero lead paragraph: narrower reading column, a touch larger and more legible
   over the photo, with balanced line breaks (no awkward wraps). Scoped to the
   first (hero) section on Elementor pages, so CTA/body paragraphs are untouched.
   Copy is unchanged. */
[data-elementor-type="wp-page"] > .e-con.e-parent:first-child .elementor-widget-text-editor {
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
[data-elementor-type="wp-page"] > .e-con.e-parent:first-child .elementor-widget-text-editor p {
    font-size: clamp(17px, 1.35vw, 19.5px);
    line-height: 1.6;
    text-wrap: balance;
}
/* The white text + drop shadows below are for photo heroes (service/about
   pages). The HOME hero is a photo-less, typography-forward layout on the
   cream background, so those pages get white-on-dark and the home page keeps
   its own espresso colors (set inline in build-home.php). Scoped off .home. */
body:not(.home) [data-elementor-type="wp-page"] > .e-con.e-parent:first-child .elementor-widget-text-editor p {
    color: #F4F4F4;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
/* Hero eyebrow + headline: legibility over bright hero photos. The small gold
   eyebrow especially was washing out on light images. */
body:not(.home) [data-elementor-type="wp-page"] > .e-con.e-parent:first-child .elementor-widget-heading h6.elementor-heading-title {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}
body:not(.home) [data-elementor-type="wp-page"] > .e-con.e-parent:first-child h1.elementor-heading-title {
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.34);
}

/* Keep the header nav on one line on desktop */
@media (min-width: 1025px) {
    .elementor-location-header .elementor-widget-nav-menu {
        width: auto;
        flex: 0 0 auto;
    }
    .elementor-location-header .elementor-nav-menu--main {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center;
    }
    .elementor-location-header .elementor-nav-menu--main .elementor-item {
        white-space: nowrap;
    }
}

/* ==========================================================================
   Mobile refinements (the brief requires an excellent mobile experience)
   ========================================================================== */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 767px) {
    /* Scale headings so nothing overflows the viewport */
    .elementor-widget-heading h1.elementor-heading-title {
        font-size: 30px !important;
        line-height: 1.22 !important;
    }
    .elementor-widget-heading h2.elementor-heading-title {
        font-size: 24px !important;
        line-height: 1.28 !important;
    }
    .elementor-widget-heading h3.elementor-heading-title {
        font-size: 20px !important;
    }
    .elementor-widget-heading .elementor-heading-title {
        overflow-wrap: break-word;
        word-break: break-word;
    }
    /* Eyebrow labels: tighten spacing so they fit one line */
    .elementor-widget-heading h6.elementor-heading-title {
        letter-spacing: 1px !important;
        font-size: 11px !important;
        overflow-wrap: break-word;
    }
    /* Buttons: comfortable tap targets, avoid overflow */
    .elementor-button {
        white-space: normal;
    }
    /* Trust badges: tight 2x2 grid instead of an airy 4-tall stack.
       Subtract more than half the 30px row gap so two fit per row. */
    .legend-trust-col {
        width: calc(50% - 20px) !important;
    }
    .legend-trust-col .elementor-icon-box-wrapper {
        gap: 10px !important;
    }
    .legend-trust-col .elementor-icon-box-title {
        font-size: 15px !important;
    }
}

/* Header on tablet/mobile: force a single row, logo left, menu toggle right.
   Elementor containers flip to column on the mobile breakpoint, so this
   overrides direction explicitly. The desktop nav/phone/CTA collapse into the
   burger menu. */
@media (max-width: 1024px) {
    .legend-site-header > .e-con-inner {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 68px;
    }
    .legend-logo {
        order: 1;
        flex: 0 0 auto !important;
    }
    .legend-nav-center {
        order: 2;
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }
    .legend-nav-center > .e-con-inner,
    .legend-nav-center .elementor-widget-nav-menu,
    .legend-nav-center .elementor-nav-menu--main {
        justify-content: flex-end !important;
        margin-left: auto !important;
    }
    /* Fold the phone + Get a Quote into the mobile menu for a clean header. */
    .legend-header-actions {
        display: none !important;
    }
    .elementor-location-header .elementor-container,
    .elementor-location-header > .e-con-inner {
        padding-left: var(--lg-gutter);
        padding-right: var(--lg-gutter);
    }
}

/* ==========================================================================
   Navigation: desktop Services dropdown
   ========================================================================== */
@media (min-width: 1025px) {
    .legend-nav .elementor-nav-menu--main .sub-menu {
        background: #fff !important;
        box-shadow: 0 20px 44px rgba(14, 14, 14, 0.14) !important;
        border-top: 2px solid var(--lg-gold) !important;
        padding: 8px 0 !important;
        min-width: 240px !important;
        border-radius: 0 0 3px 3px !important;
    }
    .legend-nav .elementor-nav-menu--main .sub-menu .elementor-sub-item {
        color: var(--lg-ink) !important;
        font-family: "Inter", system-ui, sans-serif !important;
        font-weight: 500 !important;
        font-size: 14.5px !important;
        padding: 11px 24px !important;
        transition: background 0.18s ease, color 0.18s ease;
    }
    .legend-nav .elementor-nav-menu--main .sub-menu .elementor-sub-item:hover {
        color: var(--lg-gold-deep) !important;
        background: rgba(198, 161, 91, 0.08) !important;
    }
}

/* ==========================================================================
   Navigation: custom full-screen mobile menu (replaces Elementor's dropdown)
   ========================================================================== */
.legend-mobile-toggle,
.legend-mobile-overlay {
    display: none;
}
@media (max-width: 1024px) {
    /* Hide Elementor's own mobile nav entirely; we use our custom overlay. */
    .legend-nav .elementor-menu-toggle,
    .legend-nav .elementor-nav-menu--dropdown {
        display: none !important;
    }

    /* Animated hamburger button (fixed top-right) - plain, no background box.
       !important overrides Elementor's global gold <button> styling. */
    .legend-mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        position: fixed;
        top: 17px;
        right: 18px;
        width: 40px;
        height: 40px;
        padding: 9px 6px;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        cursor: pointer;
        z-index: 10001;
    }
    .legend-mobile-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--lg-ink);
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    }
    body.legend-menu-open .legend-mobile-toggle span {
        background: #fff;
    }
    body.legend-menu-open .legend-mobile-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.legend-menu-open .legend-mobile-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.legend-menu-open .legend-mobile-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Full-screen overlay */
    .legend-mobile-overlay {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: var(--lg-ink);
        padding: 64px 28px 48px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s;
    }
    body.legend-menu-open {
        overflow: hidden;
    }
    body.legend-menu-open .legend-mobile-overlay {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .legend-mobile-inner {
        width: 100%;
        max-width: 340px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .legend-mobile-brand {
        font-family: "Cormorant Garamond", Georgia, serif;
        font-weight: 600;
        font-size: 12px;
        letter-spacing: 0.28em;
        text-transform: uppercase;
        color: var(--lg-gold);
        margin-bottom: 20px;
    }
    .legend-mobile-nav {
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }
    .legend-mobile-nav > li {
        margin: 0;
    }
    .legend-mobile-nav > li > a {
        display: block;
        color: #fff;
        font-family: "Inter", system-ui, sans-serif;
        font-weight: 600;
        font-size: 22px;
        line-height: 1.25;
        letter-spacing: -0.01em;
        padding: 6px 0;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    .legend-mobile-nav > li > a:hover,
    .legend-mobile-nav > li.current-menu-item > a {
        color: var(--lg-gold);
    }
    .legend-mobile-nav .sub-menu {
        list-style: none;
        margin: 2px 0 10px;
        padding: 8px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .legend-mobile-nav .sub-menu a {
        display: block;
        color: #c9c9c9;
        font-family: "Inter", sans-serif;
        font-weight: 400;
        font-size: 15.5px;
        padding: 5px 0;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    .legend-mobile-nav .sub-menu a:hover {
        color: var(--lg-gold);
    }
    .legend-mobile-actions {
        margin-top: 22px;
        padding-top: 20px;
        width: 100%;
        border-top: 1px solid rgba(198, 161, 91, 0.28);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    .legend-mobile-actions .legend-btn {
        min-width: 220px;
        text-align: center;
        /* Overlay bg is espresso (--lg-ink). Use the site-wide PRIMARY button:
           deep-brass fill + white text (~6.0:1), which reads clearly against
           the dark surround and matches every other Get a Quote button. Keep
           the >=44px tap target. */
        display: block;
        box-sizing: border-box;
        min-height: 52px;
        padding: 15px 28px;
        line-height: 1.2;
        background: var(--lg-brass-deep);
        border-color: var(--lg-brass-deep);
        color: #fff;
    }
    .legend-mobile-actions .legend-btn:hover,
    .legend-mobile-actions .legend-btn:focus {
        background: var(--lg-brass-darker);
        border-color: var(--lg-brass-darker);
        color: #fff;
    }
    .legend-mobile-call {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: #fff;
        font-family: "Inter", system-ui, sans-serif;
        font-weight: 600;
        font-size: 17px;
        letter-spacing: 0.02em;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    .legend-mobile-call svg {
        color: var(--lg-gold);
    }
    .legend-mobile-call:hover {
        color: var(--lg-gold);
    }
}

/* ==========================================================================
   Footer: collapsible menus (accordion) on mobile
   ========================================================================== */
@media (max-width: 767px) {
    .legend-footer-menu {
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }
    .legend-footer-menu > .e-con-inner {
        gap: 0 !important;
    }
    .legend-footer-menu .elementor-widget-heading {
        cursor: pointer;
        margin: 0 !important;
        position: relative;
    }
    .legend-footer-menu .elementor-widget-heading .elementor-heading-title {
        padding: 16px 0 !important;
        margin: 0 !important;
    }
    .legend-footer-menu .elementor-widget-heading .elementor-heading-title::after {
        content: "+";
        position: absolute;
        right: 4px;
        top: 12px;
        color: var(--lg-gold);
        font-size: 24px;
        font-weight: 300;
        line-height: 1;
    }
    .legend-footer-menu.legend-open .elementor-widget-heading .elementor-heading-title::after {
        content: "\2013"; /* en dash used only as a minus glyph in UI, not body copy */
    }
    /* Elementor renders the footer menu as a white mobile "dropdown" list;
       restyle it for the dark footer and collapse it under the heading. */
    .legend-footer-menu .elementor-nav-menu--dropdown {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        margin: 0 !important;
        padding: 0 0 16px !important;
    }
    .legend-footer-menu.legend-open .elementor-nav-menu--dropdown {
        display: block !important;
    }
    .legend-footer-menu .elementor-nav-menu--dropdown .elementor-item {
        color: #B8B8B8 !important;
        background: transparent !important;
        border: 0 !important;
        text-align: left !important;
        padding: 9px 0 !important;
        font-size: 15px !important;
    }
    .legend-footer-menu .elementor-nav-menu--dropdown .elementor-item:hover {
        color: var(--lg-gold) !important;
    }
    /* No mobile burger inside the footer menus */
    .legend-footer-menu .elementor-menu-toggle {
        display: none !important;
    }
}

/* ==========================================================================
   MODERN DESIGN LAYER
   ========================================================================== */
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #1c1c1c;
}

/* --- Typography: bolder, tighter, more modern --- */
h1.elementor-heading-title {
    font-size: clamp(40px, 5.4vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.07;
    text-wrap: balance;
}
h2.elementor-heading-title {
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.15;
    text-wrap: balance;
}
h3.elementor-heading-title,
.legend-post-hero h1,
.legend-single-project-title {
    text-wrap: balance;
}
h3.elementor-heading-title {
    letter-spacing: -0.01em;
}
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-title span {
    letter-spacing: -0.005em;
}

/* --- Buttons: sharp, architectural, with motion --- */
.elementor-button {
    border-radius: 0 !important;
    font-family: "Inter", system-ui, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    font-size: 12.5px !important;
    padding: 17px 34px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease !important;
}
.elementor-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(14, 14, 14, 0.18);
}
.legend-btn {
    border-radius: 0;
    letter-spacing: 0.1em;
    padding: 16px 32px;
}
.legend-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(14, 14, 14, 0.18);
}

/* ==========================================================================
   UNIFIED CTA SYSTEM (single source of truth)
   ONE primary (filled deep-brass + white, ~6.0:1, works on cream/walnut/
   espresso) and ONE secondary (outline, label in surrounding text color).
   Both share border weight, padding and size. Applied to Elementor buttons
   (via the legend-btn-primary/-secondary classes on legend_button) and to the
   plain .legend-btn anchors in the child-theme PHP templates.
   ========================================================================== */

/* PRIMARY - Elementor widget buttons */
.elementor-button.legend-btn-primary,
.legend-btn-primary .elementor-button {
    background-color: var(--lg-brass-deep) !important;
    color: #ffffff !important;
    border: 2px solid var(--lg-brass-deep) !important;
}
.elementor-button.legend-btn-primary:hover,
.legend-btn-primary .elementor-button:hover {
    background-color: var(--lg-brass-darker) !important;
    border-color: var(--lg-brass-darker) !important;
    color: #ffffff !important;
}
/* SECONDARY - Elementor widget buttons (outline; inherits currentColor).
   Espresso border/label on light bg by default; the widget carries the color
   so it can be overridden per-section for dark bands. */
.elementor-button.legend-btn-secondary,
.legend-btn-secondary .elementor-button {
    background-color: transparent !important;
    border: 2px solid currentColor !important;
}
.elementor-button.legend-btn-secondary:hover,
.legend-btn-secondary .elementor-button:hover {
    background-color: var(--lg-ink) !important;
    border-color: var(--lg-ink) !important;
    color: #ffffff !important;
}

/* --- Header --- */
.legend-site-header {
    min-height: 84px;
    box-shadow: 0 1px 0 rgba(14, 14, 14, 0.07);
    transition: box-shadow 0.3s ease;
}
.legend-site-header.elementor-sticky--effects {
    box-shadow: 0 8px 34px rgba(14, 14, 14, 0.10);
    min-height: 72px;
}
.legend-logo img {
    transition: opacity 0.2s ease;
}
.legend-logo:hover img {
    opacity: 0.82;
}
.legend-header-actions {
    width: auto !important;
    flex: 0 0 auto !important;
}
.legend-logo {
    flex: 0 0 auto !important;
}
.legend-nav-center {
    flex: 1 1 auto !important;
}
/* Nav with animated gold underline */
.legend-nav .elementor-nav-menu--main .elementor-item {
    position: relative;
    padding: 10px 0 !important;
    margin: 0 18px !important;
}
.legend-nav .elementor-nav-menu--main .elementor-item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    background: var(--lg-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.28s ease;
}
.legend-nav .elementor-nav-menu--main .elementor-item:hover::after,
.legend-nav .elementor-nav-menu--main .elementor-item.elementor-item-active::after {
    transform: scaleX(1);
}
.legend-nav .elementor-nav-menu--main .elementor-item.elementor-item-active {
    color: var(--lg-ink) !important;
}
/* Phone */
.legend-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lg-ink);
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.legend-phone-link svg {
    color: var(--lg-gold);
    flex: none;
}
.legend-phone-link span {
    color: var(--lg-ink);
}
.legend-phone-link:hover,
.legend-phone-link:hover span {
    color: var(--lg-gold-deep);
}
/* Vertically center the phone text with the CTA button */
.legend-header-phone,
.legend-header-phone .elementor-widget-container {
    display: flex;
    align-items: center;
}
.legend-header-phone p {
    margin: 0 !important;
    line-height: 1;
}
/* Header CTA: the site-wide PRIMARY button (deep-brass fill, white text),
   with header-only padding. Matches every other Get a Quote button. */
.legend-header-cta .elementor-button {
    background-color: var(--lg-brass-deep) !important;
    color: #ffffff !important;
    border: 2px solid var(--lg-brass-deep) !important;
    padding: 14px 30px !important;
    box-shadow: none !important;
}
.legend-header-cta .elementor-button:hover {
    background-color: var(--lg-brass-darker) !important;
    border-color: var(--lg-brass-darker) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Cards: refined with hover lift --- */
.legend-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    border-color: rgba(14, 14, 14, 0.08) !important;
}
.legend-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(14, 14, 14, 0.10);
    border-color: rgba(198, 161, 91, 0.55) !important;
}
.legend-card .elementor-icon-box-icon .elementor-icon {
    transition: transform 0.3s ease;
}
.legend-card:hover .elementor-icon-box-icon .elementor-icon {
    transform: translateY(-2px);
}

/* Thin gold divider helper (used between sections) */
.legend-hairline {
    height: 1px;
    width: 100%;
    background: var(--lg-hairline);
    border: 0;
    margin: 0;
}

/* Small gold eyebrow label above headings */
.legend-eyebrow {
    display: inline-block;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--lg-gold);
}

/* Baseline PRIMARY treatment for non-Elementor buttons (blog, archives,
   single-post, mobile menu, shortcode CTA). Deep-brass fill + white text
   (~6.0:1) - identical to the Elementor primary. */
.legend-btn {
    display: inline-block;
    padding: 15px 32px;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #ffffff;
    background: var(--lg-brass-deep);
    border: 2px solid var(--lg-brass-deep);
    border-radius: 0;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.legend-btn:hover {
    background: var(--lg-brass-darker);
    border-color: var(--lg-brass-darker);
    color: #ffffff;
}
/* SECONDARY outline: transparent, espresso border/label on light bg. */
.legend-btn--ghost {
    background: transparent;
    color: var(--lg-ink);
    border-color: var(--lg-ink);
}
.legend-btn--ghost:hover {
    background: var(--lg-ink);
    color: #ffffff;
    border-color: var(--lg-ink);
}

/* ==========================================================================
   Project category archive (child theme PHP template)
   ========================================================================== */
.legend-tax-archive h1,
.legend-tax-archive h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
}
.legend-tax-hero {
    /* Tier B walnut band (matches the blog-post hero, projects/about/contact and
       the single-project hero) so blog listing and blog post read as one system. */
    background: var(--lg-walnut);
    color: var(--lg-white);
    text-align: center;
    padding: 84px var(--lg-gutter);
}
.legend-tax-hero__inner {
    max-width: 820px;
    margin: 0 auto;
}
.legend-tax-hero h1 {
    color: var(--lg-white);
    font-size: clamp(30px, 5vw, 46px);
    margin: 10px 0 14px;
}
.legend-tax-hero p {
    color: #E7E7E7;
    font-size: 18px;
    margin-bottom: 26px;
}
.legend-tax-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}
.legend-tax-body {
    background: var(--lg-white);
    padding: 80px var(--lg-gutter);
}
.legend-tax-body__inner {
    max-width: 1140px;
    margin: 0 auto;
}
/* Category archives can hold only 1-2 projects; center the cards so the grid
   never looks half-empty (the main portfolio grid is unaffected). */
.legend-tax-body .legend-project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}
.legend-tax-body .legend-project-cards > .legend-project-card {
    width: calc((100% - 52px) / 3);
    max-width: 360px;
}
@media (max-width: 1024px) {
    .legend-tax-body .legend-project-cards > .legend-project-card {
        width: calc((100% - 26px) / 2);
    }
}
@media (max-width: 600px) {
    .legend-tax-body .legend-project-cards > .legend-project-card {
        width: 100%;
    }
}
.legend-tax-cta {
    background: var(--lg-offwhite);
    text-align: center;
    padding: 70px var(--lg-gutter);
}
.legend-tax-cta__inner {
    max-width: 720px;
    margin: 0 auto;
}
.legend-tax-cta h2 {
    font-size: clamp(26px, 4vw, 36px);
    margin-bottom: 12px;
}
.legend-tax-cta p {
    color: var(--lg-gray);
    margin-bottom: 22px;
}

/* ==========================================================================
   Blog: listing + single post
   ========================================================================== */
.legend-post-hero {
    background: var(--lg-ink);
    color: var(--lg-white);
    text-align: center;
    padding: 76px var(--lg-gutter);
}
.legend-post-hero__inner {
    max-width: 820px;
    margin: 0 auto;
}
.legend-post-hero h1 {
    color: var(--lg-white);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 42px);
    margin: 10px 0 12px;
    line-height: 1.2;
}
.legend-post-hero__date {
    color: var(--lg-gold);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    letter-spacing: 0.06em;
}
.legend-post-body {
    background: var(--lg-white);
    padding: 64px var(--lg-gutter);
}
.legend-post-body__inner {
    max-width: 760px;
    margin: 0 auto;
}
.legend-post-featured {
    margin: 0 0 34px;
}
.legend-post-featured img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}
.legend-post-content {
    font-size: 17.5px;
    line-height: 1.8;
    color: #2a2a2a;
}
.legend-post-content h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    font-size: 26px;
    margin: 40px 0 14px;
    color: var(--lg-ink);
}
.legend-post-content h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    font-size: 21px;
    margin: 30px 0 12px;
    color: var(--lg-ink);
}
.legend-post-content p {
    margin: 0 0 20px;
}
.legend-post-content a {
    color: var(--lg-gold-deep);
    text-decoration: underline;
}
.legend-post-content ul,
.legend-post-content ol {
    margin: 0 0 20px 20px;
}
.legend-post-content li {
    margin-bottom: 8px;
}
.legend-pagination {
    margin-top: 40px;
    text-align: center;
}
.legend-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    color: var(--lg-ink);
    border: 1px solid rgba(14, 14, 14, 0.18);
    border-radius: 2px;
    text-decoration: none;
}
.legend-pagination .page-numbers.current,
.legend-pagination .page-numbers:hover {
    background: var(--lg-gold);
    border-color: var(--lg-gold);
}

/* Blog listing: post cards grid (shared render fn in legend-projects plugin) */
.legend-post-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.legend-post-card {
    display: flex;
    flex-direction: column;
    background: var(--lg-white);
    border: 1px solid var(--lg-hairline);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.legend-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(43, 32, 22, 0.14);
}
.legend-post-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--lg-espresso);
    overflow: hidden;
}
.legend-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.legend-post-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px 26px;
}
.legend-post-card__date {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-gold-deep);
}
.legend-post-card__title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    font-size: 23px;
    line-height: 1.25;
    color: var(--lg-ink);
}
.legend-post-card__excerpt {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #4a4038;
}
.legend-post-card__more {
    margin-top: 4px;
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lg-gold-deep);
}
@media (max-width: 1024px) {
    .legend-post-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .legend-post-cards { grid-template-columns: 1fr; }
}

/* Single-project "More Kitchens": with only 2-3 total projects a related grid can
   show 2 items, which strand in the left of a rigid 3-col grid. Center them so 2
   items sit 2-up centered. Scoped to the single-project section via its css class
   so the main portfolio grid is unaffected. */
.legend-more-kitchens .legend-project-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}
.legend-more-kitchens .legend-project-cards > .legend-project-card {
    width: calc((100% - 52px) / 3);
    max-width: 360px;
}
@media (max-width: 1024px) {
    .legend-more-kitchens .legend-project-cards > .legend-project-card {
        width: calc((100% - 26px) / 2);
    }
}
@media (max-width: 600px) {
    .legend-more-kitchens .legend-project-cards > .legend-project-card {
        width: 100%;
    }
}

/* Single post: solid walnut hero band (never a gray placeholder). The featured
   images are decorative typographic tiles, so they drive the listing cards and
   SEO/social rather than sitting behind the post title. */
.legend-post-hero {
    background: var(--lg-walnut);
}

/* Keep the PRIMARY CTA text white on the deep-brass fill. Some theme/Elementor
   anchor rules can override the base .legend-btn color, so pin white here with
   the template context for higher specificity. */
.legend-tax-cta .legend-btn,
.legend-post-body .legend-btn,
.legend-blog .legend-btn {
    color: #ffffff;
}
.legend-tax-cta .legend-btn:hover,
.legend-post-body .legend-btn:hover,
.legend-blog .legend-btn:hover {
    color: #ffffff;
}
/* SECONDARY outline: espresso label on these light-bg CTA bands. */
.legend-tax-cta .legend-btn--ghost,
.legend-post-body .legend-btn--ghost,
.legend-blog .legend-btn--ghost {
    color: var(--lg-espresso);
}
.legend-tax-cta .legend-btn--ghost:hover,
.legend-post-body .legend-btn--ghost:hover,
.legend-blog .legend-btn--ghost:hover {
    color: var(--lg-white);
}

/* Match the child-theme PHP templates (blog, archives) to the same tighter
   vertical rhythm as the Elementor sections on phones. */
@media (max-width: 767px) {
    .legend-tax-hero,
    .legend-post-hero {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .legend-tax-body,
    .legend-tax-cta,
    .legend-post-body {
        padding-top: 32px;
        padding-bottom: 32px;
    }
}
