/*
Theme Name: Feed by INFINTRIX
Theme URI: https://infintrix.com
Author: INFINTRIX
Author URI: https://infintrix.com
Description: A single-page landing page theme for Feed — Financial Education for Everyday Decisions. A financial literacy platform for students in Grades 3-8.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: feed-by-infintrix
*/

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
    --mint: #4ECDC4;
    --mint-light: #A8E6CF;
    --mint-dark: #3DBEB5;
    --ocean: #2C3E7B;
    --ocean-light: #3D5299;
    --ocean-dark: #1A2555;
    --yellow: #FFD93D;
    --yellow-light: #FFE680;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E9ECEF;
    --text-dark: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --footer-bg: #1A1A2E;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 50px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ocean);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
}

h4 {
    font-size: 1rem;
    font-weight: 700;
}

p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ==========================================================================
   4. Layout Utilities
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-header p {
    margin-top: 12px;
    font-size: 1.1rem;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: var(--mint);
    color: var(--white);
    border-color: var(--mint);
}

.btn-primary:hover {
    background: var(--mint-dark);
    border-color: var(--mint-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--ocean);
    border-color: var(--ocean);
}

.btn-outline:hover {
    background: var(--ocean);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-yellow {
    background: var(--yellow);
    color: var(--ocean);
    border-color: var(--yellow);
    font-size: 1.1rem;
    padding: 16px 40px;
}

.btn-yellow:hover {
    background: var(--yellow-light);
    border-color: var(--yellow-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 217, 61, 0.5);
}

/* ==========================================================================
   6. Sticky Navigation Bar
   ========================================================================== */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--medium-gray);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ocean);
    flex-shrink: 0;
}

.nav-logo span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    padding: 4px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mint);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: var(--mint);
    color: var(--white);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

.nav-cta:hover {
    background: var(--mint-dark);
    transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ocean);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--ocean);
    transition: var(--transition);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* Admin bar adjustment */
body.admin-bar .site-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-nav {
        top: 46px;
    }
}

/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.hero {
    min-height: calc(90vh - var(--nav-height));
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--light-gray) 0%, #E8FFF9 50%, #F0F4FF 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    margin-bottom: 20px;
}

.hero-content .highlight {
    color: var(--mint);
    position: relative;
}

.hero-tagline {
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-field {
    position: relative;
    width: 100%;
    height: 350px;
}

.floating-emoji {
    position: absolute;
    bottom: -20px;
    left: var(--x, 50%);
    font-size: 2.2rem;
    animation: float-up 7s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
        transform: translateY(-30px) rotate(5deg) scale(1);
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-380px) rotate(15deg) scale(0.9);
        opacity: 0;
    }
}

/* ==========================================================================
   8. Grade Selector
   ========================================================================== */

.grades {
    background: var(--light-gray);
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grade-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border-top: 4px solid var(--mint);
    position: relative;
    overflow: hidden;
}

.grade-card:nth-child(2) {
    border-top-color: var(--ocean-light);
}

.grade-card:nth-child(3) {
    border-top-color: var(--yellow);
}

.grade-card:nth-child(4) {
    border-top-color: #FF6B6B;
}

.grade-card:nth-child(5) {
    border-top-color: #A29BFE;
}

.grade-card:nth-child(6) {
    border-top-color: #FD79A8;
}

.grade-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.grade-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.grade-card h3 {
    margin-bottom: 4px;
    color: var(--ocean);
}

.grade-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   9. Topics Section
   ========================================================================== */

.topics {
    background: var(--white);
}

.topics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.topic-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--medium-gray);
    transition: var(--transition);
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.topic-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
    background: var(--light-gray);
}

.topic-card:nth-child(1) .topic-icon { background: #E8FFF9; }
.topic-card:nth-child(2) .topic-icon { background: #E8F4FD; }
.topic-card:nth-child(3) .topic-icon { background: #FFF9E8; }
.topic-card:nth-child(4) .topic-icon { background: #FFE8E8; }
.topic-card:nth-child(5) .topic-icon { background: #F0E8FF; }
.topic-card:nth-child(6) .topic-icon { background: #E8FFE8; }

.topic-card h3 {
    margin-bottom: 8px;
}

.topic-card p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.grade-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--light-gray);
    color: var(--ocean);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
}

/* ==========================================================================
   10. How It Works
   ========================================================================== */

.how-it-works {
    background: var(--light-gray);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ocean);
    color: var(--white);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    font-size: 0.95rem;
    max-width: 220px;
    margin: 0 auto;
}

/* ==========================================================================
   11. Stats Bar
   ========================================================================== */

.stats-bar {
    background: linear-gradient(135deg, var(--ocean) 0%, var(--ocean-light) 50%, var(--mint-dark) 100%);
    padding: 48px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--white);
    line-height: 1.2;
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 4px;
}

/* ==========================================================================
   12. Testimonial
   ========================================================================== */

.testimonial {
    background: var(--white);
}

.testimonial-quote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-top: 40px;
}

.quote-mark {
    font-family: 'Nunito', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: var(--mint);
    opacity: 0.25;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
}

.testimonial-quote p {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 24px;
}

.testimonial-quote footer {
    margin-top: 16px;
}

.testimonial-quote cite {
    font-style: normal;
}

.testimonial-quote cite strong {
    display: block;
    color: var(--ocean);
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
}

.testimonial-quote cite span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ==========================================================================
   13. CTA Section
   ========================================================================== */

.cta-section {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean) 60%, var(--ocean-light) 100%);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 16px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 32px;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer {
    background: var(--footer-bg);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.footer-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    display: block;
    margin-bottom: 12px;
}

.footer-logo span {
    font-weight: 600;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-col h4 {
    color: var(--white);
    font-family: 'Nunito', sans-serif;
    margin-bottom: 16px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--mint);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ==========================================================================
   15. Scroll Reveal Animations
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ==========================================================================
   16. Responsive — Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }

    .section-header {
        margin-bottom: 56px;
    }

    /* Nav: show everything */
    .nav-toggle {
        display: none;
    }

    /* Hero: two columns */
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Grades: 3 columns */
    .grades-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    /* Topics: 2 columns */
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    /* Steps: 2 columns */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    /* Stats: 4 columns */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Footer: 2 columns */
    .footer-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   17. Responsive — Desktop (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    /* Hero: bigger gap */
    .hero-grid {
        gap: 64px;
    }

    .hero-content {
        max-width: 560px;
    }

    .emoji-field {
        height: 420px;
    }

    .floating-emoji {
        font-size: 2.8rem;
    }

    /* Grades: 6 columns on wide desktop */
    .grades-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Topics: 3 columns */
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    /* Steps: 4 columns with connecting lines */
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 24px;
        right: -12px;
        width: calc(100% - 72px);
        height: 2px;
        background: repeating-linear-gradient(
            90deg,
            var(--mint) 0px,
            var(--mint) 6px,
            transparent 6px,
            transparent 12px
        );
        transform: translateX(100%);
    }

    /* Footer: 4 columns */
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 48px;
    }
}

/* ==========================================================================
   18. Mobile Navigation (below 768px)
   ========================================================================== */

@media (max-width: 767px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 0 24px;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    .nav-menu.open {
        max-height: 300px;
        opacity: 1;
        padding: 16px 24px;
    }

    .nav-menu a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--medium-gray);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-cta.open {
        display: inline-flex;
        position: absolute;
        top: calc(var(--nav-height) + 200px);
        left: 24px;
        right: 24px;
        justify-content: center;
    }

    /* Hero adjustments */
    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-visual {
        min-height: 200px;
    }

    .emoji-field {
        height: 200px;
    }

    .floating-emoji {
        font-size: 1.8rem;
    }

    /* Section spacing */
    .section {
        padding: 56px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    /* Stats smaller text */
    .stats-bar {
        padding: 40px 0;
    }
}
