/* Landing page - dark theme, standalone. Load only on landing page. */
:root {
    --bg-deep: #0a0e17;
    --bg-surface: #111827;
    --bg-elevated: #1a2234;
    --border: rgba(99, 179, 237, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #22d3ee;
    --accent-dim: #06b6d4;
    --accent-glow: rgba(34, 211, 238, 0.25);
    --chart-1: #22d3ee;
    --chart-2: #a78bfa;
    --chart-3: #34d399;
    --chart-4: #f472b6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-1 { width: 400px; height: 400px; background: var(--accent); top: -100px; right: -100px; }
.orb-2 { width: 300px; height: 300px; background: #a78bfa; bottom: 20%; left: -80px; opacity: 0.2; }
.orb-3 { width: 200px; height: 200px; background: var(--chart-3); bottom: -50px; right: 30%; opacity: 0.15; }

.content-wrapper {
    position: relative;
    z-index: 1;
}

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

.landing-logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.landing-logo h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.landing-logo span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: var(--bg-deep);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 4rem 3rem;
    max-width: 1280px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    min-width: 0;
    max-width: 520px;
}

.hero-visual {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

/* ── Camera feed visual ────────────────────────────── */
.cam-feed {
    position: relative;
    flex: 1;
    min-height: 340px;
    background: #070d14;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

/* vignette */
.cam-feed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
    z-index: 2;
}

/* noise grain */
.cam-feed::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

/* fake camera scene background – abstract silhouette shapes */
.cam-feed {
    background:
        radial-gradient(ellipse 80px 120px at 38% 70%, rgba(255,255,255,0.03) 0%, transparent 70%),
        radial-gradient(ellipse 60px 90px at 68% 72%, rgba(255,255,255,0.025) 0%, transparent 70%),
        radial-gradient(ellipse 50px 80px at 82% 74%, rgba(255,255,255,0.02) 0%, transparent 70%),
        linear-gradient(180deg, #060d18 0%, #0a1520 60%, #0d1e2e 100%);
}

.cam-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 3;
}

.cam-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: rgba(34,211,238,0.7);
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 10;
}

.cam-rec {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #f87171;
}

.rec-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f87171;
    animation: recBlink 1.2s step-start infinite;
}

@keyframes recBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.cam-label { opacity: 0.7; }
.cam-time  { font-size: 0.65rem; }

/* Detection boxes */
.det-box {
    position: absolute;
    border: 1.5px solid rgba(34, 211, 238, 0.0);
    z-index: 8;
    animation: detFadeIn 0.6s ease forwards;
}

@keyframes detFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.det-1 { width: 34%; height: 55%; top: 22%; left: 31%; animation-delay: 0.1s; }
.det-2 { width: 24%; height: 44%; top: 26%; left:  6%; animation-delay: 0.5s; }
.det-3 { width: 20%; height: 40%; top: 28%; right: 4%; animation-delay: 0.9s; }

/* Corner markers */
.det-corner {
    position: absolute;
    width: 10px; height: 10px;
    border-color: var(--accent);
    border-style: solid;
    border-width: 0;
}
.det-corner.tl { top: -1px; left: -1px;  border-top-width: 2px; border-left-width: 2px; }
.det-corner.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.det-corner.bl { bottom: -1px; left: -1px;  border-bottom-width: 2px; border-left-width: 2px; }
.det-corner.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* Animated scan beam */
.det-scan-beam {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.7;
    animation: scanBeam 2.4s ease-in-out infinite;
}

@keyframes scanBeam {
    0%   { top: 0%; opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* Person photo inside main detection box */
.det-person-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) brightness(0.55) sepia(1) hue-rotate(160deg) saturate(3);
    opacity: 0.75;
    border-radius: 1px;
}

/* Face landmark mesh on main detection */
.det-face-grid {
    position: absolute;
    inset: 15% 20%;
    background-image:
        linear-gradient(rgba(34,211,238,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,211,238,0.08) 1px, transparent 1px);
    background-size: 12px 12px;
    border-radius: 50% 50% 40% 40%;
    opacity: 0.6;
}

/* Keypoints */
.det-keypoints {
    position: absolute;
    inset: 0;
}

.kp {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 4px var(--accent);
}
.kp-eye-l  { top: 33%; left: 30%; }
.kp-eye-r  { top: 33%; right: 28%; }
.kp-nose   { top: 52%; left: 48%; }
.kp-mouth-l { top: 68%; left: 36%; }
.kp-mouth-r { top: 68%; right: 32%; }

/* ID label above box */
.det-label {
    position: absolute;
    top: -1.4rem;
    left: 0;
    font-size: 0.55rem;
    letter-spacing: 0.07em;
    color: var(--accent);
    white-space: nowrap;
    background: rgba(6,14,24,0.85);
    padding: 1px 5px;
    border-radius: 3px;
}

.det-conf {
    color: #34d399;
    margin-left: 0.35rem;
}

.det-new {
    color: #f59e0b !important;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* HUD bottom strip */
.hud-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, transparent 100%);
    z-index: 10;
}

.hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.hud-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.hud-val.accent-text, .accent-text { color: var(--accent); }

.hud-key {
    font-size: 0.48rem;
    letter-spacing: 0.1em;
    color: rgba(34,211,238,0.5);
}

.hud-divider {
    width: 1px;
    height: 24px;
    background: rgba(34,211,238,0.2);
}

/* Crosshair */
.cam-crosshair {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    opacity: 0.12;
}

.ch-h {
    position: absolute;
    width: 100%; height: 1px;
    background: var(--accent);
}

.ch-v {
    position: absolute;
    height: 100%; width: 1px;
    background: var(--accent);
}

/* ── AI Sidebar ─────────────────────────────────────── */
.ai-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 150px;
    flex-shrink: 0;
}

.ai-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
}

.ai-panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.52rem;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.6rem;
    opacity: 0.8;
}

/* Embedding bars */
.embed-bars { display: flex; flex-direction: column; gap: 0.45rem; }

.embed-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.52rem;
    color: var(--text-secondary);
}

.embed-id { width: 42px; flex-shrink: 0; }

.embed-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.embed-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 2px;
    animation: fillGrow 1.2s ease-out forwards;
    transform-origin: left;
}

.efill-new {
    background: linear-gradient(90deg, #f59e0b, #f87171);
    animation: efillPulse 1.5s ease-in-out infinite alternate;
}

@keyframes fillGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes efillPulse {
    from { width: 30%; }
    to   { width: 55%; }
}

.embed-pct { font-size: 0.5rem; color: var(--text-muted); width: 16px; text-align: right; }

/* Mini chart */
.mini-chart { width: 100%; }
.mini-chart svg { width: 100%; height: 50px; display: block; }

/* Pipeline */
.pipeline-steps {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.pip-step {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.05em;
    padding: 3px 5px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.pip-done    { color: #34d399; border-color: rgba(52,211,153,0.25); background: rgba(52,211,153,0.07); }
.pip-active  { color: var(--accent); border-color: rgba(34,211,238,0.35); background: rgba(34,211,238,0.1); animation: pipPulse 1.2s ease-in-out infinite; }
.pip-pending { color: var(--text-muted); border-color: rgba(255,255,255,0.08); }

@keyframes pipPulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(34,211,238,0.4); }
}

.pip-arrow {
    font-size: 0.5rem;
    color: var(--text-muted);
}

/* ── Responsive: collapse visual below hero text on small screens ── */
@media (max-width: 1024px) {
    .hero { flex-direction: column; gap: 2.5rem; padding: 3rem 1.5rem; text-align: center; }
    .hero-text { max-width: 100%; }
    .hero-text .hero-buttons { justify-content: center; }
    .hero-visual { width: 100%; max-width: 600px; margin: 0 auto; }
    .ai-sidebar { display: none; }
}

@media (max-width: 600px) {
    .cam-feed { min-height: 240px; }
}

/* ─────────────────────────────────────────────────── */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: hero-pulse 2s ease-in-out infinite;
}

@keyframes hero-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h2 .accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 0 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: var(--accent);
    color: var(--bg-deep);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: rgba(34, 211, 238, 0.3);
}

.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.12);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.preview-section {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    overflow: hidden;
}

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

.preview-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-metrics {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.preview-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-metric .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.preview-metric .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.chart-placeholder {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 1rem;
}

.chart-bar {
    flex: 1;
    min-width: 20px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(34, 211, 238, 0.3) 100%);
    border-radius: 6px 6px 0 0;
    animation: barGrow 1.2s ease-out forwards;
}

@keyframes barGrow {
    from { transform: scaleY(0); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

.chart-bar:nth-child(1) { height: 45%; }
.chart-bar:nth-child(2) { height: 65%; }
.chart-bar:nth-child(3) { height: 55%; }
.chart-bar:nth-child(4) { height: 85%; }
.chart-bar:nth-child(5) { height: 70%; }
.chart-bar:nth-child(6) { height: 95%; }
.chart-bar:nth-child(7) { height: 60%; }
.chart-bar:nth-child(8) { height: 80%; }
.chart-bar:nth-child(9) { height: 45%; }
.chart-bar:nth-child(10) { height: 90%; }

.tech-stack {
    padding: 4rem 2rem;
    text-align: center;
}

.tech-stack p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.tech-stack .tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.footer-cta {
    padding: 5rem 2rem;
    text-align: center;
}

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

.footer-cta h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    nav { padding: 1rem; }
    .hero { min-height: 80vh; padding: 1.5rem; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1.05rem; }
    .features { padding: 4rem 1rem; }
}
