/* Additions for behaviour the reference renders client-side (kept minimal; design comes from site.css). */

/* AnimatedHeading: words start hidden until JS reveals them (no flash before split) */
html:not([data-ready]) [data-animated-heading] { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { html:not([data-ready]) [data-animated-heading] { visibility: visible; } }
.ah-word { transform: none; }
[data-animated-heading].ah-active .ah-word { transform: translateY(100%); }

/* consent banner enter/exit (reference: opacity + 8px rise, 200ms) */
[data-consent] { opacity: 0; transform: translateY(8px); transition: opacity .2s ease-out, transform .2s ease-out; }
[data-consent].is-visible { opacity: 1; transform: translateY(0); }

/* saved-roles badge on the heart icon */
.eg-badge { position: absolute; top: -6px; right: -8px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); font-size: 9px; font-weight: 700; line-height: 1; animation: badge-bounce .4s ease-out; }
.eg-saved-remove { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--corners-s, 4px); color: var(--on-surface-subtle); background: transparent; cursor: pointer; transition: background-color .2s, color .2s; }
.eg-saved-remove:hover { background: var(--on-surface-ghost); color: var(--on-surface); }
[data-saved-list] a { padding-right: 36px; }

/* save-role heart toggle state */
[data-save-role].is-saved svg path { fill: var(--primary); }

/* accordion panels hidden state must not animate */
[data-slot="accordion-content"][hidden] { display: none; }

/* lottie preloader svg fills its box */
[data-preloader-session-root] svg { width: 100% !important; height: 100% !important; }

/* responsive variants captured from the reference at desktop / mobile widths */
.v-m { display: contents; }
.v-d { display: none; }
@media (min-width: 1024px) { .v-m { display: none; } .v-d { display: contents; } }

/* hero media sits at -z-10: keep it inside the hero's own stacking context so the page background never covers it */
main section.relative.h-screen.overflow-clip { isolation: isolate; }

/* the reference hides the site header while a role drawer is open */
[data-header] { transition: opacity .3s ease; }
html[data-role-open] [data-header] { opacity: 0; pointer-events: none; }
/* sections whose desktop variant already applies from 768px (as in the reference) */
.v-m-md { display: contents; }
.v-d-md { display: none; }
@media (min-width: 768px) { .v-m-md { display: none; } .v-d-md { display: contents; } }
