/* ============================================================
   OJEET-TOOLS — Landing Page Styles
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

/* ─── Design Tokens ─── */
:root {
    /* Colors — Base */
    --bg-base: #000000;
    /* Pure Black for maximum contrast */
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(255, 255, 255, 0.04);
    --border-card: rgba(255, 255, 255, 0.05);
    --border-card-hover: rgba(255, 255, 255, 0.12);

    /* Colors — Orbs */
    --orb-navy-deep: #020617;
    --orb-navy-mid: #0f172a;
    --orb-navy-light: #1e293b;

    /* Colors — Text */
    --text-title: #ffffff;
    --text-heading: #e2e8f0;
    --text-body: #64748b;
    --text-muted: #475569;
    --text-footer: #334155;

    /* Colors — Accent */
    --arrow-color: rgba(255, 255, 255, 0.3);
    --arrow-color-hover: rgba(255, 255, 255, 0.9);

    /* Typography */
    --font-display: 'DM Serif Display', serif;
    --font-body: 'Inter', sans-serif;
    --fs-heading-card: 26px;
    /* Increased from 20px */
    --fs-desc: 15px;
    /* Increased from 13px */
    --fs-tag: 12px;
    --fs-footer: 12px;
    --fs-wordmark: 14px;

    /* Spacing */
    --header-padding: 24px;
    --card-padding-x: 24px;
    /* Increased from 16px */
    --card-padding-y: 20px;
    /* Increased from 14px */
    --card-radius: 20px;
    /* Increased from 16px */
    --grid-gap: 32px;
    /* Increased from 24px */
    --section-padding: 100px;
    /* Increased from 80px */

    /* Effects */
    --blur-glass: 14px;
    --blur-header: 20px;
    --blur-orb: 120px;
    --transition-card: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.25s ease;

    /* Noise */
    --noise-opacity: 0.04;

    /* Mouse spotlight — updated via JS */
    --mouse-x: 50vw;
    --mouse-y: 50vh;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ─── Background System ─── */

/* Layer 1 — Ambient orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    filter: blur(var(--blur-orb));
}

.bg-orb--teal {
    width: 800px;
    height: 800px;
    background: var(--orb-navy-deep);
    top: -200px;
    left: -200px;
}

.bg-orb--violet {
    width: 700px;
    height: 700px;
    background: var(--orb-navy-mid);
    top: -150px;
    right: -200px;
}

.bg-orb--rose {
    width: 900px;
    height: 900px;
    background: var(--orb-navy-light);
    bottom: -300px;
    left: 50%;
    transform: translateX(-50%);
}

/* Layer 2 — Mouse-reactive spotlight */
.bg-spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.015),
            /* Reduced from 0.03 */
            transparent 70%);
}

/* Layer 3 — Neural Net Canvas */
#neural-net {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* Layer 4 — Noise texture */
.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ─── Header ─── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--header-padding) 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(var(--blur-header));
    -webkit-backdrop-filter: blur(var(--blur-header));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__wordmark {
    font-family: var(--font-body);
    font-size: var(--fs-wordmark);
    font-weight: 700;
    color: var(--text-title);
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: opacity var(--transition-fast);
}

.site-header__wordmark:hover {
    opacity: 0.65;
}

/* ─── Main ─── */
.main-content {
    position: relative;
    z-index: 10;
    padding-top: calc(var(--header-padding) * 2 + var(--fs-wordmark) + var(--section-padding));
    padding-bottom: var(--section-padding);
    max-width: 1400px;
    /* Increased from 1100px */
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* ─── Card Grid ─── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

/* ─── Card ─── */
.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-card);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px);
}

.card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.6s ease calc(var(--i, 0) * 100ms),
        transform 0.6s ease calc(var(--i, 0) * 100ms),
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-card-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Card image */
.card__image-wrap {
    width: 100%;
    aspect-ratio: 1366 / 768;
    overflow: hidden;
}

.card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card:hover .card__image {
    transform: scale(1.03);
}

/* Card content */
.card__content {
    padding: var(--card-padding-y) var(--card-padding-x);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* Tag pill */
.card__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    font-size: var(--fs-tag);
    font-weight: 500;
    color: var(--text-body);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50px;
    padding: 4px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card__tag svg,
.card__tag i {
    width: 12px;
    height: 12px;
}

/* Heading */
.card__heading {
    font-family: var(--font-display);
    font-size: var(--fs-heading-card);
    font-weight: 400;
    color: var(--text-heading);
    margin: 6px 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Description */
.card__desc {
    font-size: var(--fs-desc);
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Arrow indicator */
.card__arrow {
    position: absolute;
    bottom: var(--card-padding-y);
    right: var(--card-padding-x);
    color: var(--arrow-color);
    transition: color var(--transition-fast);
}

.card__arrow svg,
.card__arrow i {
    width: 16px;
    height: 16px;
}

.card:hover .card__arrow {
    color: var(--arrow-color-hover);
}

/* ─── Footer ─── */
.site-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px 24px 48px;
    font-size: var(--fs-footer);
    color: var(--text-footer);
}

/* ─── Responsive ─── */

/* Tablet — 2 + 1 */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid .card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        justify-self: center;
    }
}

/* Mobile — single column */
@media (max-width: 600px) {
    :root {
        --grid-gap: 20px;
        --section-padding: 48px;
        --card-radius: 14px;
    }

    .main-content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .card-grid .card:last-child {
        max-width: 100%;
    }
}