/* style.css */
:root {
    --bg-dark: #050505;
    --bg-panel: rgba(20, 20, 20, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --accent-hover: #2563eb;
    --gradient-start: #60a5fa;
    --gradient-end: #c084fc;
}

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

body {
    font-family: 'Suisse Intl', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Glow */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: var(--accent);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: #c084fc;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-1px);
}

.w-full {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    margin-top: 1rem;
}

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

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.subtitle-wrapper {
    position: relative;
    display: inline-block;
    padding: 1.5rem 2rem;
    margin-top: 1rem;
    border-radius: 16px;
    z-index: 1;
}

/* Abstract Animated Background */
.animated-gradient-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(120deg,
            rgba(59, 130, 246, 0.15),
            /* accent */
            rgba(192, 132, 252, 0.1),
            /* gradient end */
            rgba(16, 185, 129, 0.1),
            /* green hint */
            rgba(59, 130, 246, 0.15));
    background-size: 300% 300%;
    animation: flowGradient 8s ease infinite;
    z-index: 0;
    /* Soft glowing border effect */
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
}

@keyframes flowGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


/* Chat Interactive Interface */
.demo-section {
    padding: 2rem 1rem 5rem;
    position: relative;
}

.chat-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.chat-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    border-radius: 18px;
    z-index: -1;
}

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.1);
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mac-window-controls {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 8px;
    position: relative;
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mac-btn.close {
    background: #ff5f56;
}

.mac-btn.minimize {
    background: #ffbd2e;
}

.mac-btn.maximize {
    background: #27c93f;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.chat-header {
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 20, 0.4);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pulse-ring {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    left: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    background: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.model-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.chat-history {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Custom scrollbar */
}

.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Chat Messages */
.message {
    display: flex;
    gap: 1rem;
    max-width: 85%;
    animation: fadeIn 0.3s ease forwards;
}

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

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

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.user-message .bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .avatar {
    background: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message .avatar i {
    width: 18px;
    height: 18px;
    color: var(--gradient-end);
}

.bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border-top-left-radius: 4px;
    line-height: 1.5;
}

.suggestions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-chip {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Chat Input */
.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

#chatForm {
    display: flex;
    gap: 0.75rem;
    position: relative;
}

#userInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 1rem 3rem 1rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#userInput::placeholder {
    color: var(--text-muted);
}

#userInput:focus {
    border-color: var(--accent);
}

.btn-send {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.btn-send i {
    width: 18px;
    height: 18px;
}

.btn-send:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* Bento Grid Features Section */
.features-section {
    padding: 4rem 5% 8rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.bento-box {
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.bento-box:hover::before {
    opacity: 1;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-content {
    z-index: 2;
    position: relative;
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.bento-large .bento-content h3 {
    font-size: 2rem;
}

.bento-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.bento-bg-icon {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 140px;
    height: 140px;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-main);
}

.bento-large .bento-bg-icon {
    width: 250px;
    height: 250px;
    bottom: 20px;
    right: 30px;
    opacity: 0.05;
}

.bento-box:hover .bento-bg-icon {
    transform: scale(1.1) rotate(-5deg);
}

.text-accent {
    color: var(--accent);
}

.text-alert {
    color: #ffbd2e;
}

.bento-visual {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    z-index: 2;
}

.bento-visual pre {
    color: #a78bfa;
    font-size: 0.9rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.glow-hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
}

.glow-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.05) inset;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    width: 90%;
    max-width: 450px;
    padding: 2.5rem 2rem;
    background: #111;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: white;
}

.modal-icon {
    color: #10b981;
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    display: block;
}

.modal-icon i {
    width: 100%;
    height: 100%;
}

.modal h2 {
    margin-bottom: 1rem;
}

.modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.schema-preview {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.schema-preview pre {
    color: #34d399;
    font-size: 0.85rem;
    overflow-x: auto;
}

.cta-text {
    color: var(--text-main) !important;
    font-weight: 500;
}

#emailInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

#emailInput:focus {
    border-color: var(--accent);
}

.micro-copy {
    font-size: 0.75rem !important;
    margin-top: 1rem;
    margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-large,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
        grid-row: auto;
    }
}

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

    .chat-container {
        height: 500px;
    }

    .message {
        max-width: 95%;
    }
}

/* Auth & Recaptcha */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: white;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.recaptcha-badge {
    position: absolute;
    bottom: -10px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
    font-size: 0.65rem;
    color: var(--text-muted);
    border: none;
    opacity: 0.6;
    pointer-events: none;
}

.recaptcha-badge a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s;
    pointer-events: auto;
}

/* Hide official Google floaty badge since we include the terms inline */
.grecaptcha-badge {
    visibility: hidden !important;
}

.recaptcha-badge img {
    height: 16px;
}

.recaptcha-badge a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s;
}

.recaptcha-badge a:hover {
    color: white;
}

.bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}