/* ============================================================
   YDWP SHARED DESIGN SYSTEM  (assets/css/ydh-design.css)
   Loaded on every page. Moved out of custom.css verbatim so the
   design system (brand tokens, header, navigation, buttons, mobile
   menu, footer, motion) is one shared layer, with page-specific
   section styles kept separate:
     assets/css/ydh-home.css  - homepage sections
     assets/css/ydh-page.css  - interior page sections
   Enqueue order: custom.css (legacy v1 compatibility) -> this file
   -> page stylesheet, which preserves the source order these rules
   had before the split.
   Palette per redesign spec v1: ink/orange/charcoal, no teal.
   Measured contrast (evidence/contrast-plan.txt): all pairs >= 4.5
   body, >= 3.0 large. Buttons use ink text on orange (4.83).
   ============================================================ */

/* ================================================================
   YDWP HOMEPAGE REDESIGN v2 - appended Oct 2026
   New brand tokens (spec: ink/orange/charcoal, no teal), self-hosted
   fonts, redesigned header + footer parts, button variants, mobile
   menu. Earlier rules in this file (teal, navy) stay for sub-pages
   until the sub-page redesign pass; later source order wins ties.
   Contrast audit (evidence/contrast-plan.txt, contrast_plan.py):
   all text pairs measured >= 4.5:1 body, >= 3:1 large.
   ================================================================ */

:root {
    --ydh-font-display: 'Outfit', 'Poppins', sans-serif;
    --ydh-font-body: 'Inter', 'Poppins', sans-serif;
    --ydh-ink: #14120F;
    --ydh-body: #3A3631;
    --ydh-muted: #6E6760;      /* 5.57:1 on white */
    --ydh-line: #E8E3DC;
    --ydh-mist: #F7F5F2;
    --ydh-orange: #D2601A;     /* CTA background; ink text on it is 4.83:1 */
    --ydh-orange-600: #E06F22; /* hover bg */
    --ydh-orange-deep: #A94A10;/* text-on-light orange, 5.72:1 on white */
    --ydh-orange-tint: #FDF1E7;
    --ydh-dark: #16130F;
    --ydh-dark-2: #221D18;
}

/* Legacy --pc-* variable rebrand: the v1 rules above reference these.
   Points them at the new palette so old sub-page rules resolve to
   ink/orange instead of slate/teal. Values measured in
   evidence/contrast-plan.txt against their real backgrounds. */
:root, :root[data-theme="light"] {
    --pc-bg: #FFFFFF;
    --pc-bg-alt: #F7F5F2;
    --pc-surface: #FFFFFF;
    --pc-surface-alt: #F7F5F2;
    --pc-text: #14120F;
    --pc-text-muted: #3A3631;
    --pc-text-faded: #6E6760;
    --pc-border: #E8E3DC;
    --pc-border-light: #F7F5F2;
    --pc-heading: #14120F;
    --pc-accent: #A94A10;       /* 5.72:1 on white */
    --pc-accent-hover: #D2601A;
    --pc-link: #A94A10;         /* 5.72:1 on white */
    --pc-link-dark: #E08A4F;    /* links still inside dark sections */
    --pc-link-hover: #A94A10;   /* D3 fix: was #D2601A (3.87:1); now 5.72:1 on white */
    --pc-button-bg: #D2601A;
    --pc-button-text: #14120F;  /* 4.83:1 on D2601A */
    --pc-button-hover: #E06F22;
    --pc-card-bg: #FFFFFF;
    --pc-card-border: #E8E3DC;
    --pc-header-bg: rgba(255,255,255,0.96);
    --pc-header-text: #14120F;
    --pc-footer-bg: #16130F;
    --pc-footer-text: #C9C2B8;
    --pc-footer-heading: #F7F5F2;
    --pc-footer-link: #C9C2B8;
    --pc-footer-link-hover: #F0A868;
    --pc-separator: #E8E3DC;
    --pc-shadow-card: 0 2px 12px rgba(20,18,15,0.06);
    --pc-shadow-card-hover: 0 12px 32px rgba(20,18,15,0.12);
    --pc-navy: #16130F;
    --pc-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ydh-header.scrolled,
header.ydh-header.scrolled {
    box-shadow: 0 10px 28px rgba(20, 18, 15, 0.10) !important;
}

/* Mobile sticky restore: v1's mobile block sets header .wp-block-group
   to position:relative !important with equal specificity (0,1,1); this
   tie-breaking declaration appears later in source order and wins. */
header.ydh-header {
    position: sticky !important;
    top: 0 !important;
}

/* ---------- Header ---------- */
.ydh-header {
    position: sticky !important;
    top: 0 !important;
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    z-index: 10000 !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(160%) !important;
    border-bottom: 1px solid var(--ydh-line) !important;
    transition: box-shadow 250ms ease, padding 250ms ease !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.ydh-header.scrolled {
    /* D2 (owner round 2): the scrolled bar dropped to zero vertical padding,
       so the 54px call button sat flush against the header's top edge. Equal
       non-zero clearance on both sides instead; the bar still shrinks
       (0.55rem + content -> 0.3rem + button) while the button keeps air. */
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
    box-shadow: 0 10px 28px rgba(20, 18, 15, 0.10) !important;
}

.ydh-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none !important;
}

.ydh-brand-badge {
    width: 46px;
    height: auto;
    display: block;
}

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

.ydh-brand-name {
    font-family: var(--ydh-font-display);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ydh-ink);
    letter-spacing: -0.01em;
}

.ydh-brand-sub {
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ydh-muted);
}

a.ydh-brand:hover .ydh-brand-name { color: var(--ydh-orange-deep); }

.ydh-header-side {
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 1rem !important;
}

/* Nav colors for the new header */
header .ydh-nav .wp-block-navigation-item__content,
header .ydh-nav .wp-block-navigation-item__label {
    color: var(--ydh-body) !important;
    font-family: var(--ydh-font-body) !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
}

header .ydh-nav .wp-block-navigation-item__content:hover,
header .ydh-nav .wp-block-navigation-item__label:hover {
    color: var(--ydh-orange-deep) !important;
}

header .ydh-nav .wp-block-navigation-item:hover::after {
    background: var(--ydh-orange) !important;
}

header .ydh-nav .wp-block-navigation__submenu-container {
    background-color: var(--ydh-mist) !important;
    border: 1px solid var(--ydh-line) !important;
}

/* Header phone CTA */
/* D2 (owner round 2): the wrapper is a plain block, so the inline-block button
   inside sat on the text baseline and its descender space rendered BELOW the
   button (measured: wrapper 54px, button 47px, 0px above / 7px inside). The
   button is then flush against the header top edge once scrolled. Making the
   wrapper a flex box and removing the middle box from layout (display:
   contents) centres the link element inside the wrapper by construction, so
   the gap above and below stays equal in both header states. */
.ydh-header-cta { margin: 0; display: flex; align-items: center; }
.ydh-header-cta .wp-block-button { margin: 0; display: contents; }

.ydh-hamburger {
    display: none !important;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: var(--ydh-ink) !important;
    padding: 0.5rem !important;
}

/* ---------- Button variants (brand) ---------- */
.ydh-btn .wp-block-button__link {
    font-family: var(--ydh-font-body) !important;
    font-weight: 700 !important;
    font-size: 0.93rem !important;
    letter-spacing: 0.01em;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.7rem 1.35rem !important;
    transition: transform 250ms ease, background-color 250ms ease, color 250ms ease, border-color 250ms ease !important;
}

.ydh-btn .wp-block-button__link:hover {
    transform: translateY(-2px);
}

.ydh-btn-primary .wp-block-button__link,
.ydh-btn-phone .wp-block-button__link {
    background-color: var(--ydh-orange) !important;
    color: var(--ydh-ink) !important;   /* 4.83:1 on D2601A */
}

.ydh-btn-primary .wp-block-button__link:hover,
.ydh-btn-phone .wp-block-button__link:hover {
    background-color: var(--ydh-orange-600) !important;
    color: var(--ydh-ink) !important;   /* 5.76:1 on E06F22 */
}

.ydh-btn-ghost .wp-block-button__link {
    background-color: transparent !important;
    color: #F7F5F2 !important;          /* 17:1 on 16130F */
    border: 1px solid rgba(247, 245, 242, 0.45) !important;
}

.ydh-btn-ghost .wp-block-button__link:hover {
    border-color: #F7F5F2 !important;
    background-color: rgba(247, 245, 242, 0.08) !important;
}

.ydh-btn-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--ydh-ink) !important;
    border: 1px solid #D8CFC3 !important;
}

.ydh-btn-outline .wp-block-button__link:hover {
    border-color: var(--ydh-ink) !important;
    background-color: #FFFFFF !important;
}

/* ===== Mobile menu overlay ===== */
.ydh-mobile-menu { z-index: 100002 !important; }

/* ===== DESKTOP SUBMENU (no Interactivity runtime on this page) ===== */
header .ydh-nav .wp-block-navigation-item.has-child {
    position: relative;
}

header .ydh-nav .wp-block-navigation__submenu-container {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    background-color: var(--ydh-mist) !important;
    border: 1px solid var(--ydh-line) !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 34px rgba(20, 18, 15, 0.14) !important;
    padding: 0.45rem !important;
    min-width: 210px !important;
    left: 0 !important;
    top: 100% !important;
}

header .ydh-nav .has-child.ydh-sub-open > .wp-block-navigation__submenu-container,
header .ydh-nav .wp-block-navigation__submenu-container.ydh-sub-open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Core navigation/style.min.css pins the closed state to a zero-size,
       clipped box (height:0; width:0; overflow:hidden) and only un-clips on
       its own :hover or [aria-expanded=true] path. Overriding display alone
       left the open panel a ~16px sliver on click/keyboard, so un-clip it
       here too, matching core's open state. */
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

header .ydh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
}

header .ydh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    background-color: #FFF3E8;
    color: var(--ydh-ink) !important;
}

header .ydh-nav .wp-block-navigation__submenu-icon {
    transition: transform 200ms ease;
}

header .ydh-nav .has-child.ydh-sub-open .wp-block-navigation__submenu-icon {
    transform: rotate(180deg);
}

/* ---------- Mobile menu overlay ---------- */
.ydh-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: #FFFFFF;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ydh-mobile-menu[hidden] { display: none; }

.ydh-mobile-menu-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
}

.ydh-mobile-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0 1rem;
}

.ydh-brand-small {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-family: var(--ydh-font-display);
    font-weight: 700;
    color: var(--ydh-ink);
    text-decoration: none;
    font-size: 0.95rem;
}

.ydh-brand-small img { width: 34px; height: auto; display: block; }

.ydh-mobile-close {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: var(--ydh-ink) !important;
    padding: 0.4rem !important;
}

.ydh-mobile-quick { display: flex; flex-direction: column; }

.ydh-mobile-quick > a,
.ydh-mobile-acc-btn {
    font-family: var(--ydh-font-body);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--ydh-ink) !important;
    text-decoration: none;
    padding: 0.9rem 0.2rem;
    border-bottom: 1px solid var(--ydh-line);
    text-align: left;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
}

.ydh-mobile-acc-btn svg { transition: transform 250ms ease; }
.ydh-mobile-acc.open .ydh-mobile-acc-btn svg { transform: rotate(180deg); }

.ydh-mobile-acc-panel {
    display: none;
    padding: 0.4rem 0 0.8rem 1rem;
    border-bottom: 1px solid var(--ydh-line);
}

.ydh-mobile-acc.open .ydh-mobile-acc-panel { display: block; }

.ydh-mobile-acc-panel a {
    display: block;
    padding: 0.55rem 0;
    color: var(--ydh-body) !important;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.ydh-mobile-seeall { color: var(--ydh-orange-deep) !important; font-weight: 700 !important; }

.ydh-mobile-call { margin-top: 1.2rem; }
.ydh-mobile-call .wp-block-button__link {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: var(--ydh-orange) !important;
    color: var(--ydh-ink) !important;
}

.ydh-mobile-tag {
    color: var(--ydh-muted);
    font-size: 0.85rem;
    margin-top: 0.8rem;
}

body.ydh-menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.ydh-footer {
    background-color: var(--ydh-dark) !important;
    color: #C9C2B8 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    /* The spacing padding set in parts/footer.html ("top":"3.5rem") is a block
       style attribute, which this WP install fails to serialize on static
       blocks (group has no render_callback), so it never reaches the HTML.
       Reproduce it in CSS so footer padding does not depend on block-support
       serialization. bottom 2rem matches the footer.html attr. */
    padding-top: 3.5rem !important;
    padding-bottom: 2rem !important;
}

.ydh-footer-grid {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ydh-footer-cols {
    display: grid !important;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
}

.ydh-footer-cols .wp-block-column { margin: 0 !important; }

.ydh-footer .ydh-brand-text,
.ydh-footer .ydh-brand-name,
.ydh-footer .ydh-brand-sub { display: flex; }
.ydh-footer .ydh-brand-name { color: #F7F5F2; }
.ydh-footer .ydh-brand-sub { color: #B9B1A7; }
.ydh-footer a.ydh-brand:hover .ydh-brand-name { color: #F0A868; }
.ydh-footer-badge { width: 72px; height: auto; display: block; }

.ydh-footer-tag {
    color: #B9B1A7 !important;   /* 8.7:1 on 16130F */
    font-size: 0.9rem;
    line-height: 1.65;
    max-width: 34ch;
    margin-top: 0.9rem !important;
}

.ydh-footer-h {
    color: #F7F5F2 !important;
    font-family: var(--ydh-font-body);
    font-weight: 700 !important;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 !important;
    margin-bottom: 0.7rem !important;
}

.ydh-footer-h-gap { margin-top: 1.4rem !important; }

.ydh-footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.ydh-footer-list a {
    color: #C9C2B8 !important;   /* 10.5:1 on 16130F */
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 500;
}

.ydh-footer-list a:hover { color: #F0A868 !important; }

.ydh-footer-nap li {
    color: #C9C2B8 !important;
    font-size: 0.92rem;
    line-height: 1.5;
}

.ydh-footer-nap a,
.ydh-footer-nap li a { color: #C9C2B8 !important; }

.ydh-footer-cities {
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 1rem;
}

.ydh-footer-bottom {
    border-top: 1px solid rgba(247, 245, 242, 0.12);
    margin-top: 2.5rem !important;
    margin-bottom: 0 !important;
    padding-top: 1.4rem !important;
    /* Owner note round 4: padding-bottom was 0, so the copyright sat against
       the very bottom edge of the page. Balanced, non-zero vertical padding. */
    padding-bottom: 1.4rem !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ydh-copyright {
    color: #8A8378 !important;   /* ~5:1 on 16130F */
    font-size: 0.82rem;
    margin: 0 !important;
}

/* Round 5: WP core block spacing (layout flow) applies margin-top ~1.6rem to
   the social links list, pushing the icon row below the copyright baseline.
   Zero lateral block margins; the flex row's align-items:center handles the rest. */
.ydh-social { margin-top: 0 !important; margin-bottom: 0 !important; }
.ydh-social .wp-block-social-link { background-color: transparent !important; border-radius: 6px !important; width: 32px !important; height: 32px !important; padding: 0 !important; margin: 0 2px; font-size: 32px !important; }
.ydh-social .wp-block-social-link .wp-block-social-link-anchor { width: 32px !important; height: 32px !important; padding: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; }
.ydh-social .wp-block-social-link .wp-block-social-link-anchor svg { fill: #C9C2B8 !important; width: 32px !important; height: 32px !important; display: block !important; }
.ydh-social .wp-block-social-link:hover .wp-block-social-link-anchor svg { fill: #F0A868 !important; }
.ydh-social .wp-block-social-link:focus .wp-block-social-link-anchor svg,
.ydh-social .wp-block-social-link:active .wp-block-social-link-anchor svg { fill: #F0A868 !important; }
.ydh-social .wp-block-social-link:hover { background-color: transparent !important; }

/* Old footer mu-plugin forces black text on NFD footer classes only;
   the new footer uses .ydh-footer and is unaffected. */

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ydh-nav { display: none !important; }
    .ydh-hamburger { display: inline-flex !important; }
}

@media (max-width: 640px) {
    .ydh-header-cta { display: none !important; }
    .ydh-brand-name { font-size: 0.9rem; }
    .ydh-brand-sub { display: none; }
    .ydh-footer-cols { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .ydh-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .ydh-footer-cols { grid-template-columns: 1fr; }
    .ydh-footer-cities { grid-template-columns: 1fr; }
    .ydh-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Hero motion ---------- */
main.ydh-main .ydh-hero {
    position: relative;
    overflow: hidden;
}

main.ydh-main .ydh-hero::before {
    content: '';
    position: absolute;
    inset: -10% -5% auto -5%;
    height: 70%;
    background: radial-gradient(900px 480px at 78% 0%, rgba(210, 96, 26, 0.16) 0%, rgba(210, 96, 26, 0) 60%);
    animation: ydhGlow 12s ease-in-out infinite alternate;
    pointer-events: none;
}

main.ydh-main .ydh-hero > .ydh-hero-inner { position: relative; }

main.ydh-main .ydh-hero-badge {
    animation: ydhFloat 7s ease-in-out infinite alternate;
    will-change: transform;
}

/* Reduced motion handled at the bottom of this file's earlier section;
   the global reduce block above also kills ydhGlow/ydhFloat animation. */