/*
=========================
sections.css
Styles that belong to one specific section: homepage hero, page hero (detail pages),
stats strip, governance · technology · security, pricing, what's new, about, photo band and contact.
Reusable building blocks live in components.css.
=========================
*/

/*
=========================
Hero (homepage)
The photo sits on ::before so it can be mirrored (.hero--mirror); the scrim on ::after.
Swap the photo by replacing img/header.jpg; tune its crop with --hero-pos / --hero-pos-mobile.
--hero-shift widens the photo layer past the right edge: the photo grows a little
and its subject moves right, clear of the headline. 0% = no shift.
=========================
*/

.hero {
    --hero-shift: 58%;

    position: relative;
    min-height: 760px;
    min-height: max(760px, 100svh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background-color: var(--brand-forest);
    color: var(--band-fg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--hero-shift)) 0 0;
    background-image: url("/static/img/header.jpg");
    background-size: cover;
    background-position: var(--hero-pos, 60% 40%);
}

.hero--mirror::before {
    transform: scaleX(-1);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--scrim-strong) 0%, var(--scrim-mid) 36%, var(--scrim-soft) 60%, var(--scrim-faint) 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: calc(var(--site-header-h) + 64px);
    padding-bottom: 64px;
}

.hero__text {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero__lead {
    font-size: var(--text-xl);
    line-height: 1.6;
    color: color-mix(in srgb, var(--band-fg) 92%, transparent);
}

.hero .checks {
    max-width: 560px;
    margin-top: 72px;
    font-size: var(--text-base);
    color: color-mix(in srgb, var(--band-fg) 88%, transparent);
}

/*
=========================
Page hero (detail pages)
=========================
*/

.page-hero {
    padding: 88px 0 72px;
}

.page-hero .wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-hero .h1 {
    max-width: 880px;
}

.page-hero .lead {
    max-width: 760px;
    color: var(--c-text-muted);
}

/*
=========================
Stats strip (Built for SMEs)
=========================
*/

.stats {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 48px;
    border-radius: 16px;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.5;
}

.stat strong {
    font-size: var(--display-lg);
    color: var(--band-accent);
}

/*
=========================
Governance · Technology · Security
=========================
*/

/* the three columns share their rows (subgrid), so label, title, intro,
   each bullet and the link line up across columns whatever the text length */
.pillars {
    column-gap: 40px;
    row-gap: 20px;
}

.pillar {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 7;  /* eyebrow, h3, intro, 3 list items, link */
    gap: 20px;
    padding-top: 24px;
    border-top: 2px solid var(--band-accent);
}

.pillar .link-arrow {
    justify-self: start;
}

.pillar .eyebrow {
    color: var(--brand-mint);
}

.pillar h3 {
    font-size: var(--text-xl);
    line-height: 1.3;
}

.pillar p,
.pillar li {
    line-height: 1.6;
}

.pillar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    gap: 14px;
}

/*
=========================
Pricing
The tiers and prices are written in index.html (#pricing).
Highlight a tier with .is-featured + a .tier__badge, and give its button .btn-ochre.
=========================
*/

.tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.tier {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px 28px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 14px;
}

.tier__price {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tier__amount {
    font-size: var(--display-lg);
    font-weight: 700;
    line-height: 1;
}

.tier__per,
.tier__extra {
    font-size: var(--text-base);
    color: var(--c-text-muted);
}

.tier ul {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 20px 0 0;
    font-size: var(--text-md);
    line-height: 1.45;
    border-top: 1px solid var(--c-border);
}

.tier .btn {
    width: 100%;
}

.tier.is-featured {
    background: var(--band-bg);
    color: var(--band-fg);
    border-color: var(--band-bg);
    box-shadow: var(--shadow-lg);
}

.tier.is-featured .eyebrow {
    color: var(--band-accent);
}

.tier.is-featured .tier__per,
.tier.is-featured .tier__extra {
    color: var(--band-muted);
}

.tier.is-featured ul {
    border-top-color: var(--band-line);
}

.tier__badge {
    position: absolute;
    top: -14px;
    left: 28px;
    padding: 6px 12px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--brand-ochre);
    color: var(--brand-forest);
    border-radius: var(--r-full);
}

/*
=========================
What's new
The newsletter cards on news.html (#newsletters) and the homepage (#news, the first three,
loaded from news.html by js/load-partials.js).
=========================
*/

/* the cards share their rows (subgrid), so date, title, text and link
   line up across the cards next to each other whatever the text length */
.news-grid > .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;  /* meta, title, text, link */
}

.news-grid .link-arrow {
    justify-self: start;
}

/* the date and "Newsletter #n" each stay on one line: the meta only wraps at the · */
.news-grid .card__meta > span {
    white-space: nowrap;
}

/*
=========================
About
=========================
*/

.portrait {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    max-height: 560px;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: 14px;
}

/* subject on the right of the photo (about-ben.jpg) */
.portrait--right {
    object-position: 62% 20%;
}

.pull-quote {
    margin: 0;
    padding-left: 20px;
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.45;
    color: var(--c-accent);
    border-left: 3px solid var(--c-accent);
}

/*
=========================
Photo band with quote
Swap the photo by replacing img/manufacturing-floor-1.jpg.
=========================
*/

.photo-band {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: var(--band-fg);
    background-color: var(--brand-forest);
    background-image:
        linear-gradient(270deg, var(--scrim-strong) 0%, var(--scrim-mid) 34%, transparent 58%),
        url("/static/img/manufacturing-floor-1.jpg");
    background-size: cover;
    background-position: center 45%;
}

.photo-band .wrap {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 64px;
    padding-bottom: 64px;
}

.quote {
    max-width: 460px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quote p {
    font-size: var(--display-md);
    font-weight: 700;
    line-height: 1.4;
}

.quote cite {
    font-size: var(--text-md);
    font-style: normal;
    color: var(--band-accent);
}

/* full-width quote band (about page) */
.quote--center {
    max-width: 960px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
}

.quote--center p {
    font-size: var(--display-lg);
    line-height: 1.35;
}

/*
=========================
Contact
=========================
*/

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    padding-top: 28px;
    font-size: var(--text-md);
    line-height: 1.6;
    border-top: 1px solid var(--band-line);
}

.contact-details .eyebrow {
    margin-bottom: 8px;
    color: var(--brand-mint);
}

.contact-details a:not(.link-arrow) {
    color: var(--band-fg);
}

/*
=========================
Responsive
=========================
*/

/* below three columns, the pillars stack: no shared rows, more room between them */
@media (max-width: 999px) {

    .pillars {
        row-gap: 48px;
    }

    .pillar,
    .pillar ul {
        display: flex;
        flex-direction: column;
        grid-row: auto;
    }
}

@media (max-width: 640px) {

    .hero::before {
        background-position: var(--hero-pos-mobile, 50% center);
    }

    .hero::after {
        background: linear-gradient(180deg, var(--scrim-strong) 0%, var(--scrim-mid) 60%, color-mix(in srgb, var(--brand-forest) 60%, transparent) 100%);
    }

    .hero__lead {
        font-size: var(--text-lg);
    }

    .hero .btn-row .btn {
        width: 100%;
    }

    .hero .checks {
        margin-top: 48px;
    }

    .page-hero {
        padding: 56px 0 48px;
    }

    .stats {
        padding: 32px 24px;
    }

    .photo-band {
        min-height: 640px;
        align-items: flex-end;
        background-image:
            linear-gradient(0deg, var(--scrim-strong) 0%, var(--scrim-mid) 45%, transparent 75%),
            url("/static/img/manufacturing-floor-1.jpg");
    }

    .photo-band .wrap {
        justify-content: flex-start;
    }
}
