/* Home page (resources/views/home). Everything is scoped under .hp so the shared Bootstrap 4 and
   main-<site>.css styles keep working elsewhere. Site colours come in as --hp-* custom properties. */

.hp {
    --hp-ink: #16202c;
    --hp-muted: #5b6675;
    --hp-line: #e2e7ee;
    --hp-radius: 14px;
    --hp-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    color: var(--hp-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* :where() keeps these resets at class-level specificity, so the component classes below win */
.hp :where(h1, h2, h3) { color: inherit; font-family: inherit; letter-spacing: -.01em; margin: 0; }
.hp :where(h2) { font-size: 1.75rem; font-weight: 700; line-height: 1.25; }
.hp :where(h3) { font-size: 1.1rem; font-weight: 650; line-height: 1.35; }
.hp :where(p) { margin: 0; }
.hp :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
.hp :where(a) { text-decoration: none; }

/* Buttons */
.hp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 2px solid transparent; border-radius: 10px;
    font-weight: 650; font-size: 1rem; line-height: 1; padding: .9rem 1.4rem;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    cursor: pointer; white-space: nowrap;
}
.hp-btn:hover { transform: translateY(-1px); text-decoration: none; }
.hp-btn--accent { background: var(--hp-accent); color: #fff; }
.hp-btn--accent:hover { color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.hp-btn--primary { background: var(--hp-primary); color: #fff; }
.hp-btn--primary:hover { color: #fff; background: var(--hp-primary-dark); }
.hp-btn--ghost { border-color: var(--hp-primary); color: var(--hp-primary); background: #fff; }
.hp-btn--ghost:hover { background: var(--hp-tint); color: var(--hp-primary-dark); }
.hp-btn--light { background: #fff; color: var(--hp-primary-dark); }
.hp-btn--light:hover { color: var(--hp-primary-dark); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }

.hp-link { color: var(--hp-primary); font-weight: 650; }
.hp-link:hover { color: var(--hp-primary-dark); text-decoration: underline; }
.hp-link i { font-size: .85em; margin-left: .25rem; }

.hp-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #fff; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: .35rem .8rem; margin-bottom: 1rem;
}
.hp-eyebrow--dark { color: var(--hp-primary); background: var(--hp-tint); margin-bottom: .75rem; }

/* Hero */
.hp-hero {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, var(--hp-primary-dark) 0%, var(--hp-primary) 100%);
    padding: 72px 0 64px;
}
.hp-hero__inner { position: relative; z-index: 1; }
.hp-hero__title { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; line-height: 1.12; max-width: 17em; }
.hp-hero__lead { font-size: 1.15rem; color: rgba(255, 255, 255, .88); max-width: 36em; margin-top: 1rem; }
.hp-hero__motif {
    position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
    width: min(46vw, 620px); color: rgba(255, 255, 255, .9); pointer-events: none;
}
.hp-hero__motif svg { display: block; width: 100%; height: auto; }
.hp--canadaworkdirectory .hp-hero__motif { width: min(40vw, 520px); right: -60px; opacity: .22; transform: translateY(-50%) rotate(-12deg); }
.hp--jobsforrefugee .hp-hero__motif { top: auto; bottom: 0; transform: none; right: 0; }
.hp--aboriginaljobportal .hp-hero__motif { top: auto; bottom: 0; transform: none; right: 0; }

.hp-search {
    display: flex; gap: .5rem; align-items: stretch; margin-top: 2rem; max-width: 860px;
    background: #fff; border-radius: var(--hp-radius); padding: .5rem; box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}
.hp-search__field { flex: 1 1 0; display: flex; align-items: center; gap: .6rem; margin: 0; padding: 0 .9rem; border-radius: 10px; color: var(--hp-muted); }
.hp-search__field + .hp-search__field { border-left: 1px solid var(--hp-line); border-radius: 0; }
.hp-search__field input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1rem; color: var(--hp-ink); padding: .8rem 0; background: transparent; }
.hp-search__field:focus-within { box-shadow: inset 0 0 0 2px var(--hp-primary); border-radius: 10px; }

.hp-popular { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.1rem; font-size: .92rem; color: rgba(255, 255, 255, .8); }
.hp-popular a { color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: .25rem .8rem; }
.hp-popular a:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.hp-hero__facts { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin-top: 2rem; font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hp-hero__facts i { color: var(--hp-accent); margin-right: .35rem; }
.hp--jobsforrefugee .hp-hero__facts i, .hp--canadaworkdirectory .hp-hero__facts i { color: #fff; }
.hp-hero__facts strong { color: #fff; font-size: 1.05rem; }

/* Sections */
.hp-section { padding: 72px 0; background: #fff; }
.hp-section--tint { background: var(--hp-tint); }
.hp-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hp-section__head--center { flex-direction: column; align-items: center; text-align: center; }

/* Jobs */
.hp-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.hp-job {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); padding: 1.4rem;
    color: var(--hp-ink); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hp-job:hover { border-color: var(--hp-primary); box-shadow: var(--hp-shadow); transform: translateY(-2px); color: var(--hp-ink); }
.hp-job__title { color: var(--hp-primary-dark); padding-right: 4.5rem; }
.hp-job__company { color: var(--hp-muted); margin-top: .25rem; font-weight: 500; }
.hp-job__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: auto; padding-top: 1rem; font-size: .88rem; color: var(--hp-muted); }
.hp-job__meta i { color: var(--hp-primary); margin-right: .3rem; }
.hp-badge { position: absolute; top: 1.2rem; right: 1.2rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--hp-accent); border-radius: 999px; padding: .2rem .6rem; }

.hp-empty {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    border: 1px dashed var(--hp-primary); background: var(--hp-tint); border-radius: var(--hp-radius); padding: 2rem;
}
.hp-empty p { color: var(--hp-muted); margin-top: .4rem; max-width: 38em; }
.hp-empty__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Browse */
.hp-browse { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; }
.hp-browse h2 { margin-bottom: 1.25rem; }
.hp-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.hp-chips a { display: inline-flex; align-items: center; gap: .5rem; background: #fff; color: var(--hp-ink); border: 1px solid var(--hp-line); border-radius: 999px; padding: .45rem 1rem; font-weight: 500; }
.hp-chips a:hover { border-color: var(--hp-primary); color: var(--hp-primary); }
.hp-chips span { font-size: .8rem; font-weight: 700; color: var(--hp-primary); background: var(--hp-tint); border-radius: 999px; padding: .05rem .5rem; }

/* Features */
.hp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.hp-feature { border: 1px solid var(--hp-line); border-radius: var(--hp-radius); padding: 1.75rem; background: #fff; }
.hp-feature__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; background: var(--hp-tint); color: var(--hp-primary); font-size: 1.35rem; margin-bottom: 1rem; }
.hp-feature p { color: var(--hp-muted); margin-top: .5rem; }

/* How it works */
.hp-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.hp-how__col { background: #fff; border-radius: var(--hp-radius); padding: 2rem; box-shadow: var(--hp-shadow); }
.hp-steps { counter-reset: hp-step; margin: 1.25rem 0 1.75rem; }
.hp-steps li { counter-increment: hp-step; position: relative; padding-left: 3rem; margin-bottom: 1rem; color: var(--hp-muted); }
.hp-steps li strong { color: var(--hp-ink); }
.hp-steps li::before {
    content: counter(hp-step); position: absolute; left: 0; top: -.1rem;
    width: 2rem; height: 2rem; border-radius: 50%; background: var(--hp-primary); color: #fff;
    font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

/* Resources and blog */
.hp-resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.hp-resource { display: block; height: 100%; border: 1px solid var(--hp-line); border-left: 4px solid var(--hp-accent); border-radius: var(--hp-radius); padding: 1.4rem; color: var(--hp-ink); background: #fff; }
.hp-resource:hover { box-shadow: var(--hp-shadow); color: var(--hp-ink); }
.hp-resource h3 { color: var(--hp-primary-dark); }
.hp-resource h3 i { font-size: .7em; color: var(--hp-muted); margin-left: .25rem; vertical-align: middle; }
.hp-resource p { color: var(--hp-muted); margin-top: .4rem; font-size: .95rem; }

/* Employer CTA */
.hp-cta { background: var(--hp-primary-dark); color: #fff; padding: 56px 0; }
.hp-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.hp-cta p { color: rgba(255, 255, 255, .8); margin-top: .4rem; }

/* FAQ */
.hp-faq { max-width: 860px; }
.hp-faq h2 { margin-bottom: 1.5rem; }
.hp-faq__item { background: #fff; border: 1px solid var(--hp-line); border-radius: 12px; margin-bottom: .75rem; }
.hp-faq__item summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.25rem; font-weight: 650; position: relative; }
.hp-faq__item summary::-webkit-details-marker { display: none; }
.hp-faq__item summary::after { content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--hp-primary); }
.hp-faq__item[open] summary::after { content: "\2212"; }
.hp-faq__item p { padding: 0 1.25rem 1.2rem; color: var(--hp-muted); }

/* Partner sites */
.hp-network h2 { margin-bottom: 1.5rem; }
.hp-network__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.hp-network__list li { border: 1px solid var(--hp-line); border-top: 4px solid var(--hp-partner); border-radius: 12px; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; }
.hp-network__list a, .hp-network__list strong { font-weight: 700; color: var(--hp-partner); }
.hp-network__list a:hover { text-decoration: underline; }
.hp-network__list span { font-size: .9rem; color: var(--hp-muted); }
.hp-network__list .is-current { background: var(--hp-tint); }

/* Small screens */
@media (max-width: 991px) {
    .hp-hero__motif { opacity: .25; width: 70vw; right: -25vw; }
    .hp--canadaworkdirectory .hp-hero__motif { opacity: .14; }
}
@media (max-width: 767px) {
    .hp-hero { padding: 48px 0 44px; }
    .hp-section { padding: 52px 0; }
    .hp :where(h2) { font-size: 1.45rem; }
    .hp-search { flex-direction: column; padding: .6rem; }
    .hp-search__field + .hp-search__field { border-left: 0; border-top: 1px solid var(--hp-line); }
    .hp-search .hp-btn { width: 100%; }
    .hp-hero__motif { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hp-btn, .hp-job { transition: none; }
    .hp-btn:hover, .hp-job:hover { transform: none; }
}
