/* =========================================================
   Justifiable Safety Management Services Ltd. — site styles
   ========================================================= */

:root {
    --brand-red: #D11F2A;
    --brand-red-dark: #A8161F;
    --charcoal: #1F2937;
    --slate: #4B5563;
    --muted: #6B7280;
    --border: #E5E7EB;
    --bg: #FFFFFF;
    --bg-soft: #F8F9FA;
    --bg-band: #F2F4F7;
    --max-width: 1140px;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 28px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--charcoal);
    background: var(--bg);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-red); text-decoration: none; }
a:hover { color: var(--brand-red-dark); text-decoration: underline; }

h1, h2, h3, h4 {
    color: var(--charcoal);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

/* ---------- Header / nav ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 24px;
}

.logo a {
    display: inline-block;
    line-height: 0;
}

.logo img {
    height: 48px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--charcoal);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
    align-items: center;
}

.main-nav a {
    color: var(--charcoal);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--brand-red);
    border-bottom-color: var(--brand-red);
}

.nav-cta {
    background: var(--brand-red);
    color: #fff !important;
    padding: 10px 18px !important;
    border-radius: var(--radius);
    border-bottom: none !important;
}

.nav-cta:hover {
    background: var(--brand-red-dark);
    color: #fff !important;
    text-decoration: none;
}

/* ---------- Hero / page headers ---------- */
.hero {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: #fff;
    padding: 80px 0 96px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 80% 20%, rgba(209,31,42,0.18), transparent 50%);
    pointer-events: none;
}

.hero h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.hero .lede {
    color: #E5E7EB;
    font-size: 1.2rem;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.hero .cta-row {
    margin-top: 28px;
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.page-header {
    background: var(--bg-band);
    padding: 56px 0 40px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 { margin-bottom: 10px; }
.page-header .lede { color: var(--slate); font-size: 1.1rem; max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}
.btn-primary:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
    color: #fff;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-ghost:hover {
    background: #fff;
    color: var(--charcoal);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--brand-red);
    border-color: var(--brand-red);
}
.btn-outline:hover {
    background: var(--brand-red);
    color: #fff;
    text-decoration: none;
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--bg-soft); }
section.tight { padding: 40px 0; }

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}
.section-heading h2 { margin-bottom: 10px; }
.section-heading p { color: var(--slate); max-width: 680px; margin: 0 auto; }

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    color: var(--brand-red);
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.card p { color: var(--slate); margin: 0; }

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(209,31,42,0.1);
    color: var(--brand-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 1.2rem;
}

/* ---------- Lists ---------- */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--slate);
}
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--brand-red);
    font-weight: 700;
}

/* ---------- Two-column ---------- */
.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: start;
}

.col-block h3 {
    color: var(--brand-red);
    margin-bottom: 10px;
}

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--charcoal);
    color: #fff;
    text-align: center;
    padding: 56px 24px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #D1D5DB; max-width: 640px; margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #111827;
    color: #D1D5DB;
    padding: 48px 24px 24px;
    font-size: 0.92rem;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid #374151;
}

.site-footer h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-footer a {
    color: #D1D5DB;
}

.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { padding: 4px 0; }

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 18px;
    color: #9CA3AF;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Contact form ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-form .field { margin-bottom: 18px; }
.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.95rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--charcoal);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(209,31,42,0.15);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

/* Honeypot: hidden from humans, bots fill it in */
.contact-form .honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.info-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}
.info-card h3 { color: var(--brand-red); margin-bottom: 14px; font-size: 1.1rem; }
.info-card p { color: var(--slate); margin: 0 0 10px; }
.info-card .label {
    font-weight: 600;
    color: var(--charcoal);
    display: block;
    margin-top: 14px;
    margin-bottom: 2px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-red);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.1rem; }
    .hero { padding: 60px 0 72px; }

    .nav-toggle { display: inline-flex; align-items: center; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: block; }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px 16px;
    }
    .main-nav li { border-bottom: 1px solid var(--border); }
    .main-nav li:last-child { border-bottom: none; }
    .main-nav a {
        display: block;
        padding: 14px 0;
        border-bottom: none;
    }
    .nav-cta {
        margin-top: 8px;
        text-align: center;
    }

    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    section { padding: 48px 0; }
}
