/* 02-layout.css: shell layout: container, header, hero, sections, footer,
   sticky mobile call bar, auth page, reconnect modal. */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--section-px);
    padding-right: var(--section-px);
}

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

.section {
    padding: 48px 0;
}

.section-alt {
    background: var(--off-white);
}

/* ---------- header ---------- */

.site-header {
    background: var(--charcoal-900);
    border-bottom: 2px solid var(--gold-500);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-height: 44px;
    /* UX-C1: the logo link must be the flex item that shrinks, so the brand
       text can truncate instead of printing over the phone block. */
    flex: 1 1 auto;
    min-width: 0;
}

.site-logo:hover {
    text-decoration: none;
}

.site-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
}

.site-logo-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--white);
    white-space: nowrap;
    /* UX-C1: truncate with an ellipsis when the header runs out of width. */
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-logo-text strong {
    color: var(--gold-400);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    /* UX-C1: the phone block never compresses; the logo text yields instead. */
    flex-shrink: 0;
}

.header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
    line-height: 1.25;
    min-height: 44px;
    justify-content: center;
}

.header-phone:hover {
    text-decoration: none;
}

.header-phone-label {
    font-size: 12px;
    color: var(--silver-300);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-phone-number {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-400);
    white-space: nowrap;
}

/* Phone stays visible on mobile; the header CTA yields to the call bar.
   UX-C1: the hide rule needs the .site-header prefix so it outranks .btn's
   display: inline-flex (equal specificity, but 03-components.css loads after
   this file in the App.razor cascade). */
@media (max-width: 640px) {
    .site-header .header-cta {
        display: none;
    }

    .site-logo-text {
        font-size: 0.95rem;
    }
}

/* ---------- hero (dark, echoes the logo asphalt) ---------- */

.hero-dark {
    background: var(--charcoal-900);
    color: var(--white);
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 56px;
    padding-bottom: 56px;
}

.hero-logo {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 6px 30px rgba(0, 0, 0, .45);
}

.hero-title {
    color: var(--white);
    font-size: 2.2rem;
    max-width: 21ch;
}

.hero-sub {
    color: var(--silver-100);
    font-size: 1.1rem;
    max-width: 54ch;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 6px;
}

@media (min-width: 768px) {
    :root {
        --section-px: 32px;
    }

    .hero-title {
        font-size: 2.9rem;
    }
}

/* ---------- footer (charcoal, NAP per CLAUDE.md) ---------- */

.site-footer {
    background: var(--charcoal-900);
    color: var(--silver-100);
    padding: 40px 0 24px;
    /* Keep footer content clear of the fixed mobile call bar. */
    margin-bottom: var(--call-bar-height);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.footer-heading {
    color: var(--gold-400);
    font-size: 1rem;
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14.5px;
}

.footer-links a {
    color: var(--silver-100);
}

.footer-links a:hover {
    color: var(--gold-400);
}

/* UX-M6: on touch widths every footer link gets a >=44px tap box (padding
   grows the target; the negative margin keeps the visual rhythm). */
@media (max-width: 767px) {
    .footer-links {
        gap: 2px;
    }

    .footer-links a {
        display: inline-block;
        padding: 14px 0;
        margin: -4px 0;
    }
}

.footer-note {
    color: var(--silver-300);
    font-size: 13px;
    margin-top: 10px;
}

/* Quiet but findable: staff use it, customers ignore it. Underline + a
   44px-tall tap target so it works for every thumb. */
a.footer-staff-login {
    text-decoration: underline;
    display: inline-block;
    padding: 12px 0;
    margin: -2px 0;
}

a.footer-staff-login:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--steel-700);
    margin-top: 28px;
    padding-top: 16px;
}

@media (min-width: 768px) {
    .site-footer {
        margin-bottom: 0;
    }
}

/* ---------- sticky mobile call bar ---------- */

.mobile-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: flex;
    height: var(--call-bar-height);
    background: var(--charcoal-900);
    border-top: 1px solid var(--steel-700);
}

.call-bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
}

.call-bar-btn:hover {
    text-decoration: none;
}

.call-bar-call {
    color: var(--gold-400);
}

.call-bar-estimate {
    background: var(--gold-500);
    color: var(--charcoal-900);
}

@media (min-width: 768px) {
    .mobile-call-bar {
        display: none;
    }
}

/* ---------- auth page ---------- */

.auth-page {
    display: flex;
    justify-content: center;
    padding: 56px var(--section-px);
    background: var(--off-white);
    min-height: 60vh;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--silver-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    height: fit-content;
}

.auth-header {
    margin-bottom: 18px;
}

.auth-header p {
    color: var(--steel-600);
    font-size: 14px;
}

/* ---------- Blazor reconnect modal ---------- */

#components-reconnect-modal {
    display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.reconnect-overlay {
    position: absolute;
    inset: 0;
    background: rgba(23, 25, 28, .65);
}

.reconnect-card {
    position: relative;
    margin: 18vh auto 0;
    max-width: 360px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.reconnect-logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: var(--charcoal-900);
}

.reconnect-logo strong {
    color: var(--gold-700);
}

.reconnect-title {
    margin: 10px 0 6px;
    font-size: 1.2rem;
}

.reconnect-message, .reconnect-sub {
    font-size: 14px;
    color: var(--steel-700);
}

.reconnect-rejected-msg {
    display: none;
    font-size: 14px;
}
