/* =====================================================================
   AGNI FIRE PROTECTION - stylesheet
   Written mobile-first: the base rules are for phones, and the
   @media (min-width: ...) blocks at the bottom add the wider layouts.

   QUICK EDITS
   - Brand colours: change the values in :root just below.
   - Hero photo: search for ".hero" and change the image name.
   ===================================================================== */

:root {
    --red: #b52824;          /* main brand red */
    --red-dark: #8f1d1a;     /* hover colour */
    --ink: #1b1d21;          /* main text and dark sections */
    --muted: #5b6068;        /* secondary text */
    --line: #e4e6e9;         /* thin borders */
    --soft: #f4f5f6;         /* light grey sections */
    --white: #ffffff;
    --radius: 6px;
    --max: 1160px;           /* widest the content gets */
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    padding-bottom: 64px;    /* room for the phone call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 24px;
    border: 2px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; color: var(--white); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: var(--soft); color: var(--red-dark); }
.btn-outline-white { border-color: rgba(255,255,255,.8); color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-row .btn { flex: 1 1 180px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar { display: none; }
.header-inner { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.brand { flex: 1 1 auto; min-width: 0; display: block; }
.brand img { width: 100%; max-width: 270px; height: auto; }

/* Menu button (phones) */
.nav-toggle {
    width: 44px; height: 44px; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu panel (phones): hidden until the button is tapped */
.site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    padding: 8px 20px 20px;
}
.site-nav.is-open { display: block; }
.site-nav a {
    display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
    color: var(--ink); font-weight: 600; text-decoration: none;
}
.site-nav a[aria-current="page"] { color: var(--red); }
.site-nav .nav-cta {
    margin-top: 16px; border: 0; border-radius: var(--radius);
    background: var(--red); color: var(--white); text-align: center;
}

/* ---------- Hero (home page) ---------- */
.hero {
    position: relative; color: var(--white);
    background:
        linear-gradient(100deg, rgba(20,22,26,.92) 0%, rgba(20,22,26,.72) 60%, rgba(20,22,26,.45) 100%),
        url("../images/suppression.webp") center / cover no-repeat;
}
.hero-inner { padding-top: 56px; padding-bottom: 56px; }
.hero h1 { color: var(--white); font-size: 2.2rem; max-width: 14em; }
.hero .lead { font-size: 1.1rem; max-width: 34em; color: #e8eaed; }
.eyebrow { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffb4ae; }
.eyebrow.dark { color: var(--red); }
.hero .btn-row { margin-top: 24px; }

/* Strip under the hero */
.facts { background: var(--ink); color: var(--white); }
.facts-inner { display: grid; grid-template-columns: 1fr 1fr; }
.facts-inner div { padding: 18px 12px; border-top: 1px solid rgba(255,255,255,.12); }
.facts-inner div:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.12); padding-left: 0; }
.facts-inner div:nth-child(-n+2) { border-top: 0; }
.facts-inner strong { display: block; font-size: 1rem; }
.facts-inner span { display: block; font-size: .85rem; color: #b9bec6; line-height: 1.4; margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.soft { background: var(--soft); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); }

/* Service cards */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    color: inherit; text-decoration: none;
    transition: box-shadow .2s, transform .2s;
}
a.card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-2px); color: inherit; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); flex: 1; }
.card-link { color: var(--red); font-weight: 600; }
.card-link::after { content: " \2192"; }
.card-cta { background: var(--red); border-color: var(--red); justify-content: center; }
.card-cta h3, .card-cta p { color: var(--white); }
.card-cta .btn { align-self: flex-start; }

/* Steps */
.steps { display: grid; gap: 20px; grid-template-columns: 1fr; counter-reset: none; }
.steps li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps p { margin: 0; color: var(--muted); }
.step-no {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-bottom: 12px;
    background: var(--red); color: var(--white); border-radius: 50%; font-weight: 700;
}
.steps.stacked { gap: 12px; }
.steps.stacked li { display: flex; gap: 16px; align-items: flex-start; padding: 16px; }
.steps.stacked .step-no { margin: 0; flex: none; }
.steps.stacked p { color: var(--ink); padding-top: 5px; }

/* ---------- Client logo slider ---------- */
.clients { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 40px; }
.logo-slider {
    overflow-x: auto;                       /* fallback: swipe if JavaScript is off */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.logo-track { display: flex; width: max-content; }
.logo-item {
    flex: none; width: 140px; height: 72px; padding: 0 16px;
    display: flex; align-items: center; justify-content: center;
}
.logo-item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* site.js adds this class and duplicates the logos for a seamless loop */
.logo-slider.is-sliding { overflow: hidden; }
.logo-slider.is-sliding .logo-track { animation: logo-slide var(--slide-time, 40s) linear infinite; }
.logo-slider.is-sliding:hover .logo-track { animation-play-state: paused; }
@keyframes logo-slide { to { transform: translateX(-50%); } }

/* Greyscale logos that turn to colour on hover (mouse devices only) */
@media (hover: hover) {
    .logo-item img { filter: grayscale(1); opacity: .75; transition: filter .25s, opacity .25s; }
    .logo-item:hover img { filter: none; opacity: 1; }
}

/* ---------- Split layout, call to action, contact ---------- */
.split { display: grid; gap: 28px; align-items: center; }
.split-img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
.two-col { display: grid; gap: 32px; }
.cta-band { background: var(--ink); color: var(--white); padding: 44px 0; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { color: #c3c7cd; margin: 0; }
.cta-inner { display: grid; gap: 20px; }
.contact-strip { display: grid; gap: 24px; }
.contact-strip h3, .info-card h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-strip p { margin-bottom: 4px; }
.big { font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.info-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; word-break: break-word; }
.info-card p { margin-bottom: 6px; }

/* ---------- Inner page header ---------- */
.page-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { font-size: 1.1rem; color: var(--muted); margin: 0; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

.ticks li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); }
.ticks li::before {
    content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 14px;
    border: solid var(--red); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(.8);
}
.ticks + .muted { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a {
    padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink); text-decoration: none; font-weight: 600;
}
.chips a:hover { border-color: var(--red); color: var(--red); }

/* ---------- Form ---------- */
.form { padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.form label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea {
    width: 100%; min-height: 48px; padding: 10px 12px;
    font: inherit; font-size: 1rem;   /* 16px stops phones zooming in on tap */
    border: 1px solid #c9cdd2; border-radius: var(--radius); background: var(--white);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .btn { margin: 20px 0 12px; width: 100%; }
.form-error { color: var(--red-dark); font-weight: 600; }

/* ---------- Photo credits ---------- */
.credits li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.credits img { width: 110px; flex: none; border-radius: 4px; aspect-ratio: 3 / 2; object-fit: cover; }
.credits div { font-size: .95rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: #14161a; color: #c3c7cd; padding-top: 48px; font-size: .95rem; }
.footer-grid { display: grid; gap: 32px; }
.footer-logo { width: 100%; max-width: 260px; margin-bottom: 16px; }
.site-footer h3 { color: var(--white); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { color: #c3c7cd; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer li { padding: 5px 0; }
.site-footer .addr { max-width: 22em; }
.footer-base {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
    margin-top: 36px; padding-top: 18px; padding-bottom: 24px;
    border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem;
}

/* ---------- Call bar fixed at the bottom of phone screens ---------- */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; box-shadow: 0 -4px 16px rgba(0,0,0,.15); }
.mobile-bar a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 700; text-decoration: none; }
.mb-call { background: var(--red); color: var(--white); }
.mb-enquire { background: var(--ink); color: var(--white); }
.mobile-bar a:hover { color: var(--white); }

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .logo-slider.is-sliding .logo-track { animation: none; }
}

/* =====================================================================
   WIDER SCREENS
   ===================================================================== */

/* Large phones and small tablets */
@media (min-width: 640px) {
    .card-grid { grid-template-columns: 1fr 1fr; }
    .steps:not(.stacked) { grid-template-columns: repeat(3, 1fr); }
    .contact-strip { grid-template-columns: repeat(3, 1fr); }
    .btn-row .btn { flex: 0 0 auto; }
    .logo-item { width: 170px; height: 84px; padding: 0 22px; }
}

/* Laptops and desktops */
@media (min-width: 900px) {
    body { padding-bottom: 0; }
    .mobile-bar { display: none; }
    h1 { font-size: 2.6rem; }
    h2 { font-size: 2rem; }
    .section { padding: 80px 0; }

    .topbar { display: block; background: var(--ink); color: #c3c7cd; font-size: .85rem; }
    .topbar-inner { display: flex; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
    .topbar a { color: var(--white); font-weight: 600; text-decoration: none; }

    .header-inner { min-height: 78px; gap: 28px; }
    .brand { flex: 0 0 auto; }
    .brand img { width: 300px; max-width: none; }
    .nav-toggle { display: none; }
    .site-nav {
        display: flex; align-items: center; gap: 28px;
        position: static; margin-left: auto; padding: 0;
        border: 0; box-shadow: none; background: none;
    }
    .site-nav a { padding: 8px 0; border: 0; }
    .site-nav a:hover { color: var(--red); }
    .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); }
    .site-nav .nav-cta { margin: 0; padding: 0 22px; line-height: 44px; border-radius: var(--radius); }
    .site-nav .nav-cta:hover { background: var(--red-dark); color: var(--white); }

    .hero-inner { padding-top: 110px; padding-bottom: 110px; }
    .hero h1 { font-size: 3.2rem; }
    .facts-inner { grid-template-columns: repeat(4, 1fr); }
    .facts-inner div, .facts-inner div:nth-child(odd) { border: 0; border-left: 1px solid rgba(255,255,255,.12); padding: 24px 24px; }
    .facts-inner div:first-child { border-left: 0; padding-left: 0; }

    .card-grid { grid-template-columns: repeat(4, 1fr); }
    .split { grid-template-columns: 1fr 1fr; gap: 56px; }
    .two-col { grid-template-columns: 1fr 1fr; gap: 56px; }
    .cta-inner { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
    .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr; gap: 56px; }
    .logo-item { width: 200px; height: 96px; padding: 0 28px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); }
}
