:root {
    /* Refined Slate Palette - Softer, more balanced */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dim: rgba(99, 102, 241, 0.12);
    --success: #22c55e;
    --success-dim: rgba(34, 197, 94, 0.12);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.15);
    
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    background-image: var(--gradient-hero);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Decorative Shapes */
.page-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-shapes::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.06) 1px, transparent 0);
    background-size: 42px 42px;
    opacity: 0.35;
    mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 55%);
}

.shape {
    position: absolute;
    opacity: 0.9;
    transform: translateZ(0);
}

.shape--orb {
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(129, 140, 248, 0.18), rgba(99, 102, 241, 0.06) 55%, transparent 72%);
}

.shape--ring {
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(129, 140, 248, 0.22);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.06);
}

.shape--squircle {
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.shape--triangle {
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.16), rgba(34, 197, 94, 0.08));
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
    opacity: 0.75;
}

/* Positions */
.shape--1 { width: 520px; height: 520px; top: -220px; left: -200px; }
.shape--2 { width: 420px; height: 420px; top: 80px; right: -180px; }
.shape--3 { width: 260px; height: 260px; top: 22vh; left: 62vw; }
.shape--4 { width: 220px; height: 220px; top: 64vh; left: -70px; transform: rotate(12deg); }
.shape--5 { top: 58vh; right: -40px; transform: rotate(-6deg); }
.shape--6 { width: 320px; height: 320px; bottom: -160px; left: 22vw; }
.shape--7 { width: 220px; height: 220px; bottom: 18vh; right: 14vw; }
.shape--8 { width: 180px; height: 180px; top: 42vh; left: 14vw; transform: rotate(-8deg); }

@media (prefers-reduced-motion: no-preference) {
    .shape--1, .shape--2, .shape--6 { animation: float 9s ease-in-out infinite; }
    .shape--3, .shape--7 { animation: float 7.5s ease-in-out infinite; }
    .shape--4, .shape--8 { animation: float 10.5s ease-in-out infinite; }
    .shape--5 { animation: float 8.5s ease-in-out infinite; }
}

@media (max-width: 768px) {
    .page-shapes::before { opacity: 0.22; background-size: 52px 52px; }
    .shape--1 { width: 420px; height: 420px; top: -220px; left: -240px; }
    .shape--2 { width: 320px; height: 320px; top: 120px; right: -180px; }
    .shape--3, .shape--7 { display: none; }
}

/* Typography */
h1, h2, h3 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-accent {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

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

.animate {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.15s; opacity: 0; }
.delay-2 { animation-delay: 0.3s; opacity: 0; }
.delay-3 { animation-delay: 0.45s; opacity: 0; }

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

/* Keep main content above global background shapes */
header, section, footer {
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.logo .app {
    color: var(--text-primary);
}

.logo .out {
    color: var(--accent-light);
    font-weight: 500;
}

.logo i {
    color: var(--accent);
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-light);
    border: 1px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-dim);
}

/* Hero Section */
header {
    min-height: 100vh;
    padding: 9rem 5% 5rem;
    display: flex;
    align-items: center;
    background: transparent;
    position: relative;
    overflow: hidden;
    perspective: 1000px; /* For 3D phone */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

/* Subtle gradient orbs */
header::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    flex: 1;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1500px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent-light);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

h1 .accent {
    color: var(--accent-light);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Carousel Container in Header */
.carousel-container {
    width: 360px;
    position: relative;
    transform: rotateY(-12deg) rotateX(5deg) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.carousel-container:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
}

/* Phone Mockup Updates */
.phone-mockup {
    background: var(--bg-secondary);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 
        20px 30px 60px -10px rgba(0, 0, 0, 0.6),
        -2px -2px 5px rgba(255, 255, 255, 0.05) inset,
        0 0 0 1px var(--border);
    border: 4px solid var(--bg-card);
    height: 680px;
    display: flex;
    flex-direction: column;
    position: relative;
    transform-style: preserve-3d;
}

/* Features Grid */
.features {
    padding: 7rem 5%;
    background: var(--bg-secondary);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-dim);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    color: var(--accent-light);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Demo Section Styles Removed (Moved to Header) */

.phone-mockup::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.25), transparent 55%),
        radial-gradient(circle at 80% 95%, rgba(34, 197, 94, 0.12), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.08) 1px, transparent 0);
    background-size: 30px 30px;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.phone-mockup > * {
    position: relative;
    z-index: 1;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 26px;
    background: var(--bg-card);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 20;
}

.chat-header {
    background: var(--bg-secondary);
    padding: 1.75rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 42px;
    height: 42px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.chat-info h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.chat-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-accent 2s infinite;
}

.chat-body {
    flex: 1;
    overflow: hidden;
    background: var(--bg-primary);
    position: relative;
}

.conversation-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.conversation-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    opacity: 0;
    transform: translateY(10px);
    animation: messageFadeIn 0.3s forwards;
}

.message:nth-child(1) { animation-delay: 0.05s; }
.message:nth-child(2) { animation-delay: 0.1s; }
.message:nth-child(3) { animation-delay: 0.15s; }
.message:nth-child(4) { animation-delay: 0.2s; }
.message:nth-child(5) { animation-delay: 0.25s; }
.message:nth-child(6) { animation-delay: 0.3s; }
.message:nth-child(7) { animation-delay: 0.35s; }
.message:nth-child(8) { animation-delay: 0.4s; }

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

.message.received { align-self: flex-start; }
.message.sent { align-self: flex-end; align-items: flex-end; }

.bubble {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.received .bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.sent .bubble {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.meta-info {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-trace {
    background: var(--accent-dim);
    color: var(--accent-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.chat-input-area {
    padding: 0.9rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.fake-input {
    flex: 1;
    height: 38px;
    background: var(--bg-card);
    border-radius: 19px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Carousel Controls */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s;
}

.nav-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.carousel-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.carousel-btn.prev { left: -65px; }
.carousel-btn.next { right: -65px; }

/* CTA Section */
.cta-section {
    padding: 8rem 5%;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-box h2 {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.cta-box h2 .accent {
    color: var(--accent-light);
}

.cta-box p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: var(--bg-primary);
    color: var(--text-muted);
    padding: 2.5rem 5%;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: var(--accent-light);
}

@media (max-width: 1024px) {
    .header-container { flex-direction: column; text-align: center; gap: 3rem; }
    .hero-content { max-width: 100%; align-items: center; display: flex; flex-direction: column; }
    .subtitle { margin: 0 auto 2.5rem; }
    .hero-cta { justify-content: center; }
    .hero-visual { width: 100%; }
    .carousel-container { transform: none; width: 340px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .grid { grid-template-columns: 1fr; }
    .carousel-btn { display: none; }
    .phone-mockup { height: 580px; }
    .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
    .cta-box h2 { font-size: 2.2rem; }
    .section-title h2 { font-size: 2rem; }
    .carousel-container { width: 100%; max-width: 320px; }
}
