/* =========================================================
   NEXT Portal — Landing page animations & luxury typography
   ========================================================= */

/* ── Larger public-page type scale ── */
body.portal-public {
    font-size: var(--font-size-base);
}

.portal-hero__title {
    font-size: var(--font-size-display) !important;
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
}

.portal-hero__subtitle {
    font-size: var(--font-size-xl) !important;
    line-height: var(--line-height-relaxed);
}

.portal-hero__role {
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-medium);
}

.portal-search-pill .form-control,
.portal-search-pill__input {
    font-size: var(--font-size-base) !important;
    padding: 0.7rem 0.35rem !important;
}

.portal-search-pill__btn,
.portal-search-pill .btn-portal-primary {
    font-size: var(--font-size-base) !important;
    padding: 0 1.25rem !important;
    height: 2.75rem;
}

.portal-section__title {
    font-size: clamp(1.875rem, 4vw, 2.75rem) !important;
    letter-spacing: var(--letter-spacing-tight);
}

.portal-section__subtitle {
    font-size: var(--font-size-lg) !important;
    line-height: var(--line-height-relaxed);
    max-width: 640px;
}

.portal-stat-card__label {
    font-size: var(--font-size-sm) !important;
}

.portal-stat-card__value {
    font-size: clamp(1.75rem, 3vw, 2.25rem) !important;
    font-weight: var(--font-weight-bold);
}

.portal-step-card__title {
    font-size: var(--font-size-lg) !important;
}

.portal-step-card p {
    font-size: var(--font-size-base) !important;
}

.portal-view-all {
    font-size: var(--font-size-base) !important;
}

.portal-employer-carousel__item b {
    font-size: var(--font-size-sm) !important;
}

/* ── Hero ambient orbs ── */
.portal-hero--animated {
    isolation: isolate;
}

.portal-hero--animated::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    top: 10%;
    right: 15%;
    opacity: 0.45;
    filter: blur(40px);
    animation: portalOrbPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.portal-hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(60px);
}

.portal-hero__orb--1 {
    width: 280px;
    height: 280px;
    top: 20%;
    left: 5%;
    background: rgba(0, 255, 136, 0.12);
    animation: portalOrbDrift 12s ease-in-out infinite;
}

.portal-hero__orb--2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: 30%;
    background: rgba(212, 175, 55, 0.10);
    animation: portalOrbDrift 10s ease-in-out infinite reverse;
}

[data-theme="light"] .portal-hero__orb--1 {
    background: rgba(0, 99, 116, 0.10);
}

[data-theme="light"] .portal-hero__orb--2 {
    background: rgba(168, 135, 74, 0.12);
}

/* ── Hero entrance animations ── */
.portal-animate-in {
    opacity: 0;
    animation: portalFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.portal-animate-in--1 { animation-delay: 0.1s; }
.portal-animate-in--2 { animation-delay: 0.25s; }
.portal-animate-in--3 { animation-delay: 0.4s; }
.portal-animate-in--4 { animation-delay: 0.55s; }
.portal-animate-in--5 { animation-delay: 0.7s; }

.portal-hero__visual--float {
    animation: portalHeroFloat 6s ease-in-out infinite;
}

.portal-hero__visual-img {
    animation: portalHeroFloat 6s ease-in-out infinite;
}

.portal-hero__title-accent {
    display: inline-block;
    animation: portalAccentShimmer 4s ease-in-out infinite;
}

/* ── Search pill glow on load ── */
.portal-search-pill--glow {
    animation: portalSearchGlow 3s ease-in-out 1s infinite;
}

/* ── Stat card hover lift ── */
.portal-stat-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.portal-stat-card:hover {
    transform: translateY(-6px) scale(1.02);
}

.portal-stat-card__icon {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-stat-card:hover .portal-stat-card__icon {
    transform: scale(1.1);
}

/* ── Step cards stagger feel ── */
.portal-step-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.portal-step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ── Employer logo marquee ── */
.portal-marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.portal-marquee__track {
    display: flex;
    gap: var(--space-4);
    width: max-content;
    animation: portalMarquee 40s linear infinite;
}

.portal-marquee:hover .portal-marquee__track {
    animation-play-state: paused;
}

.portal-marquee__track .portal-employer-carousel__item {
    flex-shrink: 0;
    min-width: 160px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.portal-marquee__track .portal-employer-carousel__item:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

/* ── Section divider shimmer ── */
.portal-section--animated {
    position: relative;
}

.portal-section--animated::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(120px, 20%);
    height: 3px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.6;
}

/* ── Job tabs subtle pulse on active ── */
.portal-job-tabs .nav-link.active {
    animation: portalTabPulse 2.5s ease-in-out infinite;
}

/* ── Keyframes ── */
@keyframes portalFadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes portalHeroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes portalOrbPulse {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.08); }
}

@keyframes portalOrbDrift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, -15px); }
    66% { transform: translate(-10px, 10px); }
}

@keyframes portalAccentShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

@keyframes portalSearchGlow {
    0%, 100% { box-shadow: var(--shadow-md); }
    50% { box-shadow: var(--shadow-md), 0 0 24px var(--color-primary-glow); }
}

@keyframes portalMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes portalTabPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 12px var(--color-primary-glow); }
}

@keyframes portalGridDrift {
    0% { background-position: 0 0; }
    100% { background-position: 48px 48px; }
}

.portal-hero--animated::before {
    animation: portalGridDrift 20s linear infinite;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .portal-animate-in,
    .portal-hero__visual--float,
    .portal-hero--animated::after,
    .portal-hero__orb,
    .portal-marquee__track,
    .portal-hero--animated::before,
    .portal-job-tabs .nav-link.active {
        animation: none !important;
    }

    .portal-animate-in {
        opacity: 1;
    }
}
