/* ==========================================================================
   Homepage refresh (Nov 2026)
   Loaded last on index.php only. Covers: hero, brand cards, team photo
   controls, careers, story video controls, contact and footer contrast.
   ========================================================================== */

[hidden] { display: none !important; }

/* Shared buttons ---------------------------------------------------------- */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.home-btn i { font-size: .85em; }
.home-btn:focus-visible { outline: 3px solid #a9c2ff; outline-offset: 3px; }
.home-btn-white { background: #fff; color: #16286a; }
.home-btn-white:hover { background: #e8eeff; color: #16286a; }
.home-btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; background: transparent; }
.home-btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.home-btn-blue { background: #2f6bff; color: #fff; }
.home-btn-blue:hover { background: #1f57e6; color: #fff; }
.home-btn-outline { border-color: #2f6bff; background: #fff; color: #2f6bff; }
.home-btn-outline:hover { background: #2f6bff; color: #fff; }
.home-btn-sm { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: .9rem; }

/* Hero -------------------------------------------------------------------- */
.home-hero {
    padding: 72px 0 64px;
    background:
        radial-gradient(1200px 600px at 85% 20%, #2a4fb8 0, transparent 60%),
        linear-gradient(135deg, #0e1a4a 0%, #16286a 55%, #1e3a8a 100%);
    color: #fff;
}
.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: 56px;
}
.home-hero-hiring {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: .95rem;
    line-height: 1.5;
}
.home-hero-hiring a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.home-hero-hiring a:hover { color: #cfdcff; }
.home-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 4.6vw, 3.6rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.035em;
}
.home-hero h1 span { color: #a9c2ff; }
.home-hero-sub {
    max-width: 540px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, .84);
    font-size: 1.15rem;
    line-height: 1.6;
}
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.home-hero-stats {
    display: flex;
    margin: 44px 0 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
.home-hero-stats > div {
    display: flex;
    flex-direction: column-reverse;
    margin-right: 36px;
    padding-right: 36px;
    border-right: 1px solid rgba(255, 255, 255, .14);
}
.home-hero-stats > div:last-child { margin: 0; padding: 0; border: 0; }
.home-hero-stats dd { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.home-hero-stats dt { margin-top: 4px; color: #c3cee4; font-size: .85rem; font-weight: 400; }
.home-hero-media {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 4.4;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.home-hero-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-hero-media figcaption {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    background: rgba(14, 26, 74, .8);
    backdrop-filter: blur(6px);
}
.home-hero-media figcaption img { width: 36px; height: 36px; border-radius: 8px; }
.home-hero-media figcaption b { display: block; font-size: .92rem; }
.home-hero-media figcaption span span { display: block; color: #c3cee4; font-size: .8rem; }

/* Brand cards (homepage only; brands.php keeps the logo tile) -------------- */
.brand-section .smopc-brand-tile.smopc-brand-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    overflow: visible; /* Nov 4: was hidden, which cut off the QR popup */
    position: relative;
    border: 1px solid #e3e8f1;
    border-radius: 18px;
    background: #fff;
}
.smopc-brand-card .smopc-brand-logo {
    position: relative;
    inset: auto;
    height: 170px;
    padding: 10px 18%;
    flex-shrink: 0;
    border-radius: 17px 17px 0 0; /* keeps the rounded top now the card no longer clips */
    background: var(--brand-background, #fff);
}
.smopc-brand-card .smopc-brand-qr { right: 12px; bottom: auto; top: 118px; }
.smopc-brand-card .smopc-brand-qr summary {
    width: 40px;
    height: 40px;
    border: 1px solid #e3e8f1;
    border-radius: 10px;
    background: rgba(255, 255, 255, .92);
    color: #16286a;
}
.smopc-brand-card .smopc-brand-qr-popup { bottom: auto; top: calc(100% + 8px); z-index: 30; }
/* The open card sits above its neighbours so the QR isn't hidden behind the next row */
.brand-section .smopc-brand-card:has(.smopc-brand-qr[open]) { z-index: 20; }
.smopc-brand-card .smopc-brand-qr[open] summary { background: #16286a; color: #fff; border-color: #16286a; }
.smopc-brand-body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto; /* fills the card, so links line up across a row */
    padding: 18px 20px 20px;
    border-top: 1px solid #e3e8f1;
}
.smopc-brand-text { min-width: 0; }
.smopc-brand-body h3 { margin: 0; color: #0a1d48; font-size: 1.03rem; font-weight: 700; line-height: 1.3; }
.smopc-brand-body p { margin: 3px 0 0; color: #5b6678; font-size: .85rem; line-height: 1.4; }
.smopc-brand-visit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    min-height: 44px;
    color: #2f6bff;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.smopc-brand-visit:hover { color: #1f57e6; text-decoration: underline; }
.smopc-brand-visit:focus-visible { outline: 3px solid #a9c2ff; outline-offset: 2px; border-radius: 6px; }
.smopc-brand-visit i { font-size: .75rem; }
.smopc-brand-soon {
    margin-left: auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f4f9;
    color: #6b7487;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.home-brands-more { margin-top: 36px; text-align: center; }

/* Team photos: show the dots and counter under the photo deck --------------- */
/* The side photos in the deck poked 1-3px past the screen edge on 390-414px
   phones, which let the whole page scroll sideways. Clip them to the section. */
.people-section { overflow-x: clip; }
.people-media { padding-bottom: 64px; }
.people-media .tc-foot {
    position: absolute;
    right: 0;
    bottom: -60px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: none;
}
.people-media .tc-count { order: 2; color: #5b6678; font-size: .82rem; font-weight: 700; letter-spacing: 0; }
.people-media .tc-dots { display: flex; gap: 8px; }
.people-media .tc-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cfd8ea;
    transition: width .2s ease, background-color .2s ease;
}
.people-media .tc-dot[aria-current="true"] { width: 28px; background: #2f6bff; }
.people-media .tc-dot:hover { background: #9fb4df; }
.people-media .tc-dot[aria-current="true"]:hover { background: #2f6bff; }
.people-media .tc-dot:focus-visible { outline: 3px solid rgba(47, 107, 255, .35); outline-offset: 3px; }

/* Careers ----------------------------------------------------------------- */
.home-careers-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 24px;
    margin-bottom: 28px;
}
.home-careers-head .section-header-modern { margin: 0; text-align: left; }
.home-careers-head .section-header-modern .section-title-modern { margin: 0 0 10px; color: #0a1d48; }
.home-careers-head .section-header-modern .section-description-modern { margin: 0; }
.home-job-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #e3e8f1;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
}
.home-chip em {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f4f9;
    color: #5b6678;
    font-size: .75rem;
    font-style: normal;
}
.home-chip.is-on { border-color: #16286a; background: #16286a; color: #fff; }
.home-chip.is-on em { background: rgba(255, 255, 255, .18); color: #fff; }
.home-chip:focus-visible { outline: 3px solid rgba(47, 107, 255, .35); outline-offset: 2px; }
.home-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.home-job {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid #e3e8f1;
    border-radius: 16px;
    background: #fff;
}
.home-job-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.home-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8eeff;
    color: #1d4fd6;
    font-size: .72rem;
    font-weight: 700;
}
.home-badge.is-full { background: #dcfce7; color: #166534; }
.home-badge.is-intern { background: #fef3c7; color: #92400e; }
.home-job h3 { margin: 12px 0 0; color: #0a1d48; font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.home-job-location { margin: 8px 0 0; color: #5b6678; font-size: .82rem; }
.home-job-location i { margin-right: 4px; color: #2f6bff; }
.home-job-description {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: #5b6678;
    font-size: .88rem;
    line-height: 1.6;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.home-job.is-open .home-job-description { display: block; overflow: visible; -webkit-line-clamp: unset; }
.home-job-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}
.home-job-more {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: #2f6bff;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
}
.home-job-more:hover { text-decoration: underline; }
.home-job-more:focus-visible { outline: 3px solid rgba(47, 107, 255, .35); outline-offset: 2px; border-radius: 6px; }
.home-job-actions .home-btn { margin-left: auto; }
.home-general-application {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 22px 24px;
    border: 1px dashed #a9bdf5;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8eeff, #f6f8ff);
}
.home-general-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    color: #2f6bff;
    font-size: 1.2rem;
}
.home-general-application h3 { margin: 0; color: #0a1d48; font-size: 1.05rem; font-weight: 700; }
.home-general-application p { margin: 3px 0 0; color: #5b6678; font-size: .88rem; }
.home-general-application .home-btn { margin-left: auto; }

/* Application form: success state ------------------------------------------ */
.home-apply-done { padding: 12px 4px 4px; text-align: center; }
.home-apply-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #166534;
    font-size: 1.4rem;
}
.home-apply-done h6 { margin: 14px 0 6px; color: #0a1d48; font-size: 1.2rem; font-weight: 700; }
.home-apply-done p { max-width: 420px; margin: 0 auto 20px; color: #5b6678; font-size: .95rem; line-height: 1.6; }

/* Story video ------------------------------------------------------------- */
.story-play {
    position: absolute;
    top: 46%;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #16286a;
    font-size: 1.8rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity .25s ease;
}
.story-play i { margin-left: 5px; }
.story-frame.is-playing .story-play { opacity: 0; }
.story-overlay { justify-content: flex-end; align-items: flex-start; padding: 28px; text-align: left; }
.story-overlay h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.story-section .story-sound {
    width: auto;
    height: 44px;
    display: inline-flex;
    gap: 8px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}
.story-sound-label { white-space: nowrap; }
.story-footer { justify-content: flex-start; }
.story-footer a.story-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin-left: 0;
    padding: 0 24px;
    border: 1.5px solid #2f6bff;
    border-radius: 12px;
    background: #fff;
    color: #2f6bff;
    font-size: 1rem;
    font-weight: 700;
}
.story-footer a.story-cta:hover { background: #2f6bff; color: #fff; }

/* Contact ----------------------------------------------------------------- */
.home-contact { padding: 72px 0; background: #16286a; color: #fff; }
.home-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 48px;
}
.home-contact h2 { margin: 0; color: #fff; font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; }
.home-contact-grid > div > p { margin: 12px 0 0; color: #c3cee4; font-size: 1rem; line-height: 1.6; }
.home-contact-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-contact-option {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}
.home-contact-option:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; }
.home-contact-option:focus-visible { outline: 3px solid #a9c2ff; outline-offset: 3px; }
.home-contact-option b { display: block; font-size: .98rem; }
.home-contact-option span span { display: block; margin-top: 4px; color: #c3cee4; font-size: .82rem; }
.home-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    color: #16286a;
    font-size: 1.1rem;
}
.home-contact-option.is-primary { background: #fff; color: #16286a; }
.home-contact-option.is-primary:hover { background: #e8eeff; color: #16286a; }
.home-contact-option.is-primary .home-contact-icon { background: #2f6bff; color: #fff; }
.home-contact-option.is-primary span span { color: #5b6678; }

/* Footer: brighter copyright line (was 3.7:1 contrast) --------------------- */
body .footer .footer-bottom { color: #b9c7e2; }

/* Tablet ------------------------------------------------------------------ */
@media (max-width: 991.98px) {
    .home-hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .home-hero-media { max-width: 560px; aspect-ratio: 4 / 3.2; }
    .home-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-contact-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Tablet: three narrow cards per row, so the link goes under the text ------ */
@media (max-width: 1199.98px) {
    .smopc-brand-body { flex-direction: column; align-items: flex-start; gap: 6px; }
    .smopc-brand-visit,
    .smopc-brand-soon { margin-left: 0; margin-top: auto; }
    .smopc-brand-visit { min-height: 36px; }
    .smopc-brand-text { margin-bottom: 4px; }
    .smopc-brand-soon { margin-bottom: 3px; }
}

/* Phone ------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .home-hero { padding: 44px 0 40px; }
    .home-hero h1 { font-size: 2.35rem; }
    .home-hero-sub { font-size: 1.03rem; }
    .home-hero-actions .home-btn { flex: 1 1 0; padding: 0 14px; }
    .home-hero-stats { margin-top: 32px; }
    .home-hero-stats > div { flex: 1 1 0; margin-right: 12px; padding-right: 12px; }
    .home-hero-stats dd { font-size: 1.3rem; }
    .home-hero-stats dt { font-size: .75rem; }
    .home-hero-media { max-width: none; }
    .home-hero-media > img { object-position: center 30%; }

    .brand-section .smopc-brand-tile.smopc-brand-card { aspect-ratio: auto; border-radius: 14px; }
    .smopc-brand-card .smopc-brand-logo { height: 120px; padding: 8px 14%; }
    .smopc-brand-card .smopc-brand-qr { display: none; }
    .smopc-brand-body { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 14px; }
    .smopc-brand-body h3 { font-size: .92rem; }
    .smopc-brand-body p { font-size: .78rem; }
    .smopc-brand-visit,
    .smopc-brand-soon { margin-left: 0; margin-top: auto; } /* same spot at the bottom of every card */
    .smopc-brand-visit { min-height: 36px; }
    .smopc-brand-text { margin-bottom: 4px; }
    .smopc-brand-soon { margin-bottom: 3px; } /* centres it on the same line as Visit site */

    .home-careers-head { flex-direction: column; align-items: flex-start; }
    .home-jobs { grid-template-columns: 1fr; gap: 12px; }
    .home-general-application { flex-direction: column; align-items: flex-start; }
    .home-general-application .home-btn { width: 100%; margin-left: 0; }

    .story-section .story-sound { top: 16px; right: 16px; bottom: auto; }
    .story-play { width: 68px; height: 68px; font-size: 1.4rem; }
    .story-overlay { padding: 22px; }

    .home-contact { padding: 56px 0; }
    .home-contact h2 { font-size: 2rem; }
    .home-contact-options { grid-template-columns: 1fr; }
    .home-contact-option { flex-direction: row; align-items: center; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-btn,
    .people-media .tc-dot,
    .story-play,
    .home-contact-option { transition: none; }
}
