:root {
    --brand-blue: #635BFF;
    --brand-dark: #0A2540;
    --text-main: #3C4257;
    --text-secondary: #4F566B;
    --bg-white: #FFFFFF;
    --bg-slate: #F7FAFC;
    --border-color: #E3E8EE;
    --shadow-sm: 0 2px 5px rgba(60, 66, 87, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 7px 14px rgba(60, 66, 87, 0.08), 0 3px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px rgba(60, 66, 87, 0.08), 0 5px 15px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
}

/* Typography Utilities */
h1, h2, h3, h4 {
    color: var(--brand-dark);
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

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

.section-header {
    margin-bottom: 4rem;
    max-width: 800px;
}

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

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    letter-spacing: 0;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: var(--bg-white);
    box-shadow: 0 4px 6px rgba(50,50,93,0.11), 0 1px 3px rgba(0,0,0,0.08);
}

.btn-primary:hover {
    background-color: #0A2540;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50,50,93,0.1), 0 3px 6px rgba(0,0,0,0.08);
}

.btn-secondary {
    background-color: white;
    color: var(--brand-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), inset 0 0 0 1px var(--border-color);
}

.btn-secondary:hover {
    color: var(--brand-blue);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(50,50,93,0.08), 0 3px 7px -3px rgba(0,0,0,0.08), inset 0 0 0 1px var(--border-color);
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
    text-decoration: none;
    letter-spacing: 0;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: auto;
    margin-right: 2rem;
}

.nav-links a {
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-visual {
    perspective: 1500px;
}

.hero-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background-color: var(--bg-slate);
    transform: skewY(-8deg);
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.top-left {
    width: 600px;
    height: 600px;
    background: #80E9FF;
    top: 20%;
    left: 20%;
}

.bottom-right {
    width: 500px;
    height: 500px;
    background: #7A73FF;
    bottom: 20%;
    right: 20%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0;
    line-height: 1.1;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.highlight-text {
    position: relative;
    display: inline-block;
    padding: 0 0.15em;
    z-index: 1;
    animation: textColorChange 0.1s forwards;
    animation-delay: 0.8s;
}

.highlight-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2F61D5;
    z-index: -1;
    transform-origin: left;
    transform: scaleX(0);
    animation: expandHighlight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes expandHighlight {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes textColorChange {
    100% { color: white; }
}

/* Dashboard Visuals */
.dashboard-window {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.window-header {
    background: var(--bg-slate);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.window-body {
    padding: 1.5rem;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

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

.dash-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.error {
    background: #FFF1F0;
    color: #E03131;
    border: 1px solid #FFD8D6;
}

.metric-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--bg-slate);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-top: 3px solid transparent;
}

.border-orange { border-top-color: #F5A623; }
.border-cyan { border-top-color: #24B47E; }
.border-red { border-top-color: #E03131; }

.m-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.m-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
    font-variant-numeric: tabular-nums;
}

.chart-area {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.bar {
    flex: 1;
    background: #E3E8EE;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}

/* Feature Grid 3 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-orange { background: #FFF4E5; color: #F5A623; }
.icon-cyan { background: #E3FDF1; color: #24B47E; }
.icon-red { background: #FFF1F0; color: #E03131; }
.icon-blue { background: #E6F3FF; color: #0073E6; }
.icon-green { background: #EBF8F2; color: #108A4D; }
.icon-purple { background: #F2EFFF; color: var(--brand-blue); }

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

/* Bento Layout (2x2 Grid) */
.bento-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.bento-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.bento-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(99, 91, 255, 0.12);
    border-color: rgba(99, 91, 255, 0.3);
}

.feature-square {
    grid-column: span 1;
}

/* Dual-Track Animation Section */
.workflow-section {
    background: var(--bg-slate);
    overflow: hidden;
}

.workflow-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.flow-panel {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid #E2E8F0;
}

.traditional-panel {
    background: #F4FBF7;
    border-color: #D1E7DD;
}

.sapper-panel {
    background: #F5F3FF;
    border-color: #DDD6FE;
}

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

.panel-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--brand-dark);
}

.sapper-logo-tag {
    font-weight: 800;
    font-size: 1rem;
    color: var(--brand-blue);
}

.panel-status {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
}

.status-gray {
    background: #EDF2F7;
    color: #4A5568;
}

.status-mint {
    background: #E6F3FF;
    color: var(--brand-blue);
}

.running-track-wrapper {
    position: relative;
    padding: 1.5rem 0;
    width: 100%;
}

.track-line-bg {
    position: absolute;
    top: 40px;
    left: 5.555%;
    right: 5.555%;
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    z-index: 1;
}

.track-line-fill {
    position: absolute;
    top: 40px;
    left: 5.555%;
    height: 4px;
    background: linear-gradient(90deg, #635BFF, #80E9FF);
    border-radius: 2px;
    z-index: 2;
    transition: width 0.4s ease;
    width: 0%;
}

.track-fill-trad {
    background: #34D399;
}

.running-packet {
    position: absolute;
    top: 23px;
    left: 5.555%;
    z-index: 10;
    width: 0;
    height: 38px;
    transition: left 0.4s ease;
}

.packet-icon {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #635BFF;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.4);
    animation: bouncePacket 1.5s infinite ease-in-out;
}

.packet-icon.icon-amber {
    background: #34D399;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.4);
}

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

.packet-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: #0A2540;
    color: #FFFFFF;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.tooltip-amber {
    background: #0A2540;
    color: #FFFFFF;
}

.nodes-container {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.node-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex: 1;
    min-width: 0;
}

.node-item:hover {
    transform: translateY(-2px);
}

.node-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #CBD5E0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.node-item.active .node-icon {
    border-color: #635BFF;
    background: #F5F3FF;
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.2);
}

.trad-node.active .node-icon {
    border-color: #34D399;
    background: #ECFDF5;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.25);
}

.node-item.completed .node-icon {
    border-color: #635BFF;
    background: #635BFF;
    color: white;
}

.trad-node.completed .node-icon {
    border-color: #34D399;
    background: #34D399;
    color: white;
}

.node-symbol {
    font-size: 1.1rem;
}

.node-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.node-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    background: var(--bg-white);
}

.cta-box {
    background: linear-gradient(135deg, #0A2540 0%, #1A1F36 100%);
    border-radius: var(--radius-lg);
    padding: 5rem 3rem;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.15);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
}

.cta-content p {
    color: #A0AEC0;
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

/* Contact Sales Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 20, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #F1F5F9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    color: #64748B;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: #E2E8F0;
    color: var(--brand-dark);
}

.modal-header {
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.25rem;
}

.modal-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.modal-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 1rem;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--brand-dark);
    background: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
}

.modal-success {
    text-align: center;
    padding: 1.5rem 0;
}

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

.modal-success h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.modal-success p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Footer */
footer {
    padding: 4rem 0;
    background: var(--bg-slate);
    border-top: 1px solid var(--border-color);
}

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

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

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

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

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

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 900px) {
    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    .container {
        width: 100%;
        padding-inline: 1.25rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header h2 span[style*="white-space"] {
        white-space: normal !important;
    }

    .nav-container {
        padding: 0.875rem 1.25rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.25rem;
    }

    .hero h1 {
        font-size: 2rem;
        white-space: normal;
    }

    .hero h1 span[style*="white-space"] {
        white-space: normal !important;
    }

    .highlight-text {
        white-space: nowrap;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-visual,
    .dashboard-window {
        width: 100%;
        min-width: 0;
    }

    .window-body {
        padding: 1rem;
    }

    .dash-header {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .metric-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .grid-3 { grid-template-columns: 1fr; }
    .bento-layout { grid-template-columns: 1fr; }
    .nav-links, .nav-actions { display: none; }

    .bento-box,
    .workflow-card {
        padding: 1.25rem;
    }

    .flow-panel {
        min-width: 0;
        overflow: hidden;
        padding: 1rem;
    }

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

    .running-track-wrapper {
        overflow: visible;
        padding: 0;
    }

    .nodes-container {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem 0.5rem;
        min-width: 0;
    }

    .track-line-bg,
    .track-line-fill,
    .running-packet {
        display: none;
    }

    .node-item {
        min-width: 0;
        padding: 0.25rem;
        text-align: center;
    }

    .node-label,
    .node-sub {
        overflow-wrap: anywhere;
    }

    .cta-box {
        padding: 3rem 1.25rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-actions,
    .footer-container {
        align-items: stretch;
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
    }

    .footer-container {
        gap: 1.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
    }

    .modal-overlay {
        padding: 0.75rem;
    }

    .modal-card {
        max-height: calc(100vh - 1.5rem);
        padding: 1.25rem;
    }

    .modal-form { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
}

@media (max-width: 420px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .section-header h2,
    .cta-content h2 {
        font-size: 1.625rem;
    }
}
