/* Dark sections use spacing and subtle surface changes to establish rhythm.
   The legacy band-paper class now resolves to the charcoal foundation. */

.band {
    padding-block: var(--space-3xl);
}

.band-tight { padding-block: var(--space-2xl); }
.band-flush-top { padding-top: 0; }

.band-ink {
    background-color: var(--ink);
    color: var(--on-ink);
}

.band-ink h1,
.band-ink h2,
.band-ink h3 { color: var(--on-ink); }

.band-ink p { color: var(--on-ink-body); }

.band-paper {
    background-color: var(--paper);
    color: var(--text);
}

/* Page header band — interior pages */
.page-header {
    position: relative;
    overflow: hidden;
    padding-block: var(--space-2xl);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header__inner {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.page-header p {
    font-size: var(--font-size-lg);
    line-height: 1.65;
    max-width: 620px;
}

/* Eyebrow label */
.eyebrow {
    font-size: var(--font-size-eyebrow);
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--green-deep);
}

.band-ink .eyebrow,
.eyebrow-on-ink { color: var(--green-pale); }

/* Section head — eyebrow + heading left, blurb right */
.section-head {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-xl);
}

.section-head__main {
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.section-head__blurb {
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--text-body);
    max-width: 360px;
}

/* Emergency banner — sticky for the whole page. `top` clears the sticky header
   (header.css) and z-index sits under it so the two stack rather than fight.
   Only sticks correctly as a direct child of <main>; see EmergencyBanner in
   internal/web/components/sections.templ. */
.emergency-banner {
    position: sticky;
    top: var(--header-offset);
    z-index: 15;
    background-color: var(--red);
    color: #fff;
    transition: box-shadow 0.2s ease;
}

.emergency-banner__inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-md);
    transition: padding-block 0.2s ease;
}

.emergency-banner__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.emergency-banner__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    opacity: 0.85;
}

.emergency-banner__headline {
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    transition: font-size 0.2s ease;
}

.emergency-banner__area {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

/* Rest of the label ("Emergency call out"), phones only — see the phone block
   below. */
.emergency-banner__label-phone {
    display: none;
}

/* Office + mobile pair — callButtons in internal/web/components/sections.templ */
.call-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.call-buttons a { white-space: nowrap; }

.call-buttons__narrow { display: none; }

/* Pinned phone banner only — see the phone block below. */
.emergency-banner__call-now { display: none; }

.emergency-banner__call:focus-visible {
    outline-color: #fff;
}

/* Compact state, once the full-size banner has scrolled away. Applied by the
   banner IIFE in main.js — without JS the banner stays full height and still
   sticks, so this is polish, not function. */
.emergency-banner.is-pinned {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.emergency-banner.is-pinned .emergency-banner__inner {
    padding-block: 10px;
}

.emergency-banner.is-pinned .emergency-banner__headline {
    font-size: var(--font-size-base);
}

.emergency-banner.is-pinned .emergency-banner__label,
.emergency-banner.is-pinned .emergency-banner__area {
    display: none;
}

.emergency-banner.is-pinned .emergency-banner__call {
    min-height: 40px;
    padding: 10px 16px;
    font-size: var(--font-size-sm);
}

/* Zero-height scroll trigger for the compact state; carries no content. */
.emergency-sentinel {
    height: 0;
}

@media (prefers-reduced-motion: reduce) {
    .emergency-banner,
    .emergency-banner__inner,
    .emergency-banner__headline {
        transition: none;
    }
}

/* Phones. Full size, the banner is the label on one line over the two numbers
   stacked full width ("01793 200890 - Office"), with the headline sentence
   left to tablet up. Pinned, it compacts to one row: the label on two lines
   beside a single "Call Now" (office) button. That row is 60px and must stay
   equal to --emergency-height, which anchor scroll-padding clears and main.js
   uses as the pin trigger. */
@media (max-width: 600px) {
    .emergency-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
        padding-block: 10px;
    }

    .emergency-banner.is-pinned .emergency-banner__inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: var(--space-xs);
        padding-block: 8px;
    }

    .emergency-banner__headline,
    .emergency-banner__area {
        display: none;
    }

    .emergency-banner__label,
    .emergency-banner.is-pinned .emergency-banner__label {
        display: block;
        font-size: 12px;
        line-height: 1.3;
        letter-spacing: 0;
        opacity: 1;
        white-space: nowrap;
    }

    .emergency-banner__label-phone {
        display: inline;
        margin-left: 0.35em;
    }

    .emergency-banner.is-pinned .emergency-banner__label-phone {
        display: block;
        margin-left: 0;
    }

    .emergency-banner__calls {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: var(--space-xs);
    }

    .emergency-banner.is-pinned .emergency-banner__calls {
        display: none;
    }

    .emergency-banner.is-pinned .emergency-banner__call-now {
        display: inline-flex;
    }

    .emergency .call-buttons__long,
    .emergency-banner .call-buttons__long {
        display: none;
    }

    .emergency .call-buttons__narrow,
    .emergency-banner .call-buttons__narrow {
        display: inline;
    }

    /* The stacked numbers are kept slim (28px) so the full banner stays
       around 100px; the pinned Call Now keeps a full 44px tap target. */
    .emergency-banner__call {
        min-height: 28px;
        padding: 4px 12px;
        font-size: var(--font-size-sm);
    }

    .emergency-banner.is-pinned .emergency-banner__call {
        min-height: 44px;
        padding: 8px 12px;
    }

    .emergency-banner.is-pinned .emergency-banner__call {
        flex: 0 0 auto;
    }
}

/* Tablets: once pinned, the headline plus both full-number buttons need ~845px,
   so below that the pinned banner wrapped to two rows against the 60px
   --emergency-height and in-page anchors landed behind it. Pinned, the
   headline gives way to the short "24 hours" label so the numbers stay. */
@media (min-width: 601px) and (max-width: 860px) {
    .emergency-banner.is-pinned .emergency-banner__headline {
        display: none;
    }

    .emergency-banner.is-pinned .emergency-banner__label {
        display: block;
    }
}

/* Emergency band — the in-flow block used on interior pages */
.emergency {
    background-color: var(--red);
    color: #fff;
    padding: var(--space-md) var(--space-lg);
    border-radius: 3px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: space-between;
}

.emergency__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    opacity: 0.85;
}

.emergency__headline {
    font-size: var(--font-size-card);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    display: block;
}

/* Trust bar — hairline strip at the foot of an ink band */
.trust-bar {
    border-top: 1px solid var(--ink-line);
}

.trust-bar__inner {
    padding-block: var(--space-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    justify-content: space-between;
}

.trust-bar__legal {
    font-size: var(--font-size-sm);
    color: var(--on-ink-muted);
}

/* Closing call-to-action strip */
.cta-strip {
    background-color: var(--card);
    border: 1px solid var(--line);
    padding: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    justify-content: space-between;
    align-items: center;
}

.cta-strip__main {
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.cta-strip__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    line-height: 1.35;
}

.cta-strip p {
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-muted);
}

