/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0D0D0D; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #F2541B; }

/* ─── GLOBALS ─── */
html { scroll-behavior: smooth; background: #0D0D0D; }
body { -webkit-font-smoothing: antialiased; }

/* ─── GRADIENT TEXT ─── */
.gradient-text {
    background: linear-gradient(90deg, #F20530 0%, #F2541B 50%, #F27B35 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ─── NAV SCROLL ─── */
#navbar.scrolled {
    background: rgba(13,13,13,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ─── MOBILE MENU ─── */
#mobile-menu.open { display: flex; }

/* ─── FLOATING LABEL FORM ─── */
.input-group {
    position: relative;
    margin-bottom: 0.5rem;
}

.field-label {
    position: absolute;
    left: 0;
    top: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.35);
    transition: all 0.2s ease;
    pointer-events: none;
}

.peer:focus ~ .field-label,
.peer:not(:placeholder-shown) ~ .field-label {
    top: -1rem;
    font-size: 0.7rem;
    color: #F2541B;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ─── AUTOFILL FIX ─── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #000 inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ─── SCROLL REVEAL ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── CANVAS ─── */
#hero-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── SCROLL STACK ─── */
.scroll-stack-scroller {
    width: 100%;
    overflow: visible;
}

.scroll-stack-inner {
    position: relative;
}

.scroll-stack-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3rem 2.5rem;
    margin-bottom: 120px;
    transform-origin: top center;
    will-change: transform, filter;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-left: 2px solid rgba(242, 84, 27, 0.5);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.scroll-stack-card:hover {
    border-color: rgba(255,255,255,0.12);
    border-left-color: rgba(242, 84, 27, 0.8);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.scroll-stack-card:last-of-type {
    margin-bottom: 0;
}

.scroll-stack-end {
    height: 1px;
    pointer-events: none;
}


/* ─── CIRCULAR GALLERY (Portfolio) ─── */
#portfolio-gallery {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    cursor: grab;
}
#portfolio-gallery:active { cursor: grabbing; }
#portfolio-gallery canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ─── FULLSCREEN MENU ─── */
#mobile-menu.open {
    display: flex !important;
    animation: fadeInMenu 0.4s ease forwards;
}
@keyframes fadeInMenu {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(12px); }
}

#mobile-btn svg {
    transition: transform 0.3s ease;
}
#mobile-btn.active svg {
    transform: rotate(90deg);
}

/* ─── CAROUSEL HORIZONTAL SCROLLBAR ─── */
#estilos-horizontal-list::-webkit-scrollbar {
  height: 10px;
}
#estilos-horizontal-list::-webkit-scrollbar-thumb {
  background: #F2541B;
  border-radius: 6px;
  cursor: pointer;
}
#estilos-horizontal-list::-webkit-scrollbar-thumb:hover {
  background: #F27B35;
}
#estilos-horizontal-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin: 0 10px;
}

#estilos-horizontal-list.cursor-grabbing * {
    pointer-events: none;
}

/* ─── CUSTOM ANIMATIONS ─── */
.scale-up-center {
    animation: scale-up-center 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    animation-delay: 1.2s; /* Sincronizado para que entre después del H1 */
}

@keyframes scale-up-center {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ─── CUSTOM CURSOR ─── */
* { cursor: none !important; }

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    border-radius: 50%;
    translate: -50% -50%;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #F2541B;
    box-shadow: 0 0 10px rgba(242,84,27,0.9);
    transition: opacity 0.3s, transform 0.1s;
}
.cursor-dot--click {
    transform: translate(-50%,-50%) scale(0.6) !important;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(242,84,27,0.65);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease, opacity 0.3s;
}
.cursor-ring--hover {
    width: 60px;
    height: 60px;
    border-color: #F2541B;
    box-shadow: 0 0 20px rgba(242,84,27,0.4), inset 0 0 12px rgba(242,84,27,0.1);
}
.cursor-ring--click {
    width: 30px;
    height: 30px;
}

/* ─── THREE.JS HERO OVERLAY ─── */
#hero-3d {
    position: absolute;
    inset: 0;
    z-index: 5;        /* above bg canvas, below text (z-20) */
    pointer-events: none;
    overflow: hidden;
}
#hero-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ─── 3D TILT CARDS ─── */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), box-shadow 0.6s ease;
    will-change: transform;
}
.tilt-card:hover {
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 25px rgba(242,84,27,0.15) !important;
}
.tilt-card .tilt-content {
    transform: translateZ(20px);
}
.tilt-card .tilt-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at var(--shine-x,50%) var(--shine-y,50%),
        rgba(255,255,255,0.08) 0%, transparent 65%);
    transition: opacity 0.3s;
    opacity: 0;
}
.tilt-card:hover .tilt-shine {
    opacity: 1;
}

/* ─── KINETIC CHAR SPLIT ─── */
.char {
    display: inline-block;
    will-change: transform, opacity;
}

/* ─── NEON BOOKING PULSE ─── */
@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(242,84,27,0.25), 0 0 40px rgba(242,84,27,0.08); }
    50%       { box-shadow: 0 0 35px rgba(242,84,27,0.50), 0 0 70px rgba(242,84,27,0.20); }
}
.neon-card {
    animation: neon-pulse 3.5s ease-in-out infinite;
    border: 1px solid rgba(242,84,27,0.25) !important;
}

/* ─── HERO H1 GLITCH (Automatic) ─── */
@keyframes glitch-auto-1 {
    0%, 94%, 100% { clip-path: inset(0 0 100% 0); transform: translateX(0); opacity: 0; }
    95% { clip-path: inset(30% 0 55% 0); transform: translateX(-4px); opacity: 0.8; }
    96.5% { clip-path: inset(60% 0 15% 0); transform: translateX(4px); opacity: 0.3; }
    98% { clip-path: inset(10% 0 80% 0); transform: translateX(-2px); opacity: 0.8; }
}
@keyframes glitch-auto-2 {
    0%, 94%, 100% { clip-path: inset(0 0 100% 0); transform: translateX(0); opacity: 0; }
    95.5% { clip-path: inset(20% 0 45% 0); transform: translateX(4px); opacity: 0.6; color: #F2541B; }
    97% { clip-path: inset(70% 0 5% 0); transform: translateX(-5px); opacity: 0.4; }
    98.5% { clip-path: inset(5% 0 85% 0); transform: translateX(2px); opacity: 0.8; color: #F20530; }
}

h1.glitch { position: relative; }
h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    font: inherit;
    opacity: 0;
    mix-blend-mode: screen;
}
h1.glitch::before {
    color: #F20530;
    animation: glitch-auto-1 6s infinite linear;
}
h1.glitch::after {
    color: #F2541B;
    animation: glitch-auto-2 6s infinite linear;
    transform: translateX(3px);
}

/* Ensure mobile hides custom cursor */
@media (hover: none) {
    .cursor-dot, .cursor-ring { display: none !important; }
    * { cursor: auto !important; }
}

/* ─── INTERACTIVE EFFECTS ─── */

/* 1. Cursor Glow Spotlight */
#cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(242,84,27,0.15) 0%, transparent 70%); /* Stronger orange opacity */
    border-radius: 50%;
    pointer-events: none;
    z-index: 0; /* Below content */
    will-change: transform;
}

/* 2. Scroll Skew (smooth transition on body) - Removed by user request */

/* 3. Shimmer Line Effect on H2s */
.shimmer-line {
    position: absolute;
    bottom: -15px; left: 0;
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, transparent, var(--primary, #F2541B), transparent);
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}
h2 {
    position: relative;
    display: inline-block;
}
.shimmer-line--active {
    width: 100%;
}

/* 4. Marquee Ticker */
.marquee-strip {
    width: 100vw;
    background: #F20530; /* Accent color */
    color: white;
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    z-index: 30;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    white-space: nowrap;
}
.marquee-track {
    display: inline-flex;
    align-items: center;
    animation: marquee-scroll 18s linear infinite;
    will-change: transform;
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Scrolls precisely half its duplicated length */
}
