/* --- Diseño Moderno, Pastel, y Realista --- */
:root {
    /* Paleta de Colores Pastel Morado-Violeta (Oscuro) */
    --bg-color-main: #1c1033;
    /* Darker, hypnotic violet base */
    --bg-color-secondary: #2b1c4e;
    /* Slightly lighter for contrast */
    --text-primary: #eaddf5;
    /* Light pastel text */
    --text-secondary: #b3a0cf;

    /* Vibrant Accents */
    --neon-blue: #00e0ff;
    --neon-purple: #c026d3;
    --neon-gold: #fbbf24;

    /* Hourglass Colors */
    --hourglass-glass: rgba(255, 255, 255, 0.2);
    --hourglass-border: rgba(192, 38, 211, 0.4);

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #818cf8, #c026d3, #f472b6);
    --gradient-wing: linear-gradient(45deg, #ff7eb3, #bf55ec, #00b4d8);

    /* Tipografía */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    /* Glassmorphism */
    --glass-bg: rgba(30, 20, 50, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur-strength: blur(20px);
}

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    scroll-behavior: smooth;

    /* Cursor personalizado (Opcional, manejado mayormente por JS) */
    cursor: none;
}

/* --- Typografía --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(3.5rem, 8vw, 6.5rem) !important;
    text-shadow: 0 10px 30px rgba(192, 38, 211, 0.15);
}

.neon-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(192, 38, 211, 0.2);
    font-style: italic;
    /* Adds hypnotic elegance to the serif font */
}

/* --- Utilidades --- */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 243, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(188, 19, 254, 0.5);
}

.cta-button.outline {
    background: transparent;
    border: 2px solid var(--neon-blue);
    box-shadow: none;
}

.cta-button.outline:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* --- Cursor Custom (JavaScript Update) --- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--neon-gold);
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out, width 0.2s, height 0.2s;
}

/* Hide cursor on touch devices */
@media (hover: none),
(max-width: 1024px) {
    .cursor {
        display: none !important;
    }

    body {
        cursor: auto;
    }
}

/* --- Estilos Base de Secciones --- */
section {
    min-height: 100vh;
    padding: 6rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* --- Navigation Bar --- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(28, 16, 51, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-links {
        gap: 1.2rem;
    }

    .nav-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .glass-nav {
        padding: 0.8rem 0;
    }
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--neon-purple);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--text-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(157, 78, 221, 0.2);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    text-align: left;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 560px;
    z-index: 10;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1.5rem;
    z-index: 10;
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 520px;
    line-height: 1.7;
    z-index: 10;
    position: relative;
}

/* Contenedores de Animación Relativa */
.clock-container,
.butterflies-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 1;
}

/* Philosophy Section */
.philosophy {
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(192, 38, 211, 0.05), transparent);
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 10;
}

.philosophy-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.philosophy-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.spacer {
    height: 6rem;
}

/* Services Section */
.services {
    background: radial-gradient(circle at center, rgba(192, 38, 211, 0.05) 0%, transparent 70%);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    z-index: 10;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur-strength);
    -webkit-backdrop-filter: var(--blur-strength);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: left;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--neon-blue);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Subpage Headers --- */
.page-header {
    padding: 10rem 2rem 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top, rgba(192, 38, 211, 0.1) 0%, transparent 70%);
}

/* --- Portfolio Gallery (Subpage) --- */
.portfolio-gallery {
    padding: 2rem 2rem 6rem;
    position: relative;
    z-index: 10;
}

.portfolio-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: var(--blur-strength);
    -webkit-backdrop-filter: var(--blur-strength);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.gallery-media {
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Simulated media backgrounds for the demo */
.video-placeholder {
    background: linear-gradient(135deg, #1c1033, #3a225ebd);
}

.img-placeholder-1 {
    background: linear-gradient(45deg, #9d4edd, #ff7eb3);
}

.img-placeholder-2 {
    background: linear-gradient(to bottom right, #00e0ff, #3a225e);
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-card:hover .play-btn {
    transform: scale(1.1);
    background: var(--gradient-primary);
}

.gallery-info {
    padding: 2rem;
}

.g-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--neon-blue);
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.gallery-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.gallery-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.gallery-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(192, 38, 211, 0.3);
}

/* Make odd items stagger slightly down for a masonry feel */
.portfolio-grid-large .gallery-card:nth-child(even) {
    transform: translateY(30px);
}

.portfolio-grid-large .gallery-card:nth-child(even):hover {
    transform: translateY(20px);
}

/* --- Minilanding Modal System --- */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.4s, opacity 0.4s ease;
}

.project-modal.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0s;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 20, 0.85);
    /* Very dark backdrop */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: linear-gradient(145deg, rgba(28, 16, 51, 0.95), rgba(43, 28, 78, 0.95));
    border: 1px solid var(--neon-purple);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(192, 38, 211, 0.2);
    overflow: hidden;
    /* Contains the scrollable body */
    z-index: 10;
    transform: translateY(50px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 30;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.close-modal:hover {
    background: var(--gradient-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
    /* Custom Scrollbar for Modal */
    scrollbar-width: thin;
    scrollbar-color: var(--neon-purple) rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--neon-purple);
    border-radius: 10px;
}

/* Modal Internal Layout */
.ml-header {
    padding: 3rem 3rem 2rem 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ml-category {
    color: var(--neon-gold);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ml-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: white;
    margin: 0.5rem 0 1rem 0;
}

.ml-media-container {
    width: 100%;
    margin: 0;
    background: #000;
    /* Dark background for videos/images */
    position: relative;
}

/* YouTube Embed */
.ml-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.ml-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Image Carousel placeholder styles */
.ml-carousel {
    width: 100%;
    height: 500px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.ml-carousel::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for carousel */
}

.ml-carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.ml-details {
    padding: 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.ml-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.ml-stats {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
}

.ml-stats h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ml-stats ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ml-stats li {
    color: var(--neon-blue);
    margin-bottom: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ml-stats li span {
    color: var(--text-secondary);
    font-weight: 400;
}

@media (max-width: 768px) {
    .ml-details {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .ml-header {
        padding: 2rem;
    }

    .ml-title {
        font-size: 1.8rem;
    }

    .ml-carousel {
        height: 300px;
    }
}

/* --- Interactive Time Services Section (Subpage) --- */
.time-services {
    padding: 2rem 2rem 8rem;
    position: relative;
    z-index: 10;
}

.clocks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .clocks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .clocks-grid {
        grid-template-columns: 1fr;
    }
}

.clock-package {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 1.8rem;
    text-align: center;
    backdrop-filter: var(--blur-strength);
    -webkit-backdrop-filter: var(--blur-strength);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 480px;
    justify-content: flex-start;
}

.clock-package:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(192, 38, 211, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.clock-package.popular {
    transform: scale(1.05);
    background: linear-gradient(145deg, rgba(30, 20, 50, 0.85), rgba(43, 28, 78, 0.85));
    border: 1px solid var(--neon-purple);
    z-index: 2;
}

.clock-package.popular:hover {
    transform: scale(1.05) translateY(-15px);
}

.clock-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(192, 38, 211, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.package-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.relative-z1 {
    z-index: 1;
    position: relative;
}

/* Visual Containers */
.clock-visual {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* 1. Hourglass Abstract */
.hourglass-visual {
    flex-direction: column;
    gap: 2px;
}

.glass-top,
.glass-bottom {
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-blue);
    position: relative;
    overflow: hidden;
}

.glass-top {
    border-radius: 5px 5px 30px 30px;
    border-bottom: none;
}

.glass-bottom {
    border-radius: 30px 30px 5px 5px;
    border-top: none;
}

.sand {
    width: 100%;
    height: 100%;
    background: var(--neon-blue);
    transform-origin: bottom;
}

.sand-pile {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--neon-blue);
}

.clock-package:hover .sand {
    animation: drainSand 3s forwards;
}

.clock-package:hover .sand-pile {
    animation: fillSand 3s forwards;
}

@keyframes drainSand {
    100% {
        transform: scaleY(0);
    }
}

@keyframes fillSand {
    100% {
        height: 100%;
    }
}

/* 2. Pocket Watch */
.pocket-watch-visual {
    perspective: 1000px;
}

.pw-case {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--neon-gold);
    box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.3), 0 0 30px rgba(251, 191, 36, 0.2);
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clock-package.popular:hover .pw-case {
    transform: rotateY(180deg) scale(1.1);
}

.pw-crown {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 12px;
    background: var(--neon-gold);
    border-radius: 3px 3px 0 0;
}

.pw-ring {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--neon-gold);
    border-radius: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.pw-face {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 1px dotted rgba(255, 255, 255, 0.2);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: white;
    border-radius: 4px;
    transform: translateX(-50%);
}

.hour-hand {
    width: 4px;
    height: 25px;
    transform: translateX(-50%) rotate(45deg);
}

.minute-hand {
    width: 3px;
    height: 35px;
    transform: translateX(-50%) rotate(120deg);
}

.second-hand {
    width: 1px;
    height: 40px;
    background: var(--neon-purple);
    display: block;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--neon-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.clock-package.popular:hover .second-hand {
    animation: tickFast 1s steps(10) infinite;
}

@keyframes tickFast {
    100% {
        transform: translateX(-50%) rotate(480deg);
    }
}

/* 3. Digital Glitch */
.digital-visual {
    background: #000;
    border: 2px solid #222;
    border-radius: 10px;
    width: 140px;
    height: 60px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.digi-display {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glitch-time {
    font-family: monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-purple);
    text-shadow: 0 0 10px var(--neon-purple);
    position: relative;
    letter-spacing: 2px;
}

.clock-package:hover .glitch-time {
    animation: glitchTwitch 0.2s infinite;
}

.clock-package:hover .glitch-time::before,
.clock-package:hover .glitch-time::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

.clock-package:hover .glitch-time::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation: glitchTop 0.4s infinite linear alternate-reverse;
}

.clock-package:hover .glitch-time::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    animation: glitchBottom 0.6s infinite linear alternate-reverse;
}

@keyframes glitchTwitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 1px);
    }

    40% {
        transform: translate(2px, -1px);
    }

    60% {
        transform: translate(-1px, 2px);
    }

    80% {
        transform: translate(1px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Package Text Info */
.clock-package h3 {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.badge {
    font-size: 0.75rem;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge.local {
    background: rgba(0, 224, 255, 0.1);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 224, 255, 0.3);
}

.badge.elite {
    background: rgba(192, 38, 211, 0.1);
    color: var(--neon-purple);
    border: 1px solid rgba(192, 38, 211, 0.3);
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 4px;
}

.price span {
    color: var(--neon-blue);
    font-size: 1.8rem;
}

.clock-package.popular .price span {
    color: var(--neon-gold);
}

.popular-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(192, 38, 211, 0.9);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(192, 38, 211, 0.4);
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulseGlow 2s infinite alternate;
}

@media (max-width: 768px) {
    .popular-tag {
        animation: none;
        box-shadow: 0 5px 10px rgba(192, 38, 211, 0.3);
    }

    .clock-glow {
        display: none;
    }

    .clock-package {
        min-height: auto;
        padding: 2rem 1.5rem;
    }
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 5px rgba(192, 38, 211, 0.4);
    }

    to {
        box-shadow: 0 0 20px rgba(192, 38, 211, 0.6);
    }
}

.clock-package p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    min-height: 40px;
    display: block;
}

.clock-package ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
    flex-grow: 1;
}

.clock-package ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}

.clock-package ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: bold;
}

.clock-package.popular ul li::before {
    color: var(--neon-gold);
}

.clock-package .cta-button {
    width: 100%;
    margin-top: auto;
}

.cta-button.outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.clock-package:hover .cta-button.outline {
    border-color: var(--neon-blue);
    background: rgba(0, 224, 255, 0.1);
}

.clock-package:last-child:hover .cta-button.outline {
    border-color: var(--neon-purple);
    background: rgba(192, 38, 211, 0.1);
}

/* --- Stopwatch Visual --- */
.stopwatch-visual {
    perspective: 600px;
}

.sw-body {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--neon-blue);
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 15px rgba(0, 224, 255, 0.2), 0 0 20px rgba(0, 224, 255, 0.15);
}

.sw-face {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px dotted rgba(255, 255, 255, 0.15);
}

.sw-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 30px;
    background: var(--neon-blue);
    transform-origin: bottom center;
    transform: translateX(-50%);
    border-radius: 2px;
}

.sw-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--neon-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.sw-button {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 12px;
    height: 8px;
    background: var(--neon-blue);
    border-radius: 3px 3px 0 0;
    transform: translateX(-50%);
}

.clock-package:hover .sw-hand {
    animation: spinHand 1s linear infinite;
}

@keyframes spinHand {
    100% {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* --- Sundial Visual --- */
.sundial-visual {
    flex-direction: column;
    gap: 0;
}

.sd-base {
    width: 100px;
    height: 50px;
    background: linear-gradient(to top, rgba(251, 191, 36, 0.3), transparent);
    border-radius: 50% 50% 0 0;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-bottom: none;
    position: relative;
}

.sd-gnomon {
    width: 3px;
    height: 45px;
    background: var(--neon-gold);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-30deg);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
    z-index: 2;
}

.sd-shadow {
    width: 40px;
    height: 2px;
    background: rgba(251, 191, 36, 0.3);
    position: absolute;
    bottom: 0;
    left: 55%;
    transform-origin: left center;
    border-radius: 2px;
    transition: transform 0.5s ease;
}

.clock-package:hover .sd-gnomon {
    animation: gnomonSwing 3s ease-in-out infinite alternate;
}

@keyframes gnomonSwing {
    0% {
        transform: translateX(-50%) rotate(-30deg);
    }

    100% {
        transform: translateX(-50%) rotate(30deg);
    }
}

/* --- Flip Clock Visual --- */
.flip-clock-visual {
    gap: 5px;
}

.flip-digit {
    width: 40px;
    height: 55px;
    background: #111;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.6);
}

.flip-digit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.8);
}

.flip-digit span {
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.clock-package:hover .flip-digit {
    animation: flipBounce 0.4s ease;
}

@keyframes flipBounce {
    0% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }

    100% {
        transform: scaleY(1);
    }
}

/* --- Nixie Tube Visual --- */
.nixie-visual {
    gap: 8px;
}

.nixie-tube {
    width: 45px;
    height: 65px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(192, 38, 211, 0.3);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 15px rgba(192, 38, 211, 0.1);
    position: relative;
}

.nixie-tube::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(192, 38, 211, 0.15);
    border-radius: 5px;
}

.nixie-char {
    font-family: monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-purple);
    text-shadow: 0 0 15px var(--neon-purple), 0 0 30px rgba(192, 38, 211, 0.4);
}

.clock-package:hover .nixie-char {
    animation: nixieFlicker 0.15s infinite;
}

@keyframes nixieFlicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* --- Radar Visual --- */
.radar-visual {
    position: relative;
}

.radar-ring {
    width: 90px;
    height: 90px;
    border: 1px solid rgba(0, 224, 255, 0.2);
    border-radius: 50%;
    position: absolute;
}

.radar-ring.r2 {
    width: 55px;
    height: 55px;
}

.radar-sweep {
    width: 45px;
    height: 2px;
    background: linear-gradient(to right, var(--neon-blue), transparent);
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: left center;
    border-radius: 2px;
}

.radar-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-blue);
    border-radius: 50%;
    position: absolute;
    top: 25%;
    right: 30%;
    box-shadow: 0 0 8px var(--neon-blue);
    opacity: 0;
}

.clock-package:hover .radar-sweep {
    animation: radarSweep 2s linear infinite;
}

.clock-package:hover .radar-dot {
    animation: radarBlink 2s ease infinite;
}

@keyframes radarSweep {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes radarBlink {

    0%,
    30% {
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    70% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

/* --- About / Creator Section --- */
.about {
    background-color: var(--bg-color-main);
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    z-index: 10;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.about-image-container {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Creator Photo & Creative Effects */
.creator-photo-wrapper {
    position: relative;
    width: clamp(250px, 80vw, 320px);
    height: clamp(300px, 100vw, 400px);
    margin: 0 auto;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: organic-morph 8s ease-in-out infinite alternate;
    z-index: 2;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.creator-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.5s ease;
    filter: contrast(1.1) saturate(1.2);
}

.photo-frame-effect {
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.8;
    filter: blur(15px);
    transition: all 0.5s ease;
    animation: pulse-glow 3s infinite alternate;
}

.creator-photo-wrapper:hover .creator-photo {
    transform: scale(1.05);
    filter: contrast(1.15) saturate(1.4) brightness(1.1);
}

.creator-photo-wrapper:hover .photo-frame-effect {
    inset: -12px;
    filter: blur(25px);
    opacity: 1;
}

@keyframes organic-morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

@keyframes pulse-glow {
    0% {
        opacity: 0.6;
        filter: blur(15px);
    }

    100% {
        opacity: 0.9;
        filter: blur(20px);
    }
}

.glow-orb {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--neon-purple);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 1;
    animation: floatOrb 6s ease-in-out infinite alternate;
}

@keyframes floatOrb {
    0% {
        transform: translateY(-20px) scale(0.9);
    }

    100% {
        transform: translateY(20px) scale(1.1);
    }
}

.about-text h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Contact / CTA */
.contact {
    text-align: center;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 243, 255, 0.05), transparent);
}

.contact-content h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1rem;
}

.contact-content p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ── Hourglass & Maripositas ── */
.hourglass-wrapper {
    flex-shrink: 0;
    position: relative;
    width: clamp(180px, 25vw, 280px);
    height: clamp(300px, 42vw, 480px);
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(192, 38, 211, 0.25));
}

.hourglass-svg {
    width: 100%;
    height: 100%;
}

.sand-butterflies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(10% 2%, 90% 2%, 90% 10%, 55% 48%, 55% 52%, 90% 90%, 90% 98%, 10% 98%, 10% 90%, 45% 52%, 45% 48%, 10% 10%);
}

.tiny-butterfly {
    position: absolute;
    width: clamp(10px, 2vw, 20px);
    height: clamp(10px, 2vw, 20px);
    /* Butterfly SVG mask */
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 12.5c-1.4-3-5.3-7.7-10.4-4.3 0 0-2.3 5.4.8 8.1 2.5 2.2 7.8.6 8.8-1.4 1-2.2-1.6-.6-1.9.4-.3 1.1 2 1.5 2.8.5v-3.3zm0 0c1.4-3 5.3-7.7 10.4-4.3 0 0 2.3 5.4-.8 8.1-2.5 2.2-7.8.6-8.8-1.4-1-2.2 1.6-.6 1.9.4.3 1.1-2 1.5-2.8.5v-3.3z"/></svg>') center/contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 12.5c-1.4-3-5.3-7.7-10.4-4.3 0 0-2.3 5.4.8 8.1 2.5 2.2 7.8.6 8.8-1.4 1-2.2-1.6-.6-1.9.4-.3 1.1 2 1.5 2.8.5v-3.3z"/></svg>') center/contain no-repeat;
    background-color: var(--neon-purple);
    /* Default, overridden in JS */
    transform-origin: center center;
    will-change: transform, left, top, opacity;
}

/* --- Global Swarm Butterflies --- */
#global-butterflies-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.global-butterfly {
    position: absolute;
    width: clamp(40px, 10vw, 80px);
    height: clamp(30px, 8vw, 60px);
    pointer-events: none;
    transform-style: preserve-3d;
    will-change: transform, left, top;
}

.real-butterfly-svg {
    filter: drop-shadow(0 10px 15px rgba(192, 38, 211, 0.4));
}

.b-wing.b-left {
    animation: b-flap-left 0.1s infinite alternate ease-in-out;
}

.b-wing.b-right {
    animation: b-flap-right 0.1s infinite alternate ease-in-out;
}

@keyframes b-flap-left {
    0% {
        transform: rotateY(0deg) scaleX(1);
    }

    100% {
        transform: rotateY(70deg) scaleX(0.7);
    }
}

@keyframes b-flap-right {
    0% {
        transform: rotateY(0deg) scaleX(1);
    }

    100% {
        transform: rotateY(-70deg) scaleX(0.7);
    }
}

/* =========================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================= */

/* GPU-composited properties to avoid repaints on animated elements */
.hourglass-wrapper,
.global-butterfly,
.creator-photo-wrapper,
.glow-orb,
.clock-package {
    will-change: transform;
}

/* Reduce backdrop-filter cost on low-spec devices */
@media (max-width: 600px) {

    .glass-nav,
    .service-card,
    .clock-package,
    .gallery-card,
    .modal-content {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    /* Disable expensive glow animations on mobile */
    .glow-orb {
        animation: none;
        opacity: 0.25;
        filter: blur(50px);
    }

    .photo-frame-effect {
        animation: none;
    }

    .creator-photo-wrapper {
        animation: none;
        border-radius: 20px;
    }
}

/* =========================================================
   ACCESSIBILITY: RESPECTS prefers-reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .creator-photo-wrapper,
    .glow-orb,
    .photo-frame-effect,
    .popular-tag,
    .b-wing {
        animation: none !important;
    }

    /* Ensure text is still readable without animations */
    .hero-title,
    .hero-subtitle,
    .cta-button {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =========================================================
   ABOUT section on index.html (same styles as services/portfolio variant)
   ========================================================= */
#about.about {
    background: linear-gradient(to bottom, transparent, rgba(43, 28, 78, 0.3), transparent);
}

@media (max-width: 900px) {
    .about-image-container {
        height: 350px;
    }
}