/* ==========================================================================
   Knowledge Quill — Premium Colorful Design System v3
   ========================================================================== */

:root {
    --bg-base: #faf8ff;
    --bg-surface: #ffffff;
    --bg-surface-2: #f3f0ff;
    --bg-dark: #0a0618;
    --border: rgba(121, 40, 202, 0.12);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-on-dark: #e2e8f0;

    --purple: #7928ca;
    --purple-light: rgba(121, 40, 202, 0.12);
    --purple-mid: #9333ea;
    --pink: #ec4899;
    --yellow: #f59e0b;
    --orange: #f97316;
    --green: #10b981;
    --blue: #3b82f6;
    --cyan: #06b6d4;

    --grad-brand: linear-gradient(135deg, #7928ca 0%, #ec4899 50%, #f97316 100%);
    --grad-brand-2: linear-gradient(135deg, #3b82f6 0%, #7928ca 100%);
    --grad-orange: linear-gradient(135deg, #f97316, #f59e0b);
    --grad-green: linear-gradient(135deg, #10b981, #06b6d4);
    --grad-pink: linear-gradient(135deg, #ec4899, #7928ca);
    --grad-dark: linear-gradient(160deg, #0a0618 0%, #1a0a3e 100%);
    --grad-rainbow: linear-gradient(90deg, #7928ca, #ec4899, #f97316, #f59e0b, #10b981, #06b6d4, #3b82f6);

    --font-h: 'Poppins', sans-serif;
    --font-b: 'Nunito', sans-serif;

    /* Clay shadows — soft colored multi-layer */
    --clay-purple: 0 8px 0 0 rgba(90,20,170,0.45), 0 12px 30px rgba(121,40,202,0.25);
    --clay-pink:   0 8px 0 0 rgba(180,40,110,0.45), 0 12px 30px rgba(236,72,153,0.25);
    --clay-orange: 0 8px 0 0 rgba(200,80,10,0.4),  0 12px 30px rgba(249,115,22,0.25);
    --clay-green:  0 8px 0 0 rgba(5,130,90,0.4),   0 12px 30px rgba(16,185,129,0.25);
    --clay-blue:   0 8px 0 0 rgba(30,80,200,0.4),  0 12px 30px rgba(59,130,246,0.25);
    --clay-yellow: 0 8px 0 0 rgba(160,110,0,0.4),  0 12px 30px rgba(245,158,11,0.25);
    --clay-white:  0 8px 0 0 rgba(150,120,200,0.2), 0 12px 30px rgba(121,40,202,0.12);

    --r-sm: 8px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(121,40,202,0.08);
    --shadow-md: 0 8px 24px rgba(121,40,202,0.12);
    --shadow-lg: 0 20px 40px rgba(121,40,202,0.15);
    --shadow-xl: 0 40px 80px rgba(121,40,202,0.18);
    --shadow-purple: 0 12px 40px rgba(121, 40, 202, 0.35);
    --shadow-pink: 0 12px 40px rgba(236, 72, 153, 0.3);
    --shadow-orange: 0 12px 40px rgba(249, 115, 22, 0.3);
    --shadow-green: 0 12px 40px rgba(16, 185, 129, 0.3);
}

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

body {
    font-family: var(--font-b);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 500;
}

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-h);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-weight: 800;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ==========================================================================
   Announcement Bar
   ========================================================================== */
.announcement-bar {
    background: var(--grad-brand);
    color: white;
    padding: 0.65rem 0;
    overflow: hidden;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(121,40,202,0.4);
}

.marquee-wrap {
    display: flex;
    overflow: hidden;
    user-select: none;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 3rem;
    animation: marquee-scroll 25s linear infinite;
    white-space: nowrap;
    flex-shrink: 0;
    padding-right: 3rem;
}

.marquee-wrap:hover .marquee-group {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #cbd5e1;
}

.m-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 1px 8px;
    border-radius: var(--r-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid transparent;
    background-clip: padding-box;
    transition: box-shadow 0.3s ease;
    border-image: var(--grad-rainbow) 1;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo img {
    height: 52px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--r-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--purple);
    background: var(--purple-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-login {
    padding: 0.5rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--r-sm);
    transition: all 0.2s ease;
}

.nav-login:hover { color: var(--purple); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transform: translateY(-100%);
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}

.mobile-drawer.open {
    transform: translateY(0);
}

.mobile-drawer a {
    font-family: var(--font-h);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.mobile-drawer a:hover { color: var(--purple); }

.drawer-close {
    position: absolute;
    top: 1.5rem;
    right: 5%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
/* ==========================================================================
   Clay Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--r-full);
    font-family: var(--font-b);
    font-weight: 800;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.18s cubic-bezier(0.16,1,0.3,1);
    white-space: nowrap;
    letter-spacing: 0.01em;
    position: relative;
}

.btn-primary {
    background: linear-gradient(160deg, #9b5fe4 0%, #7928ca 40%, #c026d3 100%);
    color: white;
    padding: 0.85rem 2rem;
    font-size: 0.97rem;
    box-shadow: var(--clay-purple);
    transform: translateY(-4px);
}

.btn-primary:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 0 0 rgba(90,20,170,0.45), 0 18px 40px rgba(121,40,202,0.3);
    color: white;
}

.btn-primary:active {
    transform: translateY(0px);
    box-shadow: 0 2px 0 0 rgba(90,20,170,0.45), 0 4px 12px rgba(121,40,202,0.2);
}

.btn-outline {
    background: white;
    color: var(--purple);
    padding: 0.85rem 2rem;
    font-size: 0.97rem;
    border: 2.5px solid rgba(121,40,202,0.25);
    box-shadow: var(--clay-white);
    transform: translateY(-4px);
}

.btn-outline:hover {
    border-color: var(--purple);
    color: var(--purple);
    transform: translateY(-7px);
    box-shadow: 0 10px 0 0 rgba(150,120,200,0.25), 0 16px 30px rgba(121,40,202,0.15);
}

.btn-outline:active {
    transform: translateY(0px);
    box-shadow: 0 1px 0 0 rgba(150,120,200,0.2);
}

.btn-lg {
    padding: 1.1rem 2.75rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section {
    padding: 5rem 5% 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #fdfaff 0%, #f5f0ff 40%, #fdf0ff 70%, #fff5f0 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236,72,153,0.12) 0%, rgba(121,40,202,0.08) 50%, transparent 70%);
    pointer-events: none;
    animation: pulse-bg 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(6,182,212,0.06) 50%, transparent 70%);
    pointer-events: none;
    animation: pulse-bg 10s ease-in-out infinite reverse;
}

@keyframes pulse-bg {
    0%,100% { transform: scale(1) translate(0,0); opacity: 1; }
    50% { transform: scale(1.15) translate(2%, 3%); opacity: 0.7; }
}

.hero-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 4rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    color: white;
    padding: 0.55rem 1.4rem;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.75rem;
    box-shadow: var(--clay-orange);
    transform: translateY(-3px);
    font-family: var(--font-b);
}

.hero-h1 {
    font-size: clamp(2.8rem, 5vw, 5.5rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-h1 .line2 {
    background: linear-gradient(135deg, #7928ca 0%, #ec4899 40%, #f97316 80%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.trust-avatars {
    display: flex;
    margin-right: 0.5rem;
}

.trust-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    font-size: 1.1rem;
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-avatar:first-child { margin-left: 0; }

.trust-text strong { font-size: 0.95rem; display: block; }
.trust-text span { font-size: 0.8rem; color: var(--text-muted); }

/* IDE Visual */
.hero-visual {
    position: relative;
}

.ide-window {
    background: #0f172a;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.08);
    transform: perspective(1000px) rotateY(-4deg) rotateX(1deg);
    transition: transform 0.5s ease;
}

.ide-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.ide-bar {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ide-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ef4444; }
.dot-y { background: #f59e0b; }
.dot-g { background: #10b981; }

.ide-tab {
    margin-left: 1rem;
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-family: monospace;
}

.ide-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ide-code {
    padding: 2rem 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 2;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.ide-code .kw { color: #c678dd; }
.ide-code .fn { color: #61afef; }
.ide-code .str { color: #98c379; }
.ide-code .val { color: #e5c07b; }
.ide-code .ret { color: #56b6c2; }
.ide-code .cm { color: #5c6370; }

.ide-preview {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.preview-card {
    width: 100%;
    background: white;
    border-radius: var(--r-md);
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

.preview-bar {
    height: 10px;
    background: linear-gradient(90deg, #7928ca, #3b82f6);
    border-radius: 5px;
    margin-bottom: 0.75rem;
}

.preview-lines {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.preview-line {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
}

.preview-line.short { width: 60%; }

/* Tech badges */
.tech-badge {
    position: absolute;
    background: white;
    border-radius: var(--r-full);
    padding: 0.6rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: var(--font-b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    border: 2px solid rgba(121,40,202,0.1);
}

.tb-1 { top: 12%; left: -8%; box-shadow: var(--clay-orange); transform: translateY(-3px) rotate(-3deg); animation: float1 5s ease-in-out infinite; }
.tb-2 { bottom: 15%; left: -5%; box-shadow: var(--clay-purple); transform: translateY(-3px) rotate(2deg); animation: float2 6s ease-in-out infinite; }
.tb-3 { top: 30%; right: -8%; box-shadow: var(--clay-blue);   transform: translateY(-3px) rotate(-2deg); animation: float3 7s ease-in-out infinite; }
.tb-4 { bottom: 25%; right: -4%; box-shadow: var(--clay-green);  transform: translateY(-3px) rotate(3deg); animation: float1 5.5s ease-in-out infinite reverse; }

@keyframes float1 { 0%,100% { transform: translateY(-3px) rotate(-3deg); } 50% { transform: translateY(-15px) rotate(-1deg); } }
@keyframes float2 { 0%,100% { transform: translateY(-3px) rotate(2deg); } 50% { transform: translateY(-18px) rotate(0.5deg); } }
@keyframes float3 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==========================================================================
   Metrics Strip
   ========================================================================== */
.metrics-section {
    background: linear-gradient(135deg, #0a0618 0%, #1a0a3e 50%, #0a1628 100%);
    position: relative;
    overflow: hidden;
}

.metrics-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.metrics-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.5rem 5%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.metric-item {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--r-lg);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-4px);
}

.metric-item:not(:last-child)::after {
    display: none;
}

.metric-item:nth-child(1) .metric-num { background: linear-gradient(135deg, #7928ca, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.metric-item:nth-child(2) .metric-num { background: linear-gradient(135deg, #f97316, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.metric-item:nth-child(3) .metric-num { background: linear-gradient(135deg, #10b981, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.metric-item:nth-child(4) .metric-num { background: linear-gradient(135deg, #3b82f6, #7928ca); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.metric-num {
    font-family: var(--font-h);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.metric-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Awards & Accolades
   ========================================================================== */
.awards-section {
    padding: 5rem 0;
    background: linear-gradient(160deg, #fdf5ff 0%, #fff0fb 50%, #f0f5ff 100%);
    overflow: hidden;
    position: relative;
}

.awards-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-rainbow);
}

.awards-header {
    text-align: center;
    margin-bottom: 3.5rem;
    padding: 0 5%;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-b);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--purple);
    margin-bottom: 1rem;
    background: var(--purple-light);
    padding: 0.4rem 1.1rem;
    border-radius: var(--r-full);
    border: 1.5px solid rgba(121,40,202,0.15);
}

/* Remove old line decorators — eyebrow is now a pill badge */

.section-h2 {
    font-size: clamp(1.9rem, 3vw, 3.2rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.75;
    font-weight: 500;
}

.awards-track-wrap {
    overflow: hidden;
    padding: 0.5rem 0;
    -webkit-mask: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    mask: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}

.awards-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: awards-scroll 30s linear infinite;
}

.awards-track:hover {
    animation-play-state: paused;
}

@keyframes awards-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.award-card {
    background: white;
    border-radius: 24px;
    padding: 2rem 2rem;
    width: 270px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    cursor: default;
    border: 2px solid rgba(255,255,255,0.8);
}

.award-card:nth-child(1), .award-card:nth-child(6) { box-shadow: var(--clay-purple); transform: translateY(-4px) rotate(-1deg); }
.award-card:nth-child(2), .award-card:nth-child(7) { box-shadow: var(--clay-pink);   transform: translateY(-4px) rotate(1.5deg); }
.award-card:nth-child(3), .award-card:nth-child(8) { box-shadow: var(--clay-orange); transform: translateY(-4px) rotate(-0.5deg); }
.award-card:nth-child(4), .award-card:nth-child(9) { box-shadow: var(--clay-green);  transform: translateY(-4px) rotate(1deg); }
.award-card:nth-child(5), .award-card:nth-child(10){ box-shadow: var(--clay-blue);   transform: translateY(-4px) rotate(-1.5deg); }

.award-card:hover {
    transform: translateY(-10px) rotate(0deg) scale(1.04);
}

.award-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    background: linear-gradient(135deg, rgba(121,40,202,0.12), rgba(236,72,153,0.12));
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.6);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.award-card:hover .award-icon-wrap {
    transform: scale(1.15) rotate(-5deg);
}

.award-from {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.award-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ==========================================================================
   How It Works
   ========================================================================== */
.how-section {
    padding: 6rem 5%;
    background: linear-gradient(160deg, #f0f5ff 0%, #faf8ff 50%, #fff0f5 100%);
    position: relative;
}

.how-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-brand-2);
}

.how-grid {
    max-width: 1280px;
    margin: 3.5rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-card {
    background: white;
    border: 2.5px solid rgba(121,40,202,0.08);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--clay-white);
    transform: translateY(-3px);
}

.step-card:hover {
    transform: translateY(-6px);
}

.step-card.active {
    background: linear-gradient(135deg, #fdfaff, #fff0fb);
    border-color: rgba(121,40,202,0.25);
    box-shadow: var(--clay-purple);
    transform: translateY(-5px);
}

.step-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f0ff, #fce7f3);
    border: 1.5px solid rgba(121,40,202,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--purple);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-card.active .step-num {
    background: var(--grad-brand);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-purple);
}

.step-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    flex: 1;
    font-family: var(--font-b);
}

.step-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-left: calc(36px + 1rem);
}

.step-card.active .step-body {
    max-height: 100px;
    margin-top: 0.75rem;
    opacity: 1;
}

.step-visual-panel {
    border-radius: var(--r-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    background: var(--grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    transition: background 0.5s ease;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.play-arrow {
    width: 0; height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid white;
    margin-left: 4px;
}

.step-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border-radius: var(--r-md);
    padding: 0.75rem 1.25rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ==========================================================================
   Course Discovery
   ========================================================================== */
.courses-section {
    padding: 6rem 5%;
    background: white;
    position: relative;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-orange);
}

.courses-header {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 3rem;
}

.grade-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    margin-top: 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.grade-pill:hover { border-color: var(--purple); }

.grade-pill select {
    border: none; outline: none;
    font-weight: 700;
    color: var(--purple);
    cursor: pointer;
    background: transparent;
    font-size: 0.9rem;
}

/* ==========================================================================
   BrightCHAMPS-style Clay Grid
   ========================================================================== */
.bc-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.bc-card {
    border-radius: var(--r-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
    min-height: 220px;
    color: white;
    flex: 1 1 300px;
    max-width: 400px;
}

/* Clay effects */
.bc-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.bc-card-top {
    position: relative;
    z-index: 2;
}

.bc-title {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.bc-sub {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
    margin-bottom: 1rem;
}

.bc-enrolled {
    display: inline-flex;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: var(--r-full);
    font-size: 0.75rem;
    font-weight: 800;
}

.bc-img {
    font-size: 4rem;
    align-self: flex-end;
    margin-top: auto;
    z-index: 2;
    transition: transform 0.3s ease;
}

.bc-card:hover .bc-img {
    transform: scale(1.1) rotate(-5deg);
}

/* Color Variants */
.bc-cyan { background: var(--cyan); box-shadow: var(--clay-blue); }
.bc-orange { background: var(--orange); box-shadow: var(--clay-orange); }
.bc-green { background: var(--green); box-shadow: var(--clay-green); }
.bc-purple { background: var(--purple); box-shadow: var(--clay-purple); }
.bc-yellow { background: var(--yellow); box-shadow: var(--clay-yellow); color: var(--text-primary); }
.bc-coral { background: #FF7043; box-shadow: var(--clay-pink); }
.bc-peach { background: #FFCCBC; box-shadow: var(--clay-white); border: 2.5px solid rgba(255,255,255,0.9); }

.bc-yellow .bc-enrolled, .bc-peach .bc-enrolled {
    background: rgba(0,0,0,0.05);
}

.bc-wide {
    grid-column: span 2;
}

.bc-dark {
    color: var(--text-primary);
}

.bc-view-all-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.bc-view-all-dots span {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.bc-arrow-icon {
    width: 40px;
    height: 40px;
    background: var(--purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--clay-purple);
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.bc-card:hover .bc-arrow-icon {
    transform: translateX(5px);
}

/* ==========================================================================
   Learning Philosophy
   ========================================================================== */
.philosophy-section {
    padding: 6rem 5%;
    background: linear-gradient(160deg, #0a0618 0%, #1a0a3e 40%, #0f1a3e 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.philosophy-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121,40,202,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.philosophy-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.philosophy-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.philo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3.5rem;
}

.philo-text .section-h2 { color: white; }
.philo-text .section-sub { color: #94a3b8; }

.philo-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.compare-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-lg);
    padding: 1.75rem;
}

.compare-card.kq {
    background: var(--grad-brand);
    border-color: transparent;
    box-shadow: 0 10px 0 0 rgba(90,20,170,0.4), 0 20px 50px rgba(121,40,202,0.35);
    transform: translateY(-6px);
}

.compare-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.25rem;
}

.compare-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compare-item {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compare-item.kq-item {
    color: white;
}

.compare-item span.num {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    width: 20px;
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-section {
    padding: 6rem 5%;
    background: linear-gradient(160deg, #fff5f0 0%, #faf8ff 50%, #f0fff8 100%);
    position: relative;
}

.projects-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-green);
}

.projects-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.project-feature {
    background: linear-gradient(160deg, #0a0618 0%, #1a0a3e 100%);
    border-radius: var(--r-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 3.5rem;
    box-shadow: 0 40px 80px rgba(121,40,202,0.3), 0 0 0 1px rgba(121,40,202,0.2);
    transition: transform 0.4s ease;
}

.project-feature:hover { transform: translateY(-6px); }

.project-info {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e2e8f0;
    padding: 0.3rem 1rem;
    border-radius: var(--r-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-h3 {
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: white;
    font-weight: 800;
}

.project-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
}

.project-visual {
    background: linear-gradient(135deg, #1a0a3e, #0f1a3e, #0a1628);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.project-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(121,40,202,0.15) 0%, transparent 70%);
}

.project-mockup {
    width: 100%;
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 0 0 rgba(30,80,200,0.4), 0 30px 60px rgba(59,130,246,0.3);
    border: 2.5px solid rgba(255,255,255,0.9);
}

.mock-header {
    height: 12px;
    background: linear-gradient(90deg, #7928ca, #3b82f6);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.mock-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mock-card { height: 80px; background: var(--bg-base); border-radius: var(--r-md); }

/* ==========================================================================
   Enquiry Form
   ========================================================================== */
.enquiry-section {
    padding: 6rem 5%;
    background: linear-gradient(160deg, #fdf5ff 0%, #fff0fb 50%, #f0f5ff 100%);
    position: relative;
}

.enquiry-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-pink);
}

.enquiry-inner {
    max-width: 780px;
    margin: 0 auto;
}

.enquiry-card {
    background: white;
    border: 3px solid rgba(255,255,255,0.9);
    border-radius: 32px;
    padding: 4rem;
    box-shadow: var(--clay-purple);
    position: relative;
    overflow: hidden;
    transform: translateY(-5px);
}

.enquiry-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--grad-brand);
    border-radius: 32px 32px 0 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-input {
    padding: 1rem 1.25rem;
    border: 2.5px solid rgba(121,40,202,0.12);
    border-radius: 14px;
    background: #fdfaff;
    color: var(--text-primary);
    font-size: 0.97rem;
    font-family: var(--font-b);
    font-weight: 600;
    outline: none;
    transition: all 0.25s ease;
    width: 100%;
    box-shadow: inset 0 2px 6px rgba(121,40,202,0.06);
}

.form-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(121,40,202,0.12), 0 0 20px rgba(236,72,153,0.1);
    background: #fdfaff;
}

.form-submit {
    width: 100%;
    padding: 1.1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-b);
}

#form-message {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--r-md);
}

#form-message.success { background: rgba(34,197,94,0.1); color: #16a34a; }
#form-message.error { background: rgba(239,68,68,0.1); color: #dc2626; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
    padding: 7rem 5%;
    background: linear-gradient(135deg, #4a0080 0%, #7928ca 25%, #ec4899 60%, #f97316 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: cta-gradient 6s ease infinite;
}

@keyframes cta-gradient {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.25rem;
}

.cta-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-white {
    background: white;
    color: var(--purple);
    box-shadow: var(--clay-white);
    transform: translateY(-4px);
    border: 2.5px solid rgba(255,255,255,0.9);
}

.btn-white:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 0 0 rgba(150,120,200,0.25), 0 20px 40px rgba(121,40,202,0.2);
    color: var(--purple);
}

.btn-white:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 0 rgba(150,120,200,0.2);
}

.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2.5px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(10px);
    transform: translateY(-4px);
    font-weight: 800;
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-8px);
    color: white;
    box-shadow: 0 8px 0 0 rgba(0,0,0,0.15), 0 16px 30px rgba(0,0,0,0.2);
}

.btn-ghost:active {
    transform: translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: linear-gradient(160deg, #080412 0%, #0a0618 50%, #080f20 100%);
    color: var(--text-on-dark);
    padding: 5rem 5% 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-rainbow);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand img { height: 46px; margin-bottom: 1.25rem; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand p { font-size: 0.9rem; color: #64748b; line-height: 1.7; max-width: 260px; }

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #e2e8f0;
    margin-bottom: 1.25rem;
}

.footer-col li + li { margin-top: 0.75rem; }
.footer-col a { font-size: 0.88rem; color: #64748b; transition: color 0.2s ease; }
.footer-col a:hover { color: white; }

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #475569;
}

.footer-bottom a { color: #475569; transition: color 0.2s ease; }
.footer-bottom a:hover { color: white; }

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

.reveal.visible {
    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; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .hero-sub { max-width: 100%; }
    .hero-h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
    .ide-window { transform: none; }
    .philo-grid { grid-template-columns: 1fr; }
    .project-feature { grid-template-columns: 1fr; }
    .project-visual { min-height: 260px; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
    .metrics-inner { grid-template-columns: repeat(2, 1fr); }
    .how-grid { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .hamburger { display: flex; }
    .hero-section { padding: 3rem 5%; }
    .ide-body { grid-template-columns: 1fr; }
    .ide-preview { display: none; }
    .philo-compare { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .metrics-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .course-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .enquiry-card { padding: 2rem; }
    .project-info { padding: 2.5rem 2rem; }
    .tb-1, .tb-2, .tb-3, .tb-4 { display: none; }
}

@media (max-width: 480px) {
    .hero-h1 { font-size: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .metrics-inner { grid-template-columns: 1fr 1fr; }
    .metric-item::after { display: none; }
}

/* Custom Float Animations for Hero Cards */
@keyframes float-bot {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(-5deg) translateY(-15px); }
}
@keyframes float-ai {
    0%, 100% { transform: rotate(8deg) translateY(0); }
    50% { transform: rotate(8deg) translateY(-12px); }
}
@keyframes float-code {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-10px); }
}
@keyframes float-math {
    0%, 100% { transform: rotate(6deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-18px); }
}
@keyframes float-star {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
