:root {
    --homepage-blue: #0e61a8;
    --homepage-text: #263745;
    --homepage-paper: #f0f1f1;
}
.site-header {
    background: #fff;
    color: var(--homepage-text);
}
.header-inner { min-height: 78px; }
.site-header .sub-menu { background: #fff; }
.header-cta, .home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .65rem 1rem;
    min-height: 42px;
    background: var(--homepage-blue);
    border: 1px solid var(--homepage-blue);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: .82rem;
}
.header-cta:hover, .home-button:hover, .home-contact .button:hover {
    background: #fff;
    color: var(--homepage-blue);
    border-color: var(--homepage-blue);
}
.menu-toggle {
    background: #fff;
    border: 1px solid var(--homepage-blue);
    padding: .55rem .75rem;
    font: inherit;
    color: var(--homepage-blue);
}
[hidden] { display: none !important; }
.home-design {
    background: var(--homepage-paper);
    color: var(--homepage-text);
    padding-top: .5rem;
}
.home-design h1, .home-design h2, .home-design h3, .footer-columns h2 {
    font-family: system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.13;
}
.home-design h1 { font-size: clamp(2.3rem, 5vw, 5.1rem); }
.home-design h2 { font-size: clamp(1.65rem, 3vw, 3rem); max-width: 23ch; }
.home-design h3 { font-size: clamp(1rem, 1.7vw, 1.45rem); }
.home-hero {
    position: relative;
    min-height: clamp(380px, 52vw, 690px);
    display: grid;
    place-items: center;
    isolation: isolate;
    color: #fff;
    text-align: center;
    background: #263745;
}
.home-hero-media, .home-hero-media > img, .home-hero-media video, .home-hero-media::after, .contact-backdrop, .contact-backdrop img, .contact-backdrop::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.home-hero-media, .contact-backdrop { z-index: -1; }
.home-hero-media::after, .contact-backdrop::after { content: ''; background: rgb(12 24 36 / .5); }
.home-hero-media > img, .home-hero-media video, .contact-backdrop img { object-fit: cover; }
.hero-video { opacity: 0; }
.hero-video.is-playing { opacity: 1; }
.home-hero-copy { width: min(90%, 700px); padding-block: 2.25rem; }
.home-hero-copy h1 { margin-bottom: .3em; }
.home-hero-copy a { margin-top: .4rem; }
.video-toggle {
    position: absolute;
    right: .65rem;
    bottom: .65rem;
    z-index: 2;
    background: #fff;
    border: 0;
    padding: .4rem .7rem;
    cursor: pointer;
}
.home-section { padding-block: clamp(1.9rem, 4vw, 4rem); }
.section-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .13em;
}
.section-label::before { content: ''; width: .45rem; height: .45rem; background: var(--homepage-blue); }
.section-label::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .22; }
.vision-grid { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(1rem, 2vw, 2rem); }
.vision-grid > div:first-child { padding-top: clamp(1rem, 4vw, 4.5rem); }
.vision-grid img, .about-grid > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vision-grid p { color: #354758; margin-top: .7rem; max-width: 27ch; }
.home-about { margin-left: 9%; }
.home-about > p { max-width: 62ch; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1rem, 3vw, 3rem); margin-top: 1.5rem; }
.about-grid > img:only-child { grid-column: 2; }
.home-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0; }
.home-stats > div { display: flex; flex-direction: column-reverse; border-bottom: 1px solid #adbdc7; padding-bottom: .55rem; }
.home-stats dt { font-size: .8rem; }
.home-stats dd { font-size: clamp(1.5rem, 3.3vw, 3rem); margin: 0; color: var(--homepage-blue); font-weight: 700; overflow-wrap: anywhere; }
.home-section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.home-section-head h2 { margin: 0; }
.project-panel {
    display: grid;
    position: relative;
    min-height: clamp(230px, 42vw, 515px);
    place-items: end center;
    overflow: hidden;
    isolation: isolate;
    color: var(--homepage-text);
    text-decoration: none;
}
.project-panel img, .project-panel::before { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; object-fit: cover; }
.project-panel::before { z-index: 0; content: ''; background: linear-gradient(transparent 60%, rgb(0 0 0 / .25)); }
.panel-caption { position: relative; width: min(88%, 340px); margin: 0 0 clamp(.65rem, 3vw, 1.7rem); padding: .65rem 1rem; background: #fff; text-align: center; }
.panel-caption h3 { margin: 0; }
.panel-caption p { margin: .25rem 0 0; font-size: .84rem; }
.project-panel:hover h3 { text-decoration: underline; }
.voices-grid { display: grid; grid-template-columns: 1fr 3fr; gap: 1rem; }
.voices-grid > * { min-width: 0; }
.voice-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 1rem) / 3); gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .35rem; }
.voice-card { display: flex; flex-direction: column; margin: 0; padding: .85rem; background: var(--homepage-blue); color: #fff; scroll-snap-align: start; }
.voice-card figcaption span { display: block; font-size: .8rem; }
.voice-card blockquote { margin: .7rem 0; font-size: .88rem; }
.voice-card img { margin-top: auto; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.carousel-controls { display: flex; gap: .4rem; margin-top: .5rem; }
.carousel-controls button { color: var(--homepage-blue); background: #fff; border: 1px solid #a4bcd1; min-width: 44px; min-height: 44px; cursor: pointer; }
.carousel-controls button:disabled { opacity: .55; cursor: default; }
.home-blog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.home-blog a { text-decoration: none; }
.home-blog a:hover h3 { text-decoration: underline; }
.home-blog img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.home-blog p { color: var(--homepage-blue); font-size: .78rem; margin: .65rem 0 .25rem; }
.home-contact { position: relative; isolation: isolate; padding-block: clamp(2.5rem, 5vw, 5rem); background: #253948; color: #fff; }
.home-contact .enquiry-form { background: #fff; color: var(--homepage-text); padding: clamp(1rem, 3vw, 2rem); margin-inline: auto; }
.home-contact .button { background: var(--homepage-blue); color: #fff; border-color: var(--homepage-blue); width: 100%; }
.site-footer { background: var(--homepage-blue); color: #fff; }
.footer-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; padding-block: 2.5rem 1.5rem; }
.footer-columns h2 { font-size: .95rem; }
.footer-columns li, .footer-columns p, .footer-copyright { font-size: .84rem; overflow-wrap: anywhere; }
.footer-copyright { padding-bottom: 1.25rem; }

@media (max-width: 700px) {
    .site-header nav.mobile-closed { display: none; }
    .site-header nav { margin-top: .25rem; }
    .about-grid > img:only-child { grid-column: auto; }
    .home-about { margin-left: 0; }
    .voices-grid { grid-template-columns: 1fr; }
    .voice-track { grid-auto-columns: calc((100% - .5rem) / 2); }
    .footer-columns { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .vision-grid, .about-grid, .home-blog { grid-template-columns: 1fr; }
    .vision-grid > div:first-child { padding-top: 0; }
    .voice-track { grid-auto-columns: 84%; }
    .header-inner { gap: .45rem; }
    .header-inner .brand { font-size: 1.3rem; }
    .header-cta { padding-inline: .5rem; }
}

@media (min-width: 560px) {
    .home-contact .enquiry-form { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; }
    .home-contact .enquiry-form > * { grid-column: 1 / -1; }
    .home-contact .enquiry-form > label:has([name=full_name]),
    .home-contact .enquiry-form > label:has([name=email]) { grid-column: auto; }
}

/* Homepage media, counters and scroll-stacked projects */
.home-hero {
    width: min(1216px, 94%);
    min-height: min(72svh, 690px);
    aspect-ratio: 16 / 9;
}
.home-hero-media .home-video, .vision-media .home-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}
.home-video.is-playing { opacity: 1; }
.vision-media { position: relative; aspect-ratio: 23 / 10; background: #dce1e4; }
.vision-grid .vision-media img { height: 100%; aspect-ratio: auto; }
.vision-grid > div + div img { aspect-ratio: 3 / 2; }
.home-hero-copy { pointer-events: none; }
.home-hero-copy a { pointer-events: auto; }
.video-toggle { z-index: 3; }
.home-stats dd { font-variant-numeric: tabular-nums; }
.project-panels { position: relative; }
.project-panel {
    position: sticky;
    top: calc(4.5svh + var(--page-offset));
    min-height: clamp(250px, 46vw, 570px);
    background: #293c4b;
}
.panel-caption { width: min(89%, 550px); padding: 1rem 1.2rem; }
.panel-index { display: inline-block; color: #536b7c; margin-inline-end: .85rem; }
.voice-track { position: relative; }
.voice-card { min-height: clamp(240px, 26vw, 385px); }
.voice-card blockquote { line-height: 1.55; }
.carousel-dots { display: flex; align-items: center; flex-wrap: wrap; }
.carousel-dots button { position: relative; border: 0; background: transparent; min-width: 32px; min-height: 44px; }
.carousel-dots button::after { content: ''; position: absolute; width: .62rem; height: .62rem; border-radius: 50%; background: #9db7cc; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.carousel-dots button[aria-current]::after { background: var(--homepage-blue); }
.home-contact .enquiry-form { max-width: 46rem; }
@media (min-width: 560px) {
    .home-contact .enquiry-form > label:has([name=first_name]),
    .home-contact .enquiry-form > label:has([name=last_name]),
    .home-contact .enquiry-form > label:has([name=phone]) { grid-column: auto; }
}
@media (max-width: 620px) {
    .home-hero { width: 100%; min-height: clamp(320px, 67svh, 640px); aspect-ratio: auto; }
    .home-hero-copy h1 { font-size: clamp(2rem, 9vw, 3rem); }
    .vision-media { aspect-ratio: 16 / 10; }
    .project-panel { min-height: clamp(240px, 55vw, 400px); }
}
@media (prefers-reduced-motion: reduce), (max-height: 440px) {
    .project-panel { position: relative; top: auto; }
}
