/* =========================================
   VARIABLES & GLOBAL CSS
   ========================================= */
:root {
    --primary: #000000;
    --primary-light: #2c2c2c;
    --accent: #ff520a; /* Orange branding */
    --accent-hover: #e04403;
    --accent-transparent: rgba(255, 82, 10, 0.1);
    --accent-light: rgba(255, 82, 10, 0.2);
    --bg-main: #ffffff;
    --bg-sec: #fcfcfc;
    --text-main: #0B0E14; /* Deep, techy black */
    --text-sec: #475569;
    --border-color: #cbd5e1;
    --grid-color: rgba(0, 0, 0, 0.04);
    
    --transition: all 0.2s ease-in-out;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    
    --shadow-sm: none;
    --shadow-md: 4px 4px 0px rgba(0, 0, 0, 0.05);
    --shadow-lg: 8px 8px 0px rgba(0, 0, 0, 0.05);
    --shadow-primary: 6px 6px 0px var(--accent-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: var(--radius-sm); /* Force sharp corners everywhere */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-sec);
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
                      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 112px 112px;
    background-position: center top;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative; /* ensure absolute children cover full height */
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.15;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   GRID DECORATORS
   ========================================= */
.grid-decorators-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

main, header, footer {
    position: relative;
    z-index: 1;
}

.dec-grey-box, .dec-orange-text, .dec-orange-marker, .dec-matrix-cluster {
    position: absolute;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.dec-grey-box, .dec-orange-text, .dec-orange-marker {
    animation: gridDecPulse infinite ease-in-out;
}

.dec-matrix-cluster {
    color: var(--accent);
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    white-space: pre;
    pointer-events: none;
    opacity: 0.15; /* Reduced opacity */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes matrixFloatUp {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
    10% { opacity: 0.2; }
    50% { opacity: 0.5; transform: translate(-50%, -80px); }
    90% { opacity: 0.2; }
}
@keyframes matrixFloatDown {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
    10% { opacity: 0.2; }
    50% { opacity: 0.5; transform: translate(-50%, 80px); }
    90% { opacity: 0.2; }
}
@keyframes matrixFloatLeft {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
    10% { opacity: 0.2; }
    50% { opacity: 0.5; transform: translate(-80px, -50%); }
    90% { opacity: 0.2; }
}
@keyframes matrixFloatRight {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%); }
    10% { opacity: 0.2; }
    50% { opacity: 0.5; transform: translate(80px, -50%); }
    90% { opacity: 0.2; }
}

@keyframes gridDecPulse {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px 24px;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-primary);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--accent-light);
}

.btn-outline {
    background: var(--bg-main);
    color: var(--text-main);
    border: 2px solid var(--text-main);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.btn-outline:hover {
    background: var(--text-main);
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.15);
}

.bg-light { background-color: var(--bg-sec); }
.text-center { text-align: center; }

/* =========================================
   HEADER
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 48px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-main);
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.04);
    padding: 0.25rem;
    border-radius: 2rem;
    margin-left: 16px;
}

.lang-btn {
    background: none;
    border: none;
    padding: 0.35rem 0.6rem;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-sec);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background: white;
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    display: block;
}

.hero-video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Мягкий top-gradient поверх видео — даёт контраст для текста в левой колонке,
       но не превращает верх hero в белое пустое пятно. */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.25) 45%, rgba(255, 255, 255, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Небольшой overscan чтобы убрать edge artifacts на ultra-wide viewport'ах;
       translateY/scale 1.25 убрали — создавало видимые искажения по краям. */
    transform: scale(1.03);
    transform-origin: center center;
}

.hero-content {
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 48px;
    align-items: flex-start;
}

.hero-text-col {
    text-align: left;
}

.hero-calc-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    font-weight: 800;
    line-height: 1.0;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.hero-title span {
    color: var(--accent); /* Orange highlight */
}

.hero-subtitle {
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 32px 0;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

/* =========================================
   GLOBAL ASCII PATTERN
   ========================================= */
.global-ascii-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: monospace;
    font-size: 1.2vw;
    line-height: 1;
    color: var(--accent); /* Orange color */
    opacity: 0.20; /* 20% opacity */
    pointer-events: none;
    z-index: 0;
    white-space: pre;
    user-select: none;
    text-align: center;
}
@media (max-width: 768px) {
    .global-ascii-bg { font-size: 2.5vw; }
}

.demo-grid {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* Terminal Styles */
.demo-terminal {
    background: #0d1117; /* GitHub Darkish Background */
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 800px;
}

.terminal-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ff5f56; } /* Mac Red */
.terminal-dots span:nth-child(2) { background: #ffbd2e; } /* Mac Yellow */
.terminal-dots span:nth-child(3) { background: #27c93f; } /* Mac Green */

.terminal-title {
    flex: 1;
    text-align: center;
    color: #8b949e;
    font-size: 0.85rem;
    font-family: monospace;
    margin-left: -48px; /* Offset the dots for true center */
}

.terminal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 480px; 
}

.terminal-body::-webkit-scrollbar {
    width: 14px;
}
.terminal-body::-webkit-scrollbar-track {
    background: transparent;
    border-left: 1px solid rgba(255,255,255,0.05);
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #475569;
    border: 4px solid #0d1117; /* Create padding around thumb */
    border-radius: 8px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.terminal-body pre {
    margin: 0;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #c9d1d9;
}

/* Calculator Width Reset */
.calc-widget {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    font-family: 'Inter', sans-serif;
    margin: 0;
    width: 100%;
}

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    background: rgba(0,0,0,0.04);
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.custom-select-trigger:hover {
    background: rgba(0,0,0,0.08);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
    display: none; /* Hidden by default */
    flex-direction: column;
    margin-top: 4px;
    border-radius: 4px;
    overflow: hidden;
}

.custom-select-options.open {
    display: flex;
}

.custom-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.custom-option:hover {
    background: rgba(255, 82, 10, 0.05); /* Accent highlight */
    color: var(--accent);
}

.custom-option.active {
    background: rgba(255, 82, 10, 0.1);
    color: var(--text-main);
    font-weight: 700;
}

/* Existing Calc Input Group Styles Adjustments */

.calc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.calc-tab {
    flex: 1;
    padding: 14px 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-sec);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.calc-tab.active {
    color: var(--text-main);
    border-bottom-color: var(--accent);
}

.calc-body {
    padding: 24px;
}

.calc-input-group {
    margin-bottom: 12px;
}

.calc-input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-bottom: 6px;
    font-weight: 500;
}

.calc-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    background: var(--bg-sec);
    transition: var(--transition);
}

.calc-input-wrapper:focus-within {
    border-color: var(--accent);
}

.calc-input-wrapper input {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    width: 60%;
    outline: none;
    font-family: monospace;
}

.calc-currency {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    background: rgba(0,0,0,0.04);
    padding: 6px 12px;
    cursor: pointer;
}

/* Hide original calc-currency as we use custom triggers now */
.calc-input-wrapper > .calc-currency {
    display: none;
}

.currency-icon {
    width: 24px;
    height: 24px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}
.kgs-icon { background: #e31e24; }
.usdt-icon { background: #26a17b; }

.calc-swap-wrapper {
    display: flex;
    justify-content: center;
    margin: -12px 0;
    position: relative;
    z-index: 2;
}

.calc-swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.calc-swap-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.calc-swap-btn svg { width: 18px; height: 18px; }

.calc-best-rate {
    background: rgba(255, 82, 10, 0.05);
    border: 1px dashed var(--accent);
    padding: 12px;
    margin: 16px 0;
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.rate-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}
.rate-title svg { width: 18px; height: 18px; color: var(--accent); }

.rate-savings {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.rate-value {
    font-family: monospace;
    font-weight: 500;
    color: var(--text-sec);
    font-size: 0.95rem;
}

.calc-submit-btn {
    width: 100%;
}

.calc-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-sec);
    margin-top: 16px;
}

/* =========================================
   CALC WIDGET DEMO STEPS (2-6)
   ========================================= */
.step-hidden {
    display: none !important;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-sec);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--text-main);
}
.btn-back svg { width: 18px; height: 18px; }

.step-counter {
    font-family: monospace;
    color: var(--text-sec);
    font-size: 0.9rem;
}

.step-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
}

.progress-bar.active {
    background: var(--accent);
}

.progress-bar.done {
    background: var(--accent-hover);
}

.step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.step-title svg { width: 24px; height: 24px; }

/* Rate Options */
.rate-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.rate-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-sec);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Slightly rounded unlike global for widget inner */
}

.rate-option.best-rate {
    background: var(--accent-transparent);
    border-color: var(--accent-light);
}

.ro-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.ro-name svg { width: 16px; height: 16px; }

.ro-val {
    font-family: monospace;
    font-weight: 600;
}

.rate-summary {
    text-align: center;
    color: var(--text-sec);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* KYC Box */
.kyc-box {
    text-align: center;
    padding: 32px 0;
    margin-bottom: 24px;
}

.kyc-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    background: var(--bg-sec);
    border-radius: 16px; /* slightly round inner */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sec);
}

.kyc-icon-wrapper svg { width: 28px; height: 28px; }

.kyc-box h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.kyc-box p {
    color: var(--text-sec);
    font-size: 0.95rem;
}

/* Form Pills & Inputs */
.payment-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 12px;
    margin-top: 24px;
}

.payment-form label:first-child {
    margin-top: 0;
}

.payment-form label svg { width: 18px; height: 18px; color: var(--text-sec); }

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pill {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.pill.active {
    background: var(--accent-transparent);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.pill:hover:not(.active) {
    background: var(--bg-sec);
}

.sm-pill {
    padding: 4px 12px;
    font-size: 0.8rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    font-family: monospace;
    font-size: 1rem;
    margin-bottom: 32px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent);
}

/* QR Box */
.qr-box {
    text-align: center;
    padding: 32px 0;
    margin-bottom: 24px;
}

.qr-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px auto;
    background: var(--bg-sec);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sec);
}
.qr-placeholder svg { width: 48px; height: 48px; }

.qr-box h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.qr-box p {
    color: var(--text-sec);
    font-size: 0.95rem;
}

/* Success Box */
.success-box {
    text-align: center;
    padding: 40px 0 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    background: #2ea043;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    box-shadow: 0 8px 24px rgba(46, 160, 67, 0.2);
}

.success-icon svg { width: 40px; height: 40px; }

.success-box h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.success-box p {
    color: var(--text-sec);
    font-size: 1rem;
    margin-bottom: 32px;
}

.tx-details {
    text-align: left;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.tx-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-sec);
}
.tx-row:last-child { margin-bottom: 0; }

.tx-val {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-main);
}

/* Loader Animation */
.simulated-loader.loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
    color: transparent !important;
}

.simulated-loader.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =========================================
   PARTNERS MARQUEE
   ========================================= */
.partners-section {
    padding: 20px 0 80px 0;
}

.partners-banner {
    display: flex;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100px;
    position: relative;
}

.partners-title-col {
    padding: 0 32px;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border-color);
    background: var(--bg-sec);
    flex-shrink: 0;
    max-width: 250px;
    z-index: 2; /* keep title on top of marquee just in case */
}

.partners-title-col span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-sec);
    line-height: 1.4;
}

.partners-title-col span span {
    color: var(--accent);
    font-weight: 800;
}

.partners-marquee-col {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg-main);
}

.partners-track {
    display: flex;
    height: 100%;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.partners-marquee-col:hover .partners-track {
    animation-play-state: paused;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 48px;
    border-right: 1px solid var(--border-color);
    height: 100px;
    flex-shrink: 0;
}

.partner-item .p-logo {
    height: 28px;
    width: 28px;
    object-fit: contain;
    filter: opacity(0.3); /* Grey out the black logos */
    transition: var(--transition);
}

.partner-item:hover .p-logo {
    filter: opacity(0.8);
}

.partner-item .p-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #a0aab5;
    transition: var(--transition);
}

.partner-item:hover .p-name {
    color: var(--text-main);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* =========================================
   SECTIONS & GRIDS
   ========================================= */
.section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.grid {
    display: grid;
    gap: 32px;
}

/* Problem & Insight */
.insight-card {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    padding: 40px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--accent);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.insight-icon {
    background: var(--accent-transparent);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    border: 1px solid var(--accent);
}

.insight-icon svg { width: 32px; height: 32px; }

.insight-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.insight-desc { 
    font-size: 1.125rem; 
    font-weight: 500; 
    line-height: 1.4; 
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-card {
    padding: 32px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-primary);
    transform: translate(-4px, -4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--text-main);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Products */
.products-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.product-card {
    background: var(--bg-main);
    padding: 48px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
    transform: translate(-4px, -4px);
}

.product-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.product-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.product-icon svg { width: 32px; height: 32px; }
.bg-blue { background: var(--text-main); }
.bg-purple { background: var(--accent); }

.product-card h3 { font-size: 1.75rem; font-weight: 800; }
.product-desc { font-size: 1.125rem; color: var(--text-sec); margin-bottom: 32px; line-height: 1.4; }

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 500;
}
.product-features li i {
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Market & Clients */
.clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.client-card {
    background: var(--bg-main);
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.client-card:hover {
    border-color: var(--accent);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.client-icon {
    color: var(--accent);
    margin-bottom: 24px;
}
.client-icon svg { width: 40px; height: 40px; }

.client-card h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.client-examples {
    color: var(--text-sec);
    font-size: 0.9rem;
    margin-bottom: 16px;
    min-height: 42px;
}

.client-need {
    font-weight: 600;
}
.client-need span { color: var(--accent); }

/* Model Section */
.bg-gradient-dark {
    background: var(--text-main);
}
.text-white { color: white; }

.model-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* Tech Diagram for Business Model */
.tech-diagram {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    position: relative;
}

.tech-diagram::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: var(--accent);
}

.d-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    color: white;
    padding: 16px 24px;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}

.d-block.accent-block {
    background: rgba(255, 82, 10, 0.15);
    border: 1px solid var(--accent);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 82, 10, 0.2);
}

.d-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.05em;
}

.d-block-title i { color: var(--accent); }
.accent-block .d-block-title i { color: white; }

.d-block-fee {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 82, 10, 0.1);
    padding: 6px 12px;
    border: 1px dashed var(--accent);
}

.d-block-badge {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    background: var(--accent);
    padding: 6px 12px;
    letter-spacing: 0.05em;
}

.d-connector {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.d-connector::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(to bottom, var(--accent) 0, var(--accent) 4px, transparent 4px, transparent 8px);
    z-index: 1;
}

.d-connector i {
    color: var(--accent);
    background: var(--text-main);
    z-index: 2;
    padding: 4px 0;
    width: 20px;
    height: 20px;
}

.d-legal {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.d-legal i {
    color: var(--accent);
    margin-top: 4px;
}

.d-legal strong {
    color: white;
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.stat-box {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.stat-icon {
    color: var(--accent);
    background: rgba(255, 82, 10, 0.15);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--accent);
}

.stat-info h3 { font-size: 1.25rem; margin-bottom: 6px; color: white; }
.stat-info p { color: #cbd5e1; font-size: 0.95rem; }

/* Team Section */
.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.team-member {
    text-align: center;
    padding: 32px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.team-member:hover {
    border-color: var(--text-main);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.1);
    transform: translate(-2px, -2px);
}

.member-avatar {
    width: 130px;
    height: 130px;
    background: var(--bg-sec);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 24px;
    border: 3px solid var(--accent);
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
}

.team-member h4 { font-size: 1.5rem; margin-bottom: 4px; font-weight: 800; line-height: 1.1; max-width: 180px; margin-left: auto; margin-right: auto; }
.member-role { color: var(--accent); font-weight: 600; margin-bottom: 16px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; }
.member-bio { color: var(--text-sec); font-size: 0.95rem; }

/* Bottom CTA & Footer */
.bottom-cta {
    background: var(--accent-transparent);
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
}

.bottom-cta p {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-btn {
    box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
}

.footer {
    background: var(--text-main);
    color: white;
    padding: 64px 0 32px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 40px;
    margin-bottom: 32px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 56px;
    object-fit: contain;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    color: #cbd5e1;
}

.footer-links p {
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* Responsive */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

@media (max-width: 1000px) {
    .hero-title { font-size: 3rem; }
    .demo-grid { 
        display: flex;
        flex-direction: column-reverse;
        gap: 32px;
    }
    .demo-bg-ascii.left, .demo-bg-ascii.right { display: none; }
    .calc-widget { max-width: 100%; }

    /* Reduce terminal size by 40% */
    .terminal-header { padding: 7px 10px; }
    .terminal-dots { gap: 4px; }
    .terminal-dots span { width: 7px; height: 7px; }
    .terminal-title { font-size: 0.51rem; margin-left: -21px; }
    .terminal-body { padding: 14px; max-height: 288px; }
    .terminal-body pre { font-size: 0.51rem; }
}

@media (max-width: 1000px) {
    .header-container { flex-direction: row; justify-content: space-between; align-items: center; }
    .mobile-menu-toggle { display: block; padding: 4px; font-size: 20px; }
    
    .logo-img { height: 40px; } /* Increased from 32px */

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-main);
        flex-direction: column;
        padding: 24px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-color);
        display: none; /* Hidden by default toggled via JS */
        gap: 24px;
        z-index: 1000;
    }
    .nav.active { display: flex; }
    
    .nav-links { flex-direction: column; width: 100%; gap: 16px; }
    .nav-actions { flex-direction: column; width: 100%; gap: 16px; margin-left: 0; }
    .header .btn { width: auto; padding: 8px 16px; font-size: 0.85rem; }
    .bottom-cta .cta-btn { white-space: nowrap; font-size: 0.95rem; padding: 14px 20px; }
    
    /* Hero section stacked */
    .hero { display: flex; flex-direction: column; justify-content: flex-start; min-height: auto; }
    .hero-video-container { position: relative; height: 40vh; width: 100vw; overflow: hidden; z-index: 1; }
    .hero-video { transform: none; object-position: center; }
    .hero-title-overlay { 
        position: static; 
        transform: none;
        padding-top: 32px; 
    }
    
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-bottom-cta { padding: 24px 0 60px; }
    
    .hero-cta { flex-direction: column; width: 100%; }
    .btn { width: 100%; text-align: center; justify-content: center; }
    
    .section-title { font-size: 1.75rem; margin-bottom: 24px; }
    .section { padding: 48px 0; }
    
    /* Calculator widget reductions */
    .calc-input-wrapper { padding: 8px 12px; }
    .calc-input-wrapper input { font-size: 1.25rem; width: 50%; }
    .custom-select-trigger { padding: 4px 8px; font-size: 0.85rem; }
    .calc-tab { font-size: 0.95rem; padding: 12px 0; }
    .calc-body { padding: 16px; }

    /* Partners track stacked */
    .partners-banner { flex-direction: column; height: auto; align-items: stretch; }
    .partners-title-col { max-width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 16px; justify-content: center; text-align: center; }
    .partners-marquee-col { height: 80px; }
    .partner-item { padding: 0 24px; height: 80px; }
    .partner-item .p-logo { filter: opacity(0.8); }

    .stats-grid { grid-template-columns: 1fr; gap: 24px; }
    .features-grid { grid-template-columns: 1fr; gap: 24px; }
    .team-grid { grid-template-columns: 1fr; gap: 24px; }
    .products-grid { grid-template-columns: 1fr; gap: 32px; }
    .clients-grid { grid-template-columns: 1fr; gap: 24px; }
    
    .model-grid { grid-template-columns: 1fr; gap: 32px; }
    
    .footer-container { flex-direction: column; gap: 32px; }
}

/* Development Section */
.dev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

@media (max-width: 992px) {
    .dev-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
