/* =========================================================
   NEXT Portal — Luxury / modern landing motion
   Soft emerald + champagne gold. Contemporary, not flashy.
   ========================================================= */

:root {
    --lux-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --lux-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --lux-gold: var(--luxury-gold, #D4AF37);
    --lux-gold-soft: rgba(212, 175, 55, 0.28);
}

/* ── Scroll progress (thin luxury rail) ── */
.portal-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 10050;
    pointer-events: none;
    background: transparent;
    opacity: 0;
    transition: opacity 0.4s var(--lux-ease);
}

.portal-landing-page.portal-splash-done .portal-scroll-progress {
    opacity: 1;
}

.portal-scroll-progress__bar {
    display: block;
    height: 100%;
    width: 0%;
    transform-origin: left center;
    background: linear-gradient(
        90deg,
        var(--color-primary) 0%,
        var(--lux-gold) 55%,
        var(--color-primary) 100%
    );
    background-size: 200% 100%;
    animation: portalLuxBarShimmer 4s linear infinite;
    box-shadow: 0 0 12px var(--color-primary-glow);
}

@keyframes portalLuxBarShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ── Ambient film grain (very subtle) ── */
.portal-landing-page.portal-splash-done::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="light"] .portal-landing-page.portal-splash-done::before {
    opacity: 0.025;
    mix-blend-mode: multiply;
}

/* ── Section titles — gold underline draw ── */
.portal-landing-page .portal-section__title {
    position: relative;
    letter-spacing: -0.03em;
}

.portal-landing-page .portal-section__title-accent {
    position: relative;
    background: linear-gradient(
        120deg,
        var(--color-primary) 0%,
        var(--lux-gold) 45%,
        var(--color-primary) 90%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: portalLuxTextShine 7s ease-in-out infinite;
}

@keyframes portalLuxTextShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.portal-landing-page .portal-section__title.is-revealed::after,
.portal-landing-page [data-reveal].portal-section__title.is-revealed::after {
    content: "";
    display: block;
    width: min(72px, 18%);
    height: 2px;
    margin: 0.85rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--lux-gold), var(--color-primary), transparent);
    transform: scaleX(0);
    transform-origin: center;
    animation: portalLuxUnderline 0.9s var(--lux-ease) 0.15s forwards;
}

.portal-section__header-row .portal-section__title.is-revealed::after,
.portal-section__header-row [data-reveal].portal-section__title.is-revealed::after {
    margin-left: 0;
    transform-origin: left center;
}

@keyframes portalLuxUnderline {
    to { transform: scaleX(1); }
}

/* ── Refined reveal physics ── */
.portal-landing-page [data-reveal] {
    transition:
        opacity 1s var(--lux-ease),
        transform 1s var(--lux-ease),
        filter 1s var(--lux-ease);
}

.portal-landing-page [data-reveal].is-exiting {
    transition-duration: 0.45s;
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.portal-landing-page [data-reveal-stagger] > [data-reveal-item] {
    transition:
        opacity 0.85s var(--lux-ease),
        transform 0.85s var(--lux-ease),
        box-shadow 0.45s ease,
        border-color 0.45s ease;
}

/* ── Luxury cards: spotlight + gold rim on hover ── */
.portal-landing-page .portal-stat-card,
.portal-landing-page .portal-step-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-xl, 18px);
    transition:
        transform 0.55s var(--lux-ease),
        box-shadow 0.55s var(--lux-ease),
        border-color 0.45s ease;
}

.portal-landing-page .portal-stat-card::before,
.portal-landing-page .portal-step-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        420px circle at var(--lux-x, 50%) var(--lux-y, 0%),
        rgba(0, 255, 136, 0.12),
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .portal-landing-page .portal-stat-card::before,
[data-theme="light"] .portal-landing-page .portal-step-card::before {
    background: radial-gradient(
        420px circle at var(--lux-x, 50%) var(--lux-y, 0%),
        rgba(0, 99, 116, 0.1),
        transparent 45%
    );
}

.portal-landing-page .portal-stat-card:hover::before,
.portal-landing-page .portal-step-card:hover::before {
    opacity: 1;
}

.portal-landing-page .portal-stat-card > *,
.portal-landing-page .portal-step-card > * {
    position: relative;
    z-index: 1;
}

.portal-landing-page .portal-stat-card:hover,
.portal-landing-page .portal-step-card:hover {
    transform: translateY(-8px);
    border-color: var(--lux-gold-soft) !important;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(212, 175, 55, 0.18),
        0 0 28px rgba(0, 255, 136, 0.08);
}

[data-theme="light"] .portal-landing-page .portal-stat-card:hover,
[data-theme="light"] .portal-landing-page .portal-step-card:hover {
    box-shadow:
        0 16px 36px rgba(15, 40, 50, 0.1),
        0 0 0 1px rgba(168, 135, 74, 0.28);
}

.portal-landing-page .portal-stat-card__icon {
    transition: transform 0.55s var(--lux-ease), box-shadow 0.45s ease, background 0.45s ease;
}

.portal-landing-page .portal-stat-card:hover .portal-stat-card__icon {
    transform: scale(1.12) rotate(-4deg);
    box-shadow: 0 0 0 6px rgba(0, 255, 136, 0.08);
}

/* ── Count-up values ── */
.portal-stat-card__value[data-count] {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.portal-stat-card__value.is-counting {
    color: var(--color-primary);
}

/* ── Search pill — magnetic luxury ── */
.portal-landing-page .portal-search-pill {
    position: relative;
    transition:
        transform 0.45s var(--lux-ease),
        box-shadow 0.45s var(--lux-ease),
        border-color 0.35s ease;
}

.portal-landing-page .portal-search-pill::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        120deg,
        transparent 20%,
        var(--color-primary) 45%,
        var(--lux-gold) 55%,
        transparent 80%
    );
    background-size: 220% 220%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    animation: portalLuxBorderSweep 5s linear infinite;
}

.portal-landing-page .portal-search-pill:focus-within::after,
.portal-landing-page .portal-search-pill:hover::after {
    opacity: 0.9;
}

@keyframes portalLuxBorderSweep {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.portal-landing-page .portal-search-pill__btn {
    position: relative;
    overflow: hidden;
    transition:
        transform 0.35s var(--lux-ease),
        box-shadow 0.35s ease,
        background 0.3s ease;
}

.portal-landing-page .portal-search-pill__btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    transition: none;
}

.portal-landing-page .portal-search-pill__btn:hover::after {
    animation: portalLuxBtnSheen 0.7s var(--lux-ease);
}

@keyframes portalLuxBtnSheen {
    from { left: -40%; }
    to { left: 120%; }
}

.portal-landing-page .portal-search-pill__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.25);
}

/* ── Role chips ── */
.portal-landing-page .portal-hero__role {
    position: relative;
    transition:
        transform 0.4s var(--lux-ease),
        background 0.35s ease,
        color 0.35s ease,
        box-shadow 0.4s ease;
}

.portal-landing-page .portal-hero__role:hover,
.portal-landing-page .portal-hero__role.is-active {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

/* ── Job cards luxury hover ── */
.portal-landing-page .portal-job-card {
    transition:
        transform 0.55s var(--lux-ease),
        box-shadow 0.55s var(--lux-ease),
        border-color 0.4s ease;
}

.portal-landing-page .portal-job-card--live:hover {
    transform: translateY(-10px);
}

.portal-landing-page .portal-job-card__btn--primary {
    position: relative;
    overflow: hidden;
}

.portal-landing-page .portal-job-card__btn--ghost {
    transition: transform 0.3s var(--lux-ease), border-color 0.3s ease, color 0.3s ease;
}

.portal-landing-page .portal-job-card__btn--ghost:hover {
    transform: translateX(2px);
}

/* ── Tabs — modern underline indicator ── */
.portal-landing-page .portal-job-tabs .nav-link {
    position: relative;
    transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--lux-ease);
}

.portal-landing-page .portal-job-tabs .nav-link::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--lux-gold));
    transform: scaleX(0);
    transition: transform 0.4s var(--lux-ease);
}

.portal-landing-page .portal-job-tabs .nav-link.active::after,
.portal-landing-page .portal-job-tabs .nav-link:hover::after {
    transform: scaleX(1);
}

.portal-landing-page .portal-job-tabs .nav-link:hover {
    transform: translateY(-1px);
}

/* ── Marquee polish ── */
.portal-landing-page .portal-marquee__track {
    animation-duration: 48s;
}

.portal-landing-page .portal-employer-carousel__item {
    transition:
        transform 0.45s var(--lux-ease),
        border-color 0.35s ease,
        box-shadow 0.45s ease;
}

.portal-landing-page .portal-employer-carousel__item:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

/* ── View-all link arrow ── */
.portal-landing-page .portal-view-all {
    transition: letter-spacing 0.35s ease, color 0.3s ease, gap 0.35s ease;
}

.portal-landing-page .portal-view-all:hover {
    letter-spacing: 0.04em;
    gap: 0.65rem;
}

.portal-landing-page .portal-view-all i {
    transition: transform 0.35s var(--lux-ease);
}

.portal-landing-page .portal-view-all:hover i {
    transform: translateX(4px);
}

/* ── Hero visual depth ── */
.portal-landing-page .portal-hero__visual-img {
    filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.45));
    transition: filter 0.6s ease;
}

.portal-landing-page.portal-splash-done .portal-hero__visual-img {
    animation: portalHeroFloat 7s ease-in-out infinite;
}

/* ── Section divider — richer gold/emerald ── */
.portal-landing-page .portal-section--animated::before {
    height: 2px;
    width: min(140px, 24%);
    background: linear-gradient(
        90deg,
        transparent,
        var(--lux-gold),
        var(--color-primary),
        var(--lux-gold),
        transparent
    );
    opacity: 0;
    transform: translateX(-50%) scaleX(0.4);
    transition: opacity 0.6s ease, transform 0.8s var(--lux-ease);
}

.portal-landing-page .portal-section--animated.is-revealed::before {
    opacity: 0.85;
    transform: translateX(-50%) scaleX(1);
    animation: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .portal-scroll-progress,
    .portal-landing-page.portal-splash-done::before,
    .portal-scroll-progress__bar,
    .portal-landing-page .portal-section__title-accent,
    .portal-landing-page .portal-search-pill::after {
        animation: none !important;
    }

    .portal-landing-page .portal-stat-card:hover,
    .portal-landing-page .portal-step-card:hover,
    .portal-landing-page .portal-job-card--live:hover {
        transform: none !important;
    }

    .portal-landing-page .portal-section__title.is-revealed::after {
        animation: none !important;
        transform: scaleX(1);
    }
}
