@font-face {
    font-family: Barlow Semi Condensed;
    src: url('../media/barlow.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Source Sans 3;
    src: url('../media/source-sans.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --ink: #191c36;
    --muted: #525568;
    --brand: #3b3d88;
    --brand-deep: #272952;
    --red: #ac2837;
    --red-hover: #8a1f2b;
    --paper: #fff;
    --ice: #f2f3f9;
    --line: #d8dbe9;
    --content: 76rem;
    --gutter: clamp(1.25rem, 4.6vw, 4rem);
    --display: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
    font: 100%/1.55 'Source Sans 3', system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; }
::selection { background: #dadafb; color: var(--ink); }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #585bc5; outline-offset: 4px; }

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.03; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 5.65vw, 5.375rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(2.05rem, 3.65vw, 3.35rem); letter-spacing: -0.022em; }
h3 { font-size: clamp(1.55rem, 2.4vw, 2rem); letter-spacing: -0.01em; }
p { color: var(--muted); max-width: 66ch; font-size: 1.125rem; }

.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--content)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 6vw, 5.65rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.65rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 5px;
    background: var(--red);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button:hover { background: var(--red-hover); }
.button-outline { color: var(--brand); background: transparent; border-color: #999bc1; }
.button-outline:hover { background: #e7e8f5; border-color: var(--brand); }
.button-light { color: var(--brand-deep); background: #fff; }
.button-light:hover { color: var(--brand-deep); background: #e8e9ff; }
.text-link { color: var(--brand); font-weight: 650; }
.text-link:hover { color: var(--red-hover); }

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: var(--gutter);
    z-index: 3;
    padding: 0.65rem 1rem;
    background: var(--brand-deep);
    color: #fff;
    transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: var(--paper); }
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 5.25rem;
}
.brand { display: inline-block; flex: none; }
.brand img { width: 9.35rem; height: auto; }
.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.45vw, 2.2rem); }
.primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--muted);
    font-weight: 650;
    text-decoration: none;
}
.primary-nav a:hover, .primary-nav a[aria-current='page'] { color: var(--brand); text-decoration: underline; }
.primary-nav .portal-link {
    border: 1px solid #bbbdd9;
    border-radius: 5px;
    padding-inline: 0.9rem;
    color: var(--brand);
}
.primary-nav .portal-link:hover { background: var(--ice); text-decoration: none; }
.menu-toggle { display: none; }

.home-hero { background: var(--ice); border-block: 1px solid var(--line); }
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: clamp(1.75rem, 5.8vw, 6.25rem);
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
.hero-copy h1 { max-width: 12ch; text-wrap: pretty; }
.hero-copy p { max-width: 38ch; margin-top: 1.25rem; font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
.hero-copy .actions { margin-top: 1.7rem; }
.hero-image {
    display: grid;
    place-items: center;
    aspect-ratio: 1.15;
    background: #e2e4f3;
    overflow: hidden;
}
.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) { .hero-image:hover img { transform: scale(1.035); } }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-heading .text-link { padding-bottom: 0.2rem; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 3rem); }
.service-grid article { border-top: 1px solid var(--line); padding-top: 1.15rem; }
.service-grid h3 a { text-decoration: none; }
.service-grid h3 a:hover { color: var(--brand); text-decoration: underline; }
.service-grid p { margin-top: 0.65rem; }

.portal-band { color: #fff; background: var(--brand-deep); }
.band-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; padding-block: clamp(2.25rem, 5vw, 4.25rem); }
.band-inner p { color: #dedff2; margin-top: 0.65rem; }
.band-inner .button { flex: none; }

.page-intro { padding-block: clamp(2.5rem, 6vw, 5rem); background: var(--ice); border-block: 1px solid var(--line); }
.page-intro h1 { font-size: clamp(2.85rem, 6vw, 5rem); text-wrap: pretty; }
.page-intro p { max-width: 55ch; margin-top: 1rem; font-size: clamp(1.125rem, 1.85vw, 1.35rem); }
.detail-grid { display: grid; grid-template-columns: minmax(11rem, 0.68fr) 2fr; gap: 3rem; padding-block: clamp(2rem, 6vw, 5rem); }
.detail-nav { align-self: start; display: grid; border-top: 1px solid var(--line); }
.detail-nav a { color: var(--brand); font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--line); padding: 0.65rem 0.25rem; }
.detail-nav a:hover { text-decoration: underline; }
.detail-content section { scroll-margin-top: 1.5rem; }
.detail-content section + section { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 2rem; }
.detail-content p, .company-grid p, .portal-preview p { margin-top: 0.85rem; }
.detail-content .text-link, .company-grid .text-link { display: inline-block; margin-top: 1rem; }
.company-grid { display: grid; align-items: start; grid-template-columns: 1fr 0.95fr; gap: clamp(2rem, 6vw, 5rem); }
.company-image img { width: 100%; }
.company-image figcaption { margin-top: 0.45rem; color: var(--muted); }
.portal-intro { color: #fff; background: var(--brand-deep); border-color: var(--brand-deep); }
.portal-intro p { color: #e1e1f3; }
.portal-preview .actions { margin-top: 1.5rem; }

.contact-grid { display: grid; grid-template-columns: 0.73fr 1.27fr; align-items: start; gap: clamp(2rem, 6vw, 6rem); }
.contact-list { margin: 1rem 0 0; }
.contact-list div { padding-block: 0.8rem; border-bottom: 1px solid var(--line); }
.contact-list dt { font-weight: 650; }
.contact-list dd { margin: 0.125rem 0 0; color: var(--muted); }
.contact-list a { color: var(--brand); overflow-wrap: anywhere; }
.form-panel { padding: clamp(1.25rem, 3.1vw, 2.5rem); background: var(--ice); }
.form-note { margin-top: 0.65rem; font-size: 1rem; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.45rem; }
.field-wide, .form-errors { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 0.3rem; font-weight: 650; }
.field label span { font-weight: 400; color: var(--muted); }
.field :is(input, select, textarea) {
    display: block;
    width: 100%;
    min-height: 2.8rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #9397aa;
    border-radius: 4px;
    color: var(--ink);
    background: #fff;
    caret-color: var(--brand);
}
.field textarea { resize: vertical; }
.field .input-validation-error { border-color: var(--red); }
.field-validation-error, .form-errors { color: var(--red-hover); }
.validation-summary-valid, .field-validation-valid { display: none; }
.form-errors ul { margin: 0; padding-left: 1.25rem; }
.form-success { margin-top: 1rem; background: #e3f1e9; color: #205238; padding: 0.7rem 0.9rem; font-size: 1rem; }

.site-footer { border-top: 1px solid var(--line); background: #f9f9fc; padding-top: clamp(2rem, 4vw, 3.2rem); }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1.7rem; padding-bottom: 2rem; }
.footer-grid h2 { font-size: 1.3rem; margin-bottom: 0.65rem; }
.footer-grid a:not(.brand) { display: block; color: var(--muted); width: fit-content; overflow-wrap: anywhere; }
.footer-grid address { font-style: normal; color: var(--muted); margin-top: 0.6rem; }
.footer-bottom { padding-block: 0.85rem; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 52rem) {
    .hero-grid { gap: 1.5rem; }
    .hero-copy .actions { gap: 0.5rem; }
    .hero-copy .button { padding-inline: 0.85rem; }
    .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; }
    .contact-form { grid-template-columns: minmax(0, 1fr); }
    .header-content { flex-wrap: wrap; gap: 0; min-height: 4.3rem; padding-block: 0.6rem; }
    .site-header .brand img { width: 7.9rem; }
    .menu-ready .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        padding-inline: 0.95rem;
        border: 1px solid #bbbdd9;
        border-radius: 5px;
        color: var(--brand);
        background: var(--paper);
        font-weight: 650;
    }
    .primary-nav { flex: 0 0 100%; align-items: stretch; flex-direction: column; gap: 0; padding-top: 0.75rem; }
    .menu-ready .menu-toggle[aria-expanded='false'] + .primary-nav { display: none; }
    .primary-nav a { padding-inline: 0.45rem; border-bottom: 1px solid var(--line); }
    .primary-nav .portal-link { margin-top: 0.5rem; align-self: start; }
}

@media (max-width: 43rem) {
    .site-footer .brand img { width: 7.9rem; }
    .hero-grid, .service-grid, .detail-grid, .company-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-grid { padding-block: 2rem var(--gutter); }
    .hero-copy h1 { max-width: 16ch; }
    .hero-copy p { margin-top: 0.85rem; }
    .hero-copy .actions { margin-top: 1.15rem; }
    .hero-image { aspect-ratio: 1.5; }
    .section-heading, .band-inner { align-items: start; flex-direction: column; }
    .section-heading { margin-bottom: 1.4rem; }
    .detail-grid { gap: 1.8rem; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
