/* ============================================
   HOMEPAGE CTA BAND + QUOTE MODAL
   Loaded only by index.html. Builds on the tokens in css/styles.css.
   ============================================ */

:root {
    --home-cta-accent: #D1A35F; /* brass, lightened for 7:1 on ink */
}

/* ---- Hero grid: band sits directly under the photo ---- */
.site-hero--cta .hero-container {
    grid-template-rows: 800px auto auto;
    row-gap: 0;
}

.site-hero--cta .hero-content {
    grid-row: 3;
}

.home-cta-band {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--ink);
    color: var(--paper);
}

.home-cta-band__inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem var(--spacing-lg);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 2.5rem;
}

.home-cta-band__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--home-cta-accent);
    margin: 0 0 0.4rem;
    max-width: none;
}

.home-cta-band__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--paper);
    margin: 0;
    max-width: 34ch;
}

.home-cta-band__phone {
    display: flex;
    flex-direction: column;
    padding-left: 2.5rem;
    border-left: 1px solid rgba(251, 248, 242, 0.18);
    font-family: var(--font-sans);
}

.home-cta-band__label,
.home-cta-band__hours {
    font-size: 0.8125rem;
    color: rgba(251, 248, 242, 0.74);
}

.home-cta-band__number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1.25;
    color: var(--paper);
    white-space: nowrap;
}

.home-cta-band__number:hover {
    color: var(--home-cta-accent);
}

.home-cta-band__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0.9rem 2rem;
    background: var(--paper);
    border: 1px solid var(--paper);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

.home-cta-band__button:hover {
    background: var(--home-cta-accent);
    border-color: var(--home-cta-accent);
    color: var(--ink);
}

/* main.js styles the floating call button inline, hence !important. */
.home-cta-band-visible .call-now-fab {
    opacity: 0 !important;
    visibility: hidden !important;
}

.home-cta-band a:focus-visible {
    outline: 3px solid var(--home-cta-accent);
    outline-offset: 3px;
}

/* ---- Quote modal ---- */
html.quote-modal-open {
    overflow: hidden;
}

.quote-modal {
    /* The global reset removes the UA's margin:auto, which centers <dialog>. */
    margin: auto;
    width: calc(100% - 2rem);
    max-width: 940px;
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--ink-soft);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
}

.quote-modal[open] {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    animation: quote-modal-in 220ms ease-out;
}

.quote-modal::backdrop {
    background: rgba(33, 29, 23, 0.62);
}

@keyframes quote-modal-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.quote-modal__media {
    margin: 0;
    background: var(--paper-alt);
}

.quote-modal__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.quote-modal__body {
    position: relative;
    padding: 2.75rem 2.75rem 2.25rem;
    overflow-y: auto;
    max-height: calc(100dvh - 2rem);
}

.quote-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--ink);
    cursor: pointer;
}

.quote-modal__close svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.quote-modal__close:hover {
    border-color: var(--line);
    background: var(--paper);
}

.quote-modal button:focus-visible,
.quote-modal a:focus-visible {
    outline: 3px solid var(--brass-deep);
    outline-offset: 2px;
}

.quote-modal__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-deep);
    margin: 0 0 0.6rem;
}

.quote-modal__title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0 2.5rem 0.75rem 0;
}

.quote-modal__title:focus {
    outline: none;
}

.quote-modal__desc {
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.quote-modal__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

.quote-modal .form-group {
    margin-bottom: 1.1rem;
}

.quote-modal .form-group label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.875rem;
    color: var(--ink);
}

.quote-modal .form-control {
    min-height: 48px;
}

.quote-modal .btn-submit {
    min-height: 54px;
    margin-top: 0.4rem;
    font-size: 1rem;
}

.quote-modal__call {
    margin: 1.1rem 0 0;
    font-size: 0.9375rem;
    text-align: center;
    max-width: none;
}

.quote-modal__call a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--brass);
    text-underline-offset: 0.25em;
    white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .site-hero--cta .hero-container {
        grid-template-rows: 460px auto auto auto;
    }

    .site-hero--cta .hero-form-wrapper {
        grid-row: 4;
    }

    .home-cta-band__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1.5rem 2rem;
    }

    .home-cta-band__lead {
        grid-column: 1 / -1;
    }

    .home-cta-band__phone {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 768px) {
    .site-hero--cta .hero-container {
        grid-template-rows: 320px auto auto auto;
    }

    .home-cta-band__inner {
        padding: 1.75rem var(--spacing-md);
    }

    .quote-modal[open] {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-modal__media {
        display: none;
    }

    .quote-modal__body {
        padding: 2.25rem 1.25rem 1.5rem;
    }
}

@media (max-width: 560px) {
    .home-cta-band__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-cta-band__button {
        width: 100%;
    }

    .quote-modal {
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .quote-modal__body {
        max-height: calc(100dvh - 1rem);
    }

    .quote-modal__row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .site-hero--cta .hero-container {
        grid-template-rows: 260px auto auto auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quote-modal[open] {
        animation: none;
    }

    .home-cta-band__button {
        transition: none;
    }
}

/* ============================================
   BLACK FRIDAY 2026 PROMO SECTION
   State comes from html[data-campaign], set in <head> and kept current by
   js/black-friday-2026.js. Without JS, or from Dec 16, it never shows.
   ============================================ */
html:not([data-campaign]) .home-promo,
html[data-campaign="expired"] .home-promo {
    display: none;
}

html[data-campaign="pre"] .home-promo [data-bf-show]:not([data-bf-show~="pre"]),
html[data-campaign="active"] .home-promo [data-bf-show]:not([data-bf-show~="active"]) {
    display: none;
}

.home-promo {
    --home-promo-copper: #8F4B24;
    --home-promo-muted: #5E5544;
    background: #EFE5D1;
    padding: clamp(4rem, 8vw, 7rem) var(--spacing-lg);
}

.home-promo__inner {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
}

.home-promo__media {
    margin: 0;
}

.home-promo__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    object-position: 55% 50%;
}

.home-promo__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--home-promo-copper);
    margin: 0 0 1.25rem;
    max-width: none;
}

.home-promo__eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
    flex: none;
}

.home-promo__title {
    font-size: clamp(2.3rem, 4.4vw, 3.9rem);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 1.25rem;
    max-width: 14ch;
    text-wrap: balance;
}

.home-promo__title em {
    display: block;
    font-style: italic;
    color: var(--home-promo-copper);
}

.home-promo__lede {
    font-size: 1.0625rem;
    max-width: 48ch;
    margin-bottom: 1.75rem;
}

.home-promo__status {
    max-width: 30rem;
    padding: 1rem 0 1.1rem;
    margin-bottom: 1.75rem;
    border-top: 1px solid #DCCBA8;
    border-bottom: 1px solid #DCCBA8;
}

.home-promo__status-label {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 0.5rem;
}

.home-promo__countdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--home-promo-muted);
}

.home-promo__countdown b {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    color: var(--ink);
    font-variant-numeric: tabular-nums lining-nums;
    margin-right: 0.2rem;
}

.home-promo__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.home-promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.9rem 1.75rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    text-align: center;
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.home-promo__btn--primary {
    background: var(--ink);
    color: var(--paper);
}

.home-promo__btn--primary:hover {
    background: var(--home-promo-copper);
    border-color: var(--home-promo-copper);
    color: var(--paper);
}

.home-promo__btn--ghost {
    background: transparent;
    color: var(--ink);
}

.home-promo__btn--ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

.home-promo a:focus-visible {
    outline: 3px solid var(--home-promo-copper);
    outline-offset: 3px;
}

.home-promo__terms {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--home-promo-muted);
    margin: 0;
    max-width: none;
}

.home-promo__nowrap {
    white-space: nowrap;
}

@media (max-width: 960px) {
    .home-promo__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-promo__media img {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 768px) {
    .home-promo {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

@media (max-width: 560px) {
    .home-promo__actions {
        flex-direction: column;
    }

    .home-promo__btn {
        width: 100%;
    }

    .home-promo__countdown {
        gap: 0.25rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-promo__btn {
        transition: none;
    }
}
