/*
|--------------------------------------------------------------------------
| LAYOUT — containers, sections, grids, header, footer
|--------------------------------------------------------------------------
|
| WHAT THIS FILE IS
|   The page skeleton: the centred container, the vertical rhythm of the
|   sections, the reusable grid splits, and the two big furniture pieces —
|   the sticky header and the dark footer.
|
| MOBILE FIRST
|   Everything here is the small-screen layout. The wider-screen versions of
|   these same rules live in responsive.css, in one place, so you can see the
|   whole breakpoint story at once.
*/

/* ---------------------------------------------------------------
 | Container
 --------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ---------------------------------------------------------------
 | Sections — the vertical rhythm of every page
 --------------------------------------------------------------- */
.section {
    padding-block: var(--section-y);
}

.section-tight {
    padding-block: var(--section-y-tight);
}

/* A white band, used to separate two adjacent sections without a rule. */
.section-alt {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

/* A dark band. Headings and body copy flip to white automatically. */
.section-ink {
    background: var(--ink);
    color: var(--text-invert-soft);
}

.section-ink h2,
.section-ink h3,
.section-ink .section-title,
.section-ink .stat-value {
    color: var(--text-invert);
}

.section-head {
    max-width: 62ch;
    margin-bottom: var(--space-6);
}

.section-head-center {
    margin-inline: auto;
    text-align: center;
}

/* Heading on the left, a link or button on the right. */
.section-head-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.section-title {
    margin-bottom: var(--space-3);
    font-size: var(--fs-section);
    font-weight: 700;
}

.section-subtitle {
    margin-top: var(--space-7);
    margin-bottom: var(--space-4);
    font-size: var(--fs-md);
}

.section-intro {
    max-width: 62ch;
    color: var(--slate);
}

.section-foot {
    margin-top: var(--space-6);
}

.page-title {
    margin-bottom: var(--space-5);
}

/* ---------------------------------------------------------------
 | Grids
 |   .card-grid is the workhorse: one column on a phone, then the
 |   column count asked for by .cols-2 / .cols-3 / .cols-4.
 --------------------------------------------------------------- */
.card-grid {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
}

.split-grid,
.split-even {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

/* A column that stays in view while the other one scrolls. */
.split-sticky {
    position: static;
}

.article-layout {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

.stat-grid,
.study-grid,
.service-grid,
.article-grid,
.process-grid,
.tier-grid,
.deliverable-list {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr;
}

/* ---------------------------------------------------------------
 | Grid children must be allowed to shrink
 |   A grid or flex child defaults to min-width:auto, which means its
 |   min-content width — the longest unbreakable word, the widest
 |   button row, a table's min-width — becomes a hard floor. On a
 |   320px phone that floor is what pushes the whole page sideways.
 |   Setting min-width:0 lets the column shrink and the text wrap
 |   instead. If you add a new grid container, add it to this list.
 |   Symptom to look for: the page scrolls horizontally on a phone.
 --------------------------------------------------------------- */
.card-grid > *,
.split-grid > *,
.split-even > *,
.article-layout > *,
.stat-grid > *,
.study-grid > *,
.service-grid > *,
.article-grid > *,
.process-grid > *,
.tier-grid > *,
.deliverable-list > *,
.footer-grid > *,
.hero-grid > *,
.service-rows > *,
.study-rows > *,
.service-row > *,
.study-row > *,
.sample-totals > * {
    min-width: 0;
}

/* Rows of buttons under a heading or a card. */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.button-row-center {
    justify-content: center;
}

/* ---------------------------------------------------------------
 | Utility bar — the thin strip above the header
 --------------------------------------------------------------- */
.utility-bar {
    background: var(--ink);
    color: var(--text-invert-soft);
    font-size: var(--fs-xs);
}

.utility-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    min-height: 2.25rem;
    flex-wrap: wrap;
}

.utility-hours {
    display: none;             /* shown from 768px up — see responsive.css */
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

.utility-links {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.utility-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-invert-soft);
    text-decoration: none;
    font-weight: 500;
}

.utility-link:hover {
    color: var(--text-invert);
}

/* ---------------------------------------------------------------
 | Header — a floating translucent pill, sticky to the top
 --------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--t-fast);
}

/* main.js adds this once the page has scrolled past the utility bar. */
.site-header.is-stuck {
    box-shadow: var(--shadow-float);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 4.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    text-decoration: none;
}

.brand-logo {
    width: auto;
    height: 34px;
}

/* The desktop menu is hidden on small screens; the drawer takes over. */
.site-nav {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.lang-switch {
    display: none;             /* shown from 768px up */
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    background: var(--surface);
    color: var(--slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lang-switch:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* Scoped to .site-header so it outranks the .btn display rule in
   components.css, which loads after this file. */
.site-header .header-cta {
    display: none;             /* shown from 768px up */
}

/* The hamburger. 44px square so it is a comfortable touch target. */
.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
}

.menu-bars {
    display: grid;
    gap: 4px;
    width: 18px;
}

.menu-bars span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--t-fast), opacity var(--t-fast);
}

.menu-button[aria-expanded="true"] .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Set by navigation.js while the drawer is open. */
body.menu-open {
    overflow: hidden;
}

.site-main {
    display: block;
    min-height: 50vh;
}

/* ---------------------------------------------------------------
 | Footer
 --------------------------------------------------------------- */
.site-footer {
    background: var(--ink);
    color: var(--text-invert-soft);
    font-size: var(--fs-sm);
}

.footer-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
    padding-block: var(--space-8) var(--space-7);
}

.footer-logo {
    height: 32px;
    width: auto;
    /* The logo is dark artwork on a dark band, so it is lifted to white. */
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.footer-blurb {
    margin-top: var(--space-4);
    max-width: 34ch;
}

.footer-give {
    color: var(--text-invert);
    font-weight: 500;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-invert-soft);
    text-decoration: none;
}

.footer-social:hover {
    color: var(--text-invert);
}

.footer-heading {
    margin-bottom: var(--space-4);
    color: var(--text-invert);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li + li {
    margin-top: var(--space-3);
}

.footer-col a {
    color: var(--text-invert-soft);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--text-invert);
    text-decoration: underline;
}

.footer-address {
    font-style: normal;
    line-height: 1.9;
}

.footer-address a {
    color: var(--text-invert-soft);
    text-decoration: none;
}

.footer-address a:hover {
    color: var(--text-invert);
}

.footer-strong {
    color: var(--text-invert) !important;
    font-size: var(--fs-md);
    font-weight: 600;
}

.footer-muted {
    color: var(--text-invert-soft);
}

.footer-contact .btn {
    margin-top: var(--space-4);
}

.footer-legal {
    border-top: 1px solid var(--line-invert);
    font-size: var(--fs-xs);
}

.footer-legal-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-block: var(--space-5);
}

.footer-legal p {
    margin: 0;
}

.footer-note {
    max-width: 70ch;
    color: var(--text-invert-soft);
}

.footer-langs a {
    color: var(--text-invert-soft);
    text-decoration: none;
}

.footer-langs a:hover {
    color: var(--text-invert);
}

/* ---------------------------------------------------------------
 | Breadcrumbs
 --------------------------------------------------------------- */
.breadcrumbs {
    padding-block: var(--space-4) 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--fs-xs);
    color: var(--slate-soft);
}

.breadcrumb-list li + li {
    margin-top: 0;
}

.breadcrumb-item a {
    color: var(--slate-soft);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.breadcrumb-item[aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--line);
}
