/* Mesi Words Kids - Web Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #3F51B5;
    --primary-dark: #283593;
    --primary-deep: #1A237E;
    --primary-light: #E8EAF6;
    --primary-soft: #C5CAE9;
    --secondary: #FFB300;
    --secondary-dark: #F57F17;
    --secondary-light: #FFF8E1;
    --accent-emerald: #10B981;
    --accent-coral: #FF7043;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --bg-light: #F4F7FC;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navbar */
header {
    background: linear-gradient(135deg, #1A237E 0%, #283593 50%, #3F51B5 100%);
    color: var(--white);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--white);
}

.logo-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    background: var(--secondary);
    color: #1A237E;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    margin-left: 6px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--primary-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.lang-selector {
    background-color: rgba(255, 255, 255, 0.18);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s;
}

.lang-selector:focus,
.lang-selector:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

.lang-selector option {
    background-color: var(--primary-deep);
    color: var(--white);
}

/* Tab Management */
.tab-content {
    display: none;
    flex: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 720px;
    margin: -1.8rem auto 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, #E8EAF6 0%, #F4F7FC 100%);
    padding: 4.5rem 1.5rem 3.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(63, 81, 181, 0.08);
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FFFFFF;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--primary-soft);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.1rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--primary-deep);
    letter-spacing: -0.03em;
}

.hero p.tagline {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-mascot-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.mascot-avatar {
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(63, 81, 181, 0.2));
    animation: floatMascot 4s ease-in-out infinite;
}

@keyframes floatMascot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-highlights {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.highlight-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.45rem 0.95rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2.2rem 1.8rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #EEF2F6;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.55;
    flex: 1;
}

/* Methods Section */
.method-block {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem;
    background-color: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
    align-items: center;
    border: 1px solid #EEF2F6;
}

.method-block:nth-child(even) {
    grid-template-columns: 1fr 1.15fr;
}

.method-block:nth-child(even) .method-desc {
    order: 2;
}

.method-block:nth-child(even) .method-visual {
    order: 1;
}

.method-desc h3 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-deep);
}

.method-desc p {
    color: var(--text-light);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.method-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.method-visual {
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    border-radius: 18px;
    padding: 1.75rem;
    border: 2px dashed var(--primary-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

/* Visual Demos */
.scissor-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

.syllable-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.syllable-chip {
    background: #FFFFFF;
    border: 2px solid var(--primary);
    color: var(--primary-deep);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    padding: 0.7rem 1.4rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.05em;
    position: relative;
}

.cut-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.cut-line {
    width: 2px;
    height: 38px;
    border-left: 2px dashed var(--accent-coral);
}

.scissor-icon {
    color: var(--accent-coral);
    font-size: 1.3rem;
    animation: snip 2s infinite ease-in-out;
}

@keyframes snip {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-25deg) scale(1.15); }
}

/* Letter Tracing Demo */
.tracing-demo {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tracing-box {
    width: 140px;
    height: 140px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tracing-letter {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    color: #E2E8F0;
    position: absolute;
    user-select: none;
}

.tracing-guide {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 3px var(--primary);
    stroke-dasharray: 6 6;
}

.step-bubble {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary);
    color: #1A237E;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.step-bubble.p1 { top: 12px; left: 58px; }
.step-bubble.p2 { bottom: 18px; left: 22px; }
.step-bubble.p3 { bottom: 18px; right: 22px; }

.audio-radio-demo {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 340px;
    border: 1px solid #E2E8F0;
}

.radio-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.radio-waves {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.radio-bar {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    animation: soundWave 1.2s ease-in-out infinite alternate;
}

.radio-bar:nth-child(2) { animation-delay: 0.2s; }
.radio-bar:nth-child(3) { animation-delay: 0.4s; }
.radio-bar:nth-child(4) { animation-delay: 0.6s; }

@keyframes soundWave {
    0% { height: 6px; }
    100% { height: 22px; }
}

/* Manual Section */
.steps-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.step-item {
    background: var(--white);
    border-radius: 20px;
    padding: 2.2rem 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #EEF2F6;
    position: relative;
    display: flex;
    flex-direction: column;
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 10px rgba(63, 81, 181, 0.3);
}

.step-item h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.step-item p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Support Section */
.support-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.support-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid #EEF2F6;
}

.support-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-deep);
}

.support-info p {
    color: var(--text-light);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--primary-light);
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.contact-detail svg {
    color: var(--primary);
    flex-shrink: 0;
}

.support-faq {
    margin-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
    padding-top: 1.5rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-q {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.faq-a {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.support-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid #EEF2F6;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: var(--white);
    border: none;
    padding: 0.95rem 2rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(63, 81, 181, 0.4);
}

/* Privacy Section */
.privacy-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #EEF2F6;
    max-width: 900px;
    margin: 0 auto;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ECFDF5;
    color: #065F46;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid #A7F3D0;
}

.privacy-card h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-deep);
    margin-bottom: 1.25rem;
}

.privacy-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 0.65rem;
}

.privacy-card p {
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.privacy-card ul {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: #334155;
    line-height: 1.7;
}

.privacy-card li {
    margin-bottom: 0.4rem;
}

/* Standalone Fallback / Subdirectory Card */
.standalone-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.standalone-card {
    background: var(--white);
    max-width: 760px;
    width: 100%;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid #E2E8F0;
    text-align: left;
}

.standalone-card .logo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #EEF2F6;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

.action-link:hover {
    background: var(--primary-deep);
}

/* Footer */
footer {
    background: #0F172A;
    color: #94A3B8;
    padding: 3rem 2rem 2.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    font-size: 0.88rem;
    color: #64748B;
}

/* Responsive adjustments */
@media (max-width: 860px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .method-block,
    .method-block:nth-child(even) {
        grid-template-columns: 1fr;
    }
    
    .method-block:nth-child(even) .method-desc {
        order: 1;
    }
    
    .method-block:nth-child(even) .method-visual {
        order: 2;
    }
    
    .support-wrapper {
        grid-template-columns: 1fr;
    }
}
