:root {
    --bg-color: #0d0d0d;
    --text-primary: #f0f0f0;
    --text-secondary: #a3a3a3;
    --accent: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.inline-block { display: inline-block; }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 5vw;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-bottom 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
}

/* CTA Video Previews */
.cta-video-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 320px;
    height: 568px; /* 9:16 aspect ratio */
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5; /* behind the text (z-index 10) */
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    background: #111; /* fallback if video is missing */
}
.cta-video-preview.show {
    opacity: 0.6; /* 60% opacity so the white text layered over it stays perfectly readable */
    transform: translate(-50%, -50%) scale(1);
}

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

.nav-logo {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

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

.nav-link:hover {
    color: #4F6F63 !important;
}

/* ============================================================
   CANVAS & SCROLL STORY
============================================================ */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(13, 13, 13, 0.7) 100%),
                linear-gradient(to bottom, rgba(13, 13, 13, 0.3) 0%, rgba(13,13,13,0.85) 100%);
    z-index: 1;
}

.scroll-story {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
}

.story-section {
    position: absolute;
    top: 45%; /* Prevents text/CTA from hitting bottom sticky elements on laptops */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 5vw;
    opacity: 0; /* JS handles reveal */
    pointer-events: none; /* Pointer events enabled during reveal via JS */
}

.story-section.active {
    pointer-events: auto;
}

.story-content {
    text-align: center;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.story-text {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.story-text .line {
    display: block;
    color: var(--text-secondary);
    transition: color 0.5s ease;
}

.story-text .line:last-child {
    color: var(--text-primary);
}

/* ============================================================
   FINAL CTA SECTION (Inside/Below Scroll Story)
============================================================ */
.final-cta {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 8rem 5vw;
    border-bottom: 1px solid var(--glass-border);
}

.cta-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.cta-subtitle {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ============================================================
   TRUSTED BY MARQUEE
============================================================ */
.trusted-by {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 6rem 0;
}

.marquee-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Fade edges */
.marquee-fade-left, .marquee-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15vw;
    z-index: 2;
    pointer-events: none;
}

.marquee-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}

.marquee-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 0%, transparent 100%);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    width: max-content;
}

.marquee-track {
    display: flex;
    gap: 6rem;
    padding-left: 6rem;
    align-items: center;
    animation: scroll-marquee 25s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
    /* Move exactly half way so the duplicate lines up perfectly */
}

.brand-logo-img {
    height: clamp(30px, 4vw, 45px); /* Forces all logos to identical heights */
    width: auto; /* Maintains unique aspect ratios naturally */
    object-fit: contain; /* Prevents any cutting or squishing */
    opacity: 0.5;
    filter: grayscale(100%); /* Moody, unified look across random colored logos */
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
    cursor: default;
    border-radius: 4px;
}

.marquee-track:hover .brand-logo-img {
    opacity: 0.15; /* Base hover state dims the un-hovered ones */
}

.marquee-track .brand-logo-img:hover {
    opacity: 1; /* Focus specific logo */
    filter: grayscale(0%); /* Reveal true brand colors on hover! */
    transform: scale(1.1);
}


/* ============================================================
   FEATURED WORK
============================================================ */
.featured-work {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 8rem 0 6rem 5vw; /* Padding on left only to allow scroll clipping on right */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Horizontal Scroll Grid */
.h-scroll-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 3rem;
    padding-right: 5vw;
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.h-scroll-container::-webkit-scrollbar {
    display: none;
}

.fw-card {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fw-card:hover {
    transform: translateY(-8px) scale(1.02);
    background-color: #4F6F63 !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.work-ethics-card:hover {
    transform: translateY(-4px);
    background-color: #4F6F63;
    border-color: rgba(255, 255, 255, 0.4);
}

.fw-video {
    width: 320px;
    height: 568px; /* Approx 9:16 aspect ratio */
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

.fw-card:hover .fw-video {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
}

.play-icon {
    font-size: 2rem;
    color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fw-card:hover .play-icon {
    opacity: 1;
    transform: scale(1.1);
}

.fw-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fw-brand {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.fw-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================================
   ABOUT SECTION
============================================================ */
.about {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 10rem 5vw;
}

.about-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.about-sidebar {
    position: sticky;
    top: 120px;
    text-align: center;
}

.about-photo {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--glass-bg);
    border-radius: 50%; /* Circle image focused on content */
    border: 1px solid var(--glass-border);
    margin: 0 auto 2rem;
    max-width: 200px;
    background-size: cover;
    background-position: center;
}

.about-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    text-align: left;
}

.about-block h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-block p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.skills-list {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    font-weight: 300;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.skills-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Glass Grid Cards */
.work-ethics-layout { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.5rem auto; max-width: 1100px; text-align: left; }
.work-ethics-card { 
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 8px; 
    padding: 1.25rem 1.5rem; flex: 1 1 calc(33.333% - 1rem); min-width: 260px;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.we-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; color: var(--text-primary); }
.we-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; font-weight: 300; }

/* ============================================================
   CONTACT
============================================================ */
.contact-section {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 10rem 5vw 15rem;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}


/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    background-color: #fff;
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--glass-bg);
    border-color: rgba(255,255,255,0.2);
}

/* ============================================================
   UTILITY CLASSES & GRID OVERRIDES
============================================================ */
/* Used for placeholder images */
.ph-image-1 { background: linear-gradient(to top right, #111, #1a1a1a); }
.ph-image-2 { background: linear-gradient(to bottom left, #151515, #0f0f0f); }
.ph-image-3 { background: linear-gradient(to right, #1a1a1a, #111); }
.ph-image-4 { background: linear-gradient(to top, #111, #1a1a1a); }

/* Glow Text for Scroll Indicator */
.glow-text {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,1), 0 0 30px rgba(255,255,255,0.8), 0 0 45px rgba(255,255,255,0.4);
    animation: pulseGlow 2.5s infinite ease-in-out;
    opacity: 1;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; text-shadow: 0 0 10px rgba(255,255,255,0.5); transform: translateY(0); }
    50% { opacity: 1; text-shadow: 0 0 20px rgba(255,255,255,1), 0 0 40px rgba(255,255,255,0.9), 0 0 60px rgba(255,255,255,0.5); transform: translateY(5px); }
}

/* responsive resets */
@media (max-width: 900px) {
    .nav-container { flex-direction: column; gap: 1rem; align-items: center; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .nav-logo { text-align: center; }
    .about-grid { grid-template-columns: 1fr; }
    .about-sidebar { position: static; margin-bottom: 3rem; }
    .story-section { padding: 0 8vw; }
    .fw-card { flex: 0 0 280px; }
    .fw-video { width: 280px; height: 497px; }
}

.btn-primary:hover, .btn-secondary:hover {
    background-color: #4F6F63 !important;
    border-color: #4F6F63 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* ============================================================
   DESKTOP SPLIT VIEW (HOVER VIDEOS)
============================================================ */
@media (min-width: 900px) {
    .cta-video-preview {
        z-index: 15; /* Safely above or beside elements */
        width: 280px;
        height: 497px;
    }
    
    /* Location 1 (Old Monk): Right Side */
    #preview-1 {
        left: auto;
        right: 6vw;
        top: 50%;
        transform: translateY(-50%) scale(0.95);
    }
    #preview-1.show {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    /* Location 2 (Presence): Left Side */
    #preview-2 {
        left: 6vw;
        right: auto;
        top: 50%;
        transform: translateY(-50%) scale(0.95);
    }
    #preview-2.show {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    /* Location 3 (Habit): Right Offset Lower */
    #preview-3 {
        left: 5vw;
        right: auto;
        top: 25%;
        transform: translate(0, 0) scale(0.95);
    }
    #preview-3.show {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}
