@font-face {
    font-family: 'Li Ador Noirrit';
    src: url('../assets/fonts/LiAdorNoirrit-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Li Ador Noirrit';
    src: url('../assets/fonts/LiAdorNoirrit-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Li Ador Noirrit';
    src: url('../assets/fonts/LiAdorNoirrit-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Li Ador Noirrit', sans-serif;
}

.square-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 64px 64px;
}

.hero-grid {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 70px 70px;
}

.card-leaf-bg {
    background-image: radial-gradient(rgba(22, 163, 74, 0.05) 1px, transparent 1px);
    background-size: 14px 14px;
}

.btn-gradient {
    background: linear-gradient(to bottom, #34c759 0%, #28a745 22%, #1e8f3a 55%, #146b2e 82%, #0f5524 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-gradient:hover {
    filter: brightness(1.06);
    transform: scale(1.02);
}

.btn-gradient:active {
    filter: brightness(0.96);
    transform: scale(0.98);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-rev {
    to {
        transform: rotate(-360deg);
    }
}

.gear-slow {
    animation: spin 18s linear infinite;
    transform-origin: 50% 50%;
}

.gear-rev {
    animation: spin-rev 14s linear infinite;
    transform-origin: 50% 50%;
}

.gear-fast {
    animation: spin 9s linear infinite;
    transform-origin: 50% 50%;
}

.dial-window {
    background: linear-gradient(145deg, #f6d68a, #d99a2b 55%, #a96c12);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(120, 70, 0, 0.45);
}

.dial-strip {
    animation: dialTick 6s steps(10) infinite;
}

.dial-strip span {
    height: 3.5rem;
    line-height: 3.5rem;
}

@keyframes dialTick {
    to {
        transform: translateY(-35rem);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    }

    50% {
        box-shadow: 0 16px 28px -4px rgba(22, 163, 74, 0.18);
    }
}

.animate-glow-4 {
    animation: glowPulse 4s ease-in-out infinite;
}

.animate-glow-5 {
    animation: glowPulse 5s ease-in-out infinite;
}

.animate-glow-45 {
    animation: glowPulse 4.5s ease-in-out infinite;
}

.animate-glow-35 {
    animation: glowPulse 3.5s ease-in-out infinite;
}

.code-snippet {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
    direction: ltr;
    text-align: left;
}

/* ── Scroll progress ── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 60;
    background: linear-gradient(to right, #16a34a, #22c55e, #f59e0b);
    transform-origin: left;
    transform: scaleX(0);
}

/* ── Sticky glass nav ── */
.site-header {
    transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(22, 163, 74, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #16a34a;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* ── Hero entrance ── */
.hero-enter {
    opacity: 0;
    transform: scale(0.97);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
}

body.site-ready .hero-enter {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.hero-enter-d1 {
    transition-delay: 0.08s;
}

.hero-enter-d2 {
    transition-delay: 0.18s;
}

.hero-enter-d3 {
    transition-delay: 0.28s;
}

.hero-enter-d4 {
    transition-delay: 0.38s;
}

.hero-enter-d5 {
    transition-delay: 0.52s;
}

.hero-visual {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(8px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s, filter 0.9s ease 0.35s;
}

body.site-ready .hero-visual {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(5px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.reveal-left {
    opacity: 0;
    transform: scale(0.96) translateX(-12px);
    filter: blur(4px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(6px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* ── Cards ── */
.interactive-card {
    position: relative;
}

/* ── Marquee ── */
.marquee-wrap {
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-track {
    animation: marquee 28s linear infinite;
    width: max-content;
}

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

/* ── Why Babbage section ── */
.why-section {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 45%, #ffffff 100%);
}

.why-section-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 40% at 15% 20%, rgba(34, 197, 94, 0.12), transparent 70%),
        radial-gradient(ellipse 45% 35% at 85% 75%, rgba(245, 158, 11, 0.1), transparent 70%);
    animation: whyGlowDrift 10s ease-in-out infinite;
}

.why-section-glow-alt {
    background: radial-gradient(ellipse 40% 30% at 70% 30%, rgba(34, 197, 94, 0.08), transparent 70%);
    animation: whyGlowDriftAlt 12s ease-in-out infinite reverse;
}

@keyframes whyGlowDrift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.75;
        transform: scale(1.04);
    }
}

@keyframes whyGlowDriftAlt {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-2%, 3%);
    }
}

.why-narrative-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
    transform: translateX(-120%);
    animation: whyPanelShine 7s ease-in-out infinite;
    pointer-events: none;
}

.why-narrative-panel > :not(.why-blob) {
    position: relative;
    z-index: 1;
}

@keyframes whyPanelShine {

    0%,
    78%,
    100% {
        transform: translateX(-120%);
    }

    88% {
        transform: translateX(120%);
    }
}

.why-blob {
    animation: whyBlobFloat 8s ease-in-out infinite;
}

.why-blob-delay {
    animation-delay: -4s;
}

@keyframes whyBlobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-10px, 8px) scale(1.12);
    }
}

.why-chip-icon {
    position: relative;
    z-index: 1;
    animation: whyChipFloat 4.5s ease-in-out infinite;
}

@keyframes whyChipFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.why-badge-star {
    display: inline-block;
    animation: whyStarTwinkle 2.4s ease-in-out infinite;
}

@keyframes whyStarTwinkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.25) rotate(12deg);
        opacity: 0.85;
    }
}

.why-tag {
    opacity: 0;
    transform: translateY(10px);
}

.reveal-left.revealed .why-tag {
    animation: whyTagIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-left.revealed .why-tag:nth-child(1) {
    animation-delay: 0.35s;
}

.reveal-left.revealed .why-tag:nth-child(2) {
    animation-delay: 0.5s;
}

.reveal-left.revealed .why-tag:nth-child(3) {
    animation-delay: 0.65s;
}

@keyframes whyTagIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.why-benefit-card {
    display: flex;
    align-items: center;
    height: 100%;
    transition: background-color 0.25s ease;
}

.why-benefit-card:hover {
    background-color: rgba(240, 253, 244, 0.85);
}

.why-benefit-icon {
    flex-shrink: 0;
    align-self: center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.why-benefit-card.revealed .why-benefit-icon {
    animation: whyIconPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.why-benefit-card:nth-child(1).revealed .why-benefit-icon { animation-delay: 0.05s; }
.why-benefit-card:nth-child(2).revealed .why-benefit-icon { animation-delay: 0.1s; }
.why-benefit-card:nth-child(3).revealed .why-benefit-icon { animation-delay: 0.15s; }
.why-benefit-card:nth-child(4).revealed .why-benefit-icon { animation-delay: 0.2s; }
.why-benefit-card:nth-child(5).revealed .why-benefit-icon { animation-delay: 0.25s; }
.why-benefit-card:nth-child(6).revealed .why-benefit-icon { animation-delay: 0.3s; }
.why-benefit-card:nth-child(7).revealed .why-benefit-icon { animation-delay: 0.35s; }
.why-benefit-card:nth-child(8).revealed .why-benefit-icon { animation-delay: 0.4s; }
.why-benefit-card:nth-child(9).revealed .why-benefit-icon { animation-delay: 0.45s; }
.why-benefit-card:nth-child(10).revealed .why-benefit-icon { animation-delay: 0.5s; }
.why-benefit-card:nth-child(11).revealed .why-benefit-icon { animation-delay: 0.55s; }

@keyframes whyIconPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.why-benefit-card:hover .why-benefit-icon {
    transform: scale(1.1);
}

.why-benefit-card p {
    margin: 0;
    flex: 1;
    align-self: center;
}

/* ── Parent / educator message ── */
.parent-message-visual {
    position: relative;
}

.parent-message-illustration {
    display: block;
    animation: parentIllustrationFloat 5s ease-in-out infinite;
}

@keyframes parentIllustrationFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.parent-message-body {
    padding-top: 0.25rem;
}

.parent-message-paragraph {
    color: #4b5563;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.85;
}

.parent-message-paragraph + .parent-message-paragraph {
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .parent-message-paragraph {
        font-size: 1rem;
    }
}


/* ── Typing cursor ── */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #22c55e;
    margin-left: 1px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ── FAQ smooth accordion ── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.faq-answer.open {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
}

.faq-icon {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-btn {
    transition: color 0.2s ease;
}

.faq-btn:hover {
    color: #15803d;
}

/* ── CTA code terminal ── */
.code-terminal {
    animation: terminalGlow 4s ease-in-out infinite;
}

@keyframes terminalGlow {

    0%,
    100% {
        box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.35);
    }

    50% {
        box-shadow: 0 24px 48px -8px rgba(22, 163, 74, 0.35);
    }
}

.code-terminal::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 0.85rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(245, 158, 11, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ── Magnetic button hint ── */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.btn-shine:hover::after {
    transform: translateX(120%);
}

@media (prefers-reduced-motion: reduce) {

    .hero-enter,
    .hero-visual,
    .reveal,
    .reveal-left,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .marquee-track {
        animation: none;
    }

    .code-terminal {
        animation: none;
    }

    .gear-slow,
    .gear-rev,
    .gear-fast,
    .dial-strip {
        animation: none;
    }

    .why-section-glow,
    .why-section-glow-alt,
    .why-narrative-panel::after,
    .why-blob,
    .why-chip-icon,
    .why-badge-star,
    .why-benefit-card.revealed .why-benefit-icon {
        animation: none;
    }

    .why-tag {
        opacity: 1;
        transform: none;
    }

    .parent-message-illustration {
        animation: none;
    }
}

/* ── Course detail page ── */
.course-hero-light {
    background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 42%, #ecfdf5 78%, #f0fdf4 100%);
}

.course-soft-grid {
    background-image:
        linear-gradient(to right, rgba(22, 163, 74, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(22, 163, 74, 0.06) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 20%, black 20%, transparent 100%);
}

.course-soft-block {
    position: absolute;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.55), rgba(255, 255, 255, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.65);
    pointer-events: none;
}

.glass-pill {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 32px rgba(22, 163, 74, 0.08);
}

.glass-stat {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(22, 163, 74, 0.1);
}

.course-hero-image-wrap {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(220, 252, 231, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 50px rgba(22, 163, 74, 0.12);
}

.curriculum-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.curriculum-answer.open {
    max-height: 320px;
    opacity: 1;
    margin-top: 0.75rem;
}

.curriculum-item.open .faq-icon {
    transform: rotate(180deg);
}

/* ── Back to top ── */
#back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: linear-gradient(to bottom, #34c759 0%, #28a745 55%, #146b2e 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    filter: brightness(1.06);
}

/* ── Forms ── */
.form-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input,
.form-input option {
    color: #111827;
}

.form-input:invalid,
select.form-input:has(option[value=""]:checked) {
    color: #6b7280;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-input:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.form-textarea {
    min-height: 7rem;
    padding: 0.875rem 1rem;
    resize: vertical;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.instructor-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
}

.prose-page h2 {
    font-weight: 700;
    font-size: 1.375rem;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-page p,
.prose-page li {
    color: #4b5563;
    line-height: 1.8;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .prose-page p,
    .prose-page li {
        font-size: 1.0625rem;
    }
}

.prose-page ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.prose-page li + li {
    margin-top: 0.375rem;
}
