@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto:wght@300;400&display=swap');

:root {
    /* palette and tunables for futuristic metallic look */
    --bg-900: #041021;
    --panel-bg: linear-gradient(135deg, #041021 0%, #07122a 45%, #041021 100%);
    --neon-cyan: #00f0ff;
    --neon-indigo: #9b5cff;
    --neon-blue: #4f46e5;
    --muted-text: #cbd5e1;
    --glass-border: rgba(255,255,255,0.04);
    --card-padding: 2.6rem;

  --scrollbar-bg: rgba(6,10,20,0.45);
  --thumb-color-start: #00b4ff;
  --thumb-color-mid: #0066ff;
  --thumb-color-end: #00e6ff;
  --thumb-border: rgba(6,10,20,0.65);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAPElEQVR42mN8//5/CgxwMAgwMDAwcAoYgqA5SA0kA8kaJAeJGiQHiRokB4kaJAeJGiQHiRokB4kaJAcIGIwBAICTpW4c5bVfQwAAAABJRU5ErkJggg==');
}

/* Prevent horizontal scrolling caused by oversized decorative pseudo-elements */
html, body {
    overflow-x: hidden;
}

/* background particle canvas */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.9;
}

/* ensure main content sits above particles */
main { position: relative; z-index: 2; }

/* sci-fi animated background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(transparent 92%, rgba(96,165,250,0.02) 92%), linear-gradient(90deg, transparent 92%, rgba(124,58,237,0.02) 92%);
    background-size: 28px 28px, 28px 28px;
    pointer-events: none;
    opacity: 0.7;
    mix-blend-mode: overlay;
}

h2, .card, .use-case-card, p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Neon section headings to match panels */
h2 {
    color: var(--neon-blue);
    text-shadow: 0 6px 18px rgba(96,165,250,0.07), 0 1px 0 rgba(0,0,0,0.6);
    letter-spacing: 0.6px;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-link {
    position: relative;
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4f46e5;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #4f46e5;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2), 0 0 15px rgba(79, 70, 229, 0.3);
}

/* Futuristic metallic card */
.metal-card {
    /* cut-corner octagonal tech panel */
    position: relative;
    padding: 2.6rem;
    overflow: visible;
    transform-style: preserve-3d;
    perspective: 1000px;
    /* dark steel base */
    background: linear-gradient(135deg, #041021 0%, #07122a 45%, #041021 100%);
    /* shape with cut corners */
    clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%, 0 12%);
    z-index: 1;
}

.metal-card::before {
    /* neon frame + soft glow (stronger for sci-fi look) */
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    background: linear-gradient(90deg, rgba(0,240,255,0.14), rgba(155,92,255,0.12) 45%, rgba(79,70,229,0.14));
    clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%, 0 12%);
    filter: blur(10px) saturate(1.2);
    z-index: 0;
    pointer-events: none;
}

.metal-card::after {
    /* animated hover glint */
    content: '';
    position: absolute;
    top: -60%;
    left: -30%;
    width: 60%;
    height: 220%;
    background: linear-gradient(180deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.0) 100%);
    transform: rotate(-25deg);
    filter: blur(18px);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 2; /* above the neon frame */
    pointer-events: none;
}

.metal-card:hover::after {
    opacity: 1;
    transform: translateX(120%) rotate(-25deg);
}

.metal-card * { position: relative; z-index: 3; }

.metal-card h3 {
    color: #e6eefc;
    text-shadow: 0 1px 0 rgba(0,0,0,0.6), 0 6px 18px rgba(99,102,241,0.06);
}

.metal-card p {
    color: #cbd5e1;
    line-height: 1.6;
}

/* tiny bevel highlight around title */
.metal-card .title-highlight {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.06);
}

/* Decorative metal badge replacing SVG icons */
.metal-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.02) 10%, transparent 30%),
                linear-gradient(135deg, #111827 0%, #0b1220 60%, #0f1724 100%);
    display: inline-block;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(255,255,255,0.03), 0 12px 30px rgba(2,6,23,0.6),
                0 0 0 2px rgba(124,58,237,0.06) inset;
    border: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
}

.metal-badge::before {
    /* inner ring */
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.metal-badge::after {
    /* animated core glow */
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(99,102,241,0.32), rgba(96,165,250,0.12) 40%, transparent 60%);
    filter: blur(6px);
    opacity: 0.9;
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes corePulse {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
}

/* continuous diagonal glint across the entire card area is provided by the hover ::after glint and core badge animations */

/* make badges responsive on small screens */
@media (max-width: 640px) {
    .metal-badge { width: 72px; height: 72px; }
}

/* subtle ambient glint overlay applied by JS */
.metal-card .ambient-glint {
    pointer-events: none;
    position: absolute;
    top: -40%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(120deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.04) 45%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.00) 60%);
    transform: translateX(0) rotate(-20deg);
    filter: blur(10px);
    opacity: 0.6;
    mix-blend-mode: screen;
    animation: glintSlide 6s linear infinite;
}

@keyframes glintSlide {
    0% { transform: translateX(-10%) rotate(-20deg); }
    50% { transform: translateX(10%) rotate(-20deg); }
    100% { transform: translateX(-10%) rotate(-20deg); }
}

.use-case-card {
    background: linear-gradient(145deg, #1f2937, #111827);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: #e0e0e0;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.use-case-card span {
    position: relative;
    z-index: 1;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(79, 70, 229, 0.1),
        transparent 30%
    );
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.use-case-card:hover {
    transform: scale(1.05);
}

.typing::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* corner notch accents to enhance the tech-panel look */
.metal-card .corner-accent {
    position: absolute;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    filter: drop-shadow(0 2px 6px rgba(2,6,23,0.6));
    z-index: 4;
}
.metal-card .corner-accent.tl { top: 8px; left: 8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.metal-card .corner-accent.tr { top: 8px; right: 8px; clip-path: polygon(100% 0, 100% 100%, 0 0); }
.metal-card .corner-accent.bl { bottom: 8px; left: 8px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.metal-card .corner-accent.br { bottom: 8px; right: 8px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* micro-text lines under title similar to reference panels */
.metal-card .meta-lines {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.72rem;
    color: rgba(203,213,225,0.64);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* small chip / tag used for labels */
.chip {
    display: inline-block;
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
    border-radius: 6px;
    background: rgba(124,58,237,0.08);
    color: var(--neon-indigo);
    border: 1px solid rgba(124,58,237,0.12);
    margin-top: 0.6rem;
}

/* keyboard accessibility: visible focus state */
.metal-card:focus-within, .metal-card:focus {
    outline: 3px solid rgba(96,165,250,0.08);
    outline-offset: 4px;
}
.metal-card:focus-visible {
    box-shadow: 0 0 0 4px rgba(34,211,238,0.06), 0 18px 40px rgba(2,6,23,0.7);
}

/* small utility: muted small text */
.muted { color: var(--muted-text); font-size: 0.92rem; }

/* a glassy strip at the bottom of cards for status/data lines */
.metal-card .data-strip {
    margin-top: 1.1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.008));
    border: 1px solid rgba(255,255,255,0.02);
    font-size: 0.85rem;
    color: rgba(203,213,225,0.8);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .metal-card .ambient-glint,
    .metal-badge::after,
    .metal-card::after,
    .metal-badge::after {
        animation: none !important;
        transition: none !important;
    }
    .metal-card { transform: none !important; }
}

/* use Orbitron for sci-fi headings */
h1, h2, .metal-card h3 { font-family: 'Orbitron', sans-serif; }

/* scanline — moving faint stripe across panel */
.scanline {
    position: absolute;
    left: -20%;
    top: 35%;
    width: 140%;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.06), rgba(255,255,255,0));
    filter: blur(2px);
    opacity: 0.6;
    transform: rotate(-6deg);
    pointer-events: none;
    animation: scan 3.6s linear infinite;
    z-index: 2;
}

@keyframes scan {
    0% { transform: translateX(-30%) rotate(-6deg); opacity: 0.15 }
    50% { transform: translateX(30%) rotate(-6deg); opacity: 0.6 }
    100% { transform: translateX(-30%) rotate(-6deg); opacity: 0.15 }
}

/* small responsive tweaks */
@media (max-width: 768px) {
    .metal-card { padding: 1.6rem; }
    .metal-badge { width: 64px; height: 64px; }
}

/* ---- Future GIF blending styles ---- */
.future-gif-wrapper {
    position: relative;
    display: inline-block;
    padding: 6px; /* small glassy frame */
    border-radius: 12px;
    /* more translucent so the GIF blends with the page */
    background: rgba(6,10,20,0.28);
    border: 1px solid rgba(79,70,229,0.06);
    box-shadow: 0 8px 22px rgba(2,6,23,0.42), 0 0 14px rgba(79,70,229,0.03);
    backdrop-filter: blur(6px) saturate(110%);
    transition: transform 0.45s ease, box-shadow 0.45s ease, opacity 0.45s ease;
}

.future-gif-wrapper::after {
    /* subtle inner rim glow to tie into neon accents */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    box-shadow: inset 0 0 40px rgba(79,70,229,0.03);
    pointer-events: none;
}

.future-gif {
    display: block;
    width: 176px; /* small default, matches md:w-64 behavior */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    filter: saturate(1.02) contrast(1.02) brightness(0.98);
    opacity: 0.95;
    transform: translateY(4px);
    transition: transform 0.45s ease, box-shadow 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
    box-shadow: 0 6px 18px rgba(2,6,23,0.38);
    /* blend softly into the dark background so it reads as part of the layout */
    mix-blend-mode: screen;
}

@media (min-width: 768px) {
    .future-gif { width: 256px; }
}

.future-gif-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(2,6,23,0.6), 0 0 30px rgba(79,70,229,0.06);
}

.future-gif-wrapper:hover .future-gif {
    transform: translateY(-6px) scale(1.02);
    filter: saturate(1.08) contrast(1.04) brightness(1.01);
    box-shadow: 0 22px 64px rgba(2,6,23,0.6), 0 0 28px rgba(79,70,229,0.06);
}

/* Make sure the GIF doesn't draw attention with a hard edge on very dark backgrounds */
.future-gif-borderless { border: none; box-shadow: none; }

/* subtle layout improvements for the Future section */
.future-section {
    padding-top: 4.5rem; /* slightly tighter vertical rhythm */
    padding-bottom: 4.5rem;
}

.future-text {
    max-width: 56ch; /* keep paragraphs at a comfortable reading measure */
    margin: 0 auto;
}

.future-gif-wrapper {
    /* ensure GIF sits visually aligned center on taller sections */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* inner panel frame for stronger sci-fi look */
.panel-frame {
    position: absolute;
    inset: 18px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), inset 0 -10px 30px rgba(0,0,0,0.6);
}

.panel-frame::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
    border: 1px solid rgba(34,211,238,0.14);
    box-shadow: 0 0 28px rgba(0,240,255,0.06), 0 0 12px rgba(155,92,255,0.04) inset;
}

.panel-frame::after {
    content: '';
    position: absolute;
    left: 10px; right: 10px; bottom: 8px; height: 2px;
    background: linear-gradient(90deg, rgba(34,211,238,0.06), rgba(124,58,237,0.04));
    opacity: 0.8;
    filter: blur(1px);
}

/* subtle metallic grain overlay for panels */
.panel-frame {
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.01), transparent 6%),
                      linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.06));
    background-blend-mode: overlay;
}

/* tiny ticks on the inner frame corners */
.panel-frame .tick { position: absolute; width: 26px; height: 6px; background: rgba(255,255,255,0.03); }
.panel-frame .tick.tl { top: 8px; left: 18px; transform: rotate(-10deg); }
.panel-frame .tick.tr { top: 8px; right: 18px; transform: rotate(10deg); }
.panel-frame .tick.bl { bottom: 8px; left: 18px; transform: rotate(10deg); }
.panel-frame .tick.br { bottom: 8px; right: 18px; transform: rotate(-10deg); }

::-webkit-scrollbar{
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track{
  background: var(--scrollbar-bg);
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
  margin: 6px 0;
  backdrop-filter: blur(6px) saturate(120%);
}

::-webkit-scrollbar-thumb{
  border-radius: 10px;
  border: 3px solid var(--thumb-border);
  background: linear-gradient(90deg, var(--thumb-color-start) 0%, var(--thumb-color-mid) 50%, var(--thumb-color-end) 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(0,180,255,0.35), 0 0 28px rgba(0,110,255,0.18);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: sciThumbShift 3.2s linear infinite;
}

::-webkit-scrollbar-thumb:hover{
  transform: scale(1.03);
  box-shadow: 0 0 18px rgba(0,180,255,0.85), 0 0 44px rgba(0,110,255,0.45);
}

::-webkit-scrollbar-corner{ background: transparent; }

/* Firefox */
*{
  scrollbar-width: thin; /* auto | thin | none */
  scrollbar-color: var(--thumb-color-mid) var(--scrollbar-bg); /* thumb track */
}

/* Animated gradient shimmer for the thumb (WebKit only) */
@keyframes sciThumbShift{
  0%{ background-position: 0% 50%; filter: saturate(120%) hue-rotate(0deg); }
  50%{ background-position: 100% 50%; filter: saturate(130%) hue-rotate(12deg); }
  100%{ background-position: 0% 50%; filter: saturate(120%) hue-rotate(0deg); }
}

/* Optional utility: apply a stronger variant to specific scroll containers */
.scifi-scroll{
  scrollbar-width: thin;
}

/* Accessibility: reduce motion preference - stop the animation */
@media (prefers-reduced-motion: reduce){
  ::-webkit-scrollbar-thumb{ animation: none !important; }
}

/* Logo / site-brand styles */
.site-logo-link { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo-img { border-radius: 8px; box-shadow: 0 8px 20px rgba(2,6,23,0.45), 0 0 20px rgba(79,70,229,0.04); transition: transform 0.28s ease, box-shadow 0.28s ease; }
.logo-img:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 34px rgba(2,6,23,0.55), 0 0 28px rgba(79,70,229,0.08); }
.logo-text { line-height: 1; }
.logo-text .text-blue-400 { color: #60a5fa; /* slight brighter blue to match neon */ }

/* Enhanced brand glow and animation */
.site-logo-link { position: relative; padding: 0.1rem 0.2rem; z-index: 10; }
.site-logo-link::after {
    /* soft radial glow behind the logo to tie into the header */
    content: '';
    position: absolute;
    left: 4px; /* align behind the image */
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 30%, rgba(96,165,250,0.10), rgba(155,92,255,0.06) 35%, transparent 60%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.28s ease, opacity 0.28s ease;
    opacity: 0.95;
}

.logo-img { position: relative; z-index: 2; border-radius: 8px; }

.logo-text { position: relative; z-index: 2; display: inline-block; }

/* neon gradient text treatment */
.logo-text {
    background: linear-gradient(90deg, #7dd3fc 0%, #60a5fa 25%, #a78bfa 60%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 18px rgba(79,70,229,0.08), 0 1px 0 rgba(0,0,0,0.6);
    letter-spacing: 0.6px;
    transition: transform 0.22s ease, text-shadow 0.22s ease;
}

.site-logo-link:hover::after { transform: translateY(-50%) scale(1.06); opacity: 1; }
.site-logo-link:hover .logo-img { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 40px rgba(2,6,23,0.6), 0 0 34px rgba(96,165,250,0.06); }
.site-logo-link:hover .logo-text { transform: translateX(2px) scale(1.02); text-shadow: 0 8px 30px rgba(96,165,250,0.12); }

/* Slightly reduce glow on very small screens to avoid overlap */
@media (max-width: 420px) {
    .site-logo-link::after { display: none; }
    .logo-text { font-size: 1rem; }
}
