/* ============================================
   INVISION AERIALS — Main Stylesheet
   Dark cinematic aesthetic with mint accents
   ============================================ */

:root {
    --bg-primary: #0e0c11;
    --bg-secondary: #161419;
    --bg-card: #1c1a20;
    --bg-card-hover: #232128;
    --text-primary: #e8e4ec;
    --text-secondary: #9a939f;
    --text-muted: #5e5865;
    --accent: #D82338;
    --accent-dim: rgba(216, 35, 56, 0.12);
    --accent-glow: rgba(216, 35, 56, 0.25);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --container: min(90vw, 1400px);
    --nav-height: 80px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: cubic-bezier(0.65, 0.05, 0.36, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, video { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ---- Utility ---- */
.container { width: var(--container); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Grain Overlay ---- */
body::after {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: grainShift 0.8s steps(4) infinite;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 clamp(24px, 4vw, 60px);
    transition: background 0.4s var(--transition);
}

.site-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 12, 17, 0.6) 0%, rgba(14, 12, 17, 0) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    z-index: -1;
    transition: opacity 0.4s var(--transition);
}

.site-nav.scrolled::before {
    background: rgba(14, 12, 17, 0.85);
    -webkit-mask-image: none;
    mask-image: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .logo-img {
    width: 36px;
    height: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 100px;
    background: var(--accent);
    color: var(--bg-primary);
    transition: transform 0.3s var(--transition), box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px var(--accent-glow);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 28px;
    padding: 4px 0;
    z-index: 1001;
    position: relative;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--transition);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

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

.hero-video-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(177.78vh, 100vw);
    height: max(100vh, 56.25vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(14, 12, 17, 0.3) 0%,
            rgba(14, 12, 17, 0.1) 40%,
            rgba(14, 12, 17, 0.5) 70%,
            rgba(14, 12, 17, 1) 100%
        ),
        linear-gradient(90deg,
            rgba(14, 12, 17, 0.4) 0%,
            transparent 50%
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    padding-bottom: clamp(60px, 8vh, 120px);
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--transition) 0.3s forwards;
}

.hero-label::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s var(--transition) 0.5s forwards;
}

.hero-title span {
    display: block;
}

.hero-title .accent {
    color: var(--accent);
    display: inline;
}

.hero-description {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--transition) 0.7s forwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--transition) 0.9s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 16px 36px;
    border-radius: 100px;
    background: var(--accent);
    color: var(--bg-primary);
    transition: all 0.3s var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--accent-glow);
}

.btn-primary svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--transition);
}

.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 16px 32px;
    border-radius: 100px;
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    transition: all 0.3s var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* Hero scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 0.8s var(--transition) 1.2s forwards;
}

.hero-scroll span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.hero-scroll .scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   SECTION — INTRO / ABOUT
   ============================================ */
.section { padding: clamp(80px, 12vh, 160px) 0; }

.section-intro {
    position: relative;
}

.section-intro::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: start;
}

.intro-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 20px;
}

.intro-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.intro-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.intro-text p + p { margin-top: 20px; }

.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================
   SECTION — SERVICES
   ============================================ */
.services-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto clamp(48px, 6vh, 80px);
}

.services-header .intro-eyebrow { margin-bottom: 16px; }

.services-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 3vw, 48px);
    transition: all 0.4s var(--transition);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, var(--accent-dim), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--transition);
}

.service-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

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

.service-icon {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.service-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-card h3 {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.service-card p {
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   SECTION — WORK / PORTFOLIO
   ============================================ */
.work-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: clamp(40px, 5vh, 64px);
}

.work-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

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

.work-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    border: 1px solid var(--border);
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition);
}

.work-card:hover img { transform: scale(1.05); }

.work-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14,12,17,0.9) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(24px, 3vw, 40px);
    transition: background 0.4s var(--transition);
}

.work-card:hover .work-card-overlay {
    background: linear-gradient(to top, rgba(14,12,17,0.95) 0%, rgba(14,12,17,0.2) 60%);
}

.work-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.work-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.work-card-tags .work-card-tag + .work-card-tag::before {
    content: '·';
    color: var(--text-muted);
    margin-right: 10px;
    margin-left: -14px;
}

.work-card h3 {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.work-card:hover h3 { color: var(--accent); }

.work-card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: all 0.4s var(--transition);
}

.work-card-arrow svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 2;
}

.work-card:hover .work-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.work-card-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% * 10 / 9);
    height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1;
}

.work-card-video.is-playing { opacity: 1; }

.work-card-overlay,
.work-card-arrow { z-index: 2; }

/* ============================================
   SECTION — CTA BANNER
   ============================================ */
.cta-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: clamp(60px, 8vw, 120px) clamp(32px, 5vw, 80px);
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 0%, var(--accent-dim) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(216, 35, 56, 0.06) 0%, transparent 50%);
}

.cta-banner h2 {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}

.cta-banner p {
    position: relative;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-banner .btn-primary { position: relative; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 16px;
    max-width: 300px;
}

.footer-brand .casa-logo {
    display: block;
    margin-top: 28px;
    height: auto;
    width: 260px;
    max-width: 100%;
    opacity: 0.9;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.footer-social a svg {
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.footer-social a:hover svg { fill: var(--accent); }

/* ============================================
   PROJECT ARCHIVE
   ============================================ */
.project-archive {
    padding-top: calc(var(--nav-height) + clamp(40px, 6vh, 80px));
}

.archive-header {
    margin-bottom: clamp(24px, 4vh, 40px);
}

.archive-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.filter-pills {
    display: flex;
    gap: 10px;
    margin-bottom: clamp(32px, 5vh, 56px);
    flex-wrap: wrap;
}

.filter-pill {
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
    transition: all 0.3s var(--transition);
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-pill.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.work-card.hidden {
    display: none;
}

.no-projects {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: center;
    padding: 80px 0;
}

/* ============================================
   SINGLE PROJECT
   ============================================ */
.project-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.project-hero .hero-video-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(177.78vh, 100vw);
    height: max(100vh, 56.25vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Picture-in-picture mode (desktop, after scrolling past hero) */
.project-hero .hero-video-wrap.pip {
    position: fixed;
    top: 50%;
    right: auto;
    bottom: auto;
    left: calc(50% - min(90vw, 1400px) / 2 + 740px);
    width: clamp(440px, 40vw, 680px);
    height: clamp(247px, 22.5vw, 382px);
    transform: translateY(-50%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    animation: pipIn 0.6s var(--transition) both;
}

@keyframes pipIn {
    from {
        opacity: 0;
        transform: translateY(calc(-50% - 80px)) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Fullscreen button on PIP */
.pip-fullscreen {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.pip-fullscreen:hover {
    background: var(--accent);
    transform: scale(1);
}

.pip-fullscreen svg {
    width: 18px;
    height: 18px;
}

.project-hero .hero-video-wrap.pip .pip-fullscreen {
    display: flex;
    opacity: 1;
    transform: scale(1);
    animation: fadeIn 0.4s 0.3s both;
}

/* Video Lightbox */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(14, 12, 17, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: clamp(24px, 5vw, 80px);
}

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

body.video-lightbox-open .project-hero .hero-video-wrap.pip,
body.video-lightbox-open .project-hero .hero-video-wrap {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.video-lightbox-content {
    width: 100%;
    max-width: 1400px;
    aspect-ratio: 16 / 9;
    max-height: 90vh;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.4s var(--transition);
}

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

.video-lightbox-player {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-lightbox-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-lightbox .lightbox-close {
    top: 20px;
    right: 24px;
}

@media (max-width: 768px) {
    .video-lightbox {
        padding: 60px 16px;
    }

    .video-lightbox .lightbox-close {
        top: 16px;
        right: 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.project-hero .hero-video-wrap.pip iframe {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: none;
    min-width: 0;
    min-height: 0;
}

.project-hero .hero-video-wrap.pip::after {
    display: none;
}

@media (max-width: 768px) {
    .project-hero .hero-video-wrap.pip {
        display: none;
    }
}

.project-hero .project-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    padding-bottom: clamp(20px, 3vh, 40px);
}

.project-hero .hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    animation: none;
    opacity: 1;
    transform: none;
}

.project-hero .hero-label {
    animation: none;
    opacity: 1;
    transform: none;
}

.project-meta {
    display: flex;
    gap: 40px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: clamp(32px, 5vh, 56px);
}

.section.project-content {
    padding-top: clamp(20px, 3vh, 40px);
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.project-meta-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.project-section {
    max-width: 700px;
    margin-bottom: clamp(32px, 5vh, 48px);
}

.project-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-top: 12px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    padding: 0;
    transition: border-color 0.3s ease;
}

.gallery-thumb:hover {
    border-color: var(--accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-testimonial {
    border-left: 2px solid var(--accent);
    padding-left: 24px;
}

.project-testimonial p {
    font-style: italic;
    color: var(--text-primary);
}

.project-testimonial cite {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: normal;
    margin-top: 12px;
}

.project-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: clamp(32px, 5vh, 56px);
    border-top: 1px solid var(--border);
    margin-top: clamp(32px, 5vh, 56px);
}

.project-nav-links {
    display: flex;
    gap: 24px;
}

.project-nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.project-nav-link:hover {
    color: var(--accent);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(14, 12, 17, 0.95);
    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-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: var(--text-primary);
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: var(--text-primary);
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--transition), transform 0.5s var(--transition);
}

.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes grainShift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-5%, -10%); }
    50%  { transform: translate(8%, 3%); }
    75%  { transform: translate(-3%, 7%); }
    100% { transform: translate(5%, -5%); }
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes scrollPulse {
    0% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: bottom; }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot {
    position: fixed;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
    opacity: 0;
}

.cursor-dot.visible { opacity: 1; }
.cursor-dot.hovering { transform: scale(4); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    :root { --nav-height: 48px; }

    /* ---- Mobile Nav ---- */
    .nav-links { display: none; }
    .nav-toggle { display: flex; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: var(--bg-primary);
        justify-content: center;
        align-items: center;
        gap: 32px;
        z-index: 999;
    }

    .nav-links.open a {
        font-size: 1.5rem;
        color: var(--text-primary);
    }

    .nav-links.open .nav-cta {
        font-size: 1rem;
        padding: 14px 36px;
    }

    .nav-logo { font-size: 1rem; gap: 8px; }
    .nav-logo .logo-img { width: 28px; }
    .nav-toggle { width: 24px; gap: 5px; }

    /* ---- Mobile Hero ---- */
    .hero {
        min-height: 130svh;
        align-items: flex-end;
        display: block;
        overflow: visible;
        padding: 0;
    }

    .section-intro {
        position: relative;
        z-index: 2;
        background: var(--bg-primary);
    }

    #services, #work, #contact {
        position: relative;
        z-index: 2;
        background: var(--bg-primary);
    }

    .hero-video-wrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100svh;
        z-index: 0;
    }

    .hero-video-wrap iframe {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 400vw;
        height: 100svh;
        min-width: 400vw;
        min-height: 100svh;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        padding-bottom: 40px;
        padding-top: 85svh;
    }

    .hero-label { margin-bottom: 12px; }

    .hero-title {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
        margin-bottom: 16px;
    }

    .hero .hero-description,
    .hero .hero-actions,
    .hero .hero-label,
    .hero .hero-title {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .hero .hero-label::before {
        animation: pulse 2s ease-in-out infinite !important;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        justify-content: center;
        text-align: center;
        padding: 18px 32px;
        font-size: 1rem;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        padding-bottom: 24px;
    }

    .hero-scroll { display: none; }

    /* ---- Mobile Sections ---- */
    .section { padding: clamp(60px, 10vh, 100px) 0; }

    .intro-grid { grid-template-columns: 1fr; gap: 32px; }

    .intro-heading {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .intro-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-top: 36px;
        padding-top: 36px;
    }

    .stat-number { font-size: 1.8rem; }
    .stat-label { font-size: 0.75rem; }

    /* ---- Mobile Services ---- */
    .services-grid { grid-template-columns: 1fr; gap: 16px; }

    .services-header h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .service-card {
        padding: 28px;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    /* ---- Mobile Portfolio ---- */
    .work-grid { grid-template-columns: 1fr; gap: 16px; }
    .work-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .work-header h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .work-card {
        aspect-ratio: 16 / 11;
    }

    .work-card-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* ---- Mobile CTA ---- */
    .cta-banner {
        padding: 48px 24px;
        border-radius: var(--radius);
    }

    .cta-banner h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .cta-banner p {
        font-size: 1rem;
    }

    /* ---- Mobile Footer ---- */
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .footer-brand .casa-logo { width: 200px; margin-top: 24px; }

    .cursor-dot { display: none; }
}

@media (max-width: 768px) {
    /* Archive mobile */
    .filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .filter-pills::-webkit-scrollbar { display: none; }
    .filter-pill { white-space: nowrap; }

    /* Single project mobile */
    .project-hero {
        height: auto;
        min-height: 0;
        display: block;
        overflow: visible;
    }

    .project-hero .hero-video-wrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100svh;
        z-index: 0;
    }

    .project-hero .hero-video-wrap iframe {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 400vw;
        height: 100svh;
        min-width: 400vw;
        min-height: 100svh;
    }

    .project-hero .project-hero-img {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100svh;
        z-index: 0;
    }

    .project-hero-content {
        position: relative;
        z-index: 2;
        padding-top: 85svh;
        padding-bottom: 40px;
    }

    .project-hero .hero-title {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }

    /* Project content spacing */
    .project-content {
        position: relative;
        z-index: 2;
        background: var(--bg-primary);
    }

    .project-meta {
        padding: 32px 0 24px;
        gap: 16px 20px;
    }

    .project-meta-item {
        gap: 6px;
    }

    .project-section {
        margin-bottom: clamp(40px, 6vh, 56px);
    }

    .project-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-nav {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .project-nav-links {
        flex-direction: column;
        gap: 12px;
    }

    /* Lightbox mobile */
    .lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

/* ---- Small phones ---- */
@media (max-width: 380px) {
    .hero-title {
        font-size: 2.4rem;
    }

    .intro-stats {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
    }

    .stat-number { font-size: 1.5rem; }

    .nav-logo {
        font-size: 1rem;
    }
}
