/* ========================================
   SHARED CSS — raulcapote.es
   Base tokens, reset, typography, and 
   reusable components shared across
   Actor and Filmmaker pages.
   ======================================== */

/* Google Fonts loaded via <link> in HTML — do not re-import here */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Dark Cinematic Palette - Awwwards Quality */
    --bg-color: #050300;
    --bg-warm: #0a0705;
    --text-color: #EAEAEA;
    --gold-bright: #C6A664;
    --gold-light: #F5D77A;
    --gold-dark: #8B6914;
    --gold-glow: rgba(198, 166, 100, 0.4);
    --spotlight-gold: rgba(180, 140, 50, 0.25);
    --card-bg: #141414;
    --accent-glow: rgba(255, 215, 100, 0.15);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-ui: 'Montserrat', var(--font-main);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* ===== UTILITY ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== SHARED ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-wrapper {
    transform: scale(1);
}

.modal-content {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-modal:hover {
    opacity: 1;
}

.close-modal-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.close-modal-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.05);
}

/* ===== SHARED FOOTER ===== */
.footer-section {
    padding: 8rem 2rem 4rem;
    background: linear-gradient(to top, #050505, transparent);
    text-align: center;
    position: relative;
    margin-top: 4rem;
}

.footer-cta {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 2rem;
    color: #fff;
    line-height: 1.1;
    opacity: 0.9;
}

.footer-email {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: #888;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    transition: all 0.3s ease;
    font-weight: 300;
}

.footer-email:hover {
    color: #fff;
    border-color: #fff;
}

.footer-socials {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-btn {
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    background: rgba(255, 255, 255, 0.02);
}

.social-btn:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.copyright {
    margin-top: 4rem;
    color: #444;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== SHARED CARD GRID ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    aspect-ratio: 16/9;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.4;
    filter: grayscale(100%);
}

.card:nth-child(1) .card-bg { background-image: linear-gradient(45deg, #222, #333); }
.card:nth-child(2) .card-bg { background-image: linear-gradient(135deg, #1a1a1a, #2a2a2a); }
.card:nth-child(3) .card-bg { background-image: linear-gradient(225deg, #222, #333); }
.card:nth-child(4) .card-bg { background-image: linear-gradient(315deg, #1a1a1a, #2a2a2a); }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), var(--accent-glow), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.card:hover .card-bg {
    transform: scale(1.1);
    opacity: 0.6;
    filter: grayscale(0%);
}

.card:hover::before {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 3;
    text-align: center;
    pointer-events: none;
}

.card-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ===== CTA BUTTON — Glass Gold Ingot ===== */
.cta-btn {
    display: inline-block;
    padding: 1.1rem 3rem;
    background: linear-gradient(145deg,
            rgba(212, 175, 55, 0.15) 0%,
            rgba(180, 140, 40, 0.08) 50%,
            rgba(139, 105, 20, 0.12) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.6);
    border-radius: 8px;
    color: #f5d77a;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 1.5s ease 0.8s forwards, goldBreathing 3s ease-in-out 2.5s infinite;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 20px rgba(212, 175, 55, 0.2),
        0 0 40px rgba(180, 140, 40, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

@keyframes goldBreathing {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(212, 175, 55, 0.2),
            0 0 40px rgba(180, 140, 40, 0.1),
            inset 0 1px 1px rgba(255, 255, 255, 0.1),
            inset 0 -1px 1px rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(212, 175, 55, 0.35),
            0 0 60px rgba(180, 140, 40, 0.2),
            0 0 80px rgba(139, 105, 20, 0.1),
            inset 0 1px 2px rgba(255, 255, 255, 0.15),
            inset 0 -1px 1px rgba(0, 0, 0, 0.2);
        transform: scale(1.02);
    }
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25), transparent);
    animation: goldShimmer 4s ease-in-out 3s infinite;
}

@keyframes goldShimmer {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.cta-btn:hover {
    background: linear-gradient(145deg,
            rgba(212, 175, 55, 0.25) 0%,
            rgba(180, 140, 40, 0.15) 100%);
    border-color: rgba(245, 215, 122, 0.9);
    color: #fff;
    opacity: 1 !important;
    box-shadow:
        0 0 40px rgba(212, 175, 55, 0.4),
        0 0 80px rgba(180, 140, 40, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
    animation: none;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.cta-btn:hover::before { left: 100%; }
.cta-btn:hover::after { animation: none; opacity: 0; }

/* ===== LANGUAGE TOGGLE ===== */
#lang-toggle {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 10010;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
    mix-blend-mode: difference;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

#lang-toggle:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#lang-toggle svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
    transition: all 0.5s ease;
}

#lang-toggle:hover svg {
    opacity: 1;
    transform: rotate(180deg);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

#lang-toggle span { transition: all 0.5s ease; }

#lang-toggle span.active {
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    font-weight: 700;
}

/* ===== WIP BADGE ===== */
.wip-badge {
    position: fixed;
    top: 25px;
    left: 30px;
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(10, 10, 10, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    font-family: var(--font-main);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.15em;
    font-weight: 500;
    transition: all 0.4s ease;
    cursor: default;
    user-select: none;
}

.wip-badge:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(20, 20, 20, 0.6);
    transform: translateY(1px);
}

.wip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wip-pulse {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #ff3333;
    border-radius: 50%;
    top: -2px;
    right: -2px;
    z-index: 2;
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* ===== ROTATE DEVICE HINTS ===== */
.rotate-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10015;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.rotate-hint .phone-icon {
    width: 40px;
    height: 64px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    position: relative;
    animation: rotatePhoneModal 2.5s infinite ease-in-out;
}

.rotate-hint .phone-icon::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
}

.rotate-hint p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    opacity: 0;
    animation: fadeInOutModal 2.5s infinite ease-in-out;
}

@keyframes rotatePhoneModal {
    0% { transform: rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: rotate(-90deg); opacity: 1; }
    80% { opacity: 0; }
    100% { transform: rotate(-90deg); opacity: 0; }
}

@keyframes fadeInOutModal {
    0%, 15% { opacity: 0; }
    30%, 65% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

/* ===== SCROLL HINT INDICATOR ===== */
.scroll-hint {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    opacity: 0;
    color: white; /* Force white text */
    animation: scrollHintIn 1.5s ease 3s forwards;
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.scroll-hint.hidden {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

.scroll-hint-text {
    font-family: var(--font-ui);
    font-size: 0.55rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.scroll-hint-arrow {
    width: 20px;
    height: 20px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollHintIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: rotate(45deg) translateY(6px);
        opacity: 1;
    }
}

/* ===== SHARED RESPONSIVE ===== */

/* Mobile footer adjustment */
@media (max-width: 600px) {
    .footer-socials {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .social-btn {
        width: 80%;
        text-align: center;
    }
}

/* Modal rotate hint - Mobile/Tablet Portrait */
@media (max-width: 1024px) and (orientation: portrait) {
    .modal-overlay.active .rotate-hint {
        display: flex;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode consistency */
@media (prefers-color-scheme: dark) {
    :root { color-scheme: dark; }
}

/* Print styles */
@media print {
    header::before, header::after,
    .particles-container, .wip-badge,
    #lang-toggle, .cta-btn {
        display: none !important;
    }
    body { background: white; color: black; }
}

/* High DPI / Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .signature-image {
        image-rendering: -webkit-optimize-contrast;
    }
}
