@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Schoolbell&display=swap');

:root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #666666;
    --border: #e5e5e5;
    --card-bg: #fafafa;
    --accent: #f0f0f0;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

#trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998; /* Below main cursor */
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    /* Hide default cursor only if on desktop */
}

@media (pointer: fine) {
    html {
        cursor: none !important;
    }
}

/* ===== Smooth Cursor ===== */
#cursor {
    width: 12px;
    height: 12px;
    background-color: #000000;
    border: 1.5px solid #ffffff; /* High contrast border ensures visibility on black bg */
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    transform: translate(-50%, -50%);
    display: block;
    will-change: transform;
}

#cursor.active {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.1);
    border-color: #000000;
    backdrop-filter: blur(2px);
}

@media (pointer: coarse) {
    #cursor { display: none; }
}

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.04em;
    text-decoration: none;
    color: var(--fg);
}

.logo img {
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--fg);
}

/* ===== Hero ===== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 80px;
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.95;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.char {
    display: inline-block;
    font-family: 'Schoolbell', cursive;
    font-weight: 400;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(5px);
    opacity: 0.8;
}

.char.active {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    transform: translateY(0);
    opacity: 1;
}

.morphing-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto 40px;
    height: 60px;
    text-align: center;
    filter: url(#threshold) blur(0.6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.morph-text {
    position: absolute;
    display: inline-block;
    width: 100%;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

#morph-text-1 {
    font-family: 'Schoolbell', cursive;
    font-weight: 400;
}

#morph-text-2 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

svg#filters {
    display: none;
}

.hero p {
    font-size: 20px;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ===== Hero Video ===== */
.video-wrapper {
    position: relative;
    max-width: 900px;
    margin: 40px auto 0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.video-wrapper:hover {
    transform: scale(1.02);
}

.video-thumbnail {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    transition: background 0.3s;
}

.video-wrapper:hover .play-overlay {
    background: rgba(0,0,0,0.1);
}

.play-button {
    width: 64px;
    height: 64px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.video-wrapper:hover .play-button {
    transform: scale(1.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.modal-content {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    transform: scale(0.5);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active { display: flex; }
.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Marquee / Testimonials ===== */
.marquee-container {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 16px;
    padding: 10px 0;
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    min-width: 100%;
}

.marquee-content.scroll {
    animation: scroll 30s linear infinite;
}

.marquee-content.reverse {
    animation: scroll 30s linear infinite reverse;
}

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

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

.review-card {
    width: 280px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s, border-color 0.2s;
}

.review-card:hover {
    background: var(--accent);
    border-color: #d1d1d1;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.reviewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
}

.reviewer-name {
    font-size: 14px;
    font-weight: 600;
}

.reviewer-user {
    font-size: 12px;
    color: var(--muted);
}

.review-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: #444;
}

.marquee-fade-left, .marquee-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    z-index: 2;
    pointer-events: none;
}

.marquee-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}

.marquee-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

/* ===== Bento Grid ===== */
.bento-section {
    padding: 60px 0 120px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 320px);
    gap: 16px;
    width: 100%;
}

.bento-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.bento-card.large {
    grid-column: span 2;
}

.bento-card.tall {
    grid-row: span 2;
}

.bento-card .icon {
    position: absolute;
    top: 32px;
    left: 32px;
    width: 48px;
    height: 48px;
    background: var(--fg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-card .icon svg {
    width: 24px;
    height: 24px;
    color: var(--bg);
}

.bento-card .content {
    z-index: 2;
}

.bento-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.bento-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    max-width: 240px;
}

.bento-card .visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.bento-card:hover .visual {
    opacity: 0.15;
}

/* ===== Footer ===== */
footer {
    padding: 60px 0 100px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-copy {
    color: var(--muted);
    font-size: 14px;
}

/* ===== Pricing Section (Shadcn Style) ===== */
.pricing-section {
    padding: 120px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.pricing-header {
    margin-bottom: 64px;
}

.pricing-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--fg);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: 40px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.pricing-card.pro {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.pro-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffffff;
    color: #000000;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 24px 0;
}

.pricing-card .price span {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

.pricing-card.pro .price span {
    color: rgba(255, 255, 255, 0.5);
}

.feature-list {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    color: #444;
}

.pricing-card.pro .feature-item {
    color: rgba(255, 255, 255, 0.7);
}

.feature-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.feature-item.not-included {
    color: #999;
    text-decoration: line-through;
    opacity: 0.6;
}

.pricing-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.2s;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--fg);
}

.btn-outline:hover {
    background: var(--accent);
}

.btn-solid {
    background: #ffffff;
    color: #000000;
}

.btn-solid:hover {
    opacity: 0.9;
}

/* Student Card Styles */
.pricing-student-container {
    max-width: 900px;
    margin: 32px auto 0;
}

.student-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 40px;
}

.student-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-price {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.student-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.student-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.student-features {
    display: flex;
    gap: 12px;
}

.feat-tag {
    font-size: 11px;
    font-weight: 600;
    background: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    color: #444;
}

@media (max-width: 768px) {
    .pricing-student-container {
        padding: 0 20px;
    }
    .student-info, .student-footer {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .student-features {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: 100px 0 140px;
    max-width: 700px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 60px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    text-align: left;
}

.faq-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.faq-item p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* ===== Responsive Design ===== */

/* Tablets & Small Laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    
    .hero h1 {
        font-size: 64px;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .bento-card.large, .bento-card.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    header {
        padding: 24px 0;
    }
    
    .nav-links {
        display: none; /* Simplification for mobile */
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 48px;
        letter-spacing: -0.04em;
    }
    
    .morph-text {
        font-size: 32px;
    }
    
    .morphing-container {
        height: 50px;
        margin: 10px auto 30px;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        grid-template-rows: auto;
    }
    
    .bento-card {
        padding: 24px;
        min-height: 240px;
    }
    
    .bento-card h3 {
        font-size: 18px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    
    .pricing-card {
        padding: 30px;
    }
    
    .pricing-card .price {
        font-size: 40px;
    }
    
    .faq-section {
        padding: 60px 24px;
    }
    
    .faq-header h2 {
        font-size: 32px !important;
    }
    
    .marquee-fade-left, .marquee-fade-right {
        width: 80px;
    }
    
    .review-card {
        width: 240px;
    }

    #trail-canvas {
        display: none; /* Disable trails on mobile for performance and UX */
    }

    /* Adjust Rough Notation highlights for wrapped text */
    #highlight-vocabulary, #highlight-recall {
        display: inline;
    }
}
