/* ============================================================
   KWSP Malaysia — Design Tokens & Keyframe Animations
   Corporate Light Premium Theme
   ============================================================ */
:root {
    /* ── Brand Palette ── */
    --kwsp-blue-deep: #00458C;
    --kwsp-blue-action: #1455B7;
    --kwsp-blue-light: #1D65D9;  /* Darkened for 4.5:1 contrast */
    --kwsp-blue-pale: #DBEAFE;
    --kwsp-red: #DA291C;
    --kwsp-yellow: #FFCC00;
    --kwsp-yellow-text: #92400E; /* For accessible text on light backgrounds */
    --kwsp-green: #10B981;
    --kwsp-green-text: #065F46;  /* For accessible text on light backgrounds */
    --kwsp-green-pale: #D1FAE5;

    /* ── Surface Colors ── */
    --bg-main: #f0f4f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-hero: linear-gradient(135deg, #002D5A 0%, #0B4F8A 40%, #1867B5 100%);

    /* ── Text ── */
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #526071;      /* Improved contrast from #64748b */
    --text-faint: #5d6b7d;      /* Improved contrast from #94a3b8 */

    /* ── Typography Scale ── */
    --leading-body: 1.6;
    --leading-heading: 1.3;

    /* ── Borders & Dividers ── */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    /* ── Radii ── */
    --radius-pill: 50px;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;

    /* ── Shadows ── */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-blue: 0 10px 25px -4px rgba(0,69,140,0.18);
    --shadow-blue-lg: 0 20px 40px -8px rgba(0,69,140,0.25);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 6px 16px rgba(0,0,0,0.04);
    --shadow-float: 0 8px 30px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.08);

    /* ── Transitions ── */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ── Global Keyframe Animations ── */

@keyframes kwspFadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes kwspFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes kwspSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes kwspScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes kwspPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

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

@keyframes kwspCountUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Base Reset for Corporate Light ── */
body.corporate-light {
    background-color: var(--bg-main);
    color: var(--text-main);
}

/* ── Animated Background Layer ── */
.kwsp-animated-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.kwsp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    will-change: transform;
}

.kwsp-orb--1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,69,140,0.25), transparent 70%);
    top: -10%; left: -5%;
    animation: kwspDrift1 18s ease-in-out infinite;
}
.kwsp-orb--2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(20,85,183,0.2), transparent 70%);
    top: 30%; right: -8%;
    animation: kwspDrift2 22s ease-in-out infinite;
}
.kwsp-orb--3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,204,0,0.12), transparent 70%);
    bottom: 10%; left: 20%;
    animation: kwspDrift3 20s ease-in-out infinite;
}
.kwsp-orb--4 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(0,45,90,0.18), transparent 70%);
    top: 60%; left: 60%;
    animation: kwspDrift4 25s ease-in-out infinite;
}
.kwsp-orb--5 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
    top: 10%; left: 50%;
    animation: kwspDrift5 16s ease-in-out infinite;
}

.kwsp-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: kwspWatermarkPulse 6s ease-in-out infinite;
}
.kwsp-watermark img {
    width: 180px;
    height: auto;
    opacity: 0.04;
    filter: grayscale(100%);
}

@keyframes kwspDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, 40px) scale(1.05); }
    50% { transform: translate(30px, 80px) scale(0.95); }
    75% { transform: translate(-20px, 30px) scale(1.02); }
}
@keyframes kwspDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-50px, 30px) scale(1.08); }
    50% { transform: translate(-20px, -40px) scale(0.92); }
    75% { transform: translate(30px, -20px) scale(1.04); }
}
@keyframes kwspDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -50px) scale(1.06); }
    66% { transform: translate(-30px, -20px) scale(0.94); }
}
@keyframes kwspDrift4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-40px, -30px); }
    50% { transform: translate(20px, -60px); }
    75% { transform: translate(50px, 20px); }
}
@keyframes kwspDrift5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 50px) scale(1.1); }
}
@keyframes kwspWatermarkPulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}
