:root {
    --bg-color: #fafafa;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;

    /* Primary brand colors reflecting "Solutions" and "Urgency" */
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-blue-light: #eff6ff;

    --success-color: #059669;
    --success-bg: #d1fae5;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

/* Typography */
h1,
h2,
h3,
.brand-font {
    font-family: 'Outfit', sans-serif;
}

.gradient-text,
.accent-text {
    color: var(--accent-blue);
}

/* Navbar */
.navbar {
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-blue-light);
    border-radius: 8px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
}

.logo-icon svg {
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    border-radius: 999px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.telegram-icon {
    width: 24px;
    height: 24px;
}

/* Hero Section */
.hero {
    padding: 4rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.375rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 42ch;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.phone-mockup {
    width: 100%;
    max-width: 340px;
    transform: rotateX(5deg) translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-mockup:hover {
    transform: rotateX(0deg) translateY(-10px);
}

.phone-bezel {
    border-radius: 40px;
    background: #0f172a;
    padding: 12px;
    box-shadow:
        inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
        0 25px 50px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #334155;
}

.phone-screen {
    background: #eef2ff;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    height: 560px;
    display: flex;
    flex-direction: column;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #0f172a;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.mockup-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.app-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.telegram-mini-icon {
    width: 18px;
    height: 18px;
    color: #0088cc;
}

.mockup-body {
    padding: 1.5rem 1rem;
    flex: 1;
    background-image:
        radial-gradient(circle at center, #cbd5e1 1px, transparent 1px);
    background-size: 16px 16px;
    background-color: #f8fafc;
    overflow-y: hidden;
}

.phone-home-indicator {
    height: 24px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.phone-home-indicator::after {
    content: '';
    width: 100px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
}

.chat-bubble {
    background: var(--accent-blue-light);
    border: 1px solid #dbeafe;
    padding: 1.25rem;
    border-radius: 0 16px 16px 16px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    color: #1e3a8a;
}

.chat-bubble p {
    margin-bottom: 0.5rem;
}

.chat-bubble p:last-of-type {
    margin-bottom: 0;
}

.chat-bubble strong {
    color: #1e40af;
}

.btn-group {
    display: block;
    background: #ffffff;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #bfdbfe;
    text-align: center;
}

.action-btn {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 600;
}

.action-btn:hover {
    background: #f0f9ff;
}

/* Features Section — Asymmetric Layout */
.features {
    padding: 4rem 1.5rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    align-items: start;
}

/* Hero Feature */
.feature-hero {
    padding-right: 5rem;
    border-right: 1px solid var(--border-color);
}

.feature-hero-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.feature-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.feature-hero-body {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 44ch;
    margin-bottom: 2.5rem;
}

.feature-hero-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-blue);
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
}

/* Secondary Stack */
.feature-secondary-stack {
    padding-left: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    align-self: center;
}

.feature-secondary {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 1.25rem;
    padding: 2rem 0;
    align-items: start;
}

.feature-secondary-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: 0.1em;
    opacity: 0.6;
    padding-top: 0.2rem;
}

.feature-secondary h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-secondary p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.feature-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: var(--surface-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 3rem;
    }

    .hero-visual {
        /* Phone stays below copy on mobile */
        max-height: 300px;
        overflow: hidden;
        animation: none;
        /* no slide-in jank on mobile */
    }

    .features-layout {
        grid-template-columns: 1fr;
    }

    .feature-hero {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 3rem;
    }

    .feature-secondary-stack {
        padding-left: 0;
        padding-top: 3rem;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */

/* Easing tokens */
:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Keyframes --- */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes chat-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.88) translateY(8px);
    }

    60% {
        transform: scale(1.02) translateY(-2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Hero Entrance: Staggered --- */

.badge {
    animation: fade-up 0.6s var(--ease-out-expo) both;
    animation-delay: 0.1s;
}

.hero-title {
    animation: fade-up 0.7s var(--ease-out-expo) both;
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation: fade-up 0.7s var(--ease-out-expo) both;
    animation-delay: 0.32s;
}

.hero-actions {
    animation: fade-up 0.7s var(--ease-out-expo) both;
    animation-delay: 0.44s;
}

/* Phone panel sweeps in from the right */
.hero-visual {
    animation: slide-in-right 0.9s var(--ease-out-expo) both;
    animation-delay: 0.3s;
}

/* Chat bubble arrives like a real Telegram message */
.chat-bubble.bot {
    animation: chat-pop-in 0.5s var(--ease-out-quart) both;
    animation-delay: 0.85s;
}

/* --- Button micro-interactions --- */

.btn-primary {
    transition: background 0.15s ease, transform 0.15s var(--ease-out-quart),
        box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    transition-duration: 0.08s;
}

/* --- Scroll-triggered reveal --- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s var(--ease-out-expo),
        transform 0.65s var(--ease-out-expo);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.22s;
}

.reveal-delay-3 {
    transition-delay: 0.34s;
}

/* --- Reduced motion: respect user preference --- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}