/* ============================================
   COHESION - Sales Website Styles
   Modern Intelligence for Financial Professionals
   ============================================ */

/* CSS Variables */
:root {
    --color-bg: #0a0b0a;
    --color-bg-elevated: #111311;
    --color-bg-hover: #1a1d1a;
    --color-border: #27322a;
    --color-border-light: #3f4f42;

    --color-text: #fafafa;
    --color-text-secondary: #a1aaa3;
    --color-text-tertiary: #717a73;

    --color-primary: #3d6942;
    --color-primary-hover: #1e5a2e;
    --color-primary-light: #34855a;
    --color-primary-glow: rgba(41, 105, 59, 0.35);

    --color-accent: #34d399;
    --color-accent-secondary: #4ade80;

    --gradient-primary: linear-gradient(135deg, #3d6942 0%, #34d399 50%, #4ade80 100%);
    --gradient-text: linear-gradient(90deg, #29693b 0%, #34d399 50%, #4ade80 100%);
    --gradient-glow: radial-gradient(ellipse at center bottom, rgba(41, 105, 59, 0.08) 0%, transparent 60%);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px var(--color-primary-glow);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Skyline Background */
.skyline-container {
    position: fixed;
    bottom: 60px;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: 1;
    pointer-events: auto;
}

.skyline-bg {
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.skyline-bg .window {
    fill: #4ade80;
    opacity: 0.00;
    pointer-events: all;
}

.skyline-bg .window.lit {
    opacity: 1;
    animation: windowFade 1.5s ease-out forwards;
}

@keyframes windowFade {
    0% { opacity: 1; }
    20% { opacity: 1; }
    100% { opacity: 0.15; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 11, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-nav {
    background: var(--color-primary);
    color: white;
    border: 1px solid var(--color-primary);
}

.btn-nav:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm), 0 0 20px var(--color-primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 30px var(--color-primary-glow);
}

.btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    pointer-events: none;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Visual / Terminal */
.hero-visual {
    position: relative;
    z-index: 1;
}

.terminal {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }

.terminal-title {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    min-height: 100px;
}

.terminal-line {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.terminal-prompt {
    color: var(--color-accent);
}

.terminal-command {
    color: var(--color-text);
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(50, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.terminal-output {
    animation: fadeIn 0.5s ease 2s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.terminal-response {
    color: var(--color-text-tertiary);
    margin-bottom: 1rem;
}

.terminal-result {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.terminal-result p {
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.terminal-result p:last-child {
    margin-bottom: 0;
}

.terminal-result .highlight {
    color: var(--color-accent);
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    margin-top: auto;
    background: var(--color-bg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-bottom p {
    color: var(--color-text-tertiary);
    font-size: 0.85rem;
}

/* Magical Floating Windows */
.magic-windows-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.magic-trigger {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: auto;
    cursor: default;
}

.magic-trigger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 16px;
    background: linear-gradient(180deg,
        rgba(74, 222, 128, 0.9) 0%,
        rgba(52, 211, 153, 0.7) 50%,
        rgba(74, 222, 128, 0.4) 100%);
    border-radius: 1px;
    box-shadow:
        0 0 6px rgba(74, 222, 128, 0.6),
        0 0 12px rgba(52, 211, 153, 0.4),
        inset 0 0 4px rgba(255, 255, 255, 0.3);
    opacity: 0;
}

.magic-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 40px;
    background: radial-gradient(ellipse at center,
        rgba(74, 222, 128, 0.25) 0%,
        rgba(52, 211, 153, 0.08) 40%,
        transparent 70%);
    filter: blur(6px);
    opacity: 0;
}

.magic-trigger.activated::before {
    animation: windowAppear 1.5s ease-out forwards;
}

.magic-trigger.activated::after {
    animation: glowAppear 1.5s ease-out forwards;
}

@keyframes windowAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

@keyframes glowAppear {
    0% {
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    75% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
    }
}

/* Vary window sizes slightly */
.magic-trigger:nth-child(odd)::before {
    width: 8px;
    height: 12px;
}

.magic-trigger:nth-child(3n)::before {
    width: 12px;
    height: 18px;
}

.magic-trigger:nth-child(4n)::before {
    width: 9px;
    height: 14px;
}

/* Different glow colors for variety */
.magic-trigger:nth-child(3n)::before {
    background: linear-gradient(180deg,
        rgba(52, 211, 153, 0.95) 0%,
        rgba(74, 222, 128, 0.7) 50%,
        rgba(52, 211, 153, 0.5) 100%);
}

.magic-trigger:nth-child(5n)::before {
    background: linear-gradient(180deg,
        rgba(134, 239, 172, 0.9) 0%,
        rgba(74, 222, 128, 0.75) 50%,
        rgba(52, 211, 153, 0.45) 100%);
}

/* Hide magic windows on mobile to avoid interference */
@media (max-width: 768px) {
    .magic-windows-container {
        display: none;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }
}
