/* ── Design Upgrade — scroll animations, depth, polish ── */

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Hero upgrade ── */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    position: relative;
    overflow: hidden;
}

/* Animated mesh background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(255,255,255,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(168,85,247,0.3) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 60% 80%, rgba(79,70,229,0.4) 0%, transparent 60%);
    animation: mesh-shift 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes mesh-shift {
    0%   { opacity: 0.6; transform: scale(1) rotate(0deg); }
    100% { opacity: 1;   transform: scale(1.05) rotate(1deg); }
}

/* Floating orbs */
.hero::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    top: -100px; right: -100px;
    animation: orb-float 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-30px, 30px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-content > p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.88;
    font-weight: 400;
    line-height: 1.7;
}

/* ── Portal cards upgrade ── */
.portal-card {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.96);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.portal-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.8) inset;
}

/* Remove the constant pulsing — too distracting */
.child-portal .btn-primary { animation: none; }
.child-portal { animation: none; }
.child-portal::before { display: none; }

/* Cleaner child card */
.child-portal {
    background: linear-gradient(145deg, #fff5f5 0%, #fdf2ff 100%);
    border-left: 4px solid #f472b6;
    box-shadow: 0 8px 32px rgba(244,114,182,0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.child-portal:hover {
    box-shadow: 0 24px 64px rgba(244,114,182,0.25), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.child-portal h4 { color: #be185d; }
.child-portal p  { color: #9d174d; font-weight: 500; }

.child-portal .btn-primary {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    box-shadow: 0 4px 16px rgba(236,72,153,0.35);
}
.child-portal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(236,72,153,0.45);
}

/* Staff card */
.staff-portal {
    border-left: 4px solid #4f46e5;
}

/* ── Feature cards upgrade ── */
.feature-item {
    border-radius: 20px;
    border: 1px solid #f0f0f5;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease, border-color 0.3s;
    background: #fff;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.1);
    border-color: #e0e0f0;
}

/* Remove the top border override — use gradient accent instead */
.feature-item:nth-child(1),
.feature-item:nth-child(2),
.feature-item:nth-child(3),
.feature-item:nth-child(4) { border-top: none; }

.feature-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 0 0 20px 20px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-item:nth-child(1)::after { background: linear-gradient(90deg, #48bb78, #38b2ac); }
.feature-item:nth-child(2)::after { background: linear-gradient(90deg, #f472b6, #ec4899); }
.feature-item:nth-child(3)::after { background: linear-gradient(90deg, #4f46e5, #7c3aed); }
.feature-item:nth-child(4)::after { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.feature-item:hover::after { transform: scaleX(1); }
.feature-item::before { display: none; }

/* ── Section dividers ── */
.features {
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #a855f7, #ec4899);
}

/* ── About section upgrade ── */
.about {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 80% 50%, rgba(79,70,229,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Value cards upgrade ── */
.value-card {
    border-radius: 20px;
    border: 1px solid #f0f0f5;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
    border-top: none;
    position: relative;
    overflow: hidden;
}

.value-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}

.value-card:nth-child(1)::after { background: linear-gradient(90deg, #4f46e5, #7c3aed); }
.value-card:nth-child(2)::after { background: linear-gradient(90deg, #10b981, #059669); }
.value-card:nth-child(3)::after { background: linear-gradient(90deg, #f59e0b, #d97706); }
.value-card:nth-child(4)::after { background: linear-gradient(90deg, #ef4444, #dc2626); }

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.1);
}

/* ── Page hero upgrade ── */
.page-hero {
    background-attachment: scroll; /* better perf on mobile */
}

.page-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}

/* ── Section badges upgrade ── */
.section-badge {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    letter-spacing: 1px;
    font-size: 0.75rem;
}

/* ── CTA upgrade ── */
.cta-section {
    background-image:
        linear-gradient(135deg, rgba(79,70,229,0.85) 0%, rgba(124,58,237,0.85) 100%),
        url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=2400&q=95&fit=crop&auto=format');
    background-attachment: scroll;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ── Staff portal cards upgrade ── */
.card {
    border-radius: 16px;
    border: 1px solid #e8edf5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* ── Dashboard stat numbers ── */
.dashboard h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ── Timeline upgrade ── */
.timeline-item {
    border-radius: 12px;
    border-left: 3px solid #4f46e5;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.timeline-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateX(4px);
}

/* ── Child portal content upgrade ── */
.dashboard-section {
    border-radius: 20px;
    border: 1px solid rgba(124,58,237,0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dashboard-section:hover {
    box-shadow: 0 12px 32px rgba(124,58,237,0.12);
    transform: translateY(-3px);
}

/* ── Mood options upgrade ── */
.mood-label {
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}

.mood-label:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ── Buttons global upgrade ── */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover::after { opacity: 1; }

/* ── Compliance badges upgrade ── */
.compliance-badges .badge {
    animation: none;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.compliance-badges .badge:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ── Smooth focus rings ── */
*:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
