/* Responsive baseline and layout constraints */
:root {
    --site-min-width: 320px;
    --content-max-width: 1200px;
    --content-padding-x: 16px;
}

html,
body {
    min-width: var(--site-min-width);
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding-left: var(--content-padding-x);
    padding-right: var(--content-padding-x);
}

/* Headline scales safely across devices */
.hero .headline {
    font-size: clamp(28px, 6vw, 48px);
    line-height: 1.1;
    `
}

/* Navigation can wrap to avoid overflow on small screens */
.header-nav {
    display: flex;
    flex-wrap: nowrap;
    /* keep tabs on one line */
    gap: 8px;
    overflow-x: auto;
    /* allow horizontal scroll if needed */
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.header-nav .nav-tab {
    flex: 0 0 auto;
    /* prevent tabs from shrinking */
}

@media (max-width: 600px) {
    .header-nav {
        gap: 6px;
    }

    .header-nav .nav-tab {
        padding: 6px 10px;
        font-size: 0.95rem;
    }
}

/* Feature grid auto-fits cards responsively */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* Waitlist form fields maintain usable sizes */
.waitlist-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.waitlist-form input[type="email"] {
    width: min(100%, 420px);
    min-width: 240px;
}

.waitlist-form button {
    min-width: 140px;
}

/* Logo container clamps width and prevents overflow */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 60vw;
    /* responsive cap */
    overflow: hidden;
    white-space: nowrap;
}

.logo-icon {
    flex: 0 0 auto;
}

/* Animated logo text ellipsizes when space runs out */
.logo-text {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 600px) {
    .logo {
        max-width: 80vw;
    }
}

:root {
    --primary: #c45fff;
    --primary-dark: #a030e0;
    --secondary: #5fadff;
    --gradient: linear-gradient(135deg, #c45fff 0%, #5fadff 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(196, 95, 255, 0.1) 0%, rgba(95, 173, 255, 0.1) 100%);
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-light: #86868b;
    --bg: #0a0a0a;
    --bg-secondary: #1a1a1f;
    --glass-bg: rgba(26, 26, 31, 0.75);
    --glass-border: rgba(196, 95, 255, 0.2);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(196, 95, 255, 0.3);
    --shadow-elevated: rgba(196, 95, 255, 0.4);
    --glow: rgba(196, 95, 255, 0.5);
}



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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(196, 95, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(95, 173, 255, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(196, 95, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    will-change: opacity;
    transform: translateZ(0);
    /* Force hardware acceleration */
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    min-width: 450px;
}

/* Header */
header {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0 -24px;
    padding: 20px 24px;
}

header::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(20, 20, 24, 0.95) 0%, rgba(30, 25, 35, 0.9) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgb(189 95 255 / 29%);
    border-radius: 16px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(196, 95, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: -1;
}

.header-content {
    display: flex;
    flex-direction: column;
    /* gap: 16px; */
    padding: 0;
    position: relative;
}

.header-top {
    display: flex;
    align-items: center;
    padding: 8px;
    overflow: hidden;
}

.header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgb(125 150 255 / 7%);
    border-radius: 0 0 16px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 32px;
    display: inline-block;
    transform-origin: center center;
    filter: hue-rotate(270deg) saturate(1.5) brightness(1.1);

    /* Force Hardware Acceleration: essential for smoothness */
    transform: translateZ(0, 0, 0);
}

@keyframes logo-breathe {

    0%,
    100% {
        opacity: 1;
        /* Use CSS variables or simpler values if possible to reduce computation */
        /* Include translateZ(0) in all transforms for consistency */
        transform: scale(1) rotate(0deg) translateZ(0);
    }

    25% {
        opacity: 0.95;
        /* Consistent, smaller steps between 0/50/100 for better blending */
        transform: scale(1.06) rotate(-3deg) translateZ(0);
        /* Reduced scale and rotation */
    }

    50% {
        opacity: 0.9;
        transform: scale(1.1) rotate(0deg) translateZ(0);
        /* Reduced peak scale */
    }

    75% {
        opacity: 0.95;
        transform: scale(1.06) rotate(3deg) translateZ(0);
        /* Reduced scale and rotation */
    }
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    min-height: 21px;
}

.logo-text::after {
    content: '|';
    animation: cursor-blink 1s step-end infinite;
    margin-left: 2px;
    color: rgba(196, 95, 255, 0.8);
}

@keyframes cursor-blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.context-bar {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-align: left;
    flex: 1;
}

.header-nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(196, 95, 255, 0.3);
}

.nav-tab.active {
    background: rgba(196, 95, 255, 0.15);
    border-color: rgba(196, 95, 255, 0.4);
    color: rgba(255, 255, 255, 0.95);
}

.tab-icon {
    font-size: 16px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 60px;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 4px 12px var(--shadow);
    }

    50% {
        opacity: 0.9;
        box-shadow: 0 4px 20px var(--shadow-elevated);
    }
}

.headline {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, #c45fff 50%, #5fadff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px var(--glow));
}

.subheadline {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    line-height: 1.7;
    font-weight: 400;
}

/* Waitlist Form */
.waitlist-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 12px;
}

.waitlist-form input {
    flex: 1;
    padding: 16px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    font-size: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.waitlist-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 8px 24px var(--shadow), 0 0 0 3px rgba(196, 95, 255, 0.1);
    transform: translateY(-2px);
}

.waitlist-form button {
    padding: 16px 40px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px var(--shadow);
    position: relative;
    overflow: hidden;
}

.waitlist-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.waitlist-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-elevated), 0 0 40px var(--glow);
}

.waitlist-form button:hover::before {
    left: 100%;
}

.waitlist-form button:active {
    transform: translateY(0);
}

.form-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    min-height: 20px;
}

.form-note.success {
    color: #38a169;
}

.form-note.error {
    color: #e53e3e;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 80px 0;
}

.feature {
    text-align: center;
    padding: 40px 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-elevated), 0 0 60px var(--glow);
    border-color: var(--primary);
}

.feature:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 12px var(--glow));
}

.feature h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
}

.feature p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    line-height: 1.6;
}

/* Feature Sections */
.feature-section {
    padding: 80px 0;
    scroll-margin-top: 120px;
}

.feature-section.first-section {
    padding-top: 0;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 28px 20px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-elevated), 0 0 40px var(--glow);
    border-color: var(--primary);
}

.item-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px var(--glow));
}

.feature-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.feature-item p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

#agent {
    scroll-margin-top: 120px;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 8px;
    margin: 40px -24px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .headline {
        font-size: 48px;
    }

    .subheadline {
        font-size: 18px;
    }

    .waitlist-form {
        flex-direction: column;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 16px 24px;
    }

    .logo-text {
        font-size: 12px;
    }

    .header-nav {
        width: 50%;
        justify-content: space-around;
    }

    .nav-tab span:not(.tab-icon) {
        display: none;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
    }

    .section-title {
        font-size: 32px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-bottom {
        flex-direction: column;
        gap: 12px;
    }

    .headline {
        font-size: 36px;
    }

    .hero {
        padding: 60px 0 40px;
    }
}

/* Video Gallery Styles - Reimagined */
.video-gallery {
    margin-top: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.video-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(20, 20, 24, 0.8) 0%, rgba(30, 25, 35, 0.8) 100%);
    margin-bottom: 24px;
}

.video-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(196, 95, 255, 0.3);
    border-color: var(--primary);
}

.video-container video {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.video-container.playing video {
    opacity: 1;
}

/* Video Label */
.video-label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.label-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.label-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Video Controls - Play/Pause Button */
.video-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(196, 95, 255, 0.2) 0%,
            rgba(95, 173, 255, 0.2) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-container.playing .video-controls {
    opacity: 0;
}

.video-container:hover .video-controls {
    background: linear-gradient(135deg,
            rgba(196, 95, 255, 0.3) 0%,
            rgba(95, 173, 255, 0.3) 100%);
}

.play-pause-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    position: relative;
}

.video-container:hover .play-pause-btn {
    background: var(--gradient);
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 15px 40px var(--shadow-elevated);
}

.play-icon,
.pause-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.pause-icon {
    opacity: 0;
    transform: scale(0);
}

.video-container.playing .play-icon {
    opacity: 0;
    transform: scale(0);
}

.video-container.playing .pause-icon {
    opacity: 1;
    transform: scale(1);
}

/* Demo Videos Row */
.demo-videos-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* When a video is playing, it takes more space */
.demo-videos-row .video-container.playing {
    grid-column: 1 / -1;
    margin-bottom: 24px;
}

/* Adjust sibling videos when one is playing */
.demo-videos-row.has-playing .video-container:not(.playing) {
    opacity: 0.6;
    transform: scale(0.98);
}

.demo-videos-row.has-playing .video-container:not(.playing):hover {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .demo-videos-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .demo-videos-row .video-container.playing {
        grid-column: 1;
    }

    .gallery-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .play-pause-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .label-text {
        font-size: 14px;
    }

    .label-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-label {
        top: 12px;
        left: 12px;
        padding: 8px 16px;
        gap: 8px;
    }

    .play-pause-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}