/* ==========================================================================
   FuturePeak Abacus Academy - Toy Abacus Design System
   ========================================================================== */

/* Bubbly, playful fonts */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    /* Classic Toy Abacus Bead Colors */
    --brand-red: #ef4444;
    --brand-orange: #f97316;
    --brand-yellow: #facc15;
    --brand-green: #22c55e;
    --brand-blue: #3b82f6;
    --brand-wood: #d97706;
    /* Wooden frame color */
    --brand-indigo: #1e293b;
    /* Deep contrast for text */

    /* Light Variations for backgrounds */
    --bg-red-light: #fef2f2;
    --bg-orange-light: #fff7ed;
    --bg-yellow-light: #fefce8;
    --bg-green-light: #f0fdf4;
    --bg-blue-light: #eff6ff;
    --bg-wood-light: #fffbeb;
    /* Light wood background */

    --color-bg-light: #ffffff;
    --color-text-main: #334155;
    --color-text-muted: #64748b;

    /* Playful Typography */
    --font-heading: 'Baloo 2', cursive;
    --font-body: 'Nunito', sans-serif;

    /* Bubbly Shapes & Shadows */
    --radius-sm: 1rem;
    --radius-md: 1.5rem;
    --radius-lg: 2.5rem;
    --radius-pill: 9999px;

    --shadow-bubbly: 0 8px 0 rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 10px 25px rgba(30, 41, 59, 0.1);

    /* Transitions */
    --transition-bouncy: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --section-padding: 5rem 0;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    font-size: 1.1rem;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--brand-indigo);
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: var(--transition-bouncy);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Playful Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: var(--transition-bouncy);
}

.btn-red {
    background: var(--brand-red);
    color: white;
    box-shadow: 0 6px 0 #b91c1c;
}

.btn-red:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 #b91c1c;
}

.btn-orange {
    background: var(--brand-orange);
    color: white;
    box-shadow: 0 6px 0 #c2410c;
}

.btn-orange:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 #c2410c;
}

.btn-yellow {
    background: var(--brand-yellow);
    color: var(--brand-indigo);
    box-shadow: 0 6px 0 #ca8a04;
}

.btn-yellow:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 #ca8a04;
}

.btn-green {
    background: var(--brand-green);
    color: white;
    box-shadow: 0 6px 0 #15803d;
}

.btn-green:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 #15803d;
}

.btn-blue {
    background: var(--brand-blue);
    color: white;
    box-shadow: 0 6px 0 #1d4ed8;
}

.btn-blue:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 0 #1d4ed8;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: white;
    box-shadow: var(--shadow-soft);
    border-bottom: 4px solid var(--brand-wood);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 55px;
    transition: transform var(--transition-bouncy);
}

@media (max-width: 600px) {
    .logo img {
        height: 40px;
    }
}

.logo:hover img {
    transform: scale(1.1) rotate(-2deg);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--brand-indigo);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-wood-light);
    color: var(--brand-wood);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--brand-indigo);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section Layout
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-wood-light);
    padding-top: 80px;
}

/* Wavy abstract divider */
.wave-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(1px);
}

.wave-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-divider-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg) translateY(1px);
}

.wave-divider-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Hero Content */
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    z-index: 10;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--brand-indigo);
    line-height: 1.1;
}

.text-color-red {
    color: var(--brand-red);
}

.text-color-orange {
    color: var(--brand-orange);
}

.text-color-yellow {
    color: var(--brand-yellow);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-color-green {
    color: var(--brand-green);
}

.text-color-blue {
    color: var(--brand-blue);
}

.text-color-wood {
    color: var(--brand-wood);
}

.hero-content p {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image-vibe {
    position: relative;
    z-index: 5;
}

/* Making it look a bit like a wooden abacus frame */
.hero-image-vibe img {
    border-radius: var(--radius-lg);
    border: 10px solid var(--brand-wood);
    box-shadow: 0 15px 0 #b45309;
    background: white;
    transform: rotate(2deg);
    transition: var(--transition-bouncy);
}

.hero-image-vibe:hover img {
    transform: rotate(-1deg) scale(1.02);
}

/* Floating Bead Elements */
.float-elem {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.float-1 {
    top: 15%;
    left: 5%;
    background: var(--brand-red);
    animation: wiggle 3s infinite ease-in-out alternate;
}

.float-2 {
    bottom: 20%;
    left: 45%;
    background: var(--brand-green);
    animation: wiggle 4s infinite ease-in-out alternate-reverse;
}

.float-3 {
    top: 25%;
    right: 10%;
    background: var(--brand-blue);
    animation: wiggle 3.5s infinite ease-in-out alternate;
}

.float-4 {
    bottom: 10%;
    right: 20%;
    background: var(--brand-yellow);
    width: 40px;
    height: 40px;
    animation: wiggle 2.5s infinite ease-in-out alternate;
}

@keyframes wiggle {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-20px) rotate(15deg);
    }
}

/* ==========================================================================
   Sections Layouts
   ========================================================================== */
.section-title {
    margin-bottom: 4rem;
    text-align: center;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.label-red {
    background: var(--bg-red-light);
    color: var(--brand-red);
}

.label-orange {
    background: var(--bg-orange-light);
    color: var(--brand-orange);
}

.label-yellow {
    background: var(--brand-yellow);
    color: var(--brand-indigo);
}

.label-green {
    background: var(--bg-green-light);
    color: var(--brand-green);
}

.label-blue {
    background: var(--bg-blue-light);
    color: var(--brand-blue);
}

.label-wood {
    background: var(--bg-wood-light);
    color: var(--brand-wood);
}

.section-title h2 {
    font-size: 3.5rem;
}

/* Bubbly Cards */
.bubbly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.bubbly-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 4px solid var(--brand-wood);
    box-shadow: 0 10px 0 var(--brand-wood);
    transition: var(--transition-bouncy);
    text-align: center;
}

/* Card Brands */
.card-red:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 var(--brand-red);
    border-color: var(--brand-red);
}

.card-orange:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 var(--brand-orange);
    border-color: var(--brand-orange);
}

.card-yellow:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 var(--brand-yellow);
    border-color: var(--brand-yellow);
}

.card-green:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 var(--brand-green);
    border-color: var(--brand-green);
}

.card-blue:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 0 var(--brand-blue);
    border-color: var(--brand-blue);
}

.bubbly-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    color: white;
    box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.2);
}

.icon-red {
    background: var(--brand-red);
}

.icon-orange {
    background: var(--brand-orange);
}

.icon-yellow {
    background: var(--brand-yellow);
    color: var(--brand-indigo);
}

.icon-green {
    background: var(--brand-green);
}

.icon-blue {
    background: var(--brand-blue);
}

/* Stats Area */
.stats {
    background: var(--brand-wood);
    color: white;
    padding: 4rem 0;
    border-top: 8px solid #b45309;
    border-bottom: 8px solid #b45309;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

/* Stat items look like abacus beads on a wire */
.stat-item {
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: white;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 2;
    background: var(--brand-red);
    width: 140px;
    height: 90px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.2);
}

.stat-item:nth-child(2) h3 {
    background: var(--brand-green);
}

.stat-item:nth-child(3) h3 {
    background: var(--brand-blue);
}

.stat-item:nth-child(4) h3 {
    background: var(--brand-yellow);
    color: var(--brand-indigo);
}

.stat-item p {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--brand-indigo);
    color: white;
    padding: 5rem 0 2rem;
    position: relative;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: var(--brand-yellow);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    font-weight: 600;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a i {
    color: var(--brand-blue);
    transition: var(--transition-bouncy);
}

.footer-links a:hover {
    color: var(--brand-yellow);
}

.footer-links a:hover i {
    transform: translateX(5px);
    color: var(--brand-yellow);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.social-links a:hover {
    background: var(--brand-red);
    transform: translateY(-5px) scale(1.1);
}

.footer-bottom {
    text-align: center;
    border-top: 2px dashed rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Add CSS Reveal */
.reveal {
    opacity: 0;
    transform: scale(0.9) translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .float-elem {
        display: none;
    }

    /* Fix the "About Us" grid on the homepage */
    section[style*="background: var(--bg-wood-light)"] .container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    /* Make the hero title fit on mobile */
    .hero-content h1 {
        font-size: 2.8rem;
    }

    /* Stack the hero action buttons on mobile */
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .section-title h2 {
        font-size: 2.5rem;
    }

    /* Fix the stats grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item h3 {
        width: 100%;
        max-width: 140px;
    }

    /* Stack polaroids in Gallery Snippet on mobile */
    div.reveal[style*="justify-content: center;"] {
        flex-direction: column;
        align-items: center;
    }

    div.reveal[style*="justify-content: center;"]>div {
        transform: rotate(0) translateY(0) !important;
        margin-bottom: 1rem;
        width: 100% !important;
        max-width: 300px;
    }

    /* Roadmap Mobile Fix */
    .roadmap-flex {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .roadmap-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* Extra Moving Animations */
.anim-float {
    animation: floatUpDown 4s ease-in-out infinite;
}

.anim-spin-slow {
    animation: spinSlow 10s linear infinite;
}

.anim-pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes floatUpDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(250, 204, 21, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
    }
}