/* ==========================================================================
   MANMFIRE — site design system
   Built on fire-safety-palette.md. Most rules stay scoped under `.site`,
   the shell every page renders inside.
   ========================================================================== */

/* --- reset ---------------------------------------------------------------
   The site used to inherit Bootstrap's reboot through Materia's bundle. That
   bundle went with the back office, so the handful of resets the layout
   actually relies on live here now. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #FBFBFC;   /* Paper, so overscroll matches the page */
}

button {
    font: inherit;
    color: inherit;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.site {
    /* Core brand */
    --flame-red: #C8161E;
    --ember: #8E0F14;
    --signal-blue: #1E4FA3;
    --safety-amber: #F2A900;
    --steel: #6E7377;

    /* Neutrals */
    --ink: #1B1E21;
    --graphite: #3A3F44;
    --ash: #D9DDE0;
    --smoke: #F2F4F5;
    --paper: #FBFBFC;

    /* Status */
    --operational: #1E8A5F;
    --caution: #B87400;
    --offline: #8A9095;

    --font-head: 'Archivo', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --measure: 1200px;
    --header-h: 76px;
    --radius: 6px;

    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

html:has(.site) {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html:has(.site) { scroll-behavior: auto; }
}

/* --- base ---------------------------------------------------------------- */

:where(.site) :is(h1, h2, h3, h4) {
    font-family: var(--font-head);
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--ink);
    margin: 0;
    font-weight: 700;
}

:where(.site) p { margin: 0 0 1.1em; }
:where(.site) p:last-child { margin-bottom: 0; }

:where(.site) a { color: var(--signal-blue); text-decoration: none; }
:where(.site) a:hover { text-decoration: underline; }

:where(.site) img { max-width: 100%; height: auto; display: block; }

.site :focus-visible {
    outline: 2px solid var(--signal-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

.site [tabindex="-1"]:focus,
.site [tabindex="-1"]:focus-visible {
    outline: none;   /* FocusOnNavigate parks focus on the h1; not a user-initiated focus */
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: var(--paper);
    padding: .75rem 1.25rem;
    font-family: var(--font-mono);
    font-size: .8125rem;
}

.skip-link:focus { left: 0; }

/* --- layout -------------------------------------------------------------- */

.wrap {
    width: 100%;
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: clamp(4.5rem, 8vw, 7.5rem);
    scroll-margin-top: var(--header-h);
}

.section--smoke { background: var(--smoke); }
.section--ink { background: var(--ink); color: #E7EAEC; }
.section--ink h2, .section--ink h3, .section--ink h4 { color: var(--paper); }

/* Eyebrow: mono, uppercase, tracked — the palette sheet's "labels / data" role. */
.eyebrow {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--steel);
    margin: 0 0 1.25rem;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--steel);
    flex: none;
}

.section--ink .eyebrow { color: var(--offline); }
.section--ink .eyebrow::before { background: var(--offline); }

.section-title {
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    max-width: 22ch;
}

.section-lead {
    margin-top: 1.25rem;
    max-width: 62ch;
    color: var(--graphite);
    font-size: 1.0625rem;
}

.section--ink .section-lead { color: #B9C0C4; }

.section-head--center {
    text-align: center;
    max-width: 44rem;
    margin-inline: auto;
}

.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-title { max-width: none; }
.section-head--center .section-lead { margin-inline: auto; }

/* --- buttons ------------------------------------------------------------- */

.btn-fire, .btn-ghost, .btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    font-family: var(--font-mono);
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .95rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.site .btn-fire:hover, .site .btn-ghost:hover, .site .btn-line:hover { text-decoration: none; }

/* Flame Red is the one accent per view: the primary action. */
.btn-fire { background: var(--flame-red); color: var(--paper); }
.btn-fire:hover, .btn-fire:focus-visible { background: var(--ember); color: var(--paper); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(251, 251, 252, .35); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--paper); background: rgba(251, 251, 252, .08); color: var(--paper); }

.btn-line { background: transparent; color: var(--ink); border-color: var(--ash); }
.btn-line:hover, .btn-line:focus-visible { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn-fire[disabled], .btn-line[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* --- header -------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--paper);
    border-bottom: 1px solid var(--ash);
}

.site-header__inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-header__logo { display: flex; align-items: center; flex: none; }
.site-header__logo img { height: 32px; width: auto; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}

.site-nav a {
    color: var(--graphite);
    font-size: .9375rem;
    font-weight: 500;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); border-bottom-color: var(--flame-red); text-decoration: none; }

.site-header__actions { display: flex; align-items: center; gap: 1rem; flex: none; }

.site-header__phone {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-mono);
    font-size: .8125rem;
    color: var(--graphite);
}

.site-header__phone:hover { color: var(--ink); text-decoration: none; }
.site-header__phone i { font-size: 1.05rem; color: var(--steel); }

.site-header__actions .btn-fire { padding: .7rem 1.25rem; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ash);
    border-radius: var(--radius);
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-size: 1.35rem;
    cursor: pointer;
    margin-left: auto;
}

.mobile-nav {
    border-bottom: 1px solid var(--ash);
    background: var(--paper);
    padding: .5rem var(--gutter) 1.5rem;
}

.mobile-nav a {
    display: block;
    padding: .85rem 0;
    border-bottom: 1px solid var(--ash);
    color: var(--ink);
    font-weight: 500;
}

.mobile-nav a:hover { text-decoration: none; color: var(--flame-red); }

/* `.mobile-nav a` would otherwise out-specify `.btn-fire` and dark-on-red the label. */
.mobile-nav a.btn-fire,
.mobile-nav a.btn-fire:hover { width: 100%; margin-top: 1.25rem; color: var(--paper); border-bottom: 0; }

/* --- hero ---------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(33rem, 78vh, 47rem);
    background: var(--paper);
    color: var(--ink);
    overflow: hidden;
    isolation: isolate;
}

/* The wall photo runs full bleed. It is a white wall with red hardware on it,
   so the hero stays light: the veil goes opaque on the left for the copy and
   clears on the right, where the extinguisher and the call point sit. */
.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url("img/hero-bg.jpg");
    background-size: cover;
    background-position: 72% 60%;
    z-index: -2;
}

.hero__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg,
            var(--paper) 0%,
            var(--paper) 34%,
            rgba(251, 251, 252, .96) 46%,
            rgba(251, 251, 252, .64) 60%,
            rgba(251, 251, 252, .18) 76%,
            rgba(251, 251, 252, 0) 90%),
        linear-gradient(to top, var(--paper) 0%, rgba(251, 251, 252, 0) 14%);
}

.hero__inner {
    width: 100%;
    padding-block: clamp(4rem, 9vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
}

.hero__copy { max-width: 44rem; }

.hero .eyebrow { color: var(--steel); }
.hero .eyebrow::before { background: var(--flame-red); }

.hero h1 {
    font-size: clamp(2.35rem, 6.4vw, 4.5rem);
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1.04;
}

.hero__lead {
    margin-top: 1.5rem;
    font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
    color: var(--graphite);
    max-width: 50ch;
}

.hero__cta {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* The three promises, on the rounded bar the original layout used. */
.hero__promises {
    position: relative;
    margin-top: clamp(3rem, 6vw, 4.5rem);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    list-style: none;
    padding: 0;
    background: var(--ash);
    border: 1px solid var(--ash);
    border-radius: 999px;
    overflow: hidden;
}

.promise {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.15rem 1.75rem;
    background: var(--paper);
}

.promise i {
    font-size: 1.4rem;
    color: var(--flame-red);
    flex: none;
}

.promise span {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9375rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* --- brand strip --------------------------------------------------------- */

.brands { background: var(--smoke); border-bottom: 1px solid var(--ash); }

.brands__inner {
    padding-block: clamp(2.5rem, 4vw, 3.25rem);
    display: grid;
    grid-template-columns: minmax(14rem, 20rem) 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
}

.brands__label {
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--steel);
    line-height: 1.7;
}

.brands__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
    align-items: center;
}

.brands__list img {
    width: 100%;
    max-width: 132px;
    margin-inline: auto;
    filter: grayscale(1);
    opacity: .62;
    mix-blend-mode: multiply;
    transition: filter .2s ease, opacity .2s ease;
}

.brands__list li:hover img { filter: grayscale(0); opacity: 1; }

.brands__list { list-style: none; padding: 0; margin: 0; }

/* --- about --------------------------------------------------------------- */

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.about__figure { position: relative; margin: 0; }

.about__figure img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--ash);
}

/* A 4px status border rather than a tinted fill — the palette sheet's rule. */
.about__figure::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 4px;
    background: var(--flame-red);
    border-radius: 4px;
    z-index: 1;
}

.about__body p { color: var(--graphite); }

.about__facts {
    margin: 2.25rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1.5rem;
    border-top: 1px solid var(--ash);
    padding-top: 1.75rem;
}

.fact dt {
    font-family: var(--font-mono);
    font-size: .6875rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: .4rem;
}

.fact dd {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--ink);
    line-height: 1.3;
}

/* --- vision / mission / values ------------------------------------------- */

.vm-grid {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.5rem;
}

.vm-card {
    background: var(--paper);
    border: 1px solid var(--ash);
    border-left: 5px solid var(--steel);
    border-radius: var(--radius);
    padding: 2rem clamp(1.5rem, 3vw, 2.25rem);
}

.vm-card__index {
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .14em;
    color: var(--steel);
}

.vm-card h3 { font-size: 1.375rem; margin: .5rem 0 .9rem; }
.vm-card p { color: var(--graphite); margin: 0; }

.values {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    border-top: 1px solid var(--ash);
    border-left: 1px solid var(--ash);
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
}

.value {
    padding: 2rem clamp(1.5rem, 2.5vw, 2rem);
    border-right: 1px solid var(--ash);
    border-bottom: 1px solid var(--ash);
}

.value__index {
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .14em;
    color: var(--flame-red);
}

.value h4 { font-size: 1.125rem; margin: .65rem 0 .6rem; }
.value p { color: var(--graphite); font-size: .9375rem; margin: 0; }

/* --- accordion ----------------------------------------------------------- */

.acc {
    margin-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--ash);
}

.acc__item { border-bottom: 1px solid var(--ash); }

.acc__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1rem 1.5rem 1.25rem;
    background: none;
    border: 0;
    border-left: 4px solid transparent;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.acc__trigger:hover { background: rgba(110, 115, 119, .06); }

.acc__index {
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .14em;
    color: var(--steel);
    flex: none;
}

.acc__title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.0625rem, 2vw, 1.3125rem);
    letter-spacing: -0.015em;
    flex: 1;
}

.acc__icon {
    flex: none;
    font-size: 1.35rem;
    color: var(--steel);
    transition: transform .2s ease, color .18s ease;
}

.acc__item.is-open .acc__trigger { border-left-color: var(--flame-red); color: var(--flame-red); }
.acc__item.is-open .acc__index { color: var(--flame-red); }
.acc__item.is-open .acc__icon { color: var(--flame-red); transform: rotate(180deg); }

.acc__panel { padding: .25rem 1.25rem 2.75rem 1.25rem; }

.acc__cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.acc__cols p, .acc__panel > p { color: var(--graphite); }

.acc__figure { margin: 0; }

.acc__figure img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--ash);
    background: #fff;
}

.acc__note {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ash);
}

.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; }

.checklist li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: .7rem;
    color: var(--graphite);
    font-size: .9375rem;
}

.checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--operational);
    font-weight: 700;
}

/* Signal Blue carries technical / certification content. */
.norm-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-mono);
    font-size: .6875rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--signal-blue);
    border: 1px solid rgba(30, 79, 163, .35);
    border-radius: 999px;
    padding: .35rem .85rem;
    margin-bottom: 1.25rem;
}

/* --- contact ------------------------------------------------------------- */

.contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
}

.contact__lines {
    margin-top: 0;
    display: grid;
    gap: 1px;
    background: rgba(251, 251, 252, .12);
    border-radius: var(--radius);
    overflow: hidden;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--graphite);
    color: var(--paper);
}

.contact-line:hover { background: #454b51; color: var(--paper); text-decoration: none; }

.contact-line i { font-size: 1.35rem; color: var(--offline); flex: none; }
.contact-line--wa i { color: var(--operational); }

.contact-line__label {
    font-family: var(--font-mono);
    font-size: .6875rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--offline);
    display: block;
}

.contact-line__value { font-weight: 500; }

.contact__actions { margin-top: 1.75rem; }

.hours {
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--safety-amber);
}

/* --- footer -------------------------------------------------------------- */

.site-footer {
    background: var(--ink);
    color: #9AA1A6;
    border-top: 1px solid rgba(251, 251, 252, .1);
}

.site-footer__inner {
    padding-block: clamp(3rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
}

.site-footer img { height: 30px; width: auto; }

.site-footer p { margin-top: 1.25rem; max-width: 38ch; font-size: .9375rem; }

.site-footer h5 {
    font-family: var(--font-mono);
    font-size: .6875rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--paper);
    margin: 0 0 1rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; font-size: .9375rem; }
.site-footer a { color: #9AA1A6; }
.site-footer a:hover { color: var(--paper); text-decoration: none; }

.site-footer__base a { color: var(--paper); }
.site-footer__base a:hover { text-decoration: underline; }

.site-footer__base {
    border-top: 1px solid rgba(251, 251, 252, .1);
    padding-block: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: .6875rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--offline);
}

/* --- floating WhatsApp --------------------------------------------------- */

.wa-float {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 70;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--operational);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(27, 30, 33, .28);
    transition: transform .18s ease;
}

.wa-float:hover { transform: translateY(-2px); color: #fff; text-decoration: none; }

/* --- scroll reveal (CSS-only; no JS reaching into Blazor's DOM) ---------- */

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal-in linear both;
            animation-timeline: view();
            animation-range: entry 5% cover 22%;
        }
    }
}

@keyframes reveal-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1080px) {
    .site-nav, .site-header__phone, .site-header__actions { display: none; }
    .nav-toggle { display: inline-flex; }
    .about__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
    .about__figure { max-width: 34rem; }
    .brands__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .hero__promises { grid-template-columns: minmax(0, 1fr); border-radius: var(--radius); }
    .acc__cols { grid-template-columns: minmax(0, 1fr); }
    .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .brands__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.75rem; }
}

@media (max-width: 700px) {
    /* Narrow screens get the light 1100px crop and an all-over scrim: the copy
       runs the full width, so it can no longer hide in the clear left band. */
    .hero__bg {
        background-image: url("img/hero-bg-sm.jpg");
        background-position: 88% 40%;   /* keeps the extinguisher and the call point in frame */
    }

    .hero__veil {
        background: linear-gradient(to bottom,
            rgba(251, 251, 252, .80) 0%,
            rgba(251, 251, 252, .74) 45%,
            rgba(251, 251, 252, .90) 80%,
            var(--paper) 100%);
    }
}

@media (max-width: 560px) {
    .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
    .brands__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero__cta .btn-fire, .hero__cta .btn-line { width: 100%; }
}
