/* ── Nav ──────────────────────────────────────────── */

.l-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--s5);
    height: 56px;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.l-nav-mark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    animation: pulse-dot 3s ease-in-out infinite;
}

.l-nav-brand-text {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-family: var(--font-sans);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 8px rgba(99, 102, 241, 0.3); }
    50%      { opacity: 1;   box-shadow: 0 0 14px rgba(99, 102, 241, 0.6); }
}

.l-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.l-nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-4);
    letter-spacing: 0.04em;
}

.l-nav-status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--positive);
    animation: pulse-green 2.5s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.l-nav-coords {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-4);
    letter-spacing: 0.06em;
    min-width: 120px;
    text-align: right;
}

/* ── Hero ─────────────────────────────────────────── */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--s8) var(--s4);
    overflow: hidden;
}

/* Ambient glow - primary */
.hero::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.06) 0%,
                                rgba(99, 102, 241, 0.025) 30%,
                                transparent 60%
    );
    pointer-events: none;
    animation: glow-drift 12s ease-in-out infinite;
}

@keyframes glow-drift {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    33%      { transform: translate(-47%, -53%) scale(1.08); opacity: 0.75; }
    66%      { transform: translate(-53%, -47%) scale(0.95); opacity: 1; }
}

/* Secondary warm glow */
.hero::after {
    content: '';
    position: absolute;
    top: 55%;
    left: 65%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(
        circle,
        rgba(245, 158, 11, 0.025) 0%,
                                rgba(139, 92, 246, 0.015) 40%,
                                transparent 60%
    );
    pointer-events: none;
    animation: glow-drift-2 18s ease-in-out infinite;
}

@keyframes glow-drift-2 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50%      { transform: translate(-55%, -45%) scale(1.12); opacity: 1; }
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-line {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: var(--text-white);
}

.hero-line:last-of-type {
    color: var(--text-2);
}

.hero-typing {
    margin-top: var(--s5);
    min-height: 1.8em;
}

@media (max-width: 768px) {
    .hero-typing {
        min-height: 3.6em;
    }
}

.hero-typing-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-3);
    letter-spacing: 0.02em;
}

.hero-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.9s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.hero-stats {
    margin-top: var(--s5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-3);
}

.hero-stats em {
    font-style: normal;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.hero-stats .sep {
    color: var(--text-4);
    margin: 0 4px;
}

/* ── CTA Button ───────────────────────────────────── */

.hero-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--s6);
    padding: 15px 32px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-1);
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-s);
    overflow: hidden;
    transition: all 0.5s var(--ease);
    text-transform: uppercase;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.08) 0%,
                                rgba(139, 92, 246, 0.04) 50%,
                                transparent 100%
    );
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

.hero-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.06),
                                transparent
    );
    transition: none;
}

.hero-cta:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow:
    0 0 30px rgba(99, 102, 241, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    cursor: none;
}

.hero-cta:hover::before {
    opacity: 1;
}

.hero-cta:hover::after {
    left: 100%;
    transition: left 0.8s var(--ease);
}

.hero-cta-arrow {
    display: inline-block;
    transition: transform 0.4s var(--ease);
    font-size: 0.875rem;
}

.hero-cta:hover .hero-cta-arrow {
    transform: translateX(4px);
}

.hero-cta-text {
    position: relative;
    z-index: 1;
}

/* Dot grid */
.dot-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: radial-gradient(
        circle,
        var(--text-4) 1px,
                                      transparent 1px
    );
    background-size: 24px 24px;
    mask-image: radial-gradient(
        ellipse 50% 50% at 50% 50%,
        black 20%,
        transparent 70%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 50% 50% at 50% 50%,
        black 20%,
        transparent 70%
    );
}

/* ── Floating particles ───────────────────────────── */

.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    8%   { opacity: 0.35; }
    50%  { opacity: 0.2; }
    90%  { opacity: 0.1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

/* ── Process section ──────────────────────────────── */

.process {
    position: relative;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--s8) var(--s4);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-m);
    overflow: hidden;
    margin-top: var(--s5);
}

.process-card {
    padding: var(--s5);
    background: var(--bg-surface-1);
    transition: background var(--dur) var(--ease);
}

.process-card:hover {
    background: var(--bg-surface-2);
}

.process-num {
    display: block;
    margin-bottom: var(--s4);
}

.process-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--s2);
}

.process-card p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-2);
    margin-bottom: var(--s4);
}

.process-val {
    padding-top: var(--s3);
    border-top: 1px solid var(--border);
}

.process-val em {
    display: block;
    font-style: normal;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 2px;
}

.process-val span {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* ── Extraction log ───────────────────────────────── */

.log {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--s7) var(--s4) var(--s8);
}

.log-list {
    margin-top: var(--s5);
}

.log-entry {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: var(--s4);
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-phase {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.04em;
}

.log-desc {
    font-size: 0.875rem;
    color: var(--text-2);
}

.log-status {
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.log-status.ok   { color: var(--positive); }
.log-status.warn { color: var(--caution); }

.log-status.live {
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-status.live::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Footer ───────────────────────────────────────── */

.l-footer {
    position: relative;
    padding: var(--s6) var(--s4) var(--s5);
    border-top: 1px solid var(--border);
}

.l-footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s5);
}

.l-footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.l-footer-brand {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.04em;
}

.l-footer-copy {
    font-size: 0.75rem;
    color: var(--text-3);
}

.l-footer-right {
    max-width: 420px;
    text-align: right;
}

.l-footer-disclaimer {
    font-size: 0.6875rem;
    line-height: 1.7;
    color: var(--text-4);
    font-style: italic;
}

.l-footer-bar {
    max-width: var(--content-max);
    margin: var(--s5) auto 0;
    padding-top: var(--s3);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.l-footer-links {
    display: flex;
    gap: 16px;
}

.l-footer-links a {
    font-size: 0.6875rem;
    color: var(--text-4);
    letter-spacing: 0.04em;
    transition: color var(--dur-fast) var(--ease);
}

.l-footer-links a:hover {
    color: var(--text-2);
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 768px) {
    .l-nav { padding: 0 var(--s3); }
    .l-nav-coords { display: none; }
    .hero  { padding: var(--s8) var(--s3); }

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

    .log-entry {
        grid-template-columns: 72px 1fr auto;
        gap: var(--s2);
    }

    .process, .log {
        padding-left: var(--s3);
        padding-right: var(--s3);
    }

    .l-footer-inner {
        flex-direction: column;
        gap: var(--s4);
    }

    .l-footer-right {
        text-align: left;
    }

    .l-footer-bar {
        flex-direction: column;
        gap: var(--s2);
    }
}

@media (max-width: 480px) {
    .hero-line {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: 4px;
    }

    .hero-stats .sep { display: none; }
}
