/* ========================================
   ALTORA - Estilo de Ingeniería Ultra-Lujo
   Paleta: Negro Profundo, Oro Champagne, Crema
   ======================================== */

/* --- CUSTOM PROPERTIES --- */
:root {
    --gold: #D4AF37;
    --gold-dark: #BF953F;
    --gold-light: #E8D48B;
    --black: #000000;
    --cream: #F5F5DC;
    --gold-glow-sm: 0 0 20px rgba(212, 175, 55, 0.3);
    --gold-glow-md: 0 0 40px rgba(212, 175, 55, 0.5);
    --gold-glow-lg: 0 0 40px rgba(212, 175, 55, 0.12), 0 0 80px rgba(212, 175, 55, 0.05);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TIPOGRAFÍA SINCRONIZADA --- */
body {
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

h1,
h2,
h3,
.font-serif {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.15em;
    font-weight: 700;
}

h1 {
    font-weight: 800;
    line-height: 1.1;
}

h2 {
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-weight: 700;
    line-height: 1.3;
}

/* Párrafos y texto general */
p {
    font-weight: 500;
    line-height: 1.8;
}

/* Texto gris más legible */
.text-gray-400 {
    color: #c0c0c0 !important;
    font-weight: 500;
}

.text-gray-500 {
    color: #a0a0a0 !important;
    font-weight: 500;
}

/* Texto dorado metálico real */
.text-altora-gold,
.gold-text {
    background: linear-gradient(135deg,
            #BF953F 0%,
            #FCF6BA 20%,
            #D4AF37 40%,
            #B38728 60%,
            #FBF5B7 80%,
            #AA771C 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: gold-text-shimmer 6s ease infinite;
}

/* Excepción: elementos con bg-altora-gold como fondo */
.cta-button .text-altora-gold,
.bg-altora-gold,
[class*="bg-altora-gold"] {
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
    animation: none;
}

@keyframes gold-text-shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Texto uppercase pequeño (tracking labels) */
.tracking-widest {
    font-weight: 700;
}

.tracking-\[0\.5em\] {
    font-weight: 600;
}

/* Links de navegación */
nav a {
    font-weight: 600;
}

/* Texto italic (citas) */
.italic {
    font-weight: 500;
    font-style: italic;
}

/* --- GLASSMORPHISM (Apple-style curves) --- */
.glass-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    transition: box-shadow 0.5s var(--transition-smooth),
        transform 0.5s var(--transition-smooth),
        border-color 0.5s var(--transition-smooth);
}

.glass-card:hover {
    box-shadow:
        0 8px 40px rgba(212, 175, 55, 0.15),
        0 0 60px rgba(212, 175, 55, 0.08);
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Borde dorado metálico real */
.gold-border {
    border: 2px solid transparent;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        linear-gradient(135deg, #BF953F, #FCF6BA, #D4AF37, #B38728, #FBF5B7, #AA771C);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow:
        0 0 15px rgba(212, 175, 55, 0.15),
        inset 0 0 20px rgba(212, 175, 55, 0.03);
}

.gold-border:hover {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        linear-gradient(135deg, #FBF5B7, #D4AF37, #FCF6BA, #BF953F, #D4AF37, #FCF6BA);
    box-shadow:
        0 8px 40px rgba(212, 175, 55, 0.25),
        0 0 60px rgba(212, 175, 55, 0.12),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
}

/* --- ANIMACIONES --- */
@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translateY(-100vh) translateX(50px) scale(0.5);
    }
}

/* Secciones animadas con GPU acceleration */
.animate-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth),
        transform 0.8s var(--transition-smooth);
    will-change: opacity, transform;
}

.animate-section.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* --- CTA BUTTON (oro metálico real) --- */
.cta-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg,
            #BF953F 0%,
            #FCF6BA 25%,
            #D4AF37 50%,
            #B38728 75%,
            #FBF5B7 100%) !important;
    background-size: 200% 200%;
    color: #1a1a1a !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.6);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    animation: gold-shimmer 4s ease-in-out infinite;
}

@keyframes gold-shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.cta-button:hover {
    box-shadow:
        0 0 40px rgba(212, 175, 55, 0.5),
        0 0 80px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

/* --- HERO VIDEO DE FONDO --- */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

/* --- HERO PARTÍCULAS --- */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    animation: float-particle 8s ease-in-out infinite;
    will-change: transform, opacity;
}

.hero-particles::before {
    left: 20%;
    bottom: 0;
}

.hero-particles::after {
    left: 70%;
    bottom: 0;
    animation-delay: 3s;
}

/* --- PORTAFOLIO FOOTER (oro metálico) --- */
.portfolio-footer {
    background: linear-gradient(135deg,
            #BF953F 0%,
            #FCF6BA 25%,
            #D4AF37 50%,
            #B38728 75%,
            #FBF5B7 100%);
    color: #000000;
    border-radius: 0 0 20px 20px;
    padding: 1.25rem 1.5rem;
}

.portfolio-footer h3 {
    color: #000000;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.15em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.portfolio-footer p {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
}

/* --- PORTAFOLIO SLIDER --- */
.portfolio-slider {
    position: relative;
    touch-action: none;
}

.portfolio-before {
    clip-path: inset(0 0 0 50%);
}

.portfolio-range {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0;
}

.portfolio-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1px;
    height: 100%;
    cursor: ew-resize;
}

.portfolio-range::-moz-range-thumb {
    width: 1px;
    height: 100%;
    cursor: ew-resize;
    border: none;
    background: transparent;
}

.portfolio-divider {
    pointer-events: none;
}

/* --- FORMULARIO (Apple-style) --- */
input[type="text"],
input[type="email"],
input[type="tel"] {
    border-radius: 14px;
}

input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

input::placeholder {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

/* Botón submit del formulario */
#form-submit {
    border-radius: 16px;
}

/* Mensaje de éxito */
#form-success {
    border-radius: 16px;
}

/* --- EXIT POPUP --- */
#exit-popup {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#exit-popup.show {
    display: flex !important;
    opacity: 1;
}

#exit-popup .glass-card {
    transform: scale(0.9);
    transition: transform 0.4s var(--transition-bounce);
}

#exit-popup.show .glass-card {
    transform: scale(1);
}

/* --- HEADER TRANSITION --- */
#main-header {
    transition: background 0.3s ease, border-color 0.3s ease;
}

#main-header.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(212, 175, 55, 0.15);
}

#main-header.scrolled nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* --- APPLE-STYLE CURVES SYSTEM --- */
.cta-button {
    border-radius: 16px;
}

/* Navegación CTA botones */
nav a[href="#contacto"],
#mobile-menu a[href="#contacto"] {
    border-radius: 12px;
}

/* Argumentos de venta — iconos dorados circulares */
.arg-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg,
            #BF953F 0%,
            #FCF6BA 30%,
            #D4AF37 60%,
            #B38728 100%);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
    font-size: 1.5rem;
    line-height: 1;
}

/* Sector links */
.sector-link {
    border-radius: 12px;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--gold);
    display: inline-block;
    transition: all 0.3s ease;
}

.sector-link:hover {
    background: var(--gold);
    color: var(--black);
}

/* Portfolio overflow con curvas */
.portfolio-slider {
    border-radius: 20px 20px 0 0;
}

/* Exit popup card */
#exit-popup .glass-card {
    border-radius: 24px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .glass-card:hover {
        transform: none;
    }

    h1 {
        letter-spacing: 0.05em !important;
    }

    #contacto .glass-card {
        padding: 2rem !important;
    }

    .arg-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

/* --- Reduce motion para usuarios que lo prefieren --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-section {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* --- SCROLLBAR PERSONALIZADO --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) var(--black);
}

/* --- FOOTER SOCIAL ICONS --- */
.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.05);
    transition: all 0.4s var(--transition-smooth);
}

.footer-social-link:hover {
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    transform: translateY(-3px);
}

.footer-social-link:active {
    transform: translateY(-1px);
}

/* --- SELECCIÓN DE TEXTO --- */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: var(--cream);
}