/**
 * Global Styles for Homepage
 * Editorial/artsy direction — dark, refined, with subtle atmosphere.
 */

:root {
    --bg-color: #0c0d10;
    --text-primary: #f0f2f5;
    --text-secondary: #8a8a9a;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.055);
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Subtle atmospheric gradient */
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(100, 60, 200, 0.05) 0%, transparent 60%);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Custom Cursor ───────────────────────────────────────── */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s ease-out, height 0.3s ease-out, background-color 0.3s ease-out;
}

@media (pointer: fine) {
    body, a, button {
        cursor: none;
    }
}

/* ─── Header ──────────────────────────────────────────────── */
.header {
    padding: 7rem 0 4.5rem;
}

.header-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.75rem, 6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.header p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.65;
}

/* ─── Grid Layout ─────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}

/* ─── Card Styling ────────────────────────────────────────── */
.card {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.875rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Grid Layout animations handled by GSAP */

/* Inset highlight border on hover */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card:hover {
    background-color: var(--card-hover);
    box-shadow:
        0 16px 32px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.card:hover::before {
    opacity: 1;
}

/* ─── Card Content ────────────────────────────────────────── */
.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.client-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
}

.type-badge {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    padding: 0.2em 0.65em;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-name {
    font-size: 1.3125rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    flex-grow: 1;
    line-height: 1.65;
}

.view-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease, gap 0.2s ease;
    letter-spacing: 0.01em;
}

.card:hover .view-link {
    color: var(--text-primary);
    gap: 0.45rem;
}

.footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--text-primary);
}

/* removed CSS fadeSlideUp in favor of GSAP */

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .header {
        padding: 5rem 0 3.5rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 1.5rem;
    }
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
