/*
 * ITIL certification hub, section 1: HERO (dark aurora). Spec: direction.md "FOLD 1" + fold-hero.json.
 * Every selector starts main.itil-v1[data-page="certification"] .cert-hero. Reuses .v1-glass--glow, .v1-facts,
 * .v1-eyebrow, .v1-link, .v1-btn-* from the design system; nothing here restyles them globally.
 *
 * One-screen budget at 1366x768 (646px under the 122px header; limit 556px content):
 *   left  = meta 34 + 16 + H1 119 + 16 + answer 135 + 14 + approved 27 + 20 + buttons 56 + 10 + micro 22 + 12 + team 26
 *         = 507px typical, 529px with the micro line on two lines -> 139px / 117px free.
 *   card  = 56 padding + heading 25 + 12 + 6 rows x 48 + footer 44 = 425px (457px with the VAT line).
 * Short laptops (max-height 739.98px): H1 and approved gaps -4px, card padding 22px, rows 44px.
 * Nothing under 16px. Motion: only the shared hooks (data-reveal, data-split, data-stagger, data-count);
 * no rule here hides anything, so with no JS or reduced motion everything shows.
 */

main.itil-v1[data-page="certification"] .cert-hero {
    --hero-gap-h1: 16px;
    --hero-gap-approved: 20px;
    --hero-card-pad: 28px;
    --hero-row-h: 48px;
}

/* ---------- Grid: one column below 1100px, split from 1100px ---------- */
main.itil-v1[data-page="certification"] .cert-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
@media (min-width: 1100px) {
    main.itil-v1[data-page="certification"] .cert-hero__grid {
        grid-template-columns: minmax(0, 1fr) clamp(430px, 38vw, 476px);
        column-gap: clamp(36px, 5vw, 72px);
    }
    main.itil-v1[data-page="certification"] .cert-hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
    main.itil-v1[data-page="certification"] .cert-hero__grid--solo .cert-hero__copy { max-width: 44rem; }
}
main.itil-v1[data-page="certification"] .cert-hero__copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- 1. Meta row: eyebrow pill + breadcrumb ---------- */
main.itil-v1[data-page="certification"] .cert-hero__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
    min-height: 34px;
    margin: 0 0 16px;
}
main.itil-v1[data-page="certification"] .cert-hero__eyebrow { margin: 0; }
main.itil-v1[data-page="certification"] .cert-hero__crumbs ol {
    display: flex; flex-wrap: wrap; align-items: center;
    margin: 0; padding: 0; list-style: none;
    font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--on-dark-2);
}
main.itil-v1[data-page="certification"] .cert-hero__crumbs li { display: inline-flex; align-items: center; }
main.itil-v1[data-page="certification"] .cert-hero__crumbs a { font-weight: 600; }
main.itil-v1[data-page="certification"] .cert-hero__sep { margin: 0 10px; color: var(--on-dark-2); opacity: .8; }

/* ---------- 2. H1 (two set lines; the gradient part never breaks from 480px) ---------- */
main.itil-v1[data-page="certification"] .cert-hero__h1 {
    margin: 0 0 var(--hero-gap-h1);
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.02;
    --v1-lh: 1.02;
    letter-spacing: -0.03em;
    text-wrap: balance;
    color: var(--on-dark);
    text-shadow: 0 2px 40px rgba(10, 9, 38, .5);
}
main.itil-v1[data-page="certification"] .cert-hero__h1 .v1-grad { text-shadow: none; }
@media (min-width: 480px) {
    main.itil-v1[data-page="certification"] .cert-hero__h1 .v1-grad { white-space: nowrap; }
}

/* ---------- 3. Answer + approved line ---------- */
main.itil-v1[data-page="certification"] .cert-hero__answer {
    margin: 0 0 14px;
    max-width: 40rem;
    font-size: 17px; line-height: 1.58;
    color: var(--on-dark-2);
}
main.itil-v1[data-page="certification"] .cert-hero__approved {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 var(--hero-gap-approved);
    color: var(--on-dark);
    font-size: 18px; font-weight: 600; line-height: 1.5;
}
main.itil-v1[data-page="certification"] .cert-hero__shield { flex: none; display: inline-flex; width: 24px; height: 24px; color: var(--cyan); }
main.itil-v1[data-page="certification"] .cert-hero__shield .v1-i { width: 24px; height: 24px; filter: drop-shadow(0 0 10px rgba(56, 214, 245, .45)); }

/* ---------- 4. Actions: pink --lg + ghost (standard size) on one row; micro line under them ---------- */
main.itil-v1[data-page="certification"] .cert-hero__actions {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 10px 12px;
    margin: 0 0 12px;
}
main.itil-v1[data-page="certification"] .cert-hero__ghost { min-height: 52px; font-size: 17px; font-weight: 600; }
main.itil-v1[data-page="certification"] .cert-hero__micro,
main.itil-v1[data-page="certification"] .cert-hero__noscript {
    flex: 1 0 100%;
    margin: 0;
    font-size: 16px; line-height: 1.4;
    color: var(--on-dark-2);
}

/* ---------- 5. Team link ---------- */
main.itil-v1[data-page="certification"] .cert-hero__team { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.5; }

/* ---------- Right column: static halo + ring, then the glass card ---------- */
main.itil-v1[data-page="certification"] .cert-hero__aside { position: relative; min-width: 0; }
main.itil-v1[data-page="certification"] .cert-hero__halo {
    position: absolute; z-index: 0; inset: 6% -8% -6% -8%;
    border-radius: 40%;
    background: radial-gradient(closest-side, rgba(124, 92, 255, .5), rgba(240, 72, 155, .2) 58%, transparent 100%);
    filter: blur(44px);
    opacity: .75;
    pointer-events: none;
}
main.itil-v1[data-page="certification"] .cert-hero__ring {
    position: absolute; z-index: 0; left: 50%; top: 50%;
    width: 118%; max-width: none; height: auto; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
main.itil-v1[data-page="certification"] .cert-hero__card {
    position: relative; z-index: 1;
    padding: var(--hero-card-pad);
}
main.itil-v1[data-page="certification"] .cert-hero__card-h { margin: 0 0 12px; color: var(--on-dark); }

/* Level rows: one link each, name | count | From price */
main.itil-v1[data-page="certification"] .cert-hero__levels {
    --stagger: 50ms;
    margin: 0 -10px; padding: 0; list-style: none;
}
main.itil-v1[data-page="certification"] .cert-hero__levels > li + li { border-top: 1px solid var(--line-dark); }
main.itil-v1[data-page="certification"] .cert-hero__lv {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(7.2em, auto);
    grid-template-areas: "name count price";
    align-items: center;
    column-gap: 12px;
    min-height: var(--hero-row-h);
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--on-dark);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 200ms ease;
}
main.itil-v1[data-page="certification"] .cert-hero__lv-name {
    grid-area: name;
    justify-self: start;
    font-size: 17px; font-weight: 700; line-height: 1.3;
    background-image: linear-gradient(90deg, var(--cyan), #A78BFA);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    padding-bottom: 2px;
    transition: background-size 320ms var(--ease-out);
}
main.itil-v1[data-page="certification"] .cert-hero__lv-count {
    grid-area: count;
    font-size: 16px; line-height: 1.3; color: var(--on-dark-2);
    white-space: nowrap;
}
main.itil-v1[data-page="certification"] .cert-hero__lv-price {
    grid-area: price;
    justify-self: end;
    font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--on-dark);
    white-space: nowrap;
}
main.itil-v1[data-page="certification"] .cert-hero__lv:hover,
main.itil-v1[data-page="certification"] .cert-hero__lv:focus-visible { background-color: var(--glass-2); color: var(--on-dark); }
main.itil-v1[data-page="certification"] .cert-hero__lv:hover .cert-hero__lv-name,
main.itil-v1[data-page="certification"] .cert-hero__lv:focus-visible .cert-hero__lv-name { background-size: 100% 2px; }
main.itil-v1[data-page="certification"] .cert-hero__lv:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }

/* Footer facts: "38 courses · 4 formats" */
main.itil-v1[data-page="certification"] .cert-hero__facts {
    margin: 12px 0 0; padding: 14px 0 0; list-style: none;
    border-top: 1px solid var(--line-dark);
    font-size: 16px; font-weight: 600; color: var(--on-dark-2);
}
main.itil-v1[data-page="certification"] .cert-hero__fnum { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
main.itil-v1[data-page="certification"] .cert-hero__vat { margin: 12px 0 0; font-size: 16px; line-height: 1.4; color: var(--on-dark-2); }

/* ---------- 1100 to 1199px: same split, tighter; 768 to 1099px: one column, card under the copy ---------- */
@media (max-width: 1099.98px) {
    main.itil-v1[data-page="certification"] .cert-hero__aside { width: 100%; max-width: 560px; }
}

/* ---------- Short laptops ---------- */
@media (min-width: 1100px) and (max-height: 739.98px) {
    main.itil-v1[data-page="certification"] .cert-hero {
        --hero-gap-h1: 12px;
        --hero-gap-approved: 16px;
        --hero-card-pad: 22px;
        --hero-row-h: 44px;
    }
}

/* ---------- Phones (below 768px): the fold flows ---------- */
@media (max-width: 767.98px) {
    main.itil-v1[data-page="certification"] .cert-hero__halo,
    main.itil-v1[data-page="certification"] .cert-hero__ring { display: none; }
    main.itil-v1[data-page="certification"] .cert-hero__meta { min-height: 0; margin-bottom: 10px; }
    main.itil-v1[data-page="certification"] .cert-hero__h1 { --hero-gap-h1: 14px; line-height: 1.06; --v1-lh: 1.06; }
    main.itil-v1[data-page="certification"] .cert-hero__approved { align-items: flex-start; font-size: 17px; --hero-gap-approved: 18px; }
    main.itil-v1[data-page="certification"] .cert-hero__shield { margin-top: 1px; }
    main.itil-v1[data-page="certification"] .cert-hero__actions { width: 100%; }
    main.itil-v1[data-page="certification"] .cert-hero__btn,
    main.itil-v1[data-page="certification"] .cert-hero__ghost { display: flex; width: 100%; align-self: stretch; justify-content: center; }
    main.itil-v1[data-page="certification"] .cert-hero__btn { order: 1; }
    main.itil-v1[data-page="certification"] .cert-hero__micro { order: 2; text-align: center; text-wrap: balance; }
    main.itil-v1[data-page="certification"] .cert-hero__noscript { order: 3; text-align: center; }
    main.itil-v1[data-page="certification"] .cert-hero__ghost { order: 4; }
    main.itil-v1[data-page="certification"] .cert-hero__team { width: 100%; }
    main.itil-v1[data-page="certification"] .cert-hero__team-link { min-height: 48px; }
    main.itil-v1[data-page="certification"] .cert-hero__card { --hero-card-pad: 20px; }
    main.itil-v1[data-page="certification"] .cert-hero__lv {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "name price" "count count";
        row-gap: 2px;
        min-height: 60px;
        padding-block: 8px;
    }
    main.itil-v1[data-page="certification"] .cert-hero__lv-count { white-space: normal; }
}
