/* 
    vinom.design - Premium Studio Styles
    Colors: White (#FFFFFF) 60%, Black (#0A0A0A) 30%, Gold (#C5A46D) 10%
    Typography: Archivo (Headings), Archivo (Body)
*/

:root {
    --bg-primary: #FFFFFF;
    --text-primary: #0A0A0A;
    --accent-gold: #C5A46D;
    --gray-light: #F5F5F5;
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --font-heading: 'Archivo', 'Helvetica', 'Arial', sans-serif;
    --font-body: 'Archivo', 'Helvetica', 'Arial', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0A0A0A;
    --text-primary: #FFFFFF;
    --gray-light: #161616;
}

/* Modern Texture & Glow */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="dark"] .noise-overlay {
    opacity: 0;
}

.hero-glow {
    position: absolute;
    top: 10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 164, 109, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    filter: blur(40px); /* Halved: blur(80px) → blur(40px) for GPU savings */
    pointer-events: none;
    will-change: auto;
}

[data-theme="dark"] .hero-glow {
    background: radial-gradient(circle, rgba(197, 164, 109, 0.12) 0%, rgba(11, 11, 11, 0) 70%);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* scroll-behavior removed — JS handles transitions to avoid conflict */
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    text-transform: none;
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 64px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.accent {
    color: var(--accent-gold);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-gold);
}

.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--accent-gold);
}

.btn-outline {
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-text {
    font-weight: 700;
    padding: 0;
    color: var(--text-primary);
}

.btn-text:hover {
    color: var(--accent-gold);
}

.btn-large {
    padding: 24px 48px;
    font-size: 1.1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(var(--bg-rgb, 255, 255, 255), 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    border-bottom: 1px solid rgba(var(--text-rgb, 0, 0, 0), 0.05);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* JS adds .scrolled — CSS class swap is cheaper than inline style writes */
.header.scrolled {
    padding: 14px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .header {
    background: rgba(11, 11, 11, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}

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

.wordmark {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
}

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

.nav-links a:not(.btn) {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.nav-links a:hover:not(.btn) {
    color: var(--accent-gold);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background-color: var(--bg-primary);
}

.hero-headline {
    font-size: clamp(3rem, 8vw, 6rem);
    max-width: 900px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.hero-subline {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 600px;
    color: var(--text-primary);
    opacity: 0.7;
    margin-bottom: 40px;
}

.hero-ctas {
    display: flex;
    gap: 32px;
    align-items: center;
}

/* About Section */
.about-section {
    padding: 160px 0;
    background-color: var(--bg-primary);
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: var(--text-primary);
    opacity: 0.6;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 30px;
    max-width: 800px;
    color: var(--text-primary);
}

.section-desc {
    font-size: 1.2rem;
    max-width: 650px;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Marquee Section */
.marquee-section {
    padding: 64px 0;
    background-color: #0A0A0A;
    color: #FFFFFF;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
}

[data-theme="dark"] .marquee-section {
    background-color: #161616;
}

.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    padding-right: 50px;
    opacity: 0.15;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Bento Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 32px;
    margin-top: 60px;
}

.service-card {
    padding: 64px 32px;
    border: 1px solid rgba(var(--text-rgb, 0, 0, 0), 0.05);
    background-color: var(--bg-primary);
    transition: var(--transition-smooth);
}

[data-theme="dark"] .service-card {
    border-color: rgba(255, 255, 255, 0.05);
    background-color: #111111;
}

.service-card:nth-child(1),
.service-card:nth-child(4) {
    grid-column: span 2;
}

.service-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.02);
}

[data-theme="dark"] .service-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-primary);
    opacity: 0.6;
    font-size: 1.1rem;
}

/* Work Section */
.work-section {
    padding: 128px 0;
    background-color: var(--gray-light);
}

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

.work-grid .work-item:first-child {
    grid-column: span 2;
}

.work-image-placeholder {
    aspect-ratio: 16 / 9;
    background-color: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    color: rgba(0,0,0,0.1);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.work-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item:hover .work-image img {
    transform: scale(1.04);
}

[data-theme="dark"] .work-image-placeholder {
    background-color: #1a1a1a;
    color: rgba(255,255,255,0.05);
}

.work-item:hover .work-image-placeholder {
    color: var(--accent-gold);
}

.work-info {
    margin-top: 20px;
}

.work-info h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.work-info p {
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.5;
}

/* Process Section */
.process-section {
    padding: 160px 0;
    background-color: var(--bg-primary);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 64px;
    margin-top: 60px;
}

.process-step {
    position: relative;
}

.step-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    opacity: 0.03;
    line-height: 1;
    margin-bottom: -20px;
}

.process-step h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.process-step p {
    font-size: 0.95rem;
    color: var(--text-primary);
    opacity: 0.6;
}

/* Clip-path Section Transitions */
.clip-section {
    clip-path: inset(10% 10% 10% 10% round 30px);
    transform: scale(0.95);
    transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    /* will-change removed from idle state — promoted only when animating */
}

.clip-section.is-expanded {
    clip-path: inset(0% 0% 0% 0% round 0px);
    transform: scale(1);
    will-change: auto; /* reset after animation settles */
}

/* Page Transition Overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--text-primary);
    z-index: 10000;
    transform: translateY(100%);
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-transition.active {
    transform: translateY(0);
}

.page-transition.exit {
    transform: translateY(-100%);
}

/* Immersive CTA Section Redesign */
.cta-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 96px 32px;
    background-color: #0A0A0A; /* Deep Black */
    color: #FFFFFF;
    overflow: hidden;
    z-index: 1;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.cta-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(197, 164, 109, 0.1) 0%, rgba(5, 5, 5, 0) 70%);
    filter: blur(50px); /* Halved: blur(100px) → blur(50px) for GPU savings */
    will-change: auto;
}

.cta-content-wrapper {
    z-index: 2;
    max-width: 1000px;
}

.cta-headline {
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 0.9;
    letter-spacing: -4px;
    margin-bottom: 60px;
    color: #FFFFFF !important;
    text-transform: lowercase;
}

.cta-footer-text {
    margin-top: 80px;
    font-size: 1.1rem;
    opacity: 0.4;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #FFFFFF !important;
}

/* Magnetic Button */
.magnetic-btn-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.magnetic-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    height: 220px;
    background-color: var(--accent-gold);
    color: #0A0A0A;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.magnetic-btn:hover {
    background-color: #FFFFFF;
}

.magnetic-text {
    display: block;
    pointer-events: none;
}

[data-theme="dark"] .cta-section {
    background-color: #0A0A0A;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(var(--text-rgb, 0, 0, 0), 0.06);
    background-color: var(--bg-primary);
    overflow: hidden;
}

[data-theme="dark"] .footer {
    border-color: rgba(255, 255, 255, 0.06);
}

/* Top nav row */
.footer-top {
    padding: 64px 0 32px;
}

.footer-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-primary);
    opacity: 0.45;
    max-width: 220px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.link-group h5 {
    margin-bottom: 18px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    opacity: 0.4;
}

.link-group a, .link-group p {
    display: block;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--text-primary);
    opacity: 0.6;
}

.link-group a:hover {
    opacity: 1;
    color: var(--accent-gold);
}

/* Full-width wordmark */
.footer-wordmark-wrap {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid rgba(var(--text-rgb, 0, 0, 0), 0.06);
    padding: 20px 8px 0;  /* horizontal padding prevents edge clipping */
    line-height: 0.85;
}

[data-theme="dark"] .footer-wordmark-wrap {
    border-color: rgba(255, 255, 255, 0.06);
}

.footer-wordmark {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(4rem, 14.8vw, 18rem); /* slightly smaller so all chars fit without clipping */
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 0.88;
    color: var(--text-primary);
    white-space: nowrap;
    padding: 0 4px 0.2%; /* extra right padding guards the final character */
    transition: color 0.4s ease, opacity 0.4s ease;
    opacity: 0.92;
}

.footer-wordmark:hover {
    opacity: 1;
    color: var(--text-primary);
}

.footer-wordmark .accent {
    color: var(--accent-gold);
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-nav-row {
        flex-direction: column;
        gap: 32px;
    }
    .footer-links {
        gap: 40px;
    }
    .footer-wordmark {
        font-size: clamp(3rem, 18vw, 8rem);
    }
}

@media (max-width: 480px) {
    .footer-links { flex-direction: column; gap: 28px; }
    .footer-wordmark { font-size: 16vw; }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(36px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active state — use specific props not 'all' */
.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
    opacity: 1;
    transform: translate(0) scale(1);
    will-change: auto; /* release GPU layer after animation */
}

/* Staggered Delays */
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }

/* Custom Cursor — top/left fixed at 0; position via transform only (no reflow) */
.cursor-cube, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: transform; /* promote to compositor layer */
}

.cursor-cube {
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    transition: background-color 0.25s ease, opacity 0.3s ease;
}

.cursor-cube.hover {
    background-color: transparent;
}

.cursor-ring {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-gold);
    border-radius: 0;
    transition: width 0.25s ease, height 0.25s ease, background-color 0.25s ease, opacity 0.3s ease, border-color 0.25s ease;
}

.cursor-cube.invert {
    background-color: #0A0A0A;
}

.cursor-ring.invert {
    border-color: #0A0A0A;
}

/* Hide default cursor only on desktop */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
    }
    a, button, .btn {
        cursor: none;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .container { padding: 0 40px; }
    .hero-headline { font-size: clamp(3rem, 7vw, 5rem); }
}

@media (max-width: 992px) {
    .container { padding: 0 30px; }
    .grid { gap: 40px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card:nth-child(1),
    .service-card:nth-child(4) { grid-column: span 1; }
    .work-grid { grid-template-columns: 1fr; }
    .work-grid .work-item:first-child { grid-column: span 1; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-links { gap: 40px; }
}

/* Mobile Navigation Overlay */
.mobile-nav-controls {
    display: none;
    align-items: center;
    gap: 10px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

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

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.mobile-link:hover {
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-nav-controls { display: flex; }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-primary);
        transition: var(--transition-smooth);
    }

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

    .mobile-menu-toggle.active span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .hero-headline { font-size: 3.5rem; letter-spacing: -2px; }
    .section-title { font-size: 2.5rem; }
    .about-section, .services-section, .work-section, .process-section { padding: 80px 0; }
    
    .clip-section {
        clip-path: inset(5% 5% 5% 5% round 20px);
    }

    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 40px 30px; }

    .magnetic-btn {
        width: 180px;
        height: 180px;
        font-size: 1rem;
    }

    .cta-headline { font-size: 4rem; letter-spacing: -2px; }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .hero-headline { font-size: 2.8rem; }
    .hero-ctas { flex-direction: column; align-items: flex-start; gap: 20px; }
    .btn { width: 100%; text-align: center; }
    .section-title { font-size: 2rem; }
    .magnetic-btn { width: 150px; height: 150px; }
    .cta-headline { font-size: 3rem; }
    .footer-links { flex-direction: column; gap: 30px; }
}