/* =======================================================
VIBRATIX V2
BASE.CSS
======================================================= */

/* =======================================================
RESET
======================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
    /* Base */
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* =======================================================
SELECTION
======================================================= */

::selection {
    background: rgba(212, 175, 55, .35);
    color: white;
}

::-moz-selection {
    background: rgba(212, 175, 55, .35);
    color: white;
}

/* =======================================================
SCROLLBAR
======================================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            var(--gold),
            var(--gold-dark));
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* =======================================================
THREE.JS CANVAS
======================================================= */

#three-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    pointer-events: none;
}

/* =======================================================
CURSOR LIGHT
======================================================= */

#cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: clamp(250px,
            40vw,
            700px);
    height: clamp(250px,
            40vw,
            700px);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
            rgba(212, 175, 55, .10),
            rgba(212, 175, 55, .04),
            transparent 70%);
    z-index: -1;
    filter: blur(30px);
}

/* =======================================================
NOISE OVERLAY
======================================================= */

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .03;
    z-index: var(--z-noise);
    background-image:
        radial-gradient(rgba(255, 255, 255, .5) 1px,
            transparent 1px);
    background-size: 4px 4px;
}

/* =======================================================
IMAGES
======================================================= */

img {
    display: block;
    max-width: 100%;
}

/* =======================================================
LINKS
======================================================= */

a {
    text-decoration: none;
    color: inherit;
}

/* =======================================================
LISTS
======================================================= */

ul,
ol {
    list-style: none;
}

/* =======================================================
BUTTONS
======================================================= */

button {
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
}

/* =======================================================
HEADINGS
======================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    color: var(--white);
    line-height: 1.1;
    font-weight: 600;
}

/* =======================================================
PARAGRAPHS
======================================================= */

p {
    color: var(--text);
}

/* =======================================================
INPUTS
======================================================= */

input,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: white;
    padding: 1rem 1.2rem;
    font-family: var(--font-body);
    transition: var(--transition-normal);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, .15);
}

textarea {
    resize: vertical;
    min-height: 180px;
}

/* =======================================================
SECTIONS
======================================================= */

section {
    position: relative;
    padding: var(--section-padding) 20px;
    z-index: var(--z-content);
    max-width: 100%;
}

/* =======================================================
UTILITY
======================================================= */

.text-center {
    text-align: center;
}

.gold {
    color: var(--gold);
}

.hidden {
    display: none;
}

/* =======================================================
FADE ANIMATIONS
======================================================= */

.fade-up {
    opacity: 0;
    transform: translateY(40px);
}

.fade-in {
    opacity: 0;
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transition: .8s ease;
}

/* =======================================================
LOADER
======================================================= */

#loader {
    position: fixed;
    inset: 0;
    background: var(--black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-loader);
}

.loader-content {
    text-align: center;
    width: min(400px, 90%);
            
}

.loader-logo {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-family: var(--font-title);
    color: var(--gold);
    letter-spacing: 10px;
    margin-bottom: 1rem;
}

.loader-status {
    color: var(--muted);
    margin-bottom: 2rem;
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,
            var(--gold-dark),
            var(--gold),
            var(--gold-light));

}

/* =======================================================
LOADER EXIT
======================================================= */

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    transition:
        1s ease;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Texto más pequeño en móviles */
    :root {
        --section-padding: 60px;
    }

    /* Menos padding vertical en móviles */
}

/* 2. Corrección del Cursor Light: Se ocultará en móviles para mejorar rendimiento y evitar errores */
@media (max-width: 768px) {
    #cursor-light {
        display: none;
    }
}