/* ============================================
   OPTIMISTIC DISPLAY — LOCAL FONT FACES
   ============================================ */

@font-face {
    font-family: 'Optimistic Display';
    src: url('../fonts/Optimistic_Display_W_XLt.woff2') format('woff2'), url('../fonts/Optimistic_Display_W_XLt.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Optimistic Display';
    src: url('../fonts/Optimistic_Display_W_Lt.woff2') format('woff2'), url('../fonts/Optimistic_Display_W_Lt.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Optimistic Display';
    src: url('../fonts/Optimistic_Display_W_Md.woff2') format('woff2'), url('../fonts/Optimistic_Display_W_Md.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Optimistic Display';
    src: url('../fonts/Optimistic_Display_W_Bd.woff2') format('woff2'), url('../fonts/Optimistic_Display_W_Bd.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Optimistic Display';
    src: url('../fonts/Optimistic_Display_W_XBd.woff2') format('woff2'), url('../fonts/Optimistic_Display_W_XBd.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   META SALES ACADEMY — GLOBAL STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --meta-blue: #0866FF;
    --meta-blue-dark: #0552CC;
    --meta-blue-light: #E7F0FF;
    --text-primary: #1C1E21;
    --text-secondary: #4B4F56;
    --text-muted: #65676B;
    --bg-white: #FFFFFF;
    --bg-light: #F0F2F5;
    --bg-dark: #3E4A5C;
    --border-color: #E4E6EB;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --transition: 0.3s ease;
    --header-height: 64px;
    --font: 'Optimistic Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

    .site-header.scrolled {
        border-color: var(--border-color);
        box-shadow: var(--shadow-sm);
    }

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.meta-logo {
    height: 28px;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 100px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
    line-height: 1;
}

.btn-outline {
    background: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

    .btn-outline:hover {
        background: var(--text-primary);
        color: white;
        transform: translateY(-1px);
    }

.btn-primary {
    background: var(--meta-blue);
    color: white;
    border-color: var(--meta-blue);
}

    .btn-primary:hover {
        background: var(--meta-blue-dark);
        border-color: var(--meta-blue-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(8,102,255,0.35);
    }

/* ============================================
   LANGUAGE PICKER BUTTON
   ============================================ */

.lang-picker-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 100px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

    .lang-picker-btn:hover {
        border-color: var(--meta-blue);
        color: var(--meta-blue);
        background: var(--meta-blue-light);
    }

    .lang-picker-btn svg {
        flex-shrink: 0;
    }

/* ============================================
   LANGUAGE MODAL
   ============================================ */

.lang-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 76px 24px 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

    .lang-modal-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

.lang-modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 280px;
    overflow: hidden;
    transform: translateY(-12px) scale(0.97);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
}

.lang-modal-overlay.open .lang-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.lang-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
}

.lang-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.lang-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
}

    .lang-modal-close:hover {
        color: var(--text-primary);
        background: var(--bg-light);
    }

.lang-list {
    list-style: none;
    padding: 8px 0;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

    .lang-option:hover {
        background: var(--bg-light);
    }

    .lang-option.active {
        background: var(--meta-blue-light);
    }

.lang-flag {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.lang-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.lang-check {
    color: var(--meta-blue);
    opacity: 0;
    flex-shrink: 0;
}

.lang-option.active .lang-check {
    opacity: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    min-height: 72vh;
    padding-top: var(--header-height);
    background: linear-gradient( -45deg, #F5E6FF, #E8F0FF, #D8FFE8, #E0F5FF, #F5E6FF, #D8FFE8, #E8F0FF, #E0F5FF );
    background-size: 400% 400%;
    animation: heroGradientShift 18s ease infinite;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

@keyframes heroGradientShift {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 100% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 520px;
}

.hero-title {
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    font-weight: 400;
}

.hero-access {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
}

.access-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 10px;
    background: rgba(8, 102, 255, 0.10);
    border: 1.5px solid rgba(8, 102, 255, 0.55);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--meta-blue);
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.access-lock {
    flex-shrink: 0;
    color: var(--meta-blue);
    opacity: 0.85;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .hero-image img {
        width: 100%;
        max-width: 480px;
        filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
    }

/* ============================================
   SOCIAL PROOF BANNER
   ============================================ */

.social-proof-banner {
    background: #1C2B33;
    padding: 20px 24px;
}

.social-proof-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.social-proof-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.social-proof-text {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    padding: 60px 24px;
    background: var(--bg-white);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}

    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.feature-icon {
    margin-bottom: 16px;
}

.feature-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   BUILT FOR BUSY SECTION
   ============================================ */

.busy-section {
    padding: 80px 24px;
    background: var(--bg-white);
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.busy-layout {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 32px;
    align-items: center;
}

.busy-features-left,
.busy-features-right {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.busy-features-left {
    text-align: right;
}

.busy-features-right {
    text-align: left;
}

.busy-feature h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.busy-feature p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.busy-phone {
    flex-shrink: 0;
    width: 100%;
}

    .busy-phone img {
        width: 100%;
        max-width: 100%;
        filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
    }

/* Mobile-only wrapper — hidden by default on desktop */
.busy-features-wrapper {
    display: none;
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */

.certs-section {
    padding: 80px 0;
    background: var(--bg-light);
}

    .certs-section .section-title {
        padding: 0 24px;
    }

.certs-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
}

    .certs-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

.certs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    background: white;
}

    .cert-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    .cert-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* ============================================
   REWARDS SECTION
   ============================================ */

.rewards-section {
    padding: 80px 0;
    background: var(--bg-white);
}

    .rewards-section .section-title {
        padding: 0 24px;
    }

.rewards-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
}

    .rewards-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.reward-card {
    background: transparent;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    display: block;
    transition: transform var(--transition), box-shadow var(--transition);
}

    .reward-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

    .reward-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: var(--radius-md);
    }

/* ============================================
   APP RATING SECTION
   ============================================ */

.app-rating-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, #F5E6FF 0%, #E8F0FF 35%, #E0F5FF 65%, #D8FFE8 100%);
}

.app-rating-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

    .app-rating-inner .section-title {
        margin-bottom: 40px;
    }

.elfsight-widget {
    margin: 0 auto 40px;
    min-height: 200px;
}

.app-download-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.app-download-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--meta-blue);
    transition: color var(--transition), text-decoration var(--transition);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
}

    .app-download-link:hover {
        color: var(--meta-blue-dark);
        text-decoration-color: var(--meta-blue-dark);
    }

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-section {
    padding: 80px 24px;
    background: var(--bg-white);
}

.faq-inner {
    max-width: 900px;
    margin: 0 auto;
}

.faq-widget {
    min-height: 200px;
}

.faq-na-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--bg-light);
    padding: 40px 24px;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-logo-link {
    display: flex;
    align-items: center;
}

.footer-meta-logo {
    height: 24px;
    width: auto;
}

.footer-disclaimer {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

    .footer-links a {
        font-size: 14px;
        color: var(--text-secondary);
        font-weight: 500;
        transition: color var(--transition);
    }

        .footer-links a:hover {
            color: var(--meta-blue);
        }

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

    .animate-on-scroll.fade-up {
        transform: translateY(32px);
    }

    .animate-on-scroll.fade-left {
        transform: translateX(32px);
    }

    .animate-on-scroll.fade-right {
        transform: translateX(-32px);
    }

    .animate-on-scroll.animated {
        opacity: 1;
        transform: none;
    }

/* ============================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================ */

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .busy-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .busy-features-left,
    .busy-features-right {
        text-align: center;
    }

    .busy-phone {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        order: -1;
    }

    .certs-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
    }

    .rewards-grid {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
    }
}

/* ============================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================ */

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .meta-logo {
        height: 24px;
        width: auto;
    }

    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .lang-picker-btn {
        padding: 7px 10px;
        font-size: 13px;
    }

    .lang-label {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 40px 20px 20px;
        gap: 32px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image img {
        max-width: 360px;
        margin: 0 auto;
    }

    .social-proof-inner {
        gap: 12px;
    }

    .social-proof-badge {
        width: 36px;
        height: 36px;
    }

    .features-section {
        padding: 40px 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .feature-card {
        padding: 20px 16px;
    }

    .busy-section {
        padding: 60px 0;
    }
    /* Phone sits full-width above the 2-col text grid */
    .busy-layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding: 0 20px;
    }

    .busy-phone {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        order: -1;
    }
    /* Hide desktop left/right columns, show unified wrapper instead */
    .busy-features-left,
    .busy-features-right {
        display: none;
    }

    .busy-layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding: 0 20px;
    }
    /* Unified 2-col grid for all 6 features on mobile */
    .busy-features-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
        text-align: left;
    }

    .busy-feature h3 {
        font-size: 15px;
    }

    .busy-feature p {
        font-size: 13px;
    }

    .certs-section,
    .rewards-section {
        padding: 60px 0;
    }

    /* Horizontal scroll: certs — single row of cards */
    .certs-scroll-wrapper {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        padding: 0 20px 12px;
    }

    .certs-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 14px;
        width: max-content;
        grid-template-columns: unset;
        grid-template-rows: unset;
    }

    .cert-card {
        width: 260px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    /* Horizontal scroll: rewards — single row of cards */
    .rewards-scroll-wrapper {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        padding: 0 20px 12px;
    }

    .rewards-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 14px;
        width: max-content;
        grid-template-columns: unset;
        grid-template-rows: unset;
    }

    .reward-card {
        width: 200px;
        height: 200px;
        flex-shrink: 0;
        scroll-snap-align: start;
        aspect-ratio: unset;
    }

    .app-rating-section,
    .faq-section {
        padding: 60px 20px;
    }

    .app-download-links {
        gap: 24px;
    }

    .footer-links {
        gap: 16px;
    }

    .lang-modal-overlay {
        padding: 70px 16px 0;
        justify-content: center;
    }

    .lang-modal {
        width: 100%;
        max-width: 320px;
    }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================ */

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-nav {
        gap: 8px;
    }

    .btn {
        padding: 7px 14px;
        font-size: 13px;
    }
}

html:not(:-webkit-full-screen) .lang-flag {
    position: relative;
    top: -2px;
}