/* 
  Syngra - Premium Styles
  Design System: Deep Dark Theme, Gradients, Glassmorphism, Micro-animations 
*/

:root {
    /* Colors */
    --bg-base: #020617;
    /* Slate 950 */
    --bg-surface: rgba(15, 23, 42, 0.6);
    /* Slate 900 */
    --bg-surface-hover: rgba(15, 23, 42, 0.8);

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --primary-main: #3b82f6;
    /* Blue 500 */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-main: #8b5cf6;
    /* Violet 500 */
    --accent: #10b981;
    /* Emerald 500 */

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));

    /* Effects */
    --glass-blur: blur(12px);
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-max: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    cursor: default;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

ul {
    list-style: none;
}

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

.flex {
    display: flex;
}

.flex-col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

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

/* Background Effects (Aurora Canvas) */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

#bg-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Subtle grid overlay to give it a tech touch */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, transparent 20%, black 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 20%, black 80%);
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Blur Reveal Text Effect */
.blur-text {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blur-text.revealed {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
}

.section-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Buttons */
.magnetic-btn {
    display: inline-block;
    position: relative;
    /* Transformation handled by javascript for 21st.dev style effect */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    pointer-events: auto;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradient-flow 3s linear infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-primary:hover:after {
    opacity: 1;
}

@keyframes gradient-flow {
    0% {
        background-position: 100% 0;
    }

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-main);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.w-full {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.navbar.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

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

.logo-text span {
    color: var(--primary-main);
}

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

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Cards & Glassmorphism with Cursor Hover Spotlight */
.card {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease, border-color 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CSS Variables driven by JS */
    background: radial-gradient(800px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
            rgba(255, 255, 255, 0.08),
            transparent 40%);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Ensure inner content is above the spotlight */
.card>* {
    position: relative;
    z-index: 1;
}

.card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Hero Section */
.hero {
    padding: 12rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-main);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

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

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

/* Benefits Section */
.benefits {
    padding: 6rem 0;
    position: relative;
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: var(--gradient-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-main);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

/* Tracing border effect on icon */
.icon-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    animation: border-flow 3s linear infinite;
}

@keyframes border-flow {
    0% {
        background-position: 200% 0;
    }

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

.icon-box.xl {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 2rem;
}

.icon-box.xl svg {
    width: 2rem;
    height: 2rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Architecture Timeline */
.architecture {
    padding: 8rem 0;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    gap: 3rem;
}

.timeline-meta {
    flex: 0 0 20%;
    text-align: right;
    padding-top: 1rem;
    position: relative;
}

.timeline-meta::after {
    content: '';
    position: absolute;
    right: -3rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-main);
    box-shadow: 0 0 10px var(--primary-glow);
    transform: translateX(50%);
}

.layer-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-main);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.timeline-meta h4 {
    color: var(--text-main);
    font-size: 1.25rem;
    margin: 0;
}

.timeline-content {
    flex: 1;
}

.feature-list {
    margin-top: 1.5rem;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.agents-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.agent-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.agent-tag svg {
    width: 14px;
    height: 14px;
    color: var(--primary-main);
}

/* Security Section */
.security {
    padding: 6rem 0;
}

.security-container {
    padding: 4rem;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.9));
    border: 1px solid var(--border-subtle);
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.1);
}

.security-container .icon-box {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.security-grid {
    margin-top: 4rem;
    width: 100%;
    text-align: left;
    border-top: 1px solid var(--border-subtle);
    padding-top: 3rem;
}

.security-item h4 {
    color: var(--text-main);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
    background: rgba(2, 6, 23, 0.9);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
}

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

.copyright {
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.5);
}

/* Animations (To be triggered by JS) */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column;
        gap: 1rem;
    }

    .timeline-meta {
        text-align: left;
    }

    .timeline-meta::after {
        left: -6px;
        transform: none;
    }

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

@media (max-width: 600px) {
    .hero-cta {
        flex-direction: column;
    }
}