/* Logeco Labs — custom styles & scroll animations (dark "research lab" theme) */

/* ---- Circular Std (brand font, copied from the app) ---- */
@font-face {
    font-family: 'Circular Std';
    src: url('../fonts/CircularStd-Book.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Circular Std';
    src: url('../fonts/CircularStd-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Circular Std';
    src: url('../fonts/CircularStd-Bold.ttf') format('truetype');
    font-weight: 600 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Circular Std';
    src: url('../fonts/CircularStd-Black.ttf') format('truetype');
    font-weight: 800 900;
    font-style: normal;
    font-display: swap;
}

/* ---- Dark lab canvas ---- */
:root {
    --ink:       #021715;  /* deep teal-black */
    --ink-2:     #04201d;
    --line:      rgba(20, 184, 166, 0.10);
    --line-soft: rgba(20, 184, 166, 0.05);
    --glow:      #14b8a6;
}

body {
    background-color: var(--ink);
    color: #eafffb;
}

/* A faint blueprint grid that can sit behind any section */
.lab-grid {
    background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: 46px 46px;
}
.lab-grid-fade {
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 35%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 35%, transparent 100%);
}

/* ---- Hero: blueprint grid + sweeping scan beam + glow ---- */
.hero {
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(20,184,166,0.16), transparent 60%),
        linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 70%);
}

/* a brighter grid revealed only inside a thin diagonal band that sweeps to the
   bottom-right — a spottable "scan wave" */
.hero-scan {
    background-image:
        linear-gradient(to right, rgba(20, 184, 166, 0.38) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(20, 184, 166, 0.38) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image:
        linear-gradient(135deg, transparent 46%, #000 50%, transparent 54%),
        radial-gradient(ellipse 75% 65% at 50% 30%, #000 35%, transparent 100%);
    mask-image:
        linear-gradient(135deg, transparent 46%, #000 50%, transparent 54%),
        radial-gradient(ellipse 75% 65% at 50% 30%, #000 35%, transparent 100%);
    -webkit-mask-size: 260% 260%, 100% 100%;
    mask-size: 260% 260%, 100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    animation: gridScan 11s linear infinite;
}
@keyframes gridScan {
    0%   { -webkit-mask-position: 0% 0%, 50% 30%;     mask-position: 0% 0%, 50% 30%; }
    100% { -webkit-mask-position: 100% 100%, 50% 30%; mask-position: 100% 100%, 50% 30%; }
}

/* gradient headline word — brighter for dark backgrounds */
.lab-gradient-text {
    background-image: linear-gradient(100deg, #2dd4bf 0%, #14b8a6 45%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* soft hairline border used on dark cards */
.lab-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color .3s, background-color .3s, transform .3s;
}
.lab-card:hover {
    background: rgba(20, 184, 166, 0.06);
    border-color: rgba(20, 184, 166, 0.35);
}

/* ---- Terminal window (the showcase demos) ---- */
.lab-terminal {
    background: linear-gradient(180deg, rgba(2,28,26,0.92), rgba(2,20,19,0.92));
    border: 1px solid rgba(20, 184, 166, 0.18);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color .3s, transform .3s, box-shadow .3s;
}
.lab-terminal:hover {
    border-color: rgba(20, 184, 166, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 40px 70px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(20,184,166,0.12);
}
.lab-terminal-bar {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lab-dot { height: 11px; width: 11px; border-radius: 9999px; display: inline-block; }

/* blinking caret in the prompt line */
.lab-caret {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    background: var(--glow);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0ms);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .animate-float, .animate-pulse, .hero-scan, .lab-caret { animation: none !important; }
    .hero-scan { display: none; }
    html { scroll-behavior: auto; }
}

/* Smooth offset so anchored sections don't hide behind the fixed navbar */
section[id] { scroll-margin-top: 80px; }

/* Navbar scrolled state (toggled in JS) — dark glass */
#navbar.scrolled {
    background-color: rgba(2, 23, 21, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 1px 0 rgba(20, 184, 166, 0.12), 0 10px 30px -16px rgba(0, 0, 0, 0.7);
}
