/* ============================================
   Meslingo Landing Page
   Design: Floating Glassmorphism + Space Grotesk/Be Vietnam Pro
   Theme: Light/Dark with rose accent (matches app Pink theme)
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Be Vietnam Pro', sans-serif;
    --bg-primary: #FDF2F5;
    --bg-secondary: #FFF9FB;
    --bg-tertiary: #FCE4EC;
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-card-hover: rgba(255, 255, 255, 0.8);
    --accent-primary: #E11D63;
    --accent-secondary: #EC407A;
    --accent-gradient: linear-gradient(135deg, #E11D63 0%, #EC407A 100%);
    --text-primary: #1A1A2E;
    --text-secondary: #53404A;
    --text-tertiary: #78606D;
    --text-inverse: #FFFFFF;
    --border-color: rgba(225, 29, 99, 0.08);
    --glass-border: rgba(255, 255, 255, 0.45);
    --shadow-sm: 0 2px 8px rgba(225, 29, 99, 0.06);
    --shadow-md: 0 8px 32px rgba(225, 29, 99, 0.1);
    --shadow-lg: 0 24px 64px rgba(225, 29, 99, 0.15);
    --shadow-float: 0 20px 50px rgba(225, 29, 99, 0.12);
    --glow: 0 0 60px rgba(225, 29, 99, 0.15);
    --glow-accent: 0 8px 40px rgba(225, 29, 99, 0.2);
    --blur: blur(20px);
    --radius-card: 24px;
    --radius-card-lg: 32px;
    --radius-pill: 100px;
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-primary: #160D12;
    --bg-secondary: #1D1218;
    --bg-tertiary: #281A21;
    --bg-card: rgba(34, 21, 28, 0.6);
    --bg-card-hover: rgba(47, 29, 39, 0.75);
    --accent-primary: #F06292;
    --accent-secondary: #F48FB1;
    --accent-gradient: linear-gradient(135deg, #EC407A 0%, #F06292 100%);
    --text-primary: #FDF2F5;
    --text-secondary: #C9B8C2;
    --text-tertiary: #927A88;
    --text-inverse: #160D12;
    --border-color: rgba(240, 98, 146, 0.08);
    --border-strong: rgba(240, 98, 146, 0.15);
    --glass-border: rgba(240, 98, 146, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
    --shadow-float: 0 20px 50px rgba(0, 0, 0, 0.4);
    --glow: 0 0 80px rgba(240, 98, 146, 0.2);
    --glow-accent: 0 8px 40px rgba(240, 98, 146, 0.25);
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Navigation (Floating Glass) ---- */
.nav {
    position: fixed;
    top: 12px;
    left: 24px;
    right: 24px;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-float);
    transition: all 0.4s ease;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent-primary); }

/* Programs dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}
.nav-dropdown-btn svg { transition: transform var(--transition-bounce); }
.nav-dropdown:hover .nav-dropdown-btn,
.nav-dropdown:focus-within .nav-dropdown-btn { color: var(--accent-primary); }
.nav-dropdown:hover .nav-dropdown-btn svg,
.nav-dropdown:focus-within .nav-dropdown-btn svg { transform: rotate(180deg); }
/* invisible bridge so hover survives the gap between button and menu */
.nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -12px;
    right: -12px;
    height: 14px;
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    transition: all var(--transition-bounce);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-md);
    z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}
.nav-dropdown-menu a:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons (Glassmorphism + Micro-interaction) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(0.95); }

.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: var(--glow-accent);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--glow), var(--shadow-lg);
}
.btn-primary:active { transform: scale(0.96); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-secondary:active { transform: scale(0.96); }

/* Theme Toggle (Glass) */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-bounce);
}
.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: rotate(15deg) scale(1.1);
    box-shadow: var(--shadow-md);
}
.theme-toggle:active { transform: scale(0.9); }

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition-bounce);
}
.lang-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.lang-btn:active { transform: scale(0.95); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-bounce);
    z-index: 100;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-float);
    max-height: 360px;
    overflow-y: auto;
}
.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}
.lang-dropdown button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-float);
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 99;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease forwards, pillGlow 4s ease-in-out infinite;
}
.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s forwards;
    opacity: 0;
}
.hero-title .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-float);
    width: fit-content;
}
.stat-item {
    text-align: center;
    padding: 0.25rem 0.75rem;
    transition: transform var(--transition-bounce);
}
.stat-item:hover { transform: scale(1.1); }
.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--glass-border);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.cta-icon img { width: 48px; height: 48px; object-fit: contain; }

/* ---- Ticker (Floating Glass Strip) ---- */
.ticker-section {
    padding: 1.25rem 2rem;
    margin: 0 2rem;
    border-radius: var(--radius-card);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
    transform: translateY(-1.5rem);
}
.ticker { overflow: hidden; }
.ticker-track {
    display: flex;
    gap: 2.5rem;
    animation: scroll-ticker 40s linear infinite;
    width: max-content;
}
.ticker-track span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* ---- Sections ---- */
.section {
    padding: 6rem 2rem;
    position: relative;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding: 0.4rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.15;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Features ---- */
.features-section {
    background: var(--bg-secondary);
}

.feature-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.tag {
    padding: 0.35rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
}
.tag:hover { transform: scale(1.08); box-shadow: var(--glow-accent); }


/* ---- Community ---- */
.community-section { background: var(--bg-secondary); }

.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.community-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.community-card:hover {
    border-color: rgba(225, 29, 99, 0.3);
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--shadow-float), var(--glow);
}
[data-theme="dark"] .community-card:hover { border-color: rgba(240, 98, 146, 0.3); }
.community-card:active { transform: scale(0.98); }

.community-icon-wrap {
    width: 52px;
    height: 52px;
    background: var(--accent-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--glow-accent);
    transition: transform var(--transition-bounce);
}
.community-card:hover .community-icon-wrap { transform: scale(1.1) rotate(-5deg); }

.community-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.community-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Pricing Features List ---- */
.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}
.pricing-features li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.pricing-features li.included::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22C55E;
    font-weight: 700;
}

/* ---- Pro / Pro+ tiers ---- */
.pricing-tiers {
    max-width: 1100px;
    margin: 3rem auto 0;
}
.tiers-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.tier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 820px;
    margin: 0 auto;
    align-items: stretch;
}
.tier-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-bounce), box-shadow var(--transition-bounce);
}
.tier-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}
.tier-featured {
    border-color: rgba(225, 29, 99, 0.35);
    box-shadow: var(--shadow-float), var(--glow-accent);
}
[data-theme="dark"] .tier-featured { border-color: rgba(240, 98, 146, 0.35); }
.tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-pill);
    background: var(--accent-gradient);
    color: var(--text-inverse);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.tier-header {
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.25rem;
}
.tier-header h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}
.tier-price {
    margin-top: 0.6rem;
    font-size: 1rem;
    color: var(--text-secondary);
}
.tier-price strong {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.tier-points {
    margin-top: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-primary);
}
.tier-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    margin-bottom: 1.5rem;
}
.tier-features li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.tier-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22C55E;
    font-weight: 700;
}
.tier-btn { justify-content: center; }
.tiers-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ---- CTA ---- */
.cta-section { padding-bottom: 6rem; }

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card-lg);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-float), var(--glow);
}
.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(225, 29, 99, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
[data-theme="dark"] .cta-card::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(240, 98, 146, 0.08) 0%, transparent 60%);
}

.cta-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
}
.cta-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-md);
}
.cta-icon-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--accent-primary);
    border-radius: 32px;
    opacity: 0.3;
    animation: ringPulse 3s ease-in-out infinite;
}

.cta-card .section-subtitle { margin-bottom: 2.5rem; }

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.store-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-float), var(--glow);
}
.store-btn:active { transform: scale(0.97); }
.store-btn small {
    display: block;
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}
.store-btn strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ---- Footer ---- */
.footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.footer-brand { max-width: 300px; }
.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1.7;
}
.footer-links-grid { display: flex; gap: 4rem; }
.footer-column h5 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-column ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-column a:hover { color: var(--accent-primary); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}
.footer-bottom a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}
@keyframes scroll-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}
@keyframes pillGlow {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: var(--shadow-sm), 0 0 20px rgba(225, 29, 99, 0.12); }
}
[data-theme="dark"] .hero-badge {
    animation: fadeInUp 0.8s ease forwards, pillGlowDark 4s ease-in-out infinite;
}
@keyframes pillGlowDark {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: var(--shadow-sm), 0 0 20px rgba(240, 98, 146, 0.15); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- 4 Skills Grid ---- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
}
.skill-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.skill-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-float), var(--glow);
}
.skill-card:hover::after { transform: scaleX(1); }
.skill-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.skill-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Conversation Section ---- */
.conv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.conv-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.conv-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-float), var(--glow);
}
.conv-icon-big { font-size: 3.5rem; margin-bottom: 1rem; }
.conv-badge-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.conv-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.conv-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* ---- Vocab Section ---- */
.vocab-section { background: var(--bg-secondary); }
.vocab-hero {
    position: relative;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(225, 29, 99, 0.12) 100%);
    border: 1px solid rgba(225, 29, 99, 0.3);
    border-radius: var(--radius-card-lg);
    padding: 2.75rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md), var(--glow);
    transition: all var(--transition-bounce);
    overflow: hidden;
}
.vocab-hero:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float), var(--glow);
}
[data-theme="dark"] .vocab-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(240, 98, 146, 0.10) 100%);
    border-color: rgba(240, 98, 146, 0.3);
}
.vocab-hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(225, 29, 99, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}
[data-theme="dark"] .vocab-hero-badge {
    background: rgba(240, 98, 146, 0.15);
}
.vocab-hero-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
}
.vocab-hero-icon {
    font-size: 5rem;
    line-height: 1;
}
.vocab-hero-text h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    letter-spacing: -0.5px;
}
.vocab-hero-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}
.vocab-hero-text p strong {
    color: var(--text-primary);
    font-weight: 700;
}
.vocab-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.vocab-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: all var(--transition-bounce);
}
.vocab-card:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: var(--shadow-float), var(--glow);
    border-color: rgba(225, 29, 99, 0.3);
}
[data-theme="dark"] .vocab-card:hover { border-color: rgba(240, 98, 146, 0.3); }
.vocab-icon {
    width: 52px; height: 52px;
    background: var(--accent-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--glow-accent);
    transition: transform var(--transition-bounce);
}
.vocab-card:hover .vocab-icon { transform: scale(1.1) rotate(-5deg); }
.vocab-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.vocab-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Games V2 (6 grid with video placeholder) ---- */
.games-section { background: var(--bg-secondary); }
.games-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.game-card-v2 {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.game-card-v2:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-float), var(--glow);
}
.game-card-v2:active { transform: scale(0.97); }

.game-video-placeholder {
    width: 170px;
    max-width: 100%;
    aspect-ratio: 1170 / 2532;
    margin: 1.25rem auto 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}
.game-video-placeholder .demo-video { border-radius: 18px; }
.game-video-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(225, 29, 99, 0.08), transparent 70%);
}
[data-theme="dark"] .game-video-placeholder::before {
    background: radial-gradient(circle at center, rgba(240, 98, 146, 0.08), transparent 70%);
}
.game-info { padding: 1.25rem; }
.game-info h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.game-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---- Messaging Section ---- */
.msg-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.msg-features-3 { grid-template-columns: repeat(3, 1fr); }
.msg-features-3 .msg-card { text-align: center; }
.msg-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.msg-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-float), var(--glow);
}
.msg-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.msg-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Exam Section ---- */
.exam-section { background: var(--bg-secondary); }
.programs-alt { background: var(--bg-secondary); }
.programs-closing {
    max-width: 640px;
    margin: 2.5rem auto 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-secondary);
}
.programs-section .conv-grid { margin-top: 1.5rem; }
.exam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.exam-grid-5 { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.exam-grid-6 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.exam-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
}
.exam-grid-5 .exam-card { padding: 2.25rem 1.25rem; }
.exam-grid-6 .exam-card { padding: 2.25rem 1.5rem; }
.exam-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-float), var(--glow);
}
.exam-shot {
    width: 180px;
    max-width: 100%;
    aspect-ratio: 1170 / 2532;
    margin: 0 auto 1rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md), var(--glow-accent);
    background: var(--bg-tertiary);
    font-size: 0;
    line-height: 0;
}
.exam-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
}
.exam-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.exam-tier {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(225, 29, 99, 0.10);
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 0.85rem;
    letter-spacing: 0.04em;
}
[data-theme="dark"] .exam-tier {
    background: rgba(240, 98, 146, 0.15);
}
.exam-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* Locale-targeted exam cards: THPT (Vietnam) shows only for VI visitors,
   JLPT takes its slot for everyone else — so the grid is always 6 cards. */
html:not([data-lang="vi"]) .vi-only { display: none !important; }
html[data-lang="vi"] .intl-only { display: none !important; }

/* ---- Pricing / Free Model ---- */
.pricing-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}
.pricing-main-card {
    background: var(--bg-card);
    border: 1px solid rgba(225, 29, 99, 0.3);
    border-radius: var(--radius-card-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-float), var(--glow);
}
[data-theme="dark"] .pricing-main-card { border-color: rgba(240, 98, 146, 0.25); }
.pricing-free-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}
.pricing-free-header h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}
.pricing-free-header p { color: var(--text-tertiary); font-size: 0.9rem; }
.pricing-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    border: 1px solid var(--glass-border);
}

.earn-cards { display: flex; flex-direction: column; gap: 1rem; }
.earn-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.earn-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all var(--transition-bounce);
}
.earn-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(225, 29, 99, 0.25);
}
[data-theme="dark"] .earn-card:hover { border-color: rgba(240, 98, 146, 0.25); }
.earn-icon { font-size: 1.75rem; flex-shrink: 0; margin-top: 2px; }
.earn-card strong {
    font-family: var(--font-display);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.2rem;
}
.earn-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero-visual { order: -1; }
    .hero-phone { transform: none; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .conv-grid { grid-template-columns: 1fr; }
    .vocab-hero { padding: 2rem 1.75rem; }
    .vocab-hero-inner { grid-template-columns: 1fr; gap: 1rem; }
    .vocab-hero-icon { font-size: 3.5rem; }
    .vocab-hero-text h3 { font-size: 1.4rem; }
    .games-grid-6 { grid-template-columns: repeat(2, 1fr); }
    .exam-grid { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto; }
    .exam-grid-5 { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
    .exam-grid-6 { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin: 0 auto; }
    .pricing-showcase { grid-template-columns: 1fr; }
    .tier-grid { grid-template-columns: 1fr; max-width: 450px; }
    .community-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav { left: 12px; right: 12px; top: 8px; border-radius: 18px; padding: 0.5rem 1rem; }
    .nav-links { display: none; }
    .nav-cta .btn-primary { display: none; }
    .nav-cta .lang-switcher { order: 1; }
    .nav-cta .theme-toggle { width: 38px; height: 38px; border-radius: 12px; font-size: 1.1rem; }
    .lang-btn { padding: 0.4rem 0.65rem; font-size: 0.8rem; border-radius: 12px; }
    .mobile-menu-btn { display: flex; }
    .mobile-menu { left: 12px; right: 12px; top: 68px; border-radius: 18px; padding: 1.25rem 1.5rem; }
    .mobile-menu .btn-primary { width: 100%; justify-content: center; text-align: center; margin-top: 0.5rem; }
    .hero { padding: 5.5rem 1.25rem 2.5rem; min-height: auto; }
    .hero-title { font-size: clamp(2rem, 9vw, 3.5rem); margin-bottom: 1rem; }
    .hero-badge { font-size: 0.7rem; padding: 0.4rem 1rem; margin-bottom: 1rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 1.75rem; line-height: 1.6; }
    .hero-actions { flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
    .hero-actions .btn { width: 100%; justify-content: center; padding: 1rem 1.5rem; font-size: 1rem; }
    .hero-actions .btn-primary { font-size: 1.05rem; padding: 1.1rem 1.5rem; }
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        width: 100%;
        padding: 0.75rem;
    }
    .stat-item { padding: 0.5rem 0.25rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.65rem; }
    .stat-divider { display: none; }
    .section { padding: 3.5rem 1.25rem; }
    .section-header { margin-bottom: 2rem; }
    .section-label { font-size: 0.7rem; padding: 0.35rem 1rem; letter-spacing: 0.08em; }
    .section-title { font-size: clamp(1.5rem, 6vw, 2.25rem); margin-bottom: 0.75rem; }
    .section-subtitle { font-size: 0.95rem; line-height: 1.6; }
    .skills-grid { grid-template-columns: 1fr; gap: 1rem; }
    .vocab-features { grid-template-columns: 1fr; }
    .msg-features, .msg-features-3 { grid-template-columns: 1fr; }
    .games-grid-6 { grid-template-columns: 1fr; }
    .ticker-section { margin: 0 0.75rem; transform: translateY(-1rem); padding: 1rem 1.5rem; }
    .container { padding: 0 1rem; }
    .cta-card { padding: 3rem 1.5rem; border-radius: 24px; }
    .cta-card .section-subtitle { margin-bottom: 1.75rem; font-size: 0.95rem; }
    .cta-buttons { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .store-btn { width: 100%; justify-content: center; padding: 0.875rem 1.25rem; border-radius: 18px; }
    .store-btn strong { font-size: 1rem; }
    .skill-card { padding: 1.75rem 1.5rem; }
    .skill-card h3 { font-size: 1.1rem; }
    .skill-card p { font-size: 0.85rem; }
    .conv-card { padding: 1.75rem; border-radius: 24px; }
    .conv-icon-big { font-size: 2.5rem; }
    .conv-card h3 { font-size: 1.15rem; }
    .conv-card p { font-size: 0.88rem; }
    .vocab-hero { padding: 1.75rem 1.5rem; border-radius: 24px; margin-bottom: 1.25rem; }
    .vocab-hero-icon { font-size: 3rem; }
    .vocab-hero-text h3 { font-size: 1.25rem; }
    .vocab-hero-text p { font-size: 0.9rem; line-height: 1.65; }
    .vocab-hero-badge { font-size: 0.65rem; padding: 0.3rem 0.7rem; margin-bottom: 0.85rem; }
    .exam-grid-5 { grid-template-columns: 1fr; max-width: 450px; }
    .exam-grid-6 { grid-template-columns: 1fr; max-width: 450px; }
    .vocab-card { padding: 1.75rem 1.5rem; }
    .msg-card { padding: 1.75rem 1.5rem; }
    .game-card-v2 { border-radius: 20px; }
    .community-card { padding: 1.25rem; }
    .exam-card { padding: 1.75rem 1.5rem; }
    .pricing-main-card { padding: 2rem 1.5rem; border-radius: 24px; }
    .pricing-showcase { gap: 2rem; }
    .earn-card { padding: 1rem; }
    .earn-cards { gap: 0.75rem; }
    .footer { padding: 3rem 1.25rem 1.5rem; }
    .footer-top { flex-direction: column; gap: 2rem; }
    .footer-links-grid { flex-wrap: wrap; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .nav { left: 6px; right: 6px; top: 6px; padding: 0.5rem 0.75rem; border-radius: 14px; }
    .logo-icon { width: 36px; height: 36px; border-radius: 10px; }
    .logo-text { font-size: 1.15rem; }
    .nav-cta .theme-toggle { width: 34px; height: 34px; font-size: 1rem; }
    .lang-btn { padding: 0.35rem 0.5rem; font-size: 0.75rem; }
    .lang-btn svg:first-child { width: 14px; height: 14px; }
    .hero { padding: 5rem 1rem 2rem; }
    .hero-title { font-size: clamp(1.75rem, 8.5vw, 2.5rem); }
    .hero-badge { font-size: 0.65rem; padding: 0.35rem 0.75rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-actions .btn { padding: 0.95rem 1.25rem; font-size: 0.95rem; }
    .hero-actions .btn-primary { padding: 1rem 1.25rem; font-size: 1rem; }
    .hero-stats { padding: 0.5rem; }
    .stat-number { font-size: 1.35rem; }
    .stat-label { font-size: 0.6rem; }
    .section { padding: 3rem 1rem; }
    .section-label { font-size: 0.65rem; }
    .section-title { font-size: clamp(1.35rem, 5.5vw, 2rem); }
    .section-subtitle { font-size: 0.88rem; }
    .cta-card { padding: 2.5rem 1.25rem; border-radius: 20px; }
    .cta-icon-wrapper { width: 64px; height: 64px; margin-bottom: 1.5rem; }
    .cta-icon { width: 64px; height: 64px; }
    .cta-icon img { width: 40px; height: 40px; }
    .store-btn { padding: 0.75rem 1rem; border-radius: 16px; gap: 0.625rem; }
    .store-btn small { font-size: 0.6rem; }
    .store-btn strong { font-size: 0.95rem; }
    .store-btn svg { width: 20px; height: 20px; }
    .ticker-section { margin: 0 0.5rem; border-radius: 14px; padding: 0.875rem 1rem; }
    .ticker span { padding: 0 1.25rem; font-size: 0.85rem; }
    .container { padding: 0 0.75rem; }
    .mobile-menu { left: 6px; right: 6px; top: 62px; padding: 1rem 1.25rem; border-radius: 14px; }
    .mobile-menu a { font-size: 0.95rem; padding: 0.625rem 0; }
}

/* ---- RTL ---- */
[dir="rtl"] .nav-inner { direction: rtl; }
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .pricing-features li { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .community-card { flex-direction: row-reverse; }
[dir="rtl"] .community-card:hover { transform: translateX(-10px); }

/* ============================================
   Legal Pages (Privacy / Terms)
   ============================================ */
.legal-hero {
    padding: 8rem 0 3rem;
    text-align: center;
}
.legal-hero .section-label { margin-bottom: 1rem; }
.legal-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.legal-hero .legal-updated {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.legal-article {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 6rem;
    color: var(--text-secondary);
    line-height: 1.8;
}
.legal-article h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.legal-article h2:first-child { margin-top: 0; }
.legal-article h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}
.legal-article p { margin-bottom: 1rem; font-size: 0.95rem; }
.legal-article ul {
    margin: 0.5rem 0 1rem 1.25rem;
    font-size: 0.95rem;
}
.legal-article ul li { margin-bottom: 0.4rem; }
.legal-article a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(225, 29, 99, 0.25);
    transition: all 0.2s ease;
}
.legal-article a:hover {
    border-bottom-color: var(--accent-primary);
}
[data-theme="dark"] .legal-article a {
    border-bottom-color: rgba(240, 98, 146, 0.3);
}
.legal-article strong { color: var(--text-primary); font-weight: 600; }

.legal-callout {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-card);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    box-shadow: var(--shadow-sm);
}

/* Language-specific content blocks */
[data-lang-content] { display: none; }
html[data-lang="vi"] [data-lang-content="vi"] { display: block; }
html:not([data-lang="vi"]) [data-lang-content="en"] { display: block; }

/* ============================================
   Contact Dialog
   ============================================ */
.contact-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 13, 18, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}
.contact-dialog-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
[data-theme="dark"] .contact-dialog-overlay {
    background: rgba(0, 0, 0, 0.65);
}

.contact-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card-lg);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--glow);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-dialog-overlay.open .contact-dialog {
    transform: translateY(0) scale(1);
}

.contact-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.contact-dialog-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.contact-dialog-subtitle {
    color: var(--text-tertiary);
    font-size: 0.88rem;
}
.contact-close-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-bounce);
}
.contact-close-btn:hover {
    background: var(--bg-card-hover);
    transform: rotate(90deg);
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}
.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(225, 29, 99, 0.3);
}
[data-theme="dark"] .contact-field input:focus,
[data-theme="dark"] .contact-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(240, 98, 146, 0.35);
}
.contact-field textarea { min-height: 120px; }

.contact-submit {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}
.contact-foot {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-align: center;
}

@media (max-width: 600px) {
    .contact-dialog { padding: 1.5rem; }
    .contact-dialog-title { font-size: 1.25rem; }
    .legal-hero { padding: 7rem 0 2rem; }
    .legal-article { padding: 1rem 0.25rem 4rem; }
}

/* ============================================
   VIDEO LOOPS (replace static icons/placeholders with screencaps)
   ============================================ */

/* Shared video element styling for placeholder swaps */
.demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}
/* Icon-slot video variants (vocab hero, conversation card) */
.vocab-hero-video,
.conv-icon-video {
    position: relative;
    font-size: 0 !important;
    line-height: 0 !important;
    margin-bottom: 1rem;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md), var(--glow-accent);
    background: var(--bg-tertiary);
}
.vocab-hero-video {
    width: 200px;
    aspect-ratio: 1170 / 2532;
}
.conv-icon-video {
    width: 200px;
    max-width: 100%;
    aspect-ratio: 1170 / 2532;
    margin: 0 auto 1rem;
}
.vocab-hero-video .demo-video,
.conv-icon-video .demo-video {
    border-radius: 18px;
}
/* Landscape (16:9) variant — handwriting demo is a landscape capture, not a phone screencap */
.vocab-hero-video.vocab-hero-video-wide {
    width: 380px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
}
@media (max-width: 900px) {
    .vocab-hero-video { width: 100%; max-width: 200px; aspect-ratio: 1170 / 2532; margin: 0 auto 1rem; }
    .vocab-hero-video.vocab-hero-video-wide { max-width: 380px; aspect-ratio: 16 / 9; }
}

/* Hero phone-frame video showcase (iPhone 13 screencap, 1170×2532 ≈ 9:19.5) */
.hero-phone {
    position: relative;
    width: 260px;
    max-width: 100%;
    aspect-ratio: 1170 / 2532;
    margin: 0 auto;
    padding: 10px;
    border-radius: 40px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-float), var(--glow);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    font-size: 0;
    line-height: 0;
}
.hero-phone:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: var(--shadow-lg), var(--glow-accent);
}
.hero-phone-notch {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 7px;
    border-radius: 100px;
    background: var(--text-tertiary);
    opacity: 0.35;
    z-index: 2;
}
.hero-phone .demo-video {
    border-radius: 30px;
}

/* Smaller phone frame for the 4 skill cards */
.skill-phone {
    position: relative;
    width: 150px;
    max-width: 100%;
    aspect-ratio: 1170 / 2532;
    margin: 0 auto 1.25rem;
    padding: 6px;
    border-radius: 26px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md), var(--glow-accent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}
.skill-card:hover .skill-phone { transform: translateY(-4px) scale(1.03); }
.skill-phone .demo-video { border-radius: 20px; }

/* Tap-to-play affordance over any clickable video */
.playable { cursor: pointer; }
.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-overlay::before {
    content: '';
    width: 26%;
    max-width: 56px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/45% no-repeat;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, background-color 0.25s ease;
}
.hero-phone:hover .play-overlay::before,
.skill-phone:hover .play-overlay::before,
.vocab-hero-video:hover .play-overlay::before,
.game-video-placeholder:hover .play-overlay::before { transform: scale(1.12); }

/* Fullscreen video lightbox (click a .playable video → play with sound) */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.video-lightbox.open { display: flex; }
.video-lightbox-player {
    /* Portrait clips are bounded by max-height; the width cap only matters for
       landscape (16:9) clips like the handwriting demo. */
    max-width: min(100%, 960px);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-lg);
}
.video-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.video-lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

