/* ==========================================================================
   HOMEPAGE — Apple-Level Design System
   Pure custom CSS. Bootstrap used ONLY for .container max-width centering.
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    --hp-blue: #0071e3;
    --hp-blue-hover: #0077ed;
    --hp-blue-link: #0066cc;
    --hp-blue-link-dark: #2997ff;
    --hp-dark: #1d1d1f;
    --hp-gray: #86868b;
    --hp-gray-dark: #6e6e73;
    --hp-light-bg: #f5f5f7;
    --hp-white: #ffffff;
    --hp-black: #000000;
    --hp-border: #d2d2d7;
    --hp-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --hp-radius-card: 20px;
    --hp-radius-pill: 980px;
}

/* --- Font Smoothing (Apple-level rendering) --- */
.hp-hero, .hp-trusted, .hp-section {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Fade-in on Scroll --- */
.hp-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.hp-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .hp-fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hp-hero-card {
        animation: none;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hp-hero {
    background: linear-gradient(135deg, #1e3a8a 10%, #3b82f6 90%);
    padding: 5rem 0 4rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Hero left column */
.hp-hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Centered hero layout (fallback if no right column) */
.hp-hero-center {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.hp-hero-center .hp-hero-form {
    margin-left: auto;
    margin-right: auto;
}
.hp-hero-center .hp-hero-social {
    justify-content: center;
}
.hp-hero-center .hp-hero-demo {
    text-align: center;
}

/* --- Hero Left Column --- */
.hp-hero-title {
    font-family: var(--hp-font);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: #ffffff;
    margin: 0 0 1rem;
}

.hp-hero-subtitle {
    font-family: var(--hp-font);
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.47;
    letter-spacing: 0.011em;
    opacity: 0.9;
    margin: 0 0 1.5rem;
}

/* Email input group */
.hp-hero-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--hp-radius-pill);
    padding: 5px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    max-width: 480px;
    margin-bottom: 1rem;
}
.hp-hero-form:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.hp-hero-form.shake {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.3);
}

.hp-hero-email {
    flex: 1;
    min-width: 0;
    border: none;
    background: #ffffff;
    color: var(--hp-dark);
    padding: 14px 20px;
    font-size: 16px;
    border-radius: var(--hp-radius-pill);
    outline: none;
    font-family: var(--hp-font);
}
.hp-hero-email::placeholder {
    color: var(--hp-gray);
}

.hp-hero-submit {
    flex-shrink: 0;
    background: var(--hp-white);
    color: var(--hp-dark);
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--hp-radius-pill);
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 5px;
    white-space: nowrap;
    font-family: var(--hp-font);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
}
.hp-hero-submit:hover {
    background: var(--hp-light-bg);
}
.hp-hero-submit svg {
    vertical-align: middle;
}

/* Social login row */
.hp-hero-social {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.hp-hero-social-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    letter-spacing: 0.01em;
    font-family: var(--hp-font);
}
.hp-hero-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
}
.hp-hero-social-icon:hover {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* Demo link */
.hp-hero-demo {
    margin-top: 8px;
}
.hp-hero-demo a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--hp-radius-pill);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: var(--hp-font);
}
.hp-hero-demo a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* --- Hero Chat Card --- */
.hp-hero-card {
    border-radius: var(--hp-radius-card);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    height: 460px;
    max-height: 460px;
    padding: 1.25rem;
    backface-visibility: hidden;
    perspective: 1000px;
    transition: box-shadow 0.3s ease;
    animation: hp-float 6s ease-in-out infinite;
}

@keyframes hp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Chatbot header */
.hp-chat-header {
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--hp-border);
    position: relative;
}

.hp-chat-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hp-blue);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.hp-chat-name {
    font-family: var(--hp-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--hp-dark);
    margin: 0;
    line-height: 1.3;
}

.hp-chat-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--hp-radius-pill);
    font-family: var(--hp-font);
}

/* Chat messages area */
.hp-chat-messages {
    height: 300px;
    max-height: 300px;
    min-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 5px;
    position: relative;
    flex: 1;
}

.hp-chat-msg {
    max-width: 85%;
    word-break: break-word;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    animation: hp-slideUp 0.5s ease-out forwards;
    font-size: 14px;
    line-height: 1.5;
    font-family: var(--hp-font);
}
.hp-chat-msg p {
    margin: 0;
}

.hp-chat-msg--ai {
    background-color: var(--hp-light-bg);
    border-top-left-radius: 4px;
    margin-right: auto;
    color: var(--hp-dark);
}
.hp-chat-msg--ai:first-child {
    animation: hp-slideUp 0.8s ease-out 0.5s forwards;
}

.hp-chat-msg--user {
    background-color: var(--hp-blue);
    border-top-right-radius: 4px;
    margin-left: auto;
    color: #ffffff;
}

@keyframes hp-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing indicator */
.hp-typing {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    width: fit-content;
    background: var(--hp-light-bg);
    border-radius: 16px;
    border-top-left-radius: 4px;
    margin-bottom: 0.75rem;
}
.hp-typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d2d2d7;
    margin-right: 5px;
}
.hp-typing-dot:last-child {
    margin-right: 0;
}
@media (min-width: 1024px) {
    .hp-typing-dot {
        animation: hp-wave 1.3s linear infinite;
    }
    .hp-hero-card:hover {
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    }
}
.hp-typing-dot:nth-child(2) { animation-delay: -1.1s; }
.hp-typing-dot:nth-child(3) { animation-delay: -0.9s; }

@keyframes hp-wave {
    0%, 60%, 100% { transform: initial; }
    30% { transform: translateY(-10px); }
}

/* Chat input area */
.hp-chat-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    position: relative;
}

.hp-chat-field {
    flex: 1;
    border: none;
    background: var(--hp-light-bg);
    color: var(--hp-dark);
    padding: 10px 18px;
    font-size: 14px;
    border-radius: var(--hp-radius-pill);
    outline: none;
    font-family: var(--hp-font);
}
.hp-chat-field::placeholder {
    color: var(--hp-gray);
}

.hp-chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--hp-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.hp-chat-send:hover {
    background: var(--hp-blue-hover);
}

/* ==========================================================================
   HERO RIGHT — Channel cards visual
   ========================================================================== */
.hp-hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 400px;
    max-width: 400px;
    margin-left: auto;
}
.hp-hero-channels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 380px;
}
.hp-channel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}
.hp-channel-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(-4px);
}
.hp-channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hp-channel-icon--web { background: #0071e3; }
.hp-channel-icon--wa { background: #25D366; }
.hp-channel-icon--ig { background: linear-gradient(135deg, #833AB4, #E1306C, #F77737); }
.hp-channel-icon--email { background: #6366f1; }
.hp-channel-info {
    flex: 1;
    min-width: 0;
}
.hp-channel-name {
    display: block;
    font-family: var(--hp-font);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}
.hp-channel-msg {
    display: block;
    font-family: var(--hp-font);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hp-channel-badge {
    flex-shrink: 0;
    font-family: var(--hp-font);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   TRUSTED SECTION
   ========================================================================== */
.hp-trusted {
    position: relative;
    z-index: 1;
    background: var(--hp-white);
    padding: 4rem 0;
}

.hp-trusted-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hp-trusted-headline {
    font-family: var(--hp-font);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hp-dark);
    letter-spacing: -0.025em;
    line-height: 1.06;
    margin: 0 0 0.75rem;
}

.logo-carousel-wrapper {
    position: relative;
    width: 100%;
}
.logo-carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 20px 0;
}
.carousel-logo {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.45;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.logo-carousel-track .carousel-logo:nth-child(n+5) {
    display: none;
}

/* ==========================================================================
   SHARED SECTION COMPONENTS — Apple Typography
   ========================================================================== */

/* Section Label (small eyebrow) */
.hp-label {
    font-family: var(--hp-font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hp-gray);
    margin-bottom: 0.75rem;
}

/* Section Headline */
.hp-headline {
    font-family: var(--hp-font);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--hp-dark);
    letter-spacing: -0.025em;
    line-height: 1.06;
    margin-bottom: 1rem;
}

/* Section Subheadline */
.hp-subheadline {
    font-family: var(--hp-font);
    font-size: 1.3125rem;
    font-weight: 400;
    color: var(--hp-gray);
    line-height: 1.38;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 0.011em;
}

/* --- Buttons: Apple pill style --- */
.hp-btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hp-blue);
    color: #fff;
    border-radius: var(--hp-radius-pill);
    padding: 11px 24px;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.3s ease;
    font-family: var(--hp-font);
    letter-spacing: -0.022em;
}
.hp-btn-dark:hover {
    background: var(--hp-blue-hover);
    color: #fff;
    text-decoration: none;
}

.hp-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--hp-blue-link);
    border: 1.5px solid var(--hp-blue-link);
    border-radius: var(--hp-radius-pill);
    padding: 10px 24px;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--hp-font);
    letter-spacing: -0.022em;
}
.hp-btn-outline:hover {
    background: var(--hp-blue-link);
    color: #fff;
    text-decoration: none;
}

/* Blue text link */
.hp-link-blue {
    color: var(--hp-blue-link);
    font-size: 1.3125rem;
    font-weight: 400;
    display: inline-block;
    text-decoration: none;
    font-family: var(--hp-font);
    letter-spacing: 0.011em;
}
.hp-link-blue:hover {
    text-decoration: underline;
    color: var(--hp-blue-link);
}

/* ==========================================================================
   SECTION SYSTEM — Apple-style layout
   ========================================================================== */
.hp-section {
    padding: 7.5rem 0;
    text-align: center;
}
.hp-section--white {
    background: var(--hp-white);
}
.hp-section--gray {
    background: var(--hp-light-bg);
}
.hp-section--dark {
    background: linear-gradient(135deg, #1e3a8a 10%, #3b82f6 90%);
}
.hp-section-content {
    max-width: 680px;
    margin: 0 auto;
}

/* Display headline */
.hp-display {
    font-family: var(--hp-font);
    font-size: 4rem;
    font-weight: 700;
    color: var(--hp-dark);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}
.hp-display--light {
    color: #f5f5f7;
}

/* Dark section variant labels/subheadlines */
.hp-label--dark {
    color: rgba(255, 255, 255, 0.6);
}
.hp-subheadline--dark {
    color: rgba(255, 255, 255, 0.75);
}

/* CTA row */
.hp-cta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Dark section button variants */
.hp-btn-outline--dark {
    border-color: rgba(255, 255, 255, 0.3);
    color: #f5f5f7;
}
.hp-btn-outline--dark:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}
.hp-link-blue--dark {
    color: rgba(255, 255, 255, 0.9);
}
.hp-link-blue--dark:hover {
    color: #ffffff;
}

/* ==========================================================================
   FEATURE CARDS — Apple-style grid
   ========================================================================== */
.hp-feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3.5rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.hp-feature-card {
    background: var(--hp-light-bg);
    border-radius: var(--hp-radius-card);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hp-section--gray .hp-feature-card {
    background: var(--hp-white);
}
.hp-section--white .hp-feature-card {
    background: var(--hp-light-bg);
}
.hp-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.hp-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: var(--hp-light-bg);
}
.hp-section--white .hp-feature-icon {
    background: #ebebed;
}
.hp-feature-icon svg {
    stroke: var(--hp-dark);
}

.hp-feature-card h3 {
    font-family: var(--hp-font);
    font-size: 1.3125rem;
    font-weight: 600;
    color: var(--hp-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.hp-feature-card p {
    font-size: 15px;
    color: var(--hp-gray);
    line-height: 1.47;
    margin: 0;
    letter-spacing: -0.022em;
}

/* ==========================================================================
   PLATFORM ICONS — Apple monochrome style
   ========================================================================== */
.hp-platforms {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.hp-platform-item {
    text-align: center;
}
.hp-icon-box {
    width: 64px;
    height: 64px;
    background: var(--hp-light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: background 0.2s ease;
    color: var(--hp-dark);
}
.hp-icon-box:hover {
    background: #ebebed;
}
.hp-icon-box svg {
    width: 24px;
    height: 24px;
}
.hp-platform-item span {
    font-size: 12px;
    color: var(--hp-gray);
    margin-top: 8px;
    display: block;
    letter-spacing: -0.01em;
    font-family: var(--hp-font);
}

/* Dark section platform variants */
.hp-platforms--dark .hp-platform-item span {
    color: rgba(255, 255, 255, 0.85);
}
.hp-icon-box--dark {
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f7;
}
.hp-icon-box--dark:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   STATS GRID — Apple-style numbers on dark bg
   ========================================================================== */
.hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 3.5rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}
.hp-stat-card {
    text-align: center;
    padding: 2.5rem 1rem;
    border-radius: var(--hp-radius-card);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.hp-stat-number {
    font-family: var(--hp-font);
    font-size: 3.5rem;
    font-weight: 700;
    color: #f5f5f7;
    letter-spacing: -0.03em;
    line-height: 1;
}
.hp-stat-desc {
    font-size: 15px;
    color: #86868b;
    margin-top: 0.5rem;
    letter-spacing: -0.01em;
    font-family: var(--hp-font);
}

/* ==========================================================================
   RESPONSIVE — 1068px (Tablet landscape)
   ========================================================================== */
@media (max-width: 1068px) {
    .hp-hero-title {
        font-size: 2.75rem;
    }
    .hp-headline {
        font-size: 2.75rem;
    }
    .hp-trusted-headline {
        font-size: 2rem;
    }
    .hp-display {
        font-size: 3.25rem;
    }
    .hp-subheadline {
        font-size: 1.1875rem;
    }
    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hp-stat-number {
        font-size: 2.75rem;
    }
}

/* ==========================================================================
   RESPONSIVE — 767px (Tablet portrait)
   ========================================================================== */
@media (max-width: 767px) {
    .hp-hero {
        padding: 3rem 0 2.5rem;
    }
    .hp-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hp-hero-left {
        text-align: center;
    }
    .hp-hero-left .hp-hero-form {
        margin-left: auto;
        margin-right: auto;
    }
    .hp-hero-left .hp-hero-social {
        justify-content: center;
    }
    .hp-hero-left .hp-hero-demo {
        text-align: center;
    }
    .hp-hero-right {
        display: none;
    }
    .hp-hero-center {
        max-width: 100%;
    }
    .hp-hero-title {
        font-size: 2.25rem;
    }
    .hp-headline {
        font-size: 2.25rem;
    }
    .hp-trusted-headline {
        font-size: 1.75rem;
    }
    .hp-display {
        font-size: 2.5rem;
    }
    .hp-subheadline {
        font-size: 1.0625rem;
    }
    .hp-link-blue {
        font-size: 1.0625rem;
    }
    .hp-section {
        padding: 4.5rem 0;
    }
    .hp-feature-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        gap: 1rem;
    }
    .hp-platforms {
        gap: 1.5rem;
    }
    .hp-stat-number {
        font-size: 2.25rem;
    }
}

/* ==========================================================================
   RESPONSIVE — 550px (Mobile)
   ========================================================================== */
@media (max-width: 550px) {
    section + section { margin-top: 0; }

    /* Hero mobile */
    .hp-hero {
        padding: 2rem 0 1.5rem;
    }
    .hp-hero .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .hp-hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .hp-hero-left {
        text-align: center;
    }
    .hp-hero-center {
        max-width: 100%;
    }
    .hp-hero-title {
        font-size: 1.75rem;
        line-height: 1.15;
        margin-bottom: 0.5rem;
        letter-spacing: -0.02em;
    }
    .hp-hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        opacity: 0.85;
    }
    .hp-hero-form {
        flex-direction: column;
        max-width: 100%;
        padding: 5px;
        margin-bottom: 0.75rem;
        border-radius: 16px;
    }
    .hp-hero-email {
        width: 100%;
        border-radius: 12px;
        padding: 12px 16px;
    }
    .hp-hero-submit {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
        padding: 12px 20px;
        border-radius: 12px;
        justify-content: center;
    }
    .hp-hero-social {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 2px;
        margin-bottom: 14px;
        gap: 8px;
    }
    .hp-hero-social-label {
        width: 100%;
        text-align: center;
        margin-bottom: 4px;
        font-size: 0.78rem;
    }
    .hp-hero-social-icon {
        width: 44px;
        height: 44px;
        margin: 0 4px;
    }
    .hp-hero-demo {
        text-align: center;
        margin-top: 0;
        margin-bottom: 0;
    }
    .hp-hero-demo a {
        padding: 10px 24px;
        font-size: 0.85rem;
        gap: 6px;
        border-radius: var(--hp-radius-pill);
    }

    /* Hide channel cards on mobile */
    .hp-hero-right {
        display: none;
    }

    /* Trusted mobile */
    .hp-trusted {
        padding: 1.5rem 0 1rem;
    }
    .hp-trusted-header {
        margin-bottom: 0.75rem;
    }
    .hp-trusted-headline {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .hp-trusted .hp-subheadline {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }
    .logo-carousel-wrapper {
        padding: 0 20px;
    }
    .logo-carousel-track {
        gap: 20px;
        padding: 6px 0;
        justify-content: center;
        flex-wrap: wrap;
    }
    .carousel-logo {
        height: 26px;
        max-width: 80px;
    }

    /* Chat card mobile (in case JS references) */
    .hp-chat-messages {
        height: 200px;
        max-height: 200px;
        min-height: 200px;
    }
    .hp-chat-msg {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
        animation: none;
        opacity: 1;
        transform: translateY(0);
    }
    .hp-chat-msg--ai:first-child {
        animation: none;
        opacity: 1;
        transform: translateY(0);
    }
    .hp-chat-header {
        padding-bottom: 0.65rem;
        margin-bottom: 0.85rem;
    }
    .hp-chat-name {
        font-size: 0.9rem;
    }
    .hp-chat-avatar {
        width: 32px;
        height: 32px;
    }
    .hp-chat-avatar svg {
        width: 16px;
        height: 16px;
    }
    .hp-chat-field {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    .hp-chat-send {
        width: 36px;
        height: 36px;
    }
    .hp-chat-send svg {
        width: 14px;
        height: 14px;
    }
    .hp-typing-dot {
        width: 6px;
        height: 6px;
    }
    .hp-typing {
        display: none;
    }

    /* Sections mobile */
    .hp-headline {
        font-size: 1.75rem;
    }
    .hp-display {
        font-size: 2rem;
    }
    .hp-subheadline {
        font-size: 0.95rem;
    }
    .hp-link-blue {
        font-size: 0.95rem;
    }
    .hp-section {
        padding: 3rem 0;
    }
    .hp-feature-cards {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 0.875rem;
    }
    .hp-feature-card {
        padding: 1.75rem 1.5rem;
    }
    .hp-platforms {
        gap: 1.25rem;
        max-width: 260px;
        margin-left: auto;
        margin-right: auto;
    }
    .hp-icon-box {
        width: 52px;
        height: 52px;
    }
    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .hp-stat-card {
        padding: 1.5rem 0.75rem;
    }
    .hp-stat-number {
        font-size: 1.75rem;
    }
    .hp-stat-desc {
        font-size: 13px;
    }
    .hp-cta-row {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .hp-cta-row .hp-btn-dark,
    .hp-cta-row .hp-btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ==========================================================================
   RESPONSIVE — 400px (Extra small)
   ========================================================================== */
@media (max-width: 400px) {
    .hp-hero-card {
        height: 290px;
        max-height: 290px;
        transform: scale(0.9);
    }
    .hp-chat-messages {
        height: 180px;
        max-height: 180px;
        min-height: 180px;
    }
    .hp-headline {
        font-size: 1.5rem;
    }
    .hp-display {
        font-size: 1.75rem;
    }
    .hp-section {
        padding: 2.5rem 0;
    }
    .hp-feature-card {
        padding: 1.5rem 1.25rem;
    }
    .hp-stat-number {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   RESPONSIVE — 375px (iPhone SE / small)
   ========================================================================== */
@media (max-width: 375px) {
    .hp-hero-title {
        font-size: 1.5rem;
    }
    .hp-hero-subtitle {
        font-size: 0.875rem;
    }
    .hp-hero-social-icon {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   HEADER & FOOTER APPLE OVERRIDES (over finland CSS)
   ========================================================================== */
#minimal-custom-header {
    --primary-color: #0071e3;
    --accent-color: #0071e3;
    --button-radius: 980px;
    --text-color: #1d1d1f;
    --border-color: rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.82) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

#minimal-custom-header .desktop-nav a {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.01em !important;
    opacity: 0.88;
    transition: opacity 0.2s ease !important;
}
#minimal-custom-header .desktop-nav a:hover {
    opacity: 1;
    color: #1d1d1f !important;
}
#minimal-custom-header .desktop-nav a::after {
    display: none !important;
}

#minimal-custom-header .btn-text {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #1d1d1f !important;
    opacity: 0.88;
    transition: opacity 0.2s ease !important;
}
#minimal-custom-header .btn-text:hover {
    opacity: 1;
    color: #1d1d1f !important;
}

#minimal-custom-header .btn-primary {
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 8px 18px !important;
    letter-spacing: -0.01em !important;
    background-color: #0071e3 !important;
    border-radius: 980px !important;
    transition: background-color 0.15s ease !important;
}
#minimal-custom-header .btn-primary:hover {
    background-color: #0077ed !important;
}

#minimal-custom-header .header-logo img {
    height: 26px !important;
}

#minimal-custom-header .language-button {
    color: #1d1d1f !important;
    opacity: 0.56;
    transition: opacity 0.15s ease;
}
#minimal-custom-header .language-button:hover {
    opacity: 0.88;
    background-color: transparent !important;
}

/* Mobile menu refinements */
.mobile-btn-primary {
    background-color: #0071e3 !important;
    border-radius: 12px !important;
}
.mobile-btn-primary:hover {
    background-color: #0077ed !important;
}
.mobile-btn-text {
    border-radius: 12px !important;
}

/* ==========================================================================
   LEGACY COMPAT — Bootstrap overrides for shared components
   ========================================================================== */
:root {
    --primary: #0071e3;
    --primary-dark: #0077ed;
    --primary-light: #2997ff;
    --primary-soft: rgba(0, 113, 227, 0.08);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --light: #f5f5f7;
    --dark: #1d1d1f;
    --gray: #86868b;
    --white: #ffffff;
    --bg-color: #fff;
    --text-light: #86868b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --border-color: #d2d2d7;
    --transition-speed: 0.3s;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.bg-primary-soft { background-color: var(--primary-soft) !important; }
.bg-success-soft { background-color: var(--success-soft) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #1e3a8a 10%, #3b82f6 90%);
}

/* ==========================================================================
   MOBILE MENU - LOGO
   ========================================================================== */
.mobile-menu-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-logo a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.mobile-menu-logo img {
    height: 26px !important;
    width: auto !important;
    max-width: none !important;
    display: block !important;
}

/* ==========================================================================
   MOBILE MENU - SOCIAL LOGIN ICONS
   ========================================================================== */
.mobile-social-separator {
    display: flex !important;
    align-items: center !important;
    margin: 20px 0 16px !important;
    gap: 12px !important;
}

.mobile-social-separator::before,
.mobile-social-separator::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e5e7eb !important;
}

.mobile-social-separator span {
    font-size: 13px !important;
    color: #9ca3af !important;
    font-weight: 500 !important;
    text-transform: lowercase !important;
    white-space: nowrap !important;
}

.mobile-menu .mobile-social-login {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    width: 100% !important;
}

.mobile-menu .mobile-social-login .mobile-social-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.mobile-menu .mobile-social-login .mobile-social-icon:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    text-decoration: none !important;
}

.mobile-menu .mobile-social-login .mobile-social-icon:active {
    background: #f3f4f6 !important;
    box-shadow: none !important;
}

.mobile-menu .mobile-social-login .mobile-social-icon svg {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
