/* Global & Reset */
body {
    background-color: #050505;
    overflow-x: hidden;
    cursor: none;
    color: #e0e0e0;
}

/* Hero Particle Canvas */
#hero-canvas {
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Typography Reveal Utilities */
.hero-word {
    display: inline-block;
    will-change: transform, opacity;
}

.hero-fade-in {
    will-change: transform, opacity;
}

/* Infinite Marquee */
.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15rem;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #050505, transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #050505, transparent);
}

/* Hero Spotlight */
.hero-spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#home:hover .hero-spotlight {
    opacity: 1;
}

/* Base Utility for Hidden Modals */
.hidden-modal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.visible-modal {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

::selection {
    background: #f29316;
    color: #000;
}

@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Preloader */
.preloader {
    /* bg removed to allow panels to show */
    pointer-events: auto;
    /* Block interaction initially */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f29316;
    font-family: 'Syne', sans-serif;
}

.counter-wrap {
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-size: 10vw;
    font-weight: 800;
    line-height: 1;
    color: #e0e0e0;
    opacity: 0.1;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 900;
    overflow: hidden;
}

.loader-logo span {
    display: inline-block;
    transform: translateY(100%);
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #f29316;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9998;
    pointer-events: none;
    transition: width 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        height 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        background-color 0.2s,
        border-color 0.2s;
}

body.hovering .cursor-dot {
    opacity: 0;
}

body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(242, 147, 22, 0.1);
    border-color: rgba(242, 147, 22, 0.5);
    mix-blend-mode: screen;
    /* Modern premium touch */
}

/* Styles */
.stroke-text {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    color: transparent;
    transition: all 0.5s ease;
}

.stroke-text:hover {
    -webkit-text-stroke: 1px #f29316;
    color: rgba(242, 147, 22, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, #e0e0e0 0%, #f29316 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background: #111111;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-btn {
    background: #f29316;
    color: black;
    font-weight: 700;
    box-shadow: 0 0 25px rgba(242, 147, 22, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-btn:hover {
    background: #ffaa33;
    box-shadow: 0 0 40px rgba(242, 147, 22, 0.4);
    transform: translateY(-2px);
}

/* Service Cards */
.service-card-horizontal {
    width: 400px;
    height: 550px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.service-card-horizontal:hover {
    border-color: #f29316;
    box-shadow: 0 0 30px rgba(242, 147, 22, 0.1);
}

.service-icon-lg {
    font-size: 3.5rem;
    color: #333;
    transition: all 0.4s;
}

.service-card-horizontal:hover .service-icon-lg {
    color: #f29316;
    transform: scale(1.1);
}

/* Full-Screen Work Slides */
#work {
    height: 100vh;
    width: 100%;
}

.work-container {
    width: 100%;
    height: 100%;
}

.work-slide {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background: #000;
    /* Initial state for iris reveal: hidden by small circle */
    clip-path: circle(0% at 50% 50%);
}

.work-slide:first-child {
    clip-path: circle(150% at 50% 50%);
    /* First slide fully visible */
    z-index: 10;
}

.work-slide:not(:first-child) {
    z-index: 11;
}

.work-slide-bg img {
    will-change: transform, opacity;
}

.project-title {
    line-height: 0.85;
    letter-spacing: -0.05em;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
    text-transform: uppercase;
}

.project-cat {
    letter-spacing: 0.6em;
    opacity: 0.8;
}

.project-cat-wrapper {
    display: inline-block;
}

.glass-pill {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Luxury Button Styles */
.luxury-btn {
    position: relative;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-icon {
    font-size: 1.25rem;
    color: #f29316;
}

.btn-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #f29316;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1), height 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.luxury-btn:hover {
    border-color: #f29316;
    color: #000;
}

.luxury-btn:hover .btn-bg {
    width: 300px;
    height: 300px;
}

.luxury-btn:hover .btn-icon {
    color: #000;
}

/* Progress Indicator */
.work-progress-wrap {
    pointer-events: none;
}

.work-dot {
    width: 12px;
    height: 12px;
}

.work-dot.active {
    height: 40px;
}

/* Process Section - Digital Spine */
.process-line-progress {
    height: 0;
    /* Crucial: Start at 0 for JS to animate */
}

/* Ring Pulse Animation */
@keyframes ring-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.ring-pulse {
    animation: ring-pulse 2s ease-in-out infinite;
}

/* Premium Node Styles */
.process-node>div:last-child {
    background: #0a0a0a;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.process-node.active>div:last-child {
    background: #f29316;
    border-color: #f29316;
    box-shadow: 0 0 30px rgba(242, 147, 22, 0.8), 0 0 60px rgba(242, 147, 22, 0.4);
    transform: scale(1.4);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.process-node.active .ring-pulse {
    border-color: rgba(242, 147, 22, 0.5);
    animation: ring-pulse-active 1.5s ease-in-out infinite;
}

@keyframes ring-pulse-active {
    0% {
        transform: scale(1);
        opacity: 0.8;
        border-color: rgba(242, 147, 22, 0.5);
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
        border-color: rgba(242, 147, 22, 0.8);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
        border-color: rgba(242, 147, 22, 0.5);
    }
}

.process-node.active .node-inner {
    opacity: 1;
    background: white;
    box-shadow: 0 0 10px white;
}

/* Premium Card Styles */


.process-card .glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.group:hover .glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(242, 147, 22, 0.3);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(242, 147, 22, 0.1);
    /* Subtle orange glow */
}

.process-card h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Premium Typography for Numbers */
.process-card span {
    font-family: 'Syne', sans-serif;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}



/* Spotlight Effect */
.service-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.service-card-horizontal:hover::before {
    opacity: 1;
}

/* Typography & Layout Utilities */
.card-number {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
}

.group:hover .card-number {
    color: #f29316;
    -webkit-text-stroke: 0px;
    transform: scale(1.1);
}

.form-input {
    width: 100%;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: #e0e0e0;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #f29316;
    background: rgba(255, 255, 255, 0.05);
}

#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

#scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav {
    transition: all 0.5s ease;
}

nav.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#playground-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 1024px) {
    .portfolio-slider-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Scroll Lock Utility */
body.overflow-hidden {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

/* Form Validation States */
.contact-input.border-red-500 {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.contact-input.border-green-500 {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.error-message {
    display: block;
    margin-top: 0.25rem;
}

.error-message.hidden {
    display: none;
}

/* Shake Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* =========================================
   NEW PREMIUM STYLES
   ========================================= */

/* Hero Buttons */
.btn-hero {
    position: relative;
    padding: 1.25rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.02em;
    font-size: 1.125rem;
    /* ~text-lg */
}

.btn-hero-primary {
    background: #f29316;
    color: #000;
    box-shadow: 0 10px 30px -5px rgba(242, 147, 22, 0.4);
    z-index: 10;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -5px rgba(242, 147, 22, 0.6);
    background: #ffaa33;
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f29316;
    color: #f29316;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

/* Instagram Curated Gallery */
.insta-curated-gallery {
    perspective: 1500px;
}

.curated-item {
    will-change: transform;
}

.curated-item a {
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.curated-img {
    filter: grayscale(100%) brightness(0.7);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.curated-item:hover .curated-img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.08);
}

.curated-item:hover a {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

/* Texture & Overlay */
.curated-item a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent, rgba(0, 0, 0, 0.4));
    opacity: 0.6;
    transition: opacity 0.8s ease;
}

.curated-item:hover a::after {
    opacity: 0.2;
}

@media (max-width: 767px) {
    .curated-col {
        margin-top: 0 !important;
    }

    .curated-item {
        margin-bottom: 2rem;
    }
}

/* Instagram Logo Overlay */
.insta-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    pointer-events: none;
}

.curated-item:hover .insta-icon-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Scroll to Top Fix */
#scroll-to-top {
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

#scroll-to-top.active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Follow Button tweak */
.btn-insta-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(5px);
}

.btn-insta-follow:hover {
    background: #f29316;
    border-color: #f29316;
    color: black;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(242, 147, 22, 0.3);
}

/* 3D Tilt Card */
.tilt-card-3d {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.tilt-card-3d>* {
    transform: translateZ(20px);
}

.parallax-icon {
    transform: translateZ(50px);
    transition: transform 0.3s ease-out;
}

/* Sticky Reveal Footer */
@media (min-width: 1024px) {
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1;
        /* Place behind content */
    }

    #page-content {
        position: relative;
        z-index: 2;
        /* Place above footer */
        background-color: #050505;
        /* Solid background to cover footer */
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    }
}

/* For better transitions and avoiding white flashes */
#page-content {
    background: #050505;
    min-height: 100vh;
}

/* Scrollytelling Text Reveal */
.reveal-text {
    overflow: hidden;
}

.reveal-text .word {
    opacity: 0.15;
    transition: color 0.3s ease;
    display: inline-block;
    margin-right: 0.25em;
}

.reveal-text .word.active {
    opacity: 1;
    color: white;
}