/* =========================================================================
   Allied Surety — stylesheet
   Brand: Montserrat · red #D90700 / #EF4D48 · dark #2B161B
   ========================================================================= */

:root {
    --red: #D90700;
    --red-light: #EF4D48;
    --red-dark: #B00500;
    --ink: #2B161B;          /* near-black maroon */
    --charcoal: #453E3E;
    --gray: #4B4F58;
    --gray-light: #6b7280;
    --bg: #ffffff;
    --bg-soft: #F7F3F5;
    --bg-alt: #F6F7F8;
    --line: #e7e2e4;
    --white: #ffffff;

    --container: 1180px;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 3px rgba(43, 22, 27, .08), 0 1px 2px rgba(43, 22, 27, .06);
    --shadow: 0 12px 30px rgba(43, 22, 27, .10);
    --shadow-lg: 0 24px 60px rgba(43, 22, 27, .16);
    --transition: .2s ease;
    --font: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--charcoal);
    background: var(--bg);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

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

h1, h2, h3, h4 {
    font-family: var(--font);
    color: var(--ink);
    line-height: 1.18;
    margin: 0 0 .6em;
    font-weight: 800;
    letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 700; }

p { margin: 0 0 1.1rem; }

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

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 22px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ----------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 999px;
    border: 2px solid var(--red);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
    box-shadow: 0 8px 20px rgba(217, 7, 0, .22);
    text-align: center;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(217, 7, 0, .30); }
.btn--ghost { background: transparent; color: var(--red); box-shadow: none; }
.btn--ghost:hover { background: var(--red); color: #fff; }
.btn--light { background: #fff; color: var(--red); border-color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.btn--light:hover { background: var(--bg-soft); color: var(--red-dark); border-color: var(--bg-soft); }
.btn--sm { padding: 9px 18px; font-size: .92rem; box-shadow: none; }

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--transition), padding var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
    padding-block: 10px;
}
.site-header__brand img { width: clamp(190px, 22vw, 270px); height: auto; }

.primary-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.4vw, 26px);
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-nav a {
    color: var(--ink);
    font-weight: 600;
    font-size: .96rem;
    padding: 8px 2px;
    position: relative;
    white-space: nowrap;
}
.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    height: 2px; width: 0;
    background: var(--red);
    transition: width var(--transition);
}
.primary-nav a:hover { color: var(--red); }
.primary-nav a:hover::after,
.primary-nav a.is-active::after { width: 100%; }
.primary-nav a.is-active { color: var(--red); }
.primary-nav__cta a { color: #fff; }
.primary-nav__cta a::after { display: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px; height: 42px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle__bar { display: block; height: 3px; width: 100%; background: var(--ink); border-radius: 3px; transition: var(--transition); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* -------------------------------------------------------------------- hero */
.hero {
    position: relative;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(239, 77, 72, .18), transparent 60%),
        linear-gradient(135deg, var(--ink) 0%, #3a1f24 55%, var(--red-dark) 140%);
    color: #fff;
    overflow: hidden;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 40px;
    align-items: center;
    padding-block: clamp(48px, 7vw, 96px);
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(255, 255, 255, .9); max-width: 40ch; margin-bottom: 1.8rem; }
.hero__eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--red-light);
    margin-bottom: 1rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media { justify-self: center; }
.hero__media img { width: min(420px, 100%); filter: drop-shadow(0 30px 50px rgba(0,0,0,.4)); }

/* --------------------------------------------------------------- sections */
.section { padding-block: clamp(54px, 8vw, 96px); }
.section--soft { background: var(--bg-soft); }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2 { color: #fff; }

.section__head { max-width: 760px; margin: 0 auto clamp(34px, 5vw, 56px); text-align: center; }
.section__head--left { margin-inline: 0; text-align: left; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: .8rem;
}
.section--ink .eyebrow { color: var(--red-light); }
.lead { font-size: 1.12rem; color: var(--gray); }
.section--ink .lead { color: rgba(255,255,255,.85); }

/* ------------------------------------------------------------------- cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 24px 26px 28px; flex: 1; }
.card__body h3 { margin-bottom: .5rem; }
.card__body p { color: var(--gray); font-size: .98rem; margin-bottom: 0; }
.card__icon {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(217, 7, 0, .1);
    color: var(--red);
    margin-bottom: 16px;
}
.card__icon svg { width: 28px; height: 28px; }

/* ---------------------------------------------------- media + text rows */
.media-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 5vw, 64px);
    align-items: center;
}
.media-row + .media-row { margin-top: clamp(48px, 7vw, 86px); }
.media-row--flip .media-row__media { order: 2; }
.media-row__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.media-row__text h2 { margin-bottom: .6rem; }
.media-row__text p { color: var(--gray); }

/* -------------------------------------------------------------- value list */
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.value-list li { position: relative; padding-left: 38px; color: var(--charcoal); font-weight: 500; }
.value-list li::before {
    content: "";
    position: absolute; left: 0; top: 2px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* prose blocks (long-form copy) */
.prose { max-width: 760px; }
.prose h3 { margin-top: 1.8em; color: var(--ink); }
.prose p { color: var(--gray); }
.prose--center { margin-inline: auto; }

/* ------------------------------------------------------------- doc list */
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.doc {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.doc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.doc__icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px; background: rgba(217,7,0,.1); color: var(--red); display: grid; place-items: center; }
.doc__icon svg { width: 24px; height: 24px; }
.doc__body h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.doc__body p { font-size: .92rem; color: var(--gray); margin-bottom: .7rem; }
.doc__link { font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.doc--soon { opacity: .72; }
.doc--soon .doc__icon { background: #ececec; color: var(--gray-light); }
.badge-soon { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-light); background: #ececec; padding: 3px 10px; border-radius: 999px; }

/* -------------------------------------------------------------- page hero */
.page-hero {
    background:
        linear-gradient(rgba(43, 22, 27, .72), rgba(43, 22, 27, .82));
    color: #fff;
    text-align: center;
    padding-block: clamp(60px, 9vw, 110px);
    background-size: cover;
    background-position: center;
}
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: rgba(255,255,255,.88); max-width: 60ch; margin-inline: auto; font-size: 1.1rem; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 1rem; letter-spacing: .04em; }
.breadcrumb a { color: rgba(255,255,255,.85); }

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.contact-info { display: grid; gap: 22px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.info-card a { font-weight: 600; }
.info-card p { margin: 0; color: var(--gray); }
.info-card--person { display: grid; grid-template-columns: 72px 1fr; gap: 4px 16px; align-items: center; }
.info-card__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--bg-soft); box-shadow: var(--shadow-sm); }
.info-card__person-head { align-self: center; }
.info-card__person-head h3 { margin-bottom: 2px; }
.info-card--person .info-row { grid-column: 1 / -1; margin-top: 2px; }
.info-row { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.info-row svg { width: 20px; height: 20px; color: var(--red); flex: 0 0 auto; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; color: var(--ink); }
.field .req { color: var(--red); }
.field input, .field textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,7,0,.12); background: #fff; }
.field textarea { min-height: 150px; resize: vertical; }
.field--hp { position: absolute; left: -9999px; }
.form__note { font-size: .82rem; color: var(--gray-light); margin-top: 4px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-weight: 500; }
.alert--error { background: #fdecea; color: #8a1c14; border: 1px solid #f5c6c2; }
.alert--ok { background: #e9f7ef; color: #166534; border: 1px solid #bbe7cb; }

/* --------------------------------------------------------------- CTA band */
.cta-band {
    background:
        radial-gradient(800px 300px at 10% 0%, rgba(239,77,72,.25), transparent 60%),
        linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 60ch; margin: 0 auto 1.6rem; }
.cta-band .container { padding-block: clamp(50px, 7vw, 84px); }

/* ------------------------------------------------------------- utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 60px); justify-content: center; margin-top: 8px; }
.stat { text-align: center; }
.stat__num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--red); line-height: 1; }
.section--ink .stat__num { color: var(--red-light); }
.stat__label { font-size: .9rem; color: var(--gray); font-weight: 600; }
.section--ink .stat__label { color: rgba(255,255,255,.8); }

/* thank-you / 404 simple page */
.simple-page { text-align: center; padding-block: clamp(70px, 12vw, 150px); }
.simple-page .icon-circle { width: 84px; height: 84px; border-radius: 50%; background: rgba(217,7,0,.1); color: var(--red); display: grid; place-items: center; margin: 0 auto 24px; }
.simple-page .icon-circle svg { width: 44px; height: 44px; }

/* ===================================================== responsive ======= */
@media (max-width: 980px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__lead { margin-inline: auto; }
    .hero__cta { justify-content: center; }
    .hero__media { order: -1; }
    .hero__media img { width: min(320px, 70%); }
    .media-row, .contact-grid { grid-template-columns: 1fr; }
    .media-row--flip .media-row__media { order: 0; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed;
        inset: 78px 0 0 0;
        background: #fff;
        transform: translateX(100%);
        transition: transform .28s ease;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    .primary-nav.is-open { transform: translateX(0); }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 14px 22px 40px; }
    .primary-nav li { border-bottom: 1px solid var(--line); }
    .primary-nav a { display: block; padding: 16px 4px; font-size: 1.08rem; }
    .primary-nav a::after { display: none; }
    .primary-nav__cta { border-bottom: 0; margin-top: 18px; }
    .primary-nav__cta a { display: inline-flex; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .form__row { grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .hero__cta .btn { width: 100%; }
}
