:root {
    /* Whistl Dark Premium Variables */
    --bg-dark: #050a12;
    --bg-darker: #020509;
    --bg-panel: rgba(16, 36, 63, 0.4);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-blue: #1e6ce2;
    --accent-cyan: #6ebdff;
    --accent-green: #1cb38b;
    --accent-red: #ff4757;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
.brand-mark {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: white;
    color: var(--bg-dark);
    padding: 1rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-linked {
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.btn-linked:hover {
    color: var(--accent-cyan);
}

.glass-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1.5rem 4rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Nav */
.onboarding-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    z-index: 100;
    mix-blend-mode: difference;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.brand-mark {
    background: white;
    color: black;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.brand-text {
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 2rem;
    border-radius: 100px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-cta {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: white;
    color: black;
}

/* Base Sections */
.section {
    position: relative;
}

/* Hero */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(30, 108, 226, 0.15), transparent 70%);
    z-index: 0;
    filter: blur(60px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 4rem;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* Chat Sequence - Scrolljacking */
.section-chat {
    height: 400vh;
    /* Scroll duration */
    position: relative;
}

.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dynamic-background {
    position: absolute;
    inset: 0;
    background: url('hero-phones-dynamic.png') center/cover no-repeat;
    opacity: 0.3;
    filter: blur(20px);
    transform: scale(1.1);
    transition: opacity 0.5s, filter 0.5s, transform 0.5s;
}

.phone-wrapper {
    position: relative;
    z-index: 10;
    width: 320px;
    height: 650px;
    perspective: 1000px;
}

.phone-frame {
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    border-radius: 40px;
    border: 12px solid #2a3a50;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* driven by JS */
}

.dynamic-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background: black;
    border-radius: 15px;
    z-index: 100;
}

.phone-screen {
    background: linear-gradient(180deg, #13243a, #0a1320);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 60px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-header h2 {
    font-size: 1.2rem;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.msg {
    display: flex;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.msg.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.msg-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.bot-msg {
    justify-content: flex-start;
}

.bot-msg .msg-bubble {
    background: var(--bg-panel);
    border-bottom-left-radius: 4px;
}

.bot-msg .msg-bubble.alert {
    border: 1px solid rgba(255, 71, 87, 0.3);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.1);
}

.bot-msg .msg-bubble.success {
    background: rgba(28, 179, 139, 0.1);
    border: 1px solid rgba(28, 179, 139, 0.3);
    color: #fff;
}

.user-msg {
    justify-content: flex-end;
}

.user-msg .msg-bubble {
    background: var(--accent-blue);
    border-bottom-right-radius: 4px;
}

.phone-bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px 30px;
    background: rgba(10, 19, 32, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    border-radius: 50%;
}

.nav-item.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Premium Cards */
.section-cards {
    padding: 10rem 0;
    background: radial-gradient(circle at 50% 100%, rgba(30, 108, 226, 0.1), transparent 60%);
}

.title-large {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.small-disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-top: 1rem;
}

.cards-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 6rem;
    perspective: 1000px;
}

.card-3d {
    width: 280px;
    height: 440px;
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-fallback {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.fallback-left {
    background: linear-gradient(135deg, #FF0080, #7928CA, #0070F3);
}

.fallback-center {
    background: #111;
    border: 1px solid #333;
}

.fallback-right {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e, #616161);
    color: #111;
}

.card-fallback .logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.card-left {
    transform: rotateY(15deg) translateZ(-50px);
    opacity: 0.6;
}

.card-center {
    transform: translateZ(50px) scale(1.1);
    z-index: 10;
}

.card-right {
    transform: rotateY(-15deg) translateZ(-50px);
    opacity: 0.6;
}

.cards-showcase:hover .card-left {
    transform: rotateY(0) translateX(-40px);
    opacity: 1;
}

.cards-showcase:hover .card-center {
    transform: scale(1.15) translateY(-10px);
}

.cards-showcase:hover .card-right {
    transform: rotateY(0) translateX(40px);
    opacity: 1;
}


/* Analytics / Floating Screens */
.section-analytics {
    padding: 10rem 0;
    background: var(--bg-darker);
}

.analytics-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.analytics-copy {
    flex: 1;
}

.cta-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.analytics-visuals {
    flex: 1;
    position: relative;
    height: 600px;
    perspective: 1200px;
}

.floating-screen {
    position: absolute;
    background: #111;
    border-radius: 24px;
    border: 4px solid #333;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s ease;
}

.screen-1 {
    width: 220px;
    height: 440px;
    top: 100px;
    left: 0;
    transform: rotateY(20deg) translateZ(-100px);
    opacity: 0.6;
}

.screen-2 {
    width: 260px;
    height: 520px;
    top: 40px;
    left: 120px;
    z-index: 10;
    transform: translateZ(50px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
}

.screen-3 {
    width: 220px;
    height: 440px;
    top: 80px;
    right: -20px;
    transform: rotateY(-20deg) translateZ(-80px);
    opacity: 0.5;
}

.analytics-visuals:hover .screen-1 {
    transform: rotateY(15deg) translateZ(-50px) translateX(-20px);
}

.analytics-visuals:hover .screen-2 {
    transform: translateZ(80px) translateY(-10px);
}

.analytics-visuals:hover .screen-3 {
    transform: rotateY(-15deg) translateZ(-30px) translateX(20px);
}

.screen-mockup {
    padding: 20px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a1a, #0a0a0a);
}

.mockup-header {
    font-size: 0.7rem;
    color: #888;
    font-weight: 700;
    margin-bottom: 20px;
}

.mockup-chart {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 15px;
}

.bar-chart {
    height: 100px;
}

.radar-chart {
    height: 150px;
    border-radius: 50%;
}

.donut-chart {
    height: 100px;
    border-radius: 50%;
    width: 100px;
    margin: 0 auto;
}


/* Feature Bento Grid */
.section-bento {
    padding: 10rem 0;
    background: linear-gradient(180deg, var(--bg-dark), #000);
}

.title-huge {
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 5rem;
}

.bento-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.bento-img {
    height: 250px;
    width: 100%;
}

.bg-dark-gradient {
    background: linear-gradient(135deg, #13243a, #0a1320);
}

.bg-metallic {
    background: linear-gradient(135deg, #2c3e50, #000000);
}

.bg-glass {
    background: rgba(30, 108, 226, 0.05);
    backdrop-filter: blur(10px);
}

.bg-metallic-detail {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #1a1a1a 10px, #1a1a1a 20px);
}

.bg-blue-glow {
    background: radial-gradient(circle at center, rgba(30, 108, 226, 0.3) 0%, #050a12 70%);
}

.bento-label {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


/* Animation Utility Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 992px) {
    .analytics-layout {
        flex-direction: column;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .cards-showcase {
        flex-direction: column;
        gap: 4rem;
    }

    .card-3d {
        transform: none !important;
        opacity: 1 !important;
    }
}