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

:root {
    /* Colors - Modern Gray Palette */
    --color-bg: #ffffff;
    --color-bg-secondary: #fafafa;
    --color-text: #0a0a0a;
    --color-text-secondary: #525252;
    --color-text-tertiary: #737373;
    --color-border: #e5e5e5;
    --color-accent: #3f3f46;
    --color-hover: #27272a;
    --color-accent-light: #f4f4f5;
    --color-accent-dark: #18181b;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    --font-size-base: 17px;
    --line-height-base: 1.6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    --space-3xl: 12rem;

    /* Container */
    --container-max: 1280px;
    --container-padding: 2rem;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

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

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
    margin: 0 auto;
}

/* Prevent all sections from overflowing horizontally */
section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

.nav-link-cta {
    color: var(--color-text);
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all var(--transition);
}

.nav-link-cta:hover {
    border-color: var(--color-text);
    background: var(--color-text);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-2xl) var(--container-padding);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(0, 128, 0, 0.25),
            rgba(0, 128, 0, 0.18) 40%,
            rgba(0, 128, 0, 0.12) 60%,
            transparent 80%);
    pointer-events: none;
    transition: opacity 0.2s ease;
    opacity: 0;
    mix-blend-mode: normal;
}

.hero:hover::before,
.hero:active::before,
.hero.touch-active::before {
    opacity: 1;
}

/* Circuit board dots that spark on hover */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at center, rgba(0, 128, 0, 0.4) 1.5px, transparent 1.5px),
        radial-gradient(circle at center, rgba(0, 128, 0, 0.4) 1.5px, transparent 1.5px),
        radial-gradient(circle at center, rgba(0, 128, 0, 0.3) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px, 20px 20px;
    background-position: 0 0, 20px 20px, 10px 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    animation: circuitPulse 2s ease-in-out infinite;
}

@keyframes circuitPulse {
    0%, 100% {
        opacity: 0;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.5) drop-shadow(0 0 8px rgba(0, 128, 0, 0.6));
    }
}

.hero:hover::after {
    animation: circuitSpark 0.8s ease-in-out infinite;
}

@keyframes circuitSpark {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1) drop-shadow(0 0 4px rgba(0, 128, 0, 0.4));
    }
    50% {
        opacity: 1;
        filter: brightness(2) drop-shadow(0 0 12px rgba(0, 128, 0, 0.8));
    }
}

/* Circuit lines that appear on hover */
.hero {
    position: relative;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(0, 128, 0, 0.15) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 128, 0, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
    mask-image: radial-gradient(circle 500px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle 500px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
}

.hero:hover .hero-background::before {
    opacity: 0.6;
    animation: circuitFlow 3s linear infinite;
}

@keyframes circuitFlow {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

/* Neural network canvas */
.neural-network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Static background for dots */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    letter-spacing: -0.01em;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-indicator span {
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-border), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* ===========================
   Featured Work
   =========================== */
.featured-work {
    padding: var(--space-3xl) var(--container-padding);
    background: var(--color-bg-secondary);
}

.work-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.work-label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.work-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-sm);
}

.work-category {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.work-description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.work-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

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

.feature-number {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.feature-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Work Visual Frame */
.work-visual {
    position: relative;
}

.work-frame {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    transition: all var(--transition-slow);
}

.work-frame:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 32px 64px rgba(63, 63, 70, 0.15), 0 0 0 1px rgba(63, 63, 70, 0.1);
}

.frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

.frame-dots {
    display: flex;
    gap: 0.5rem;
}

.frame-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3c3c3e;
}

.frame-dots span:nth-child(1) {
    background: #ec695e;
}

.frame-dots span:nth-child(2) {
    background: #f4bf4f;
}

.frame-dots span:nth-child(3) {
    background: #61c653;
}

.frame-url {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.frame-content {
    height: 450px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
    position: relative;
    overflow: hidden;
}

.doc-preview {
    position: absolute;
    inset: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.doc-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(63, 63, 70, 0.8), transparent);
    animation: scan 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(63, 63, 70, 0.6);
}

@keyframes scan {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(380px); opacity: 1; }
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    height: 100%;
}

.doc-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.doc-item::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    height: 10px;
    background: rgba(0, 113, 227, 0.5);
    border-radius: 5px;
}

.doc-item::after {
    content: '';
    position: absolute;
    top: 2.75rem;
    left: 1rem;
    right: 3rem;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

/* DocuScout Interactive Interface */
.docuscout-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.docuscout-link:hover {
    transform: scale(1.02);
}

.docuscout-link:active {
    transform: scale(0.98);
}

.docuscout-interface {
    width: 100%;
    height: 100%;
    display: flex;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

.interface-sidebar {
    width: 120px;
    background: rgba(0, 128, 0, 0.03);
    border-right: 1px solid rgba(0, 128, 0, 0.1);
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    transition: all var(--transition);
    opacity: 0.5;
}

.sidebar-item.active {
    background: rgba(0, 128, 0, 0.1);
    opacity: 1;
}

.sidebar-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-label {
    font-size: 0.7rem;
    color: var(--color-text);
    font-weight: 500;
}

.interface-main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.interface-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.interface-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.interface-badge {
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #008000, #006400);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.interface-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.document-upload {
    background: white;
    border: 2px dashed rgba(0, 128, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    min-width: 140px;
}

.upload-icon {
    color: #008000;
    margin-bottom: 0.75rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-icon svg {
    stroke: currentColor;
}

.upload-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.processing-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.processing-dot {
    width: 8px;
    height: 8px;
    background: #008000;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.processing-dot:nth-child(1) {
    animation-delay: 0s;
}

.processing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.processing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

.ai-arrow {
    font-size: 2rem;
    color: #008000;
    font-weight: bold;
    animation: slideRight 2s ease-in-out infinite;
}

@keyframes slideRight {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(10px); opacity: 1; }
}

.quote-output {
    background: white;
    border: 2px solid rgba(0, 128, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 140px;
    position: relative;
}

.output-line {
    height: 8px;
    background: linear-gradient(90deg, rgba(0, 128, 0, 0.3), rgba(0, 128, 0, 0.1));
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: fillLine 2s ease-in-out infinite;
}

.output-line.short {
    width: 60%;
}

.output-line.medium {
    width: 80%;
}

@keyframes fillLine {
    0% { opacity: 0.3; transform: scaleX(0.5); transform-origin: left; }
    100% { opacity: 1; transform: scaleX(1); }
}

.quote-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #008000;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 128, 0, 0.3);
    animation: popIn 2s ease-in-out infinite;
}

@keyframes popIn {
    0%, 50% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.interface-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 128, 0, 0.1);
}

.stat-item {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.stat-num {
    font-weight: 700;
    color: #008000;
    font-size: 1.125rem;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(63, 63, 70, 0.25), 0 0 0 1px rgba(63, 63, 70, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-hover) 0%, var(--color-accent-dark) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(63, 63, 70, 0.35), 0 0 0 1px rgba(63, 63, 70, 0.2);
}

.btn-primary svg {
    transition: transform var(--transition);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.0625rem;
}

/* ===========================
   Capabilities Section
   =========================== */
.capabilities {
    padding: var(--space-3xl) var(--container-padding);
}

.capabilities-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-header-minimal {
    margin-bottom: var(--space-xl);
}

.section-title-minimal {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    line-height: 1.1;
}

.section-subtitle-minimal {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.capability-card {
    padding: var(--space-xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(16px);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(63, 63, 70, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.capability-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(63, 63, 70, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.capability-card:hover::after {
    opacity: 1;
}

.capability-card:hover {
    border-color: rgba(63, 63, 70, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 24px 48px rgba(63, 63, 70, 0.12), 0 0 0 1px rgba(63, 63, 70, 0.05);
    transform: translateY(-12px);
}

.capability-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(63, 63, 70, 0.08), rgba(82, 82, 91, 0.08));
    color: var(--color-accent);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-slow);
    position: relative;
    z-index: 1;
}

.capability-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(63, 63, 70, 0.2), rgba(82, 82, 91, 0.2));
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: -1;
}

.capability-card:hover .capability-icon::before {
    opacity: 1;
}

.capability-card:hover .capability-icon {
    background: linear-gradient(135deg, rgba(63, 63, 70, 0.12), rgba(82, 82, 91, 0.12));
    transform: translateY(-4px) scale(1.05);
}

.capability-icon svg {
    transition: all var(--transition-slow);
}

.capability-card:hover .capability-icon svg {
    transform: scale(1.15) rotate(-5deg);
}

.capability-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
    position: relative;
    z-index: 1;
}

.capability-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.capability-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.capability-list li {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.capability-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-text-tertiary);
}

/* ===========================
   Tech Stack
   =========================== */
.tech-stack {
    padding: var(--space-3xl) var(--container-padding);
    background: var(--color-bg);
}

.tech-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.tech-column-title {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.tech-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-list li {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* ===========================
   About Section - Star Wars Credits Style
   =========================== */
.about {
    padding: 0;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 400px;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 90px 10px, rgba(255, 255, 255, 0.9), transparent);
    background-size: 200px 200px, 250px 250px, 300px 300px, 350px 350px, 400px 400px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px;
    pointer-events: none;
    z-index: 1;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.about-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: var(--space-3xl) var(--container-padding);
    height: 100%;
    display: flex;
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for Star Wars section */
.about-container::-webkit-scrollbar {
    width: 8px;
}

.about-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.about-container::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.about-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.8);
}

.about-content {
    text-align: center;
    transform-style: preserve-3d;
    animation: none;
    transform-origin: 50% 100%;
    width: 100%;
    padding-top: 20vh;
    padding-bottom: 20vh;
    min-height: 100%;
}

.about-content.paused {
    animation-play-state: paused;
}

@keyframes crawl {
    0% {
        transform: rotateX(25deg) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotateX(25deg) translateY(-150vh) scale(0.5);
        opacity: 0;
    }
}

.about-title-wrapper {
    margin-bottom: var(--space-3xl);
}

.about-label {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.5em;
    color: #ffd700;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-family: 'Pathway Gothic One', sans-serif;
}

.about-title {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin-bottom: var(--space-2xl);
    color: #ffd700;
    text-transform: uppercase;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2);
    font-family: 'Pathway Gothic One', sans-serif;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    max-width: 1000px;
    margin: 0 auto;
}

.about-text p {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.6;
    color: #ffd700;
    margin: 0;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-family: 'Pathway Gothic One', sans-serif;
}

.about-text p:last-child {
    font-weight: 600;
    color: #ffd700;
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    text-shadow:
        0 0 15px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.3);
}

/* Scroll indicator */
.about-scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #ffd700;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: fadeInOut 3s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.about-scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: #ffd700;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Interactive controls */
.about-controls {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 1rem;
    align-items: center;
    pointer-events: none;
    opacity: 0;
}

.about-control-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd700;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.about-control-btn:hover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.about-control-btn svg {
    width: 24px;
    height: 24px;
}

.about-control-label {
    font-size: 0.875rem;
    color: #ffd700;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.about-control-hint {
    font-size: 0.75rem;
    color: rgba(255, 215, 0, 0.8);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
    padding: var(--space-3xl) var(--container-padding);
    background: linear-gradient(135deg, #3f3f46 0%, #27272a 50%, #18181b 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1), transparent 50%);
    pointer-events: none;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.cta-subtitle {
    font-size: 1.375rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    font-weight: 400;
}

.cta-contact .btn-large {
    background: white;
    color: #000;
    font-weight: 600;
}

.cta-contact .btn-large:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: var(--space-xl) var(--container-padding) var(--space-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--color-bg-secondary);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-partners {
    text-align: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.partners-label {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.partners-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.partner-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.partner-separator {
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

.certification-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(0, 128, 0, 0.05), rgba(0, 128, 0, 0.1));
    border: 1px solid rgba(0, 128, 0, 0.2);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #008000;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
}

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

/* ===========================
   Back to Top Button
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-hover) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(63, 63, 70, 0.25);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--color-hover) 0%, var(--color-accent-dark) 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(63, 63, 70, 0.35);
}

.back-to-top svg {
    transition: transform var(--transition);
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    :root {
        --container-padding: 1.5rem;
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
        --space-3xl: 8rem;
    }

    /* Hero Section Mobile Fixes */
    .hero {
        min-height: 100svh; /* Use svh for better mobile support */
        min-height: 100vh;
        padding: var(--space-lg) 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .hero-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 var(--container-padding);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        position: relative;
        left: 0;
        right: 0;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(2.25rem, 10vw, 3.5rem);
        width: 100%;
        text-align: center;
        margin: 0 auto 1.5rem;
        padding: 0;
        display: block;
        position: relative;
        left: 0;
        transform: translateX(0);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.25rem);
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 0;
        margin: 0 auto;
        display: block;
        position: relative;
        left: 0;
        transform: translateX(0);
    }

    .hero-subtitle br {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 77px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Ensure all sections are properly centered and full-width */
    .work-container,
    .capabilities-container,
    .tech-container,
    .about-container,
    .cta-container {
        width: 100%;
        max-width: 100%;
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    /* Center all text content */
    .work-content,
    .section-header-minimal {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .work-title,
    .cta-title {
        text-align: center;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .work-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* About Section Mobile */
    .about {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for better mobile support */
        min-height: 100vh;
        min-height: 100dvh;
    }

    .about-container {
        padding: var(--space-md) var(--container-padding);
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .about-content {
        padding-top: 15vh;
        padding-bottom: 15vh;
        min-height: 100%;
    }

    .about-label {
        font-size: clamp(0.75rem, 2vw, 1rem);
        letter-spacing: 0.3em;
    }

    .about-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
        letter-spacing: 0.05em;
    }

    .about-text {
        gap: var(--space-xl);
    }

    .about-text p {
        font-size: clamp(1.125rem, 3.5vw, 1.5rem);
        line-height: 1.5;
    }

    .about-scroll-indicator {
        display: flex;
        bottom: var(--space-md);
        font-size: 0.75rem;
    }

    .about-scroll-indicator svg {
        width: 20px;
        height: 20px;
    }

    .about-controls {
        display: none;
    }

    .about-visual {
        opacity: 0;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .work-visual {
        order: -1;
    }

    .work-features {
        grid-template-columns: 1fr;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* Mobile DocuScout Interface */
    .docuscout-interface {
        flex-direction: column;
        min-height: 400px;
    }

    .interface-sidebar {
        width: 100%;
        flex-direction: row;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(0, 128, 0, 0.1);
        gap: 0.5rem;
    }

    .sidebar-item {
        flex: 1;
        padding: 0.5rem;
    }

    .sidebar-icon {
        font-size: 1.25rem;
        margin-bottom: 0.125rem;
    }

    .sidebar-label {
        font-size: 0.625rem;
    }

    .interface-main {
        padding: 1.5rem 1rem;
    }

    .interface-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .interface-title {
        font-size: 1.125rem;
    }

    .interface-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .document-upload,
    .quote-output {
        min-width: 100%;
        width: 100%;
    }

    .ai-arrow {
        font-size: 1.5rem;
        animation: slideDown 2s ease-in-out infinite;
    }

    .ai-arrow::after {
        content: '↓';
        position: absolute;
        left: 0;
        right: 0;
    }

    .ai-arrow {
        font-size: 0;
        position: relative;
        height: 2rem;
    }

    .ai-arrow::after {
        font-size: 1.5rem;
    }

    @keyframes slideDown {
        0%, 100% { transform: translateY(0); opacity: 0.5; }
        50% { transform: translateY(10px); opacity: 1; }
    }

    .interface-stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .frame-content {
        height: auto;
        min-height: 400px;
    }

    /* CTA Section Mobile */
    .cta-contact {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cta-contact .btn-large {
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
        text-align: center;
        box-sizing: border-box;
        word-break: break-all;
        display: inline-block;
    }

    /* Back to Top Button Mobile */
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
}

/* Large mobile / Tablet breakpoint */
@media (min-width: 640px) and (max-width: 968px) {
    /* Hero adjustments for larger phones/small tablets */
    .hero-container {
        max-width: 700px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: clamp(2.75rem, 8vw, 4rem);
    }

    .hero-subtitle {
        font-size: clamp(1.125rem, 3vw, 1.375rem);
        max-width: 90%;
        margin: 0 auto;
    }

    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .capability-card:last-child {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    :root {
        --container-padding: 1rem;
    }

    /* Smaller mobile devices */
    .hero {
        min-height: 100svh;
        min-height: 100vh;
        padding: var(--space-md) 0;
    }

    .hero-container {
        padding: 0 var(--container-padding);
    }

    .hero-title {
        font-size: clamp(1.875rem, 9vw, 2.5rem);
        margin: 0 auto 1.25rem;
        padding: 0;
    }

    .hero-subtitle {
        font-size: clamp(0.9375rem, 3.5vw, 1.125rem);
        padding: 0;
        line-height: 1.6;
        margin: 0 auto;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 1.25rem var(--container-padding);
    }

    /* CTA Section - Smaller Mobile */
    .cta-contact .btn-large {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        max-width: 100%;
    }
}

/* ===========================
   Animations & Effects
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
