/* Shared public theme. Page-specific components are loaded after this file. */
:root {
    --ink: #14313d;
    --charcoal: #14313d;
    --blue: #214958;
    --gold: #c79a3b;
    --gold-light: #e7c67a;
    --paper: #f7f5f0;
    --muted: #536872;
    --line: #e6e1d6;
    --wrap: 1200px;
    --v3-nav-height: 82px;
}
html { scroll-padding-top: calc(var(--v3-nav-height) + 12px); }
.site-page { color: var(--ink); background: var(--paper); }
.site-page .wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.site-page :focus-visible { outline: 3px solid #bb8a27; outline-offset: 3px; }
.site-page .button { border-radius: 100px; }
.site-page .button-gold { color: #241f14; background: var(--gold); }
.site-page .button-gold:hover { background: #d3a847; }

.v3-header { z-index: 60; color: var(--ink); }
.v3-overlay { position: absolute; inset: 0 0 auto; color: #fff; background: linear-gradient(180deg,#0a1e29a6,transparent); }
.v3-solid { position: sticky; top: -38px; background: #f7f5f0f7; border-bottom: 1px solid var(--line); }
.v3-topbar { font-size: 12px; line-height: 1.45; letter-spacing: .02em; background: var(--ink); color: #d6e2e6; }
.v3-overlay .v3-topbar { background: #091a218f; border-bottom: 1px solid #ffffff1c; }
.v3-topbar .wrap, .v3-topbar .wrap > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 15px; }
.v3-topbar .wrap { min-height: 38px; padding-block: 4px; justify-content: space-between; }
.v3-topbar a + a { padding-inline-start: 14px; border-inline-start: 1px solid #c7d4d95e; }
.v3-topbar a:hover { text-decoration: underline; }
.v3-navbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: var(--v3-nav-height); padding-block: 8px; }
.v3-brand { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 50%; }
.v3-brand img { display: block; width: 156px; max-width: 100%; height: 46px; object-fit: contain; object-position: left center; }
.v3-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.v3-nav > a { position: relative; padding: 10px clamp(9px, 1vw, 15px); border-radius: 8px; line-height: 1.55; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.v3-nav a:hover, .v3-nav a[aria-current] { color: #785719; }
.v3-overlay .v3-nav a:hover, .v3-overlay .v3-nav a[aria-current] { color: var(--gold-light); }
.v3-nav a[aria-current]::after { content: ""; position: absolute; height: 2px; inset: auto 12px 3px; background: var(--gold); }
.v3-nav a.v3-quote { padding: 11px 20px; margin-inline-start: 7px; background: var(--gold); color: #241f14; border-radius: 40px; }
.v3-nav a.v3-quote:hover { background: #dfb65a; color: #241f14; }
.v3-header .menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: inherit; }
.v3-overlay .menu-toggle { border-color: #ffffff80; }
.v3-header .menu-toggle span { width: 20px; height: 2px; margin: 2px 0; background: currentColor; }

/* Previously saved home templates can still use the original hero markup. */
.hy-home > .v2-home-hero .v2-home-hero-inner {
    padding-top: calc(var(--v3-nav-height) + 64px);
}

.v2-page-banner { min-height: auto; padding-block: clamp(42px,5vw,64px) clamp(40px,4.5vw,56px); background: var(--ink); }
.v2-page-banner::before { background: linear-gradient(100deg,#0b202af0,#14313dc9 60%,#14313d9c); }
.v2-page-banner .breadcrumb { color: #d5e3e7; }
.v2-page-banner .v2-banner-label { display: flex; align-items: center; gap: 10px; color: var(--gold-light); font-weight: 700; }
.v2-page-banner .v2-banner-label::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.v2-page-banner h1 { max-width: none; margin-top: 12px; font-size: clamp(30px,4.2vw,52px); letter-spacing: -.01em; }
.v2-page-banner .v2-banner-description { line-height: 1.8; margin-top: 16px; color: #e0e8eb; }
.site-page .v2-footer { background: #0c212a; padding-top: clamp(44px,6vw,72px); color: #b9cad1; }
.v2-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; }
.v2-footer-grid h2 { font-size: 14px; letter-spacing: .04em; }
.v2-footer-grid .v3-brand img { width: 168px; height: 50px; margin-bottom: 16px; }
.v2-footer-brand p { line-height: 1.7; }
.v2-footer-grid .v2-footer-brand > .v2-footer-phone { margin-top: 17px; color: var(--gold-light); }
.v2-footer-grid .v2-footer-contact .v2-footer-phone { color: inherit; font-size: 14px; }
.site-page .back-top { display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--gold-light); visibility: hidden; }
.site-page .back-top.visible { visibility: visible; }
.site-page .site-mobile-actions { background: var(--ink); }
.site-page .site-section-content .content-category-nav a[aria-current] { background: var(--ink); color: white; }

@media (max-width: 1024px) {
    :root { --v3-nav-height: 66px; }
    .v3-navbar { flex-wrap: wrap; row-gap: 4px; }
    .v3-nav { width: 100%; justify-content: flex-start; }
    .v3-header.nav-ready .menu-toggle { display: grid; place-content: center; }
    .v3-header.nav-ready .v3-nav { display: none; }
    .v3-header.nav-ready .v3-nav.open {
        position: absolute; inset: 100% 0 auto; display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 14px;
        background: #14313d; color: #fff; border-radius: 14px; box-shadow: 0 18px 46px #0a212a38;
        max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto;
    }
    .v3-header:not(.nav-ready) { position: relative; top: 0; }
    .v3-overlay:not(.nav-ready) { background: var(--ink); }
    .v3-nav a[aria-current], .v3-nav a:hover { color: var(--gold-light); }
    .v3-nav a.v3-quote { margin: 0; text-align: center; align-self: center; }
    .v2-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    :root { --v3-nav-height: 62px; }
    .site-page .wrap { width: calc(100% - 36px); }
    .v3-solid { top: -32px; }
    .v3-topbar .wrap { min-height: 32px; justify-content: center; }
    .v3-topbar .wrap > span, .v3-address { display: none; }
    .v3-topbar a + a { padding: 0; border: 0; }
    .v3-navbar { gap: 8px; }
    .v3-brand img { width: 134px; height: 40px; }
    .v2-footer-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px 18px; }
    .v2-footer-brand, .v2-footer-contact { grid-column: 1 / -1; }
}
@media (max-height: 460px) {
    .v3-solid { position: relative; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
