/* Custom styles - Slack-inspired layout */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 100px; }
@media (min-width: 768px) { h1.hero-h1 { font-size: 72px !important; line-height: 1.1 !important; } }
.hero-video { filter: blur(5px); transform: scale(1.05); }
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; background: #050505; color: #fff; -webkit-font-smoothing: antialiased; }

/* Text gradient */
.text-gradient {
    background: linear-gradient(90deg, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass card */
.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(16,185,129,0.05);
}

/* Glow effects */
.glow-emerald { text-shadow: 0 0 20px rgba(16,185,129,0.5), 0 0 40px rgba(16,185,129,0.2); }
.glow-purple { text-shadow: 0 0 20px rgba(168,85,247,0.5), 0 0 40px rgba(168,85,247,0.2); }
.glow-rose { text-shadow: 0 0 20px rgba(244,63,94,0.5), 0 0 40px rgba(244,63,94,0.2); }
.glow-amber { text-shadow: 0 0 20px rgba(245,158,11,0.5), 0 0 40px rgba(245,158,11,0.2); }

/* Ambient background - subtler for Slack style */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.ambient-bg::before,
.ambient-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.08;
    mix-blend-mode: screen;
}
.ambient-bg::before {
    width: 600px; height: 600px;
    background: #10b981;
    top: 20%; left: 10%;
    animation: drift-1 25s ease-in-out infinite;
}
.ambient-bg::after {
    width: 500px; height: 500px;
    background: #a855f7;
    top: 40%; right: 10%;
    animation: drift-2 30s ease-in-out infinite;
}
@keyframes drift-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(100px, -50px); }
    50% { transform: translate(-50px, 100px); }
    75% { transform: translate(80px, 60px); }
}
@keyframes drift-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-80px, 60px); }
    50% { transform: translate(60px, -80px); }
    75% { transform: translate(-40px, -40px); }
}

/* Background grid */
.bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Divider */
.divider {
    display: none !important;
}

/* Word-by-word fade animation for open letter */
.word-fade span {
    opacity: 0;
    display: inline;
    animation: wordFadeIn 0.4s ease forwards;
}
@keyframes wordFadeIn {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slack-style alternating feature rows */
.slack-feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}
@media (min-width: 768px) {
    .slack-feature-row {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 5rem 0;
    }
}
.slack-feature-row + .slack-feature-row {
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Reverse layout for alternating rows */
@media (min-width: 768px) {
    .slack-feature-row-reverse .slack-feature-image {
        order: 2;
    }
    .slack-feature-row-reverse .slack-feature-text {
        order: 1;
    }
}

.slack-feature-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slack-feature-image img {
    transition: transform 0.5s ease;
}
.slack-feature-image:hover img {
    transform: scale(1.02);
}

/* MacBook frame */
.macbook-frame {
    max-width: 900px;
    width: 100%;
    position: relative;
}
.macbook-screen {
    position: relative;
    background: #0a0a0a;
    border-radius: 12px 12px 0 0;
    border: 2px solid #333;
    border-bottom: none;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.macbook-screen iframe,
.macbook-screen .macbook-iframe {
    width: 1440px;
    height: 900px;
    transform-origin: top left;
    border: none;
    display: block;
}
.macbook-base {
    height: 14px;
    background: linear-gradient(to bottom, #444, #222);
    border-radius: 0 0 8px 8px;
    position: relative;
}
.macbook-notch {
    width: 120px;
    height: 4px;
    background: #555;
    border-radius: 0 0 4px 4px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Form input styles */
.ihm-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.2s;
}
.ihm-input:focus {
    border-color: rgba(16,185,129,0.3);
}
.ihm-input::placeholder {
    color: #525252;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Logo scroller */
.logo-scroller {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-scroller-track {
    display: flex;
    gap: 3.5rem;
    animation: scroll-logos 40s linear infinite;
    width: max-content;
}
.logo-scroller:hover .logo-scroller-track {
    animation-play-state: paused;
}
.logo-item {
    opacity: 0.4;
    transition: opacity 0.3s;
}
.logo-item:hover {
    opacity: 0.8;
}
@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Nav scrolled state */
.nav-scrolled {
    background: rgba(5,5,5,0.8) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-color: rgba(255,255,255,0.1) !important;
}
