/* --- BRAND VARIABLES --- */
:root {
    --bg-body: #FFFFFF;       /* Clean White */
    --bg-light: #F8F9FC;      /* Very Light Blue/Grey */
    --bg-dark: #050A19;       /* Midnight Blue (for Hero) */
    
    --text-main: #334155;     /* Slate Grey (Body text) */
    --text-head: #0F172A;     /* Dark Navy (Headings) */
    --text-white: #FFFFFF;
    
    --brand-primary: #2962FF; /* Electric Royal */
    --brand-glow: rgba(41, 98, 255, 0.2);
    --brand-accent: #0044FF;  /* Darker Blue for light bg */
    
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { 
    font-family: var(--font-head); 
    line-height: 1.2; 
    color: var(--text-head); /* Dark Headings */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
p { color: var(--text-main); }

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-accent { color: var(--brand-accent); }
.text-royal { color: var(--brand-primary); }
.text-white { color: var(--text-white); }
.text-huge { font-size: 3.5rem; line-height: 1.1; } 
.text-center { text-align: center; }
.align-center { align-items: center; }
.section-padding { padding: 80px 0; }

/* Handle sticky header offset for anchor links */
section[id] { scroll-margin-top: 100px; }

.full-width { width: 100%; text-align: center; margin-top: 20px; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 10px 30px -10px var(--brand-glow);
    border: 1px solid var(--brand-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px var(--brand-glow);
    background: #1c4fd8;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-white);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: background 0.3s;
}

header.scrolled {
    background: var(--bg-dark); /* Solid Midnight Blue */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* Stronger shadow for separation */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-flex { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon { color: var(--brand-primary); font-size: 1.8rem; }

.nav-links { display: flex; gap: 30px; font-size: 0.95rem; font-weight: 500;}
/* Force bright text for dark header */
.nav-links a { color: rgba(255, 255, 255, 0.85); font-weight: 500; } 
.nav-links a:hover { color: var(--brand-accent); color: #FFF; }

/* --- HERO SECTION --- */
.hero {
    /* Adjusted padding to center vertically better */
    padding: 30px 0 80px; /* Reduced to pull content up */
    position: relative;
    background-color: var(--bg-dark);
    color: var(--text-white);
    /* Remove curve bottom to blend cleanly, or keep if preferred. Keeping for now. */
    border-bottom-left-radius: 50px; 
    border-bottom-right-radius: 50px;
    overflow: hidden; /* Contains the glow */
}

/* New Grid Container for Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Text gets slightly more space */
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2; /* Sits above glow */
}

/* Left Column: Text */
.hero-text {
    text-align: left;
}

.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 24px; 
    line-height: 1.1;
    color: var(--text-white);
}

.hero-sub { 
    font-size: 1.25rem; 
    margin-bottom: 32px; 
    color: rgba(255,255,255,0.85); 
    max-width: 90%; /* prevent text from hitting right edge too hard */
}

/* Align buttons to left */
.hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align left */
    gap: 10px;
}

.hero-micro { 
    font-size: 0.9rem; 
    color: rgba(255,255,255,0.5); 
    margin-left: 5px;
}

/* Right Column: Phone Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

/* The Fixed Phone Frame */
.phone-frame {
    width: 280px; 
    height: 450px; /* Reduced height by 50px */
    margin-top: 80px; /* Added margin to push it down below the header */
    
    border: 12px solid #1E293B; 
    border-radius: 40px;
    background-color: #1E293B;
    
    /* This creates the frame */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    
    /* Rotate slightly for style */
    transform: rotate(-2deg); 
    transition: transform 0.3s ease;
}

.phone-frame:hover {
    transform: rotate(0deg) scale(1.02); /* Interactive effect */
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: fill;   /* Forces image to stretch/squish to fit 100% of the frame */
    display: block;
}

/* The Glow Background */
.hero-glow {
    position: absolute;
    top: -20%;
    right: 0; /* Moved to right side behind phone */
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(41,98,255,0.25) 0%, rgba(5,10,25,0) 70%);
    pointer-events: none;
    z-index: 0;
}
/* --- HERO PHONE MOCKUP --- */

/* 1. Adjust Hero to allow overlap */
.hero {
    /* Existing styles remain... */
    padding-bottom: 20px; /* Reduced padding because the phone takes up space */
    z-index: 2; /* Ensure hero sits on top of the background */
    overflow: visible; /* CRITICAL: Allows the phone to hang out of the box */
}

/* 2. The Phone Container */
.hero-visual-wrapper {
    position: relative;
    margin-top: 60px;
    margin-bottom: -180px; /* Negative margin pulls the next section up behind it */
    z-index: 10; /* Sits on top of everything */
    display: flex;
    justify-content: center;
    perspective: 1000px; /* For 3D effect if needed */
}

/* 3. The CSS Phone Frame */
.phone-frame {
    /* Fixed dimensions to enforce a realistic phone shape */
    width: 320px;
    height: 590px;
    margin-top: 50px;
    
    border: 12px solid #1E293B; /* Bezel */
    border-radius: 45px; /* Rounded corners */
    background-color: #1E293B;
    
    /* This clips the long image to fit the box */
    overflow: hidden; 
    
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* 3D Shadow */
    position: relative;
    background: white; /* Fallback background */
}

.phone-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* 4. Adjust the Next Section (#logic) to make room */
/* We need to push the content of the next section down so the phone doesn't cover the text */
#logic {
    padding-top: 40px; /* Extra padding to account for the overlapping phone */
}

/* Mobile Tweak: Make phone smaller on small screens */
@media (max-width: 768px) {
    .phone-frame {
        width: 240px;
        border-width: 8px;
    }
    .hero-visual-wrapper {
        margin-bottom: -120px;
    }
    #logic {
        padding-top: 160px;
    }
}

/* --- CARDS & GRID --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.section-header { text-align: center; max-width: 700px; margin: 0 auto 30px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 15px; }

.feature-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0; /* Subtle grey border */
    padding: 40px;
    border-radius: 16px;
    transition: 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Soft shadow */
}

.feature-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(41, 98, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-accent);
    margin-bottom: 15px;
    display: block;
    font-weight: 700;
}

.features-list { margin-top: 20px; }
.features-list li {
    margin-bottom: 12px;
    color: var(--text-grey);
    display: flex;
    align-items: center;
    gap: 10px;
}
.features-list li::before {
    content: '✓';
    color: var(--brand-primary);
    font-weight: bold;
}

/* New Utility to remove default checkmark */
.features-list.list-plain li::before {
    content: none;
}
.features-list.list-plain li {
    padding-left: 0;
    gap: 8px;
}

/* --- GLOBAL SECTION --- */
/* Force this section to be dark for contrast */
.bg-gradient { 
    background-color: var(--bg-dark);
    background-image: linear-gradient(180deg, var(--bg-dark) 0%, rgba(41,98,255,0.1) 50%, var(--bg-dark) 100%);
    color: var(--text-white);
}

/* Ensure the sub-text is visible on the dark background */
.bg-gradient .section-sub {
    color: rgba(255, 255, 255, 0.8);
}

.global-visual {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.lang-badge {
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    color: var(--text-grey);
    font-size: 0.9rem;
}

.lang-badge.active {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
    background: rgba(0, 240, 255, 0.1);
}

.native-icons {
    margin-top: 20px;
    color: var(--text-grey);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- GAP FIX: Feature Grid to Pricing --- */
.section-padding.feature-grid { padding-bottom: 20px; }
#pricing.section-padding { padding-top: 20px; }

/* --- PRICING SECTION --- */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px; 
}

.toggle-switch {
    width: 60px;
    height: 32px;
    background: #E2E8F0; /* Light grey track */
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    border: 1px solid #CBD5E1;
}

.toggle-slider {
    width: 26px;
    height: 26px;
    background: #FFFFFF; /* White knob */
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* State for Annual (Right side) */
.toggle-switch.annual { background: var(--brand-primary); border-color: var(--brand-primary); }
.toggle-switch.annual .toggle-slider { left: 30px; background: #FFFFFF; }

.toggle-label { font-weight: 600; color: var(--text-main); transition: 0.3s; opacity: 0.6; }
.toggle-label.active { color: var(--brand-primary); opacity: 1; font-weight: 700; }

.discount-badge {
    background: #FFD700; /* Bright Gold for visibility */
    color: #000;
    font-size: 0.85rem;  /* Larger font */
    padding: 4px 10px;   /* Larger badge */
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 800;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.price-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 30px; 
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.price-card.featured {
    border: 2px solid var(--brand-primary);
    background: #FFFFFF; /* Keep white, but bold border */
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 25px 50px -12px rgba(41, 98, 255, 0.25); /* Blue glow shadow */
}

/* Fix cost-per-msg border color for light mode */
.cost-per-msg {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px 0 20px; 
    display: block;
    padding-bottom: 15px; 
    border-bottom: 1px solid #E2E8F0;
}

.best-value {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.price-header h3 { font-size: 1.5rem; margin-bottom: 5px; }
.price-header p { font-size: 0.9rem; margin-bottom: 20px; }

.price-amount {
    display: flex;
    align-items: flex-start;
    line-height: 1;
}

.currency { font-size: 1.5rem; margin-top: 5px; margin-right: 2px; }
.amount { font-size: 3.5rem; font-weight: 700; font-family: var(--font-head); }
.period { font-size: 1rem; color: var(--text-grey); align-self: flex-end; margin-bottom: 8px; margin-left: 5px; }

.cost-per-msg {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 10px 0 30px;
    display: block;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- STAT STRIP --- */
.stat-strip {
    background: #F0F7FF; /* Very light blue */
    border: 1px solid rgba(41, 98, 255, 0.15);
    padding: 20px 30px;
    border-radius: 50px; /* Pill shape */
    margin-top: 50px;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
}

.fact-badge {
    background: var(--brand-primary);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
    flex-shrink: 0; /* Prevents badge from squishing */
}

@media (max-width: 768px) {
    .stat-strip {
        flex-direction: column;
        border-radius: 20px;
        gap: 10px;
    }
}

/* --- FOOTER --- */
footer {
    padding: 80px 0 40px;
    background-color: var(--bg-dark); /* Dark background */
    color: var(--text-white);         /* White text */
    text-align: center;
    margin-top: 60px;
    /* Curve the top for symmetry with hero */
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

.footer-cta { margin-bottom: 60px; }

.footer-cta h2 { font-size: 2.5rem; margin-bottom: 15px; color: var(--text-white); }
/* Brighten the sub-text */
.footer-cta p { color: rgba(255, 255, 255, 0.8); margin-bottom: 30px; font-size: 1.1rem; } 
.copyright { color: rgba(255,255,255,0.4); font-size: 0.9rem; margin-top: 40px; }

/* --- WIDGET DEMO --- */
.widget-demo {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--brand-primary);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2);
    transition: 0.3s;
}

.widget-demo:hover { transform: scale(1.05); }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .price-card.featured { transform: scale(1); }
    .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding-top: 140px; }
}

/* Fix invisible buttons on white pricing cards */
.price-card .btn-outline {
    border-color: #CBD5E1;     /* Grey border */
    color: var(--text-main);   /* Dark text */
}

.price-card .btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: transparent;
}

/* --- CLEANUP PATCH: Fix missing text colors --- */

/* 1. Fix Feature Lists & Pricing Periods (Dark text on White cards) */
.features-list li, 
.period,
.native-icons {
    color: var(--text-main);
    opacity: 0.8;
}

/* 2. Fix Language Badges (Light text on Dark Background) */
.lang-badge {
    color: rgba(255, 255, 255, 0.7); /* Light Grey */
    border-color: rgba(255, 255, 255, 0.2);
}

/* 3. Ensure the Native Icons stand out */
.native-icons {
    color: var(--brand-primary); /* Make these Blue */
    font-weight: 700;
}

/* =========================================
   MOBILE RESPONSIVENESS
   Add this to the very bottom of homestyle.css
   ========================================= */

/* Tablet & Smaller Laptops (Max Width 1024px) */
@media (max-width: 1024px) {
    .container { max-width: 90%; }
    .hero h1 { font-size: 3rem; }
    .price-card.featured { transform: scale(1.02); } /* Reduce the "pop" size */
}

/* Mobile & Tablets (Max Width 768px) */
@media (max-width: 768px) {
    
    /* Global Spacing Reductions */
    .section-padding { padding: 50px 0; }
    .hero { padding: 120px 0 60px; }
    
    /* Navigation */
    .nav-links { display: none; } /* Hide text links on mobile to save space */
    .nav-flex { justify-content: space-between; }
    .logo { font-size: 1.2rem; }
    .btn-outline { padding: 8px 20px; font-size: 0.9rem; } /* Smaller header button */

    /* Typography Scaling */
    .hero h1 { font-size: 2.4rem; line-height: 1.1; }
    .hero-sub { font-size: 1.1rem; padding: 0 10px; }
    .section-header h2 { font-size: 2rem; }
    
    /* Grid Stacking (Force 1 Column) */
    .grid-2, 
    .pricing-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }

    /* Cards */
    .feature-card, 
    .price-card, 
    .text-block { 
        padding: 30px 20px; /* Reduce internal padding */
    }
    
     /* Reset Featured Pricing Card */
    .price-card.featured { 
        transform: scale(1); 
        /* order: -1; removed to keep logical order */
        margin-bottom: 10px;
    }
    .best-value { top: -12px; }

    /* Native/Async Section Reordering */
    /* We want the Image/Box (Async) to show AFTER the text explanation on mobile */
    .grid-2.align-center { display: flex; flex-direction: column; }
    
    /* Pricing Toggle */
    .toggle-container { gap: 10px; }
    .toggle-label { font-size: 0.9rem; }
    
    /* Footer */
    footer { border-radius: 30px 30px 0 0; } /* Smaller curves */
.footer-cta h2 { font-size: 2rem; }
    .text-huge { font-size: 2.5rem; } 
    
    /* Widget Button Position */
    .widget-demo { 
        bottom: 20px; 
        right: 20px; 
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Small Phones (Max Width 480px) */
@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero-cta-group { display: flex; flex-direction: column; gap: 15px; }
    .btn { width: 100%; text-align: center; }
    
    /* Adjust Pricing Toggle for small screens */
    .toggle-container { flex-direction: column; gap: 15px; }
    .discount-badge { display: inline-block; margin-top: 5px; }
}

/* --- MULTILINGUAL DEMO WIDGET --- */

/* Wrapper to center the button in the section */
.demo-widget-wrapper {
    position: relative;
    height: 100px;       /* Increased height to fit larger button */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

/* The Demo Button - Large & Static */
#demo-trigger-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* SCALED DIMENSIONS (Ratio matched to live widget) */
    /* Reduced horizontal padding from 48px to 32px to match "snug" look */
    padding: 22px 32px; 
    font-size: 26px; 
    
    background-color: #2962FF; 
    color: white;
    border: none;
    border-radius: 80px; 
    cursor: default; 
    z-index: 10;
    
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: 0.5px;
    white-space: nowrap;
    
    /* Clean, Static Shadow */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    
    transition: transform 0.2s ease, opacity 0.3s ease;
}

/* The Tail - Scaled & Positioned to match ratio */
#demo-trigger-button::before {
    content: '';
    position: absolute;
    
    /* Moved closer to edge (14px) to match the tighter curve radius */
    right: 14px; 
    bottom: -10px; 
    
    /* Slightly larger to maintain geometry with the larger bubble */
    width: 50px;
    height: 30px;
    
    background-color: inherit; 
    
    transform: rotate(45deg) skewX(45deg);
    
    border-radius: 6px;
    z-index: -1; 
}

/* Animations removed for static stability */
/* Fade Out State for Text Swap */
.fade-out {
    opacity: 0;
    transform: translateY(10px);
}
