/*
 * components.css
 * Shared components from the redesign, loaded on every page: tags, cards, the
 * section header, the page hero (template-parts/components/page-hero.php), the
 * CTA band (cta-band.php) and the "How applying works" steps (apply-steps.php).
 */


/* ─── Tags ──────────────────────────────────────────────────── */

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background-color: var(--ice);
    color: var(--navy-800);
    font: 600 13px/1 var(--f-body);
    white-space: nowrap;
}

.tag svg {
    width: 14px;
    height: 14px;
}

.tag-onsite {
    background-color: var(--green-100);
    color: var(--green-700);
}

.tag-night {
    background-color: var(--indigo-100);
    color: var(--indigo-700);
}


/* ─── Cards ─────────────────────────────────────────────────── */

.card {
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 36px;
    box-shadow: var(--sh-sm);
}

/* Value card: icon tile, heading, short text */
.values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.value {
    padding: 32px 28px;
    border-radius: var(--r-lg);
    background-color: var(--white);
    border: 1px solid var(--line);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.value:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
}

.value h3 {
    margin-bottom: 10px;
}

.value p {
    font-size: 15.5px;
    color: var(--slate-600);
}

.icon-tile {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background-color: var(--ice);
    color: var(--blue-600);
    margin-bottom: 22px;
}

.icon-tile svg {
    width: 26px;
    height: 26px;
}


/* ─── Section header ────────────────────────────────────────── */
/* Eyebrow and H2 on the left, a lead or a "View all" link on the right. */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 56px;
}

.section-head .eyebrow + h2 {
    margin-top: 16px;
}

.section-head .lead {
    max-width: 560px;
    margin-top: 16px;
}


/* ─── Page hero ─────────────────────────────────────────────── */
/* Inner pages: breadcrumb, eyebrow, H1 and lead. Navy with a grid texture, or light. */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 96px;
    background: radial-gradient(900px 400px at 90% -20%, rgba(77, 184, 232, 0.22), transparent 60%), var(--navy-900);
    color: var(--on-navy);
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent);
    mask-image: linear-gradient(180deg, #000, transparent);
    pointer-events: none;
}

/* The AGS mark, faint, on the right of the navy banner (behind the text on phones) */
.page-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: max(24px, calc((100vw - 1240px) / 2));
    width: min(38vw, 440px);
    aspect-ratio: 1.25;
    transform: translateY(-46%);
    background: url("../img/logo-mark-white.png") no-repeat center / contain;
    opacity: 0.07;
    pointer-events: none;
}

/* Life at AGS: the office lobby as a pencil sketch behind the navy. The navy layer sits at 82% over
   the sketch, so the H1, lead and breadcrumb keep the contrast they have on the plain banner. The
   faint AGS mark is dropped here: the sketch already shows the logo wall. On wide screens the sketch
   is enlarged and anchored left, which puts the logo wall to the right of the heading, not under it. */
.page-hero--sketch {
    background:
        linear-gradient(rgba(17, 35, 71, 0.82), rgba(17, 35, 71, 0.82)),
        url("../img/life-at-ags-lobby-sketch.webp") 0% 36% / 150% auto no-repeat,
        var(--navy-900);
}

.page-hero--sketch::before {
    content: none;
}

@media (max-width: 900px) {
    .page-hero--sketch {
        background:
            linear-gradient(rgba(17, 35, 71, 0.84), rgba(17, 35, 71, 0.84)),
            url("../img/life-at-ags-lobby-sketch-900.webp") center 40% / cover no-repeat,
            var(--navy-900);
    }
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .crumbs + .eyebrow {
    margin-top: 28px;
}

.page-hero h1 {
    color: var(--white);
    margin: 18px 0;
    max-width: 880px;
}

.page-hero .lead {
    color: var(--on-navy);
    max-width: 640px;
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font: 500 14px/1 var(--f-body);
    color: #8FA3C3;
}

.crumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crumbs li + li::before {
    content: '/';
    content: '/' / '';
    opacity: 0.5;
}

.crumbs a {
    color: var(--on-navy);
}

.crumbs a:hover {
    color: var(--white);
}

.page-hero--light {
    background: var(--mist);
    color: var(--slate-600);
}

.page-hero--light::before,
.page-hero--light::after {
    display: none;
}

/* A banner with its own picture on the right (a story's portrait, a post's cover): no mark behind it */
.page-hero.story-hero--photo::before,
.page-hero.post-head--cover::before {
    display: none;
}

.page-hero--light h1 {
    color: var(--navy-800);
}

.page-hero--light .lead {
    color: var(--slate-600);
}

.page-hero--light .crumbs ol {
    color: var(--slate-500);
}

.page-hero--light .crumbs a {
    color: var(--blue-600);
}

.page-hero--light .crumbs a:hover {
    color: var(--blue-700);
}

/* Short facts with icons ("2 open roles", "Near MRT-3 North Avenue") */
.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    font: 600 14.5px/1.3 var(--f-body);
    color: #DCE5F2;
}

.hero-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-facts a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-underline-offset: 4px;
}

.hero-facts a:hover,
.hero-facts a:focus-visible {
    color: #fff;
    text-decoration-color: currentColor;
}

.page-hero--light .hero-facts a {
    text-decoration-color: currentColor;
}

.page-hero--light .hero-facts a:hover,
.page-hero--light .hero-facts a:focus-visible {
    color: var(--blue-600);
}

.hero-facts svg {
    width: 18px;
    height: 18px;
    color: var(--sky-400);
}

.page-hero--light .hero-facts {
    color: var(--slate-700);
}

.page-hero--light .hero-facts svg {
    color: var(--blue-600);
}

.live-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background-color: #3DDC97;
    box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18);
}


/* ─── CTA band ──────────────────────────────────────────────── */
/* Navy rounded panel with a faint logo watermark: apply, or see the open jobs. */

.cta-band-wrap {
    padding: 80px 0;
}

.cta-band {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 40px;
    align-items: center;
    padding: 72px;
    border-radius: var(--r-xl);
    background: radial-gradient(700px 300px at 100% 0%, rgba(77, 184, 232, 0.3), transparent 60%), var(--navy-800);
}

.cta-band__mark {
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 340px;
    opacity: 0.06;
    pointer-events: none;
}

.cta-band__text,
.cta-band__actions {
    position: relative;
}

.cta-band h2 {
    color: var(--white);
}

.cta-band .eyebrow + h2 {
    margin-top: 16px;
}

.cta-band__lead {
    color: var(--on-navy);
    margin-top: 14px;
    max-width: 560px;
    font-size: 18px;
}

.cta-band__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* ─── How applying works (steps) ────────────────────────────── */
/* Numbered navy circles joined by a dashed line: across on desktop, down on phones. */

.apply-steps {
    padding: 120px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
}

.step {
    position: relative;
    padding: 0 28px 0 0;
}

.step::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 48px;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(90deg, #B9CCE6 0 8px, transparent 8px 14px);
}

.step:last-child::before {
    display: none;
}

.step-num {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: var(--navy-800);
    color: var(--white);
    font: var(--fw-display) 17px/1 var(--f-display);
    box-shadow: 0 0 0 8px var(--mist);
}

.step h3 {
    margin: 26px 0 10px;
    font-size: 20px;
}

.step p {
    font-size: 15.5px;
    color: var(--slate-600);
}

.apply-steps__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 56px;
}


/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .values {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 36px;
    }

    .values {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .value {
        padding: 26px 24px;
    }

    .card {
        padding: 24px;
    }

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

    .hero-facts {
        flex-direction: column;
        gap: 14px;
    }

    .page-hero::before {
        top: auto;
        right: -36px;
        bottom: -28px;
        width: 240px;
        transform: none;
        opacity: 0.05;
    }

    .cta-band-wrap {
        padding: 56px 0;
    }

    .cta-band {
        grid-template-columns: 1fr;
        padding: 44px 28px;
    }

    .cta-band .btn {
        width: 100%;
    }

    .apply-steps {
        padding: 76px 0;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .step {
        padding: 0 0 0 72px;
    }

    .step-num {
        position: absolute;
        left: 0;
        top: 0;
    }

    .step h3 {
        margin-top: 8px;
    }

    .step::before {
        top: 56px;
        left: 23px;
        right: auto;
        bottom: -32px;
        width: 2px;
        height: auto;
        background: repeating-linear-gradient(180deg, #B9CCE6 0 8px, transparent 8px 14px);
    }

    .apply-steps__actions .btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .value:hover {
        transform: none;
    }
}
