/* ==============================================
   Light Owl — Style
   Dark. Breathing. Intentional.
   ============================================== */

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

/* --- Decimal Font --- */
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Thin-Pro.otf') format('opentype'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Light-Pro.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Book-Pro.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Medium-Pro.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Semibold-Pro.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Decimal'; src: url('fonts/Decimal-Bold-Pro.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --black: #000000;
    --dark: #060606;
    --card: #0a0a0a;
    --border: #151515;
    --text: #d4cec0;
    --text-dim: #6a6358;
    --text-faint: #5a554d;
    --white: #f0ebe0;
    --glow: rgba(240, 235, 224, 0.04);
    --font: 'Decimal', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w: 1200px;
    --gutter: clamp(1.5rem, 4vw, 4rem);
}

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

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--text);
    cursor: none;
    overflow-x: hidden;
}

/* Film grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.06;
    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.9' 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;
    animation: grainShift 0.3s steps(4) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 3px); }
    50% { transform: translate(3px, -1px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(2px, 1px); }
}

/* Restore cursor on mobile / touch */
@media (hover: none) {
    body { cursor: auto; }
    .cursor-glow { display: none !important; }
}

a { color: var(--text); text-decoration: none; }

/* --- Cursor Glow --- */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 230, 0.3) 0%, rgba(255, 248, 230, 0.12) 30%, rgba(255, 248, 230, 0.04) 55%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.cursor-glow.visible { opacity: 1; }

/* --- Video Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    z-index: 1;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-video {
    width: 100%;
    border-radius: 6px;
    background: #000;
    outline: none;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    z-index: 2;
}

.lightbox-close:hover {
    color: #fff;
}

.cursor-glow.spotlight {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 248, 230, 0.45) 0%, rgba(255, 248, 230, 0.18) 30%, rgba(255, 248, 230, 0.06) 50%, transparent 65%);
    transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, opacity 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-logo {
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 2s ease 0.5s forwards;
}

.owl-logo {
    width: clamp(280px, 40vw, 520px);
    height: auto;
    filter: brightness(0.85);
    transition: filter 0.5s;
}

.owl-logo:hover { filter: brightness(1); }

.hero-video {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, var(--black) 85%);
    z-index: 1;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: brightness(0);
    animation: brightnessReveal 3s ease 1.5s forwards;
}

@keyframes brightnessReveal {
    0% { filter: brightness(0) blur(4px); }
    60% { filter: brightness(0.8) blur(1px); }
    100% { filter: brightness(1) blur(0); }
}

.hero-tagline {
    position: relative;
    z-index: 2;
    margin-top: 2.5rem;
    opacity: 0;
    animation: fadeIn 2s ease 2.5s forwards;
}

.hero-tagline p {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 200;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 3.5s forwards;
}

.scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-faint);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--text-faint), transparent);
    animation: scrollPulse 2s ease infinite;
}

/* --- Section Label --- */
.section-label {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 3rem;
}

/* --- Work --- */
.work {
    max-width: 100%;
    margin: 0;
    padding: 4rem 0;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.work-reel {
    max-width: 100%;
    margin: 0;
}

.work-reel video {
    width: 100%;
    display: block;
    background: var(--card);
}

/* Last item spans full width if odd count */
.work-grid .work-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.work-item {
    position: relative;
    cursor: none;
    overflow: hidden;
    border-radius: 2px;
}

.work-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--card);
}

.work-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    transition: filter 0.4s;
}

/* Desktop with hover capability: darken images for flashlight */
@media (hover: hover) and (min-width: 769px) {
    .work-frame img {
        filter: brightness(0.08);
    }
}

/* Flashlight reveal is handled via JS radial mask */
.work-item.lit .work-frame img {
    filter: brightness(1);
}

.work-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
}

/* Mobile: tap image opens video */

.work-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    opacity: 1;
    transition: opacity 0.4s;
}

/* Desktop: hide titles until hover */
@media (hover: hover) and (min-width: 769px) {
    .work-info { opacity: 0; }
    .work-item:hover .work-info { opacity: 1; }
}

.work-title {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text);
}

.work-tag {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* --- Manifesto --- */
.manifesto {
    padding: 6rem var(--gutter) 8rem;
}

.manifesto-inner {
    max-width: 680px;
    margin: 0 auto;
}

.manifesto-text {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 200;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

.manifesto-text.dim {
    color: var(--text-dim);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    margin-bottom: 0;
}

/* --- Clients Section --- */
.clients {
    padding: 4rem var(--gutter) 2rem;
}

/* --- Client Logos --- */
.logo-section {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 3rem;
}

.logo-label {
    display: block;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.5rem;
}

.client-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    align-items: center;
    gap: 0.5rem;
}

.client-logos img {
    height: 140px;
    width: auto;
    opacity: 0.3;
    filter: grayscale(1) brightness(2);
    transition: opacity 0.3s;
}

.client-logos img:hover {
    opacity: 0.55;
}

/* --- Tools --- */
.tools {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 6rem var(--gutter);
}

.tool-card {
    display: flex;
    align-items: center;
    padding: 1.75rem 2rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-bottom: 1rem;
    transition: border-color 0.3s, background 0.3s;
    cursor: none;
}

.tool-card:hover {
    border-color: #2a2520;
    background: rgba(255, 255, 255, 0.015);
}

.tool-name {
    font-size: 1rem;
    font-weight: 400;
    color: var(--white);
    min-width: 140px;
}

.tool-desc {
    font-size: 0.85rem;
    font-weight: 200;
    color: var(--text-dim);
    flex: 1;
}

.tool-arrow {
    font-size: 1.1rem;
    color: var(--text-faint);
    transition: color 0.3s, transform 0.3s;
}

.tool-card:hover .tool-arrow {
    color: var(--text);
    transform: translateX(4px);
}

/* --- Contact --- */
.contact {
    text-align: center;
    padding: 3rem var(--gutter) 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-email {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
    transition: opacity 0.3s;
    cursor: none;
    margin-bottom: 2.5rem;
}

.contact-email:hover { opacity: 0.8; }

.social-link {
    color: var(--text-dim);
    transition: color 0.3s;
    cursor: none;
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.social-link svg {
    width: 28px;
    height: 28px;
}

.social-link:hover { color: var(--white); }

.contact-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-line {
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .work-grid { grid-template-columns: 1fr; }

    /* Force everything visible on small screens regardless of JS */
    .work, .manifesto, .tools, .contact {
        opacity: 1 !important;
        transform: none !important;
    }

    .work-frame img {
        filter: brightness(0.6) !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }

    .work-info {
        opacity: 1 !important;
    }

    .work-title { font-size: 0.8rem; }
    .work-tag { font-size: 0.6rem; }

    /* Logo grids: 2x2 on mobile */
    .client-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
    }

    .client-logos img { height: 100px; }

    .logo-section { padding-top: 2rem; }

    /* Tools */
    .tool-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .tool-name { min-width: unset; }
    .tool-arrow { align-self: flex-end; }

    /* Hero */
    .hero-tagline p { letter-spacing: 1.5px; }
    .owl-logo { width: clamp(200px, 70vw, 320px); }

    /* Manifesto */
    .manifesto { padding: 4rem var(--gutter) 5rem; }
    .manifesto-text { font-size: 1rem; line-height: 1.7; }

    /* Contact */
    .contact-email { font-size: 1.4rem; }

    /* Reduce section spacing */
    .work { padding: 5rem var(--gutter); }
    .tools { padding: 4rem var(--gutter); }
}
