/* KINETIC.CSS — 2026 "Kinetic Data" theme */

/* ══════════════════════════════════════════════
   SHIMMER ANIMATION
   ══════════════════════════════════════════════ */

@keyframes bentoCellGlowSweep {
    0%   { transform: translate(0, 0);          opacity: 0.12; }
    50%  { transform: translate(160px, 40px);   opacity: 0.20; }
    100% { transform: translate(0, 0);          opacity: 0.12; }
}

/* ══════════════════════════════════════════════
   KINETIC BENTO SECTION
   ══════════════════════════════════════════════ */

#events.metrics-section {
    background: #07091a;
    border-top: 1px solid rgba(212, 168, 67, 0.09);
    border-bottom: 1px solid rgba(212, 168, 67, 0.09);
    position: relative;
}

#events.metrics-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(212, 168, 67, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

#events.metrics-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.05) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* Typography overrides for dark section */
#events .section-heading { color: rgba(255, 255, 255, 0.92); }
#events .section-sub     { color: rgba(255, 255, 255, 0.42); }
#events .badge-section {
    background: rgba(212, 168, 67, 0.08);
    border-color: rgba(212, 168, 67, 0.18);
    color: rgba(212, 168, 67, 0.85);
}

/* ══════════════════════════════════════════════
   BENTO GRID LAYOUT — 3-column template areas
   ══════════════════════════════════════════════ */

#events .bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
        "featured featured stat-a"
        "featured featured stat-b"
        "stat-c   dash     instant";
    grid-auto-rows: minmax(155px, auto);
    gap: 0.875rem;
    padding: 0.5rem;
    max-width: 1100px;
    margin: 2.5rem auto 0;
    position: relative;
    z-index: 1;
}

/* Assign each cell to a named area */
#events .bento-grid > :nth-child(1) { grid-area: featured; }
#events .bento-grid > :nth-child(2) { grid-area: stat-a; }
#events .bento-grid > :nth-child(3) { grid-area: stat-b; }
#events .bento-grid > :nth-child(4) { grid-area: stat-c; }
#events .bento-grid > :nth-child(5) { grid-area: dash; }
#events .bento-grid > :nth-child(6) { grid-area: instant; }

/* ══════════════════════════════════════════════
   BASE CELL
   ══════════════════════════════════════════════ */

#events .bento-cell {
    background: #0c1220;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

/* Top shimmer line */
#events .bento-cell::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    pointer-events: none;
}

#events .bento-cell:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

#events .bento-cell .content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════
   CELL ACCENT VARIANTS
   ══════════════════════════════════════════════ */

/* Featured — gold */
#events .bento-cell-featured {
    background: linear-gradient(140deg, #0f1e33 0%, #080d1c 100%);
    border-color: rgba(212, 168, 67, 0.18);
}

#events .bento-cell-featured::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.14) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
    #events .bento-cell-featured::before {
        animation: bentoCellGlowSweep 7s ease-in-out infinite;
    }
}

#events .bento-cell-featured::after {
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
}

#events .bento-cell-featured:hover {
    border-color: rgba(212, 168, 67, 0.38);
    box-shadow: 0 20px 50px rgba(212, 168, 67, 0.08), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Cyan — detection/listings */
#events .bento-cell-cyan {
    background: linear-gradient(140deg, #091929 0%, #070e1e 100%);
    border-color: rgba(56, 189, 248, 0.14);
}

#events .bento-cell-cyan::after {
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
}

#events .bento-cell-cyan:hover {
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.06), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Green — alerts/telegram */
#events .bento-cell-green {
    background: linear-gradient(140deg, #081a12 0%, #050f0b 100%);
    border-color: rgba(52, 211, 153, 0.14);
}

#events .bento-cell-green::after {
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.4), transparent);
}

#events .bento-cell-green:hover {
    border-color: rgba(52, 211, 153, 0.28);
    box-shadow: 0 20px 50px rgba(52, 211, 153, 0.06), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Amber — system/checks */
#events .bento-cell-amber {
    background: linear-gradient(140deg, #1a1408 0%, #100d05 100%);
    border-color: rgba(251, 191, 36, 0.14);
}

#events .bento-cell-amber::after {
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
}

#events .bento-cell-amber:hover {
    border-color: rgba(251, 191, 36, 0.28);
    box-shadow: 0 20px 50px rgba(251, 191, 36, 0.06), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Purple — dashboard */
#events .bento-cell-purple {
    background: linear-gradient(140deg, #130e1f 0%, #0c0814 100%);
    border-color: rgba(167, 139, 250, 0.14);
}

#events .bento-cell-purple::after {
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
}

#events .bento-cell-purple:hover {
    border-color: rgba(167, 139, 250, 0.28);
    box-shadow: 0 20px 50px rgba(167, 139, 250, 0.06), 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ══════════════════════════════════════════════
   CELL CONTENT
   ══════════════════════════════════════════════ */

#events .bento-cell .bento-card-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0.75rem 0 0.4rem;
    font-family: var(--font-display);
}

#events .bento-cell .bento-card-body {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.8125rem;
    line-height: 1.65;
    flex: 1;
}

#events .bento-cell .metric-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0.5rem 0 0.2rem;
}

#events .bento-cell .metric-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.38);
}

/* Accent-coloured stat numbers */
#events .bento-cell-cyan  .metric-number { color: #38bdf8; }
#events .bento-cell-green .metric-number { color: #34d399; }
#events .bento-cell-amber .metric-number { color: #fbbf24; }

/* Bento icon badge */
.bento-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bento-icon-gold   { background: rgba(212, 168, 67, 0.12); }
.bento-icon-cyan   { background: rgba(56, 189, 248, 0.12); }
.bento-icon-green  { background: rgba(52, 211, 153, 0.12); }
.bento-icon-amber  { background: rgba(251, 191, 36, 0.12); }
.bento-icon-purple { background: rgba(167, 139, 250, 0.12); }

.bento-featured-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(212, 168, 67, 0.65);
    letter-spacing: 0.07em;
    margin-top: auto;
    padding-top: 1.25rem;
}

/* ══════════════════════════════════════════════
   HERO LOG FEED
   ══════════════════════════════════════════════ */

.hero-log {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.hero-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.65rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
}

.hero-log-header-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-log-pulse {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    animation: radialPulse 2s ease-in-out infinite;
    display: inline-block;
}

.hero-log-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 12.5rem;
}

.hero-log-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.575rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    animation: logSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-log-item:last-child { border-bottom: none; }
.hero-log-item.log-exiting { animation: logFadeOut 0.25s ease forwards; }

.hero-log-text { flex: 1; min-width: 0; }

.hero-log-msg {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.83);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-body);
}

.hero-log-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.1rem;
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-log-time {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
}

.log-dot-scanning { background: var(--gold); border-radius: 2px; animation: spinSlow 1.5s linear infinite; }
.log-dot-detected { background: #F59E0B; animation: radialPulse 1.8s ease-in-out infinite; }
.log-dot-sent     { background: var(--green); }
.log-dot-idle     { background: rgba(255, 255, 255, 0.2); }

/* ══════════════════════════════════════════════
   LOG ANIMATIONS
   ══════════════════════════════════════════════ */

@keyframes logSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes logFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
    #events .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "featured featured"
            "stat-a   stat-b"
            "stat-c   dash"
            "instant  instant";
    }
}

@media (max-width: 640px) {
    #events .bento-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "featured"
            "stat-a"
            "stat-b"
            "stat-c"
            "dash"
            "instant";
        gap: 0.5rem;
    }
    #events .bento-cell { min-height: 130px; }
}
