:root {
    --bg-color: #000000;
    --bg-darker: #050505;
    --glass-bg: rgba(20, 20, 35, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    --color-white: #f5f5f7;
    --color-blue: #2997ff;
    --color-blue-glow: rgba(41, 151, 255, 0.3);
    --color-gold: #ffd700;
    --color-gold-glow: rgba(255, 215, 0, 0.3);
    --color-purple: #bf5af2;
    --color-purple-glow: rgba(191, 90, 242, 0.2);
    --color-black: #000000;
    --color-green: #30d158;
    --color-red: #ff453a;
    --color-text-dim: #86868b;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--color-white);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* =============================================
   UTILITY CLASSES
============================================= */
.text-white {
    color: var(--color-white);
}

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

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

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

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

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

.text-gradient-gold {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.hidden {
    display: none !important;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.w-full {
    width: 100%;
}

.text-xs {
    font-size: 0.7rem;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* =============================================
   SCROLL ANIMATIONS (IntersectionObserver)
============================================= */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
[data-animate]:nth-child(2) {
    transition-delay: 0.1s;
}

[data-animate]:nth-child(3) {
    transition-delay: 0.2s;
}

[data-animate]:nth-child(4) {
    transition-delay: 0.3s;
}

[data-animate]:nth-child(5) {
    transition-delay: 0.4s;
}

/* =============================================
   NAVBAR — Sleek, Apple-like
============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 2rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
}

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

.nav-links a {
    color: var(--color-text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    transition: color 0.2s;
}

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

/* =============================================
   HERO — Apple-Style, Full Viewport
============================================= */
.hero-apple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 48px;
    position: relative;
    overflow: hidden;
}

.hero-apple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-headline {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 30%, #86868b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subheadline {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--color-text-dim);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-cta {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--color-blue);
    color: white;
    text-decoration: none;
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.hero-cta:hover {
    background: #1a8aff;
    transform: scale(1.03);
}

/* =============================================
   STATS BAR — Apple-style highlight numbers
============================================= */
.stats-bar {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-dim);
    margin-top: 0.5rem;
    font-weight: 400;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   SECTION — Cinematic Spacing
============================================= */
.section-cinematic {
    padding: 8rem 0;
}

.section-intro {
    text-align: center;
    margin-bottom: 5rem;
}

.section-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: 1.2rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--color-text-dim);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   FLOW CAROUSEL — Horizontal Sliding
============================================= */
.flow-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0.5rem;
    scrollbar-width: none;
}

.flow-carousel::-webkit-scrollbar {
    display: none;
}

.flow-card {
    flex: 0 0 180px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    scroll-snap-align: center;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.flow-card:hover {
    border-color: var(--color-blue);
    background: rgba(41, 151, 255, 0.06);
    transform: translateY(-3px);
}

.flow-card-num {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.flow-card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.flow-card h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.25rem;
}

.flow-card p {
    font-size: 0.78rem;
    color: var(--color-text-dim);
    line-height: 1.4;
}

.flow-card-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.2);
    padding: 0 0.15rem;
}

.flow-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.flow-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* =============================================
   APPLE-STYLE FEATURE GRID
============================================= */
.apple-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.apple-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2.5rem;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.apple-feature-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.apple-feature-card.large {
    padding: 3rem;
}

.apple-feature-card.large:first-child {
    grid-column: 1;
    grid-row: 1;
}

.afc-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.apple-feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.apple-feature-card p {
    font-size: 0.92rem;
    color: var(--color-text-dim);
    line-height: 1.6;
}

/* =============================================
   VALUE BLOCKS — Scroll-Reveal
============================================= */
.value-block {
    display: flex;
    gap: 3rem;
    padding: 3.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: flex-start;
}

.value-block:last-of-type {
    border-bottom: none;
}

.value-block-number {
    font-size: 3rem;
    font-weight: 900;
    min-width: 80px;
    letter-spacing: -0.04em;
    line-height: 1;
    padding-top: 0.25rem;
}

.value-block-content {
    flex: 1;
}

.value-block-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.value-block-tagline {
    font-size: 1rem;
    color: var(--color-text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.value-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.value-detail-item {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.value-detail-item.highlight-red {
    border-color: rgba(255, 69, 58, 0.3);
    background: rgba(255, 69, 58, 0.05);
}

.value-detail-item.highlight-green {
    border-color: rgba(48, 209, 88, 0.3);
    background: rgba(48, 209, 88, 0.05);
}

.vd-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 0.2rem;
}

.vd-desc {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    line-height: 1.5;
}

/* =============================================
   CLOSING QUOTE
============================================= */
.closing-quote {
    text-align: center;
    padding: 5rem 0 0;
}

.closing-quote p {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.quote-sub {
    display: block;
    font-size: 1rem;
    color: var(--color-text-dim);
    font-weight: 400;
}

/* =============================================
   DASHBOARD — Interactive Demo Components
============================================= */
.dashboard-container {
    margin-top: 0;
}

.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 0.75rem;
}

.glass-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-white);
    padding: 0.6rem 1rem;
    font-family: var(--font-main);
    font-size: 0.85rem;
}

.glass-select option {
    background: #1a1a2e;
}

.cta-button {
    padding: 0.7rem 1.5rem;
    border-radius: 980px;
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button.primary {
    background: var(--color-blue);
    color: white;
}

.cta-button.primary:hover {
    background: #1a8aff;
    transform: scale(1.03);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    padding: 0.6rem 1.2rem;
    border-radius: 980px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metrics-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kpi-card {
    border-radius: 16px;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.kpi-value small {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-dim);
}

.kpi-delta {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.chart-card {
    border-radius: 16px;
}

.chart-wrapper {
    max-height: 200px;
    display: flex;
    justify-content: center;
}

/* History Table */
.history-card {
    border-radius: 16px;
    overflow: hidden;
}

.history-header {
    margin-bottom: 1rem;
}

.history-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--color-text-dim);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    white-space: nowrap;
}

.history-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.cat-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 980px;
    font-size: 0.72rem;
    font-weight: 600;
}

.cat-badge.it {
    background: rgba(41, 151, 255, 0.15);
    color: var(--color-blue);
}

.cat-badge.marketing {
    background: rgba(191, 90, 242, 0.15);
    color: var(--color-purple);
}

.cat-badge.ops {
    background: rgba(48, 209, 88, 0.15);
    color: var(--color-green);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot.green {
    background: var(--color-green);
}

/* Upload & Verification Panel */
.split-screen-verification {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 500px;
}

.upload-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    border-radius: 16px;
}

.upload-content {
    padding: 2rem;
}

.icon-upload {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-content p {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    margin-bottom: 1.5rem;
}

/* Scanning animation */
.scanning-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.scanner-line {
    width: 80%;
    height: 3px;
    background: var(--color-green);
    box-shadow: 0 0 20px var(--color-green), 0 0 60px var(--color-green);
    animation: scan 1.5s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes scan {

    0%,
    100% {
        transform: translateY(-100px);
        opacity: 0.7;
    }

    50% {
        transform: translateY(100px);
        opacity: 1;
    }
}

.scan-text {
    margin-top: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Bounding boxes */
.bounding-box {
    position: absolute;
    border: 2px solid;
    border-radius: 3px;
    transition: opacity 0.5s;
}

.bounding-box.visible {
    opacity: 0.7;
    animation: boxPulse 2s infinite;
}

@keyframes boxPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.9;
    }
}

/* Verification Panel */
.verification-panel {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

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

.result-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-dim);
    font-weight: 500;
}

.placeholder-text p {
    color: var(--color-text-dim);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Extracted Form */
.extracted-form {
    flex: 1;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-dim);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-white);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
}

.confidence-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: -16px;
    bottom: 12px;
}

.confidence-dot.green {
    background: var(--color-green);
    box-shadow: 0 0 6px var(--color-green);
}

.confidence-dot.yellow {
    background: var(--color-gold);
    box-shadow: 0 0 6px var(--color-gold);
}

.confidence-dot.red {
    background: var(--color-red);
    box-shadow: 0 0 6px var(--color-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.line-items-box {
    font-size: 0.85rem;
    border-radius: 12px;
    padding: 1rem;
}

.line-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.line-item-row:last-child {
    border-bottom: none;
}

.total-group {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.total-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Agentic Pipeline */
.agentic-pipeline {
    margin-top: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.agentic-pipeline h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.pipeline-step {
    font-size: 0.82rem;
    padding: 0.4rem 0;
    color: var(--color-text-dim);
}

.pipeline-step.done {
    color: var(--color-green);
}

.pipeline-step.active {
    color: var(--color-gold);
}

/* =============================================
   FOOTER
============================================= */
footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.branding {
    font-size: 1.2rem;
    font-weight: 700;
}

.branding p {
    font-size: 0.78rem;
    color: var(--color-text-dim);
    margin-top: 0.25rem;
    font-weight: 400;
}

.contact {
    text-align: right;
}

.contact p {
    font-size: 0.82rem;
    color: var(--color-text-dim);
    margin-bottom: 0.25rem;
}

.contact a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.72rem;
    }

    .section-cinematic {
        padding: 4rem 0;
    }

    .section-intro {
        margin-bottom: 3rem;
    }

    .stats-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 50px;
        height: 1px;
    }

    .flow-step-apple {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.5rem;
    }

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

    .value-block {
        flex-direction: column;
        gap: 1.5rem;
    }

    .value-block-number {
        font-size: 2rem;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .split-screen-verification {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .contact {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-headline {
        font-size: 3.5rem;
    }

    .stats-grid {
        gap: 1rem;
    }

    .flow-step-apple {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}