/* Landing Page Specific Styles */

:root {
    --header-height: 68px;
    --section-spacing: 100px;
    --container-width: 1200px;

    /* Branding Colors */
    --brand-primary: #3B82F6;
    --brand-dark: #0F172A;
    --brand-light: #F8FAFC;

    /* CTA Shadow */
    --cta-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    --cta-shadow-hover: 0 12px 32px rgba(59, 130, 246, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Base Landing Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    overflow-x: hidden;
    overflow-y: auto; /* Enable scroll for landing */
}

a, button, .btn, .nav-link, .btn-primary, .btn-outline, .btn-signup {
    text-decoration: none !important;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.header .container {
    height: 100%;
}

.section-padding {
    padding: var(--section-spacing) 0;
}

.bg-light {
    background-color: var(--primary-light);
}

.bg-dark {
    background-color: var(--brand-dark);
}

.text-white {
    color: #FFFFFF !important;
}

.text-center {
    text-align: center !important;
}

.max-width-700 {
    max-width: 700px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-50 {
    margin-top: 60px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(var(--bg-panel-rgb), 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--theme-transition), height 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    height: 60px;
    background: var(--bg-panel);
    box-shadow: 0 1px 0 var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
}

.logo i {
    color: var(--info);
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--info);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */

.btn-signup {
    padding: 10px 22px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    background: var(--info) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
    color: #FFFFFF !important;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease !important;
    border: none !important;
    font-size: 0.9rem !important;
    cursor: pointer;
}

.btn-signup:hover {
    background: #2563EB !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.38) !important;
}

.btn-signup:active {
    transform: scale(0.97) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 100px);
    padding-bottom: 120px;
    text-align: center;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59,130,246,0.07), transparent);
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.12;
    color: var(--text-primary);
    max-width: 620px;
    margin: 0 auto 20px;
    letter-spacing: -0.04em;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 0;
}

/* Hero primary CTA — must be the most prominent element */
.hero .btn-primary {
    background: var(--info) !important;
    border-color: var(--info) !important;
    color: #fff !important;
    padding: 14px 36px !important;
    height: auto !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: var(--cta-shadow) !important;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease !important;
    margin-left: 0 !important;
    cursor: pointer;
}

.hero .btn-primary:hover {
    background: #2563EB !important;
    border-color: #2563EB !important;
    box-shadow: var(--cta-shadow-hover) !important;
    transform: translateY(-2px) !important;
}

.hero .btn-primary:active {
    transform: scale(0.97) translateY(0) !important;
    box-shadow: var(--cta-shadow) !important;
}

.hero-support {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Sections */
.section-title {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.section-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.section-wrapper .section-text {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.section-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 20px;
    max-width: 580px;
}

/* Tablet (iPad/iPad Pro) */
@media (max-width: 1024px) {
    .section-wrapper {
        max-width: 600px;
        padding: 0 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section-wrapper {
        max-width: 100%;
        padding: 0 12px;
    }
    .section-text {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-panel);
    padding: 32px 28px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0,0,0,0.07);
    border-color: rgba(59,130,246,0.4);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--info-bg);
    color: var(--info);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* How it Helps */
.how-it-helps-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.how-it-helps-text .section-title {
    margin-bottom: 24px;
}

.check-list {
    list-style: none;
    margin-top: 28px;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.check-list li + li {
    margin-top: 22px;
}

.check-list li i {
    color: var(--success);
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========== Demo Animation System ========== */
.simulation-container {
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    overflow: hidden; /* Prevent horizontal bleed in any animation phase */
}

/* Scene switching */
.sim-scene {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%; /* Never exceed container */
    padding: 0 4px; /* Inner safety margin so cards don't touch edges */
    display: flex;
    justify-content: center;
    transition: opacity 0.6s ease, transform 0.6s ease;
    box-sizing: border-box;
}

.sim-scene--chat {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 2;
}

.sim-scene--chat.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.97);
    pointer-events: none;
}

.sim-scene--email {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.02);
    pointer-events: none;
    z-index: 1;
}

.sim-scene--email.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    z-index: 2;
}

/* Shared window chrome */
.sim-window {
    width: 100%;
    max-width: 440px;
    background: var(--bg-panel);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 48px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

body.dark-theme .sim-window {
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.sim-header {
    background: var(--bg-hover);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.sim-dots {
    display: flex;
    gap: 8px;
}

.sim-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF5F56;
}
.sim-dots span:nth-child(2) { background: #FFBD2E; }
.sim-dots span:nth-child(3) { background: #27C93F; }

.sim-title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 44px;
}

/* ── Chat body ── */
.chat-body {
    padding: 28px 24px;
    height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-panel);
}

.chat-message {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.chat-message.bot {
    background: var(--bg-hover);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--info);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
}

/* Dynamic bubble animation */
.chat-message.sim-dynamic {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-message.sim-dynamic.show {
    opacity: 1;
    transform: translateY(0);
}

/* Status inline messages */
.chat-status {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    padding: 6px 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.chat-status.show {
    opacity: 1;
    transform: translateY(0);
}

.chat-status.ready {
    color: var(--success);
    font-weight: 600;
}

/* Dots loading animation */
.loading-dots span {
    display: inline-block;
    animation: dotPulse 1.2s ease-in-out infinite;
    font-weight: 700;
    font-size: 1.1em;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 1; }
}

/* Typing cursor */
.cursor {
    display: inline-block;
    margin-left: 2px;
    opacity: 0;
}

.cursor.active {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Chat footer */
.sim-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: var(--bg-hover);
    align-items: center;
}

.sim-input-fake {
    flex: 1;
    height: 40px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sim-input-fake.active {
    border-color: var(--info);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.sim-input-fake .placeholder {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    transition: opacity 0.25s ease;
}

.sim-btn-send {
    width: 40px;
    height: 40px;
    background: var(--info);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.sim-btn-send.sending {
    transform: scale(0.9);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

.sim-btn-send i {
    font-size: 1.1rem;
    margin-left: 2px;
}

/* ========== Email Card Scene ========== */
.mock-email {
    max-width: 440px;
    box-sizing: border-box;
}

.email-body {
    padding: 28px 28px 24px;
    background: var(--bg-panel);
    box-sizing: border-box;
    overflow: hidden;
}

.email-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--info-bg);
    color: var(--info);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.email-meta {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.email-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
}

.email-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 56px;
}

.email-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.email-subject {
    font-weight: 700;
    color: var(--text-primary);
}

.email-content {
    font-size: 0.9rem;
    line-height: 1.72;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-break: break-word;
}

.email-content p {
    margin-bottom: 10px;
}

.email-content p:last-child {
    margin-bottom: 0;
}

.email-sign {
    margin-top: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.email-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-hover);
    font-size: 0.85rem;
    box-sizing: border-box;
    font-weight: 700;
    color: var(--success);
    border-radius: 0 0 20px 20px;
}

.email-status i {
    font-size: 1.1rem;
}

/* System Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-item {
    padding: 24px;
    background: var(--bg-panel);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.stat-item i {
    font-size: 2rem;
    color: var(--info);
    margin-bottom: 12px;
    display: block;
}

.stat-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Functions / Why MailFlow */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.function-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

body.dark-theme .function-card {
    background: #161618;
}

.function-card:hover {
    border-color: rgba(59,130,246,0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.function-icon {
    width: 44px;
    height: 44px;
    background: var(--info-bg);
    color: var(--info);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

body.dark-theme .function-icon,
body.dark-theme .feature-icon {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.function-card p {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
}


body.dark-theme .feature-card,
body.dark-theme .pricing-card,
body.dark-theme .faq-item {
    background: #161618; /* Consistent darker gray for all cards */
}



/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: var(--bg-panel);
    padding: 44px 36px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(59,130,246,0.4);
}

.pricing-card.featured {
    border-color: var(--info);
    border-width: 2px;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.pricing-card.disabled {
    background: #f8f9fa;
    border-color: #e9ecef;
    opacity: 0.7;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.5);
}

body.dark-theme .pricing-card.disabled {
    background: #161618;
    border-color: #2a2a2a;
}

.pricing-card.disabled .pricing-card-header h3,
.pricing-card.disabled .pricing-card-header p,
.pricing-card.disabled .pricing-features li {
    color: var(--text-tertiary);
}

.pro-status-msg {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
}

.pricing-card.featured::before {
    content: 'RECOMENDADO';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: linear-gradient(90deg, var(--info), #2563EB);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.1em;
}

.pricing-card.featured .pricing-header {
    margin-top: 15px;
}

.mt-30 {
    margin-top: 30px;
}

.plan-label {
    display: inline-block;
    padding: 6px 12px;
    background: var(--info-bg);
    color: var(--info);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 20px 0 16px;
}

.price span {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
}

.price small {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 24px 0 32px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.pricing-features li i {
    color: var(--success);
    flex-shrink: 0;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.pricing-note {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* FAQ */
.faq-item {
    background: var(--bg-panel);
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.04);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
    color: var(--info);
}

.faq-question i {
    transition: transform 0.3s ease, color 0.2s ease;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--info);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease-out, padding 0.25s ease;
    padding: 0 24px;
}

.faq-item.active .faq-content {
    max-height: 400px;
    padding-bottom: 20px;
}

.faq-content p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

@media (max-width: 991px) {

    .how-it-helps-content {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .functions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-info .logo {
    margin-bottom: 20px;
}

.footer-info p {
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 14px;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    cursor: pointer;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: justify; /* Ensure there is somewhat of a distribution, or center */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* ─── 900px: Header hamburger breakpoint ─── */
/* All tablet sizes (820px, 834px, 884px, 900px) use hamburger nav */
@media (max-width: 900px) {
    :root {
        --header-height: 60px;
    }

    /* Hide horizontal nav, show hamburger */
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-panel);
        padding: 32px 24px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .nav.open {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .nav-link {
        font-size: 1.05rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-actions {
        gap: 12px;
    }

    .hero {
        padding-top: calc(var(--header-height) + 64px);
    }
}

/* ─── 768px: General mobile layout ─── */
@media (max-width: 768px) {
    :root {
        --section-spacing: 72px;
    }

    .container {
        padding: 0 20px;
    }

    .hero {
        padding-bottom: 72px;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
        max-width: 100%;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero .btn-primary {
        padding: 13px 28px !important;
        font-size: 0.95rem !important;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: clamp(1.6rem, 6vw, 2rem);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .functions-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-it-helps-content {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: left;
    }

    /* ── Demo animation: tablet ── */
    .simulation-container {
        min-height: 480px;
    }

    .sim-window {
        max-width: 100%;
        border-radius: 16px;
    }

    .sim-scene {
        width: 100%;
        padding: 0 8px;
    }

    .sim-header {
        padding: 12px 16px;
    }

    .sim-dots span {
        width: 10px;
        height: 10px;
    }

    .sim-title {
        font-size: 0.75rem;
        margin-right: 34px;
    }

    .chat-body {
        height: 300px;
        padding: 22px 18px;
        gap: 14px;
    }

    .sim-footer {
        padding: 14px 18px;
    }

    .email-body {
        padding: 22px 20px 20px;
    }

    .email-content {
        font-size: 0.87rem;
    }

    .email-status {
        padding: 12px 20px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
}

/* ─── 480px: Large mobile ─── */
@media (max-width: 480px) {
    :root {
        --section-spacing: 52px;
    }

    .container {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .btn-signup {
        padding: 9px 16px !important;
        font-size: 0.88rem !important;
    }

    /* Demo animation: large mobile */
    .simulation-container {
        min-height: 440px;
        padding: 12px 0;
    }

    .sim-scene {
        padding: 0 6px;
    }

    .sim-window {
        border-radius: 14px;
    }

    .sim-header {
        padding: 10px 14px;
    }

    .sim-dots span {
        width: 9px;
        height: 9px;
        gap: 6px;
    }

    .sim-title {
        font-size: 0.7rem;
        margin-right: 28px;
    }

    .chat-body {
        height: 270px;
        padding: 18px 14px;
        gap: 12px;
    }

    .chat-message {
        font-size: 0.87rem;
        padding: 10px 14px;
        max-width: 90%;
        border-radius: 14px;
    }

    .chat-message.user {
        border-bottom-right-radius: 4px;
    }

    .chat-message.bot {
        border-bottom-left-radius: 4px;
    }

    .sim-footer {
        padding: 12px 14px;
        gap: 10px;
    }

    .sim-input-fake {
        height: 38px;
        padding: 0 14px;
    }

    .sim-input-fake .placeholder {
        font-size: 0.82rem;
    }

    .sim-btn-send {
        width: 38px;
        height: 38px;
    }

    .sim-btn-send i {
        font-size: 1rem;
    }

    /* Email card: large mobile */
    .email-body {
        padding: 20px 18px 18px;
    }

    .email-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 16px;
    }

    .email-meta {
        padding-bottom: 14px;
        margin-bottom: 16px;
    }

    .email-meta-row {
        gap: 8px;
        padding: 4px 0;
    }

    .email-label {
        font-size: 0.72rem;
        min-width: 48px;
    }

    .email-value {
        font-size: 0.85rem;
    }

    .email-content {
        font-size: 0.84rem;
        line-height: 1.65;
    }

    .email-content p {
        margin-bottom: 8px;
    }

    .email-sign {
        margin-top: 6px;
    }

    .email-status {
        padding: 12px 18px;
        font-size: 0.82rem;
    }

    .email-status i {
        font-size: 1rem;
    }
}

/* ─── 360px: Small mobile ─── */
@media (max-width: 374px) {
    /* Demo animation: small mobile */
    .simulation-container {
        min-height: 410px;
        padding: 8px 0;
    }

    .sim-scene {
        padding: 0 4px;
    }

    .sim-window {
        border-radius: 12px;
    }

    .sim-header {
        padding: 9px 12px;
    }

    .sim-dots span {
        width: 8px;
        height: 8px;
    }

    .sim-title {
        font-size: 0.65rem;
        margin-right: 24px;
    }

    .chat-body {
        height: 240px;
        padding: 14px 10px;
        gap: 10px;
    }

    .chat-message {
        font-size: 0.82rem;
        padding: 9px 12px;
        max-width: 92%;
        border-radius: 12px;
    }

    .chat-message.user {
        border-bottom-right-radius: 4px;
    }

    .chat-message.bot {
        border-bottom-left-radius: 4px;
    }

    .chat-status {
        font-size: 0.78rem;
    }

    .sim-footer {
        padding: 10px 10px;
        gap: 8px;
    }

    .sim-input-fake {
        height: 36px;
        padding: 0 12px;
        border-radius: 18px;
    }

    .sim-input-fake .placeholder {
        font-size: 0.78rem;
    }

    .sim-btn-send {
        width: 36px;
        height: 36px;
    }

    .sim-btn-send i {
        font-size: 0.95rem;
    }

    /* Email card: small mobile */
    .email-body {
        padding: 16px 14px 14px;
    }

    .email-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
        margin-bottom: 12px;
    }

    .email-meta {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .email-meta-row {
        gap: 6px;
        padding: 3px 0;
    }

    .email-label {
        font-size: 0.68rem;
        min-width: 42px;
    }

    .email-value {
        font-size: 0.8rem;
    }

    .email-content {
        font-size: 0.79rem;
        line-height: 1.6;
    }

    .email-content p {
        margin-bottom: 6px;
    }

    .email-sign {
        margin-top: 4px;
        font-size: 0.79rem;
    }

    .email-status {
        padding: 10px 14px;
        font-size: 0.78rem;
        gap: 6px;
        border-radius: 0 0 12px 12px;
    }

    .email-status i {
        font-size: 0.95rem;
    }
}
