/* ══════════════════════════════════════════════════════
 MORPHISM - cinematic.css
 Full cinematic visual upgrade.
 Import AFTER site.css on every page.
══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800;9..40,900&family=DM+Mono:wght@300;400;500&display=swap');

/* ── Override font vars ─────────────────────────────── */
:root {
 --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 --mono: 'DM Mono', 'IBM Plex Mono', ui-monospace, monospace;
 --dark: #000000;
 --dark-mid: #0a0a0a;
 --ink: #0a0a0a;

 /* Cinematic additions */
 --violet-glow: rgba(91,61,232,0.35);
 --terminal-green: #8eb4ff;
 --terminal-dim: rgba(174, 184, 210, 0.45);
 --scan-violet: rgba(91,61,232,0.6);
 --terminal-ink: rgba(230, 232, 240, 0.9);
}

/* ── Boot overlay ───────────────────────────────────── */
#boot-overlay {
 position: fixed;
 inset: 0;
 z-index: 9999;
 background: radial-gradient(ellipse 120% 80% at 50% 0%, #1a1f2e 0%, #0a0b10 45%);
 display: flex;
 align-items: center;
 justify-content: center;
 flex-direction: column;
 gap: 20px;
 transition: opacity 0.5s ease;
}

#boot-overlay.fade-out {
 opacity: 0;
 pointer-events: none;
}

.boot-terminal {
 font-family: var(--mono);
 font-size: 12px;
 color: var(--terminal-ink);
 line-height: 1.8;
 letter-spacing: 0.06em;
 width: min(420px, 92vw);
}

.boot-line {
 display: flex;
 align-items: center;
 gap: 10px;
 opacity: 0;
 transform: translateY(4px);
 transition: opacity 0.2s, transform 0.2s;
}

.boot-line.show {
 opacity: 1;
 transform: translateY(0);
}

.boot-prompt { color: var(--terminal-dim); }
.boot-ok { color: #c4b5fd; }
.boot-dim { color: rgba(148, 163, 184, 0.35); }

.boot-bar-wrap {
 width: min(420px, 92vw);
 height: 2px;
 background: rgba(255,255,255,0.06);
 position: relative;
 overflow: hidden;
}

.boot-bar-fill {
 position: absolute;
 left: 0; top: 0; bottom: 0;
 background: linear-gradient(90deg, #5b3de8, #8b7cf0);
 width: 0%;
 transition: width 0.05s linear;
 border-radius: 2px;
}

/* ── Global heading override ────────────────────────── */
.display, h1.display {
 font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 font-size: clamp(48px, 7vw, 108px);
 font-weight: 800;
 line-height: 0.96;
 letter-spacing: -0.045em;
 color: var(--ink);
}

.display-white { color: #ffffff; }

.heading-1, h2.heading-1 {
 font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 font-size: clamp(32px, 4.5vw, 64px);
 font-weight: 700;
 line-height: 1.05;
 letter-spacing: -0.035em;
}

.heading-2, h3.heading-2 {
 font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 font-size: clamp(24px, 3vw, 42px);
 font-weight: 600;
 line-height: 1.1;
 letter-spacing: -0.025em;
}

.process-title {
 font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 font-size: 22px;
 font-weight: 700;
 letter-spacing: -0.025em;
}

/* ── Terminal component ─────────────────────────────── */
.terminal {
 background: #12151c;
 border: 1px solid rgba(91, 61, 232, 0.22);
 border-radius: 10px;
 overflow: hidden;
 font-family: var(--mono);
 font-size: 11px;
 line-height: 1.7;
}

.terminal-bar {
 padding: 10px 16px;
 border-bottom: 1px solid rgba(255, 255, 255, 0.06);
 display: flex;
 align-items: center;
 gap: 8px;
 background: rgba(91, 61, 232, 0.06);
}

.t-dot { width:8px;height:8px;border-radius:50%; }

.terminal-body {
 padding: 16px;
 color: var(--terminal-ink);
 min-height: 120px;
}

.t-prompt { color: var(--terminal-dim); margin-right: 8px; }
.t-cmd { color: #fff; }
.t-out { color: var(--terminal-dim); margin-left: 16px; display: block; }
.t-val { color: #c4b5fd; font-weight: 400; }
.t-err { color: #f87171; }
.t-cursor {
 display: inline-block;
 width: 7px; height: 13px;
 background: #a78bfa;
 border-radius: 1px;
 animation: termBlink 0.9s step-end infinite;
 vertical-align: middle;
 margin-left: 2px;
}
@keyframes termBlink { 0%,100%{opacity:1}50%{opacity:0} }

/* ── Connection lines canvas ────────────────────────── */
#connection-canvas {
 display: none;
}

/* ── Section reveal with processing state ───────────── */
.section-proc {
 position: relative;
}

.proc-overlay-section {
 position: absolute;
 inset: 0;
 background: #fff;
 z-index: 10;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: opacity 0.4s ease, visibility 0.4s ease;
}

.proc-overlay-section.done {
 opacity: 0;
 visibility: hidden;
 pointer-events: none;
}

.proc-text {
 font-family: var(--mono);
 font-size: 10px;
 color: var(--violet);
 letter-spacing: 0.2em;
 text-transform: uppercase;
}

/* ── Scroll terminal sidebar ────────────────────────── */
#scroll-terminal {
 display: none !important;
}

.st-line { display: block; opacity: 0; transition: opacity 0.2s; }
.st-line.show { opacity: 1; }
.st-dim { color: rgba(0,255,136,0.3); }
.st-ok { color: var(--terminal-green); }

/* ── Hero assembly animation ────────────────────────── */
.hero-assembly-wrap {
 position: relative;
}

.hero-code-panel {
 position: absolute;
 left: -280px;
 top: 50%;
 transform: translateY(-50%);
 width: 260px;
 opacity: 0;
 transition: opacity 0.3s;
}

.word-reveal {
 display: inline-block;
 overflow: hidden;
 vertical-align: bottom;
}

.word-inner {
 display: inline-block;
 transform: translateY(110%);
 transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.word-inner.revealed {
 transform: translateY(0);
}

/* ── Stat hover scramble ────────────────────────────── */
.stat-value[data-scramble-hover] {
 cursor: default;
 transition: color 0.1s;
}

/* ── Nav code tooltip ───────────────────────────────── */
.nav-code-tip {
 position: absolute;
 top: calc(100% + 6px);
 left: 50%;
 transform: translateX(-50%);
 background: #000;
 border: 1px solid rgba(0,255,136,0.2);
 border-radius: 2px;
 padding: 4px 10px;
 font-family: var(--mono);
 font-size: 8px;
 color: var(--terminal-green);
 letter-spacing: 0.08em;
 white-space: nowrap;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.15s;
 z-index: 200;
}

.nav-item-wrap:hover .nav-code-tip { opacity: 1; }

/* ── Button code tooltip ────────────────────────────── */
.btn-code-wrap {
 position: relative;
 display: inline-flex;
}

.btn-code-tip {
 position: absolute;
 bottom: calc(100% + 6px);
 left: 50%;
 transform: translateX(-50%);
 background: #000;
 border: 1px solid rgba(0,255,136,0.2);
 border-radius: 2px;
 padding: 5px 10px;
 font-family: var(--mono);
 font-size: 8px;
 color: var(--terminal-green);
 letter-spacing: 0.06em;
 white-space: nowrap;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.15s;
 z-index: 200;
}

.btn-code-wrap:hover .btn-code-tip { opacity: 1; }

/* ── Footer terminal ────────────────────────────────── */
.footer-terminal-section {
 background: #000;
 padding: 80px 0 0;
 position: relative;
 overflow: hidden;
}

.footer-terminal-prompt {
 font-family: var(--mono);
 font-size: 13px;
 color: var(--terminal-green);
 letter-spacing: 0.06em;
 display: flex;
 align-items: center;
 gap: 8px;
 margin-bottom: 6px;
}

.footer-terminal-output {
 font-family: var(--mono);
 font-size: 11px;
 color: var(--terminal-dim);
 letter-spacing: 0.06em;
 line-height: 1.8;
 margin-bottom: 28px;
}

.footer-terminal-cta {
 display: inline-flex;
 align-items: center;
 gap: 10px;
 font-family: var(--mono);
 font-size: 10px;
 font-weight: 400;
 letter-spacing: 0.18em;
 text-transform: uppercase;
 color: #000;
 background: var(--terminal-green);
 border: none;
 border-radius: 2px;
 padding: 13px 28px;
 text-decoration: none;
 transition: background 0.2s, box-shadow 0.2s;
}

.footer-terminal-cta:hover {
 background: #fff;
 box-shadow: 0 0 20px rgba(0,255,136,0.3);
}

/* ── Violet glow on hover for product cards ─────────── */
.product-card:hover {
 box-shadow: 0 8px 48px rgba(91,61,232,0.12);
}

/* ── Section dark = pure black ──────────────────────── */
.section-dark {
 background: #000;
}

/* ── Grid lines sharper ─────────────────────────────── */
.grid-bg {
 background-image:
 linear-gradient(rgba(91,61,232,0.04) 1px, transparent 1px),
 linear-gradient(90deg, rgba(91,61,232,0.04) 1px, transparent 1px);
 background-size: 80px 80px;
}

.grid-bg-dark {
 background-image:
 linear-gradient(rgba(91,61,232,0.08) 1px, transparent 1px),
 linear-gradient(90deg, rgba(91,61,232,0.08) 1px, transparent 1px);
 background-size: 80px 80px;
}

/* ── Typing text ────────────────────────────────────── */
.typing-text::after {
 content: '▋';
 color: var(--violet);
 animation: termBlink 0.9s step-end infinite;
 font-size: 0.8em;
 margin-left: 2px;
}

/* ── Live indicator ─────────────────────────────────── */
.live-indicator {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 font-family: var(--mono);
 font-size: 9px;
 font-weight: 400;
 letter-spacing: 0.16em;
 text-transform: uppercase;
 color: var(--terminal-green);
}

.live-dot {
 width: 5px;
 height: 5px;
 border-radius: 50%;
 background: var(--terminal-green);
 box-shadow: 0 0 4px rgba(0, 255, 136, 0.45);
}

/* ── Node connection dots ───────────────────────────── */
.node-dot {
 width: 8px;
 height: 8px;
 border-radius: 50%;
 background: var(--violet);
 box-shadow: 0 0 12px var(--violet-glow);
 display: inline-block;
}

/* ── Scanline sweep on dark sections ────────────────── */
.scanline-section {
 position: relative;
 overflow: hidden;
}

.scanline-section::after {
 display: none;
}

/* ── Glitch text effect ─────────────────────────────── */
@keyframes glitch {
 0%,100% { clip-path: none; transform: none; }
 20% { clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%); transform: translateX(-2px); }
 40% { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); transform: translateX(2px); }
 60% { clip-path: none; transform: none; }
}

.glitch-hover:hover { animation: glitch 0.3s steps(2) 1; }

/* ── Data stream decorations ────────────────────────── */
.data-stream {
 position: absolute;
 font-family: var(--mono);
 font-size: 9px;
 color: rgba(91,61,232,0.12);
 line-height: 1.4;
 letter-spacing: 0.04em;
 pointer-events: none;
 user-select: none;
 white-space: nowrap;
}

/* ── Magnetic button effect ─────────────────────────── */
.btn-magnetic {
 transition: transform 0.15s ease;
}

/* ── Number ticker ──────────────────────────────────── */
.stat-value {
 font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
 font-size: clamp(48px, 6vw, 80px);
 font-weight: 800;
 letter-spacing: -0.05em;
 line-height: 1;
}

/* ── Section processing bar ─────────────────────────── */
.section-load-bar {
 position: absolute;
 top: 0;
 left: 0;
 height: 2px;
 background: var(--violet);
 width: 0%;
 transition: width 0.6s ease;
 z-index: 5;
}

/* ── Eyebrow upgrade ────────────────────────────────── */
.eyebrow {
 font-family: var(--mono);
 font-size: 9px;
 font-weight: 400;
 letter-spacing: 0.3em;
 text-transform: uppercase;
 color: var(--violet);
 margin-bottom: 16px;
 display: flex;
 align-items: center;
 gap: 10px;
}

.eyebrow::before {
 content: '';
 display: inline-block;
 width: 16px;
 height: 1px;
 background: var(--violet);
 flex-shrink: 0;
}

/* ── Animated underline on headings ─────────────────── */
.heading-underline {
 position: relative;
 display: inline-block;
}

.heading-underline::after {
 content: '';
 position: absolute;
 bottom: -4px;
 left: 0;
 width: 0%;
 height: 2px;
 background: var(--violet);
 transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.heading-underline.revealed::after { width: 100%; }

/* ── Hero title char animation ──────────────────────── */
.char-animate {
 display: inline-block;
 overflow: hidden;
 vertical-align: bottom;
 line-height: 1;
}

.char-inner {
 display: inline-block;
 transform: translateY(105%);
 transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.char-inner.in { transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
 .hero-code-panel { display: none; }
 .data-stream { display: none; }
 .display { font-size: clamp(40px, 10vw, 72px); }
}
