/*
   CLAUDE MASTERCLASS — ANIMATION SYSTEM
   Claude-native: warm, breathing, intelligent animations
*/

/* ============================================================
   1. KEYFRAMES
   ============================================================ */

/* Fade up — used for hero text & scroll reveals */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Fade in — used for pill badge & overlays */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Gentle float — used for hero card */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

/* Gradient orb pulse */
@keyframes orbPulse {
    0%   { transform: scale(1) translate(0, 0); opacity: 0.55; }
    33%  { transform: scale(1.08) translate(20px, -15px); opacity: 0.65; }
    66%  { transform: scale(0.95) translate(-15px, 10px); opacity: 0.5; }
    100% { transform: scale(1) translate(0, 0); opacity: 0.55; }
}

/* Claude orange shimmer for "Claude AI" text */
@keyframes textShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Pulsing glow for primary CTA button */
@keyframes ctaGlow {
    0%   { box-shadow: 0 4px 20px rgba(216, 90, 48, 0.35); }
    50%  { box-shadow: 0 4px 36px rgba(216, 90, 48, 0.6), 0 0 0 6px rgba(216, 90, 48, 0.12); }
    100% { box-shadow: 0 4px 20px rgba(216, 90, 48, 0.35); }
}

/* Countdown tick flash */
@keyframes tickFlash {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.08); color: #D85A30; }
    100% { transform: scale(1); }
}

/* Scroll-reveal base */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Stagger line draw for card border */
@keyframes borderDraw {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* Typing cursor blink */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Floating particle drift */
@keyframes particleDrift {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.4; }
    33%  { transform: translate(30px, -40px) scale(1.2); opacity: 0.7; }
    66%  { transform: translate(-20px, 20px) scale(0.9); opacity: 0.3; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
}

/* ============================================================
   2. HERO BACKGROUND ORBS (Claude-gradient ambient glow)
   ============================================================ */

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.hero-orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(216, 90, 48, 0.18) 0%, transparent 70%);
    top: -80px;
    left: -100px;
    animation: orbPulse 12s ease-in-out infinite;
}

.hero-orb-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(107, 79, 187, 0.14) 0%, transparent 70%);
    top: 60px;
    right: -60px;
    animation: orbPulse 16s ease-in-out infinite reverse;
    animation-delay: -4s;
}

.hero-orb-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(216, 90, 48, 0.1) 0%, transparent 70%);
    bottom: -40px;
    right: 20%;
    animation: orbPulse 20s ease-in-out infinite;
    animation-delay: -8s;
}

.hero-section .container,
.hero-section .hero-grid {
    position: relative;
    z-index: 1;
}

/* ============================================================
   3. HERO TEXT STAGGER ANIMATIONS
   ============================================================ */

.hero-pill {
    animation: fadeIn 0.5s ease both;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.25s;
    opacity: 0;
}

.hero-description {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.4s;
    opacity: 0;
}

.direct-access-card {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-actions {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.6s;
    opacity: 0;
}

.trust-stat-row {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.75s;
    opacity: 0;
}

.hero-card-side {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.45s;
    opacity: 0;
}

/* ============================================================
   4. "CLAUDE AI" ANIMATED SHIMMER TEXT
   ============================================================ */

.text-terracotta {
    background: linear-gradient(
        90deg,
        #D85A30 0%,
        #FF8C5A 30%,
        #D85A30 50%,
        #C04E27 70%,
        #FF7043 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s linear infinite;
    animation-delay: 1s;
}

/* ============================================================
   5. CTA BUTTON PULSE GLOW
   ============================================================ */

.btn-primary {
    animation: ctaGlow 3s ease-in-out infinite;
    animation-delay: 1.5s;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-primary:hover {
    animation: none;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(216, 90, 48, 0.5) !important;
}

/* ============================================================
   6. HERO INFO CARD — FLOATING
   ============================================================ */

.info-card {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1.2s;
    will-change: transform;
}

/* ============================================================
   7. COUNTDOWN TICK ANIMATION
   ============================================================ */

.timer-block.tick {
    animation: tickFlash 0.4s ease;
}

/* ============================================================
   8. SCROLL REVEAL — INTERSECTION OBSERVER CLASSES
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children delays */
.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* ============================================================
   9. CARD HOVER EFFECTS
   ============================================================ */

.curriculum-item,
.feature-card,
.pricing-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.curriculum-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: rgba(216, 90, 48, 0.3);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

/* ============================================================
   10. SUBTLE GRID LINES (Claude AI background texture)
   ============================================================ */

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(216, 90, 48, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 90, 48, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   11. FLOATING REGISTRATION WIDGET — SLIDE IN
   ============================================================ */

.bottom-floating-widget {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ============================================================
   12. NAVBAR SCROLL SHADOW
   ============================================================ */

.navbar {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background-color: rgba(247, 244, 238, 0.98);
    backdrop-filter: blur(12px);
}

/* ============================================================
   13. FAQ ACCORDION SMOOTH OPEN
   ============================================================ */

.faq-answer {
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                padding 0.3s ease;
}

/* ============================================================
   14. SECTION HEADING UNDERLINE ANIMATION
   ============================================================ */

.section-heading::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #D85A30, #6B4FBB);
    border-radius: 2px;
    margin-top: 8px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-heading.visible::after {
    width: 60px;
}

/* ============================================================
   15. PULSE DOT ANIMATION & PORTAL CARD LIFT
   ============================================================ */

.pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #D85A30;
    box-shadow: 0 0 0 0 rgba(216, 90, 48, 0.7);
    animation: pulseDot 1.8s infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes pulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(216, 90, 48, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(216, 90, 48, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(216, 90, 48, 0);
    }
}

.portal-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease !important;
}

.portal-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(216, 90, 48, 0.18) !important;
    border-color: #D85A30 !important;
}

.portal-card-img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.portal-card:hover .portal-card-img {
    transform: scale(1.06) !important;
}

/* Button Shimmer Line Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        60deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: rotate(25deg);
    animation: buttonShimmer 3.5s infinite;
}

@keyframes buttonShimmer {
    0% { left: -60%; }
    20% { left: 140%; }
    100% { left: 140%; }
}

/* Feature & Curriculum Card Enhancements */
.feature-card:hover .feature-icon,
.info-item:hover .info-icon {
    transform: scale(1.12) rotate(6deg) !important;
}

.feature-icon, .info-icon {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
