/* 
 * OpenWhale - Modern SaaS / Comprehensive
 * Theme: Clean / Trustworthy / Content-Rich
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Colors */
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --text: #111827;
    --text-muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border: #e5e7eb;
    --code-bg: #1f2937;
    --code-text: #e5e7eb;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 6rem 2rem;
    --radius: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
}

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

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--text);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #111827, #4b5563);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Code Copy Box */
.code-copy {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
    max-width: 100%;
    overflow-x: auto;
}

.code-copy:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.code-copy i {
    color: var(--text-muted);
}

/* Chat Visual */
.chat-visual {
    margin-top: 5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    text-align: left;
}

.chat-header {
    background: #f9fafb;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
}

.dot:nth-child(1) {
    background: #fee2e2;
}

/* Red tint */
.dot:nth-child(2) {
    background: #fef3c7;
}

/* Yellow tint */
.dot:nth-child(3) {
    background: #dcfce7;
}

/* Green tint */

.chat-body {
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.msg {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.msg.ai {
    background: #f3f4f6;
    align-self: flex-start;
    color: #374151;
}

.msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Hero Icons */
.hero-icons i {
    font-size: 1.5rem;
    color: #9ca3af;
    transition: all 0.2s;
}

.hero-icons i:hover {
    color: #fff;
    transform: translateY(-2px);
    opacity: 1;
}

/* Chat App Switching Logic */
.chat-body.active-view {
    display: flex;
    animation: fadeInView 0.5s ease;
}

.chat-body.hidden-view {
    display: none !important;
}

/* Floating Background Animation */
#hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-use {
    position: absolute;
    bottom: -100px;
    /* Start below screen */
    color: #000;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    user-select: none;
    animation: floatUp linear infinite;
    will-change: transform, opacity;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: var(--opacity, 0.05);
        /* Fade in quickly */
    }

    90% {
        opacity: var(--opacity, 0.05);
        /* Stay visible */
    }

    100% {
        transform: translateY(-20vh) rotate(var(--rotation));
        opacity: 0;
    }
}

@keyframes fadeInView {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* WhatsApp Theme */
.chat-body.whatsapp-theme {
    background: #e5ddd5;
    /* Standard WA bg, or #0b141a for dark mode */
    background-image: url("https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png");
    background-blend-mode: overlay;
    color: #111b21;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.msg.user-wa {
    background: #d9fdd3;
    color: #111b21;
    padding: 0.5rem 0.75rem;
    border-radius: 7.5px;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    font-size: 0.9rem;
    position: relative;
    min-width: 150px;
}

.msg.ai-wa {
    background: #ffffff;
    color: #111b21;
    padding: 0.5rem 0.75rem;
    border-radius: 7.5px;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    font-size: 0.9rem;
    position: relative;
    max-width: 80%;
}

.wa-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #667781;
    margin-top: 2px;
}

/* Discord Theme */
.chat-body.discord-theme {
    background: #36393f;
    color: #dcddde;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.discord-msg {
    display: flex;
    gap: 1rem;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    flex-shrink: 0;
}

.discord-avatar.user-av {
    background-color: #5865f2;
    background-image: url('https://cdn.discordapp.com/embed/avatars/0.png');
}

.discord-avatar.ai-av {
    background-color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.discord-content {
    display: flex;
    flex-direction: column;
}

.discord-name {
    font-weight: 600;
    color: #fff;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.discord-timestamp {
    font-size: 0.75rem;
    color: #72767d;
}

.bot-tag {
    background: #5865f2;
    color: #fff;
    font-size: 0.625rem;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: text-top;
}

.discord-text {
    font-size: 0.95rem;
    line-height: 1.375rem;
}

.discord-embed {
    margin-top: 0.5rem;
    background: #2f3136;
    border-left: 4px solid #10b981;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Chat Dark Theme Redesign */
.chat-body.dark-theme {
    background: #000000;
    color: #e5e7eb;
    padding: 2rem;
    height: auto;
    min-height: 400px;
}

.msg.user-dark {
    background: #1f2937;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    border-top-right-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 80%;
}

.msg.ai-dark {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #e5e7eb;
    line-height: 1.6;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.ai-name {
    font-weight: 700;
    color: #fff;
}

.ai-time {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Tool Calls Styling */
.tool-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.tool-logs {
    background: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.tool-log-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #d1d5db;
}

.tool-log-item:last-child {
    border-bottom: none;
}

/* AI Loader Box */
.ai-loader-box {
    margin-top: 1.5rem;
    background: linear-gradient(90deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid #4338ca;
    border-radius: 20px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #a5b4fc;
    font-size: 0.9rem;
    width: 100%;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: #818cf8;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}


/* Sections Generic */
section {
    padding: var(--section-padding);
}

section.alt-bg {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-head h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
}

.tool-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-dark);
}

/* Browser Comparison Redesign (Equal Cards) */
.browser-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.browser-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.browser-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.browser-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.browser-card .description {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.browser-card .feature-list {
    margin-top: auto;
}

.browser-card .feature-list li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.browser-card .feature-list li i {
    margin-top: 3px;
}

.browser-card .feature-list li .fa-check {
    color: #10b981;
}

.browser-card .feature-list li .fa-times {
    color: #ef4444;
}

.browser-card .pro-feature {
    opacity: 0.7;
}

/* Remove old comparison table styles as section is gone */
.comparison-container,
table,
th,
td,
.check,
.cross {
    display: none;
}

footer {
    background: #111827;
    color: #9ca3af;
    padding: 5rem 0 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-link {
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}