/* --- Variables & Theming --- */
:root {
    /* Colors */
    --bg-base: #0a0a0c;
    --bg-surface: #13141a;
    --bg-card: rgba(20, 21, 28, 0.6);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary-light: #60a5fa;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    
    --accent-1: #06b6d4; /* Cyan */
    --accent-2: #8b5cf6; /* Violet */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--primary) 0%, var(--accent-1) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);

    /* borders */
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --border-glow: 1px solid rgba(59, 130, 246, 0.3);

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    
    /* Spacing */
    --section-py: 120px;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Layout & Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-py) 0;
    position: relative;
    z-index: 10;
}

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

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

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
}

/* --- Background Effects --- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.bg-glow-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
}

.bg-glow-2 {
    bottom: -20%;
    left: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
}

/* --- Typography --- */
h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw + 1rem, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw + 1rem, 3rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 64px;
    max-width: 700px;
}

.section-header.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

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

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

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-glass);
    padding: 16px 0;
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

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

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

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for navbar */
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

.arrow { margin-left: 8px; transition: transform 0.3s; }
.btn-secondary:hover .arrow { transform: translateX(4px); }

/* --- Mockup (Hero Graphic) --- */
.mockup {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: rgba(0,0,0,0.3);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dots {
    display: flex;
    gap: 6px;
    margin-right: 16px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
}

.dots span:nth-child(1) { background: #ef4444; }
.dots span:nth-child(2) { background: #f59e0b; }
.dots span:nth-child(3) { background: #10b981; }

.mockup-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.mockup-body {
    flex-grow: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scanner-container {
    flex-grow: 1;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px dashed rgba(255,255,255,0.1);
}

/* Pseudo-image for scanner */
.scan-image {
    position: absolute;
    inset: 10px;
    background: 
        linear-gradient(90deg, transparent 50%, rgba(255,255,255,0.02) 50%),
        linear-gradient(rgba(255,255,255,0.02) 50%, transparent 50%);
    background-size: 20px 20px;
    border-radius: 8px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-1);
    box-shadow: 0 0 10px var(--accent-1), 0 0 20px var(--accent-1);
    animation: scan 3s ease-in-out infinite alternate;
}

@keyframes scan {
    0% { top: 10%; }
    100% { top: 90%; }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .nav-links {
        display: none; /* Handle mobile menu later if needed */
    }
}

/* --- Animations --- */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Defects Section --- */
.defects-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.defect-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.defect-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.defect-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 10px currentColor; /* Dynamic glow based on background */
}

.defect-list strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.defect-list span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Heatmap Demo (Abstract Graphic) --- */
.heatmap-demo {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.heatmap-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.heatmap-body {
    height: 250px;
    position: relative;
    background: #1a1b26;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.weld-base {
    width: 80%;
    height: 120px;
    background: linear-gradient(0deg, #333 0%, #555 50%, #333 100%);
    border-radius: 8px;
    position: relative;
}

.weld-defect {
    position: absolute;
    width: 30px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    top: 50%;
    left: 40%;
    transform: translateY(-50%);
}

.heatmap-overlay {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(239,68,68,0.8) 0%, rgba(245,158,11,0.5) 40%, transparent 70%);
    mix-blend-mode: screen;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.heatmap-footer {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    font-weight: 600;
}

/* --- CTA & Footer --- */
.cta {
    padding: 140px 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.footer {
    border-top: var(--border-glass);
    padding: 40px 0;
    background: rgba(0,0,0,0.2);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.copyright p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.footer-contact {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .defects-layout {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
}
