@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: #141414;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.accent-font {
    font-family: 'Playfair Display', serif;
}

/* --- Layout --- */

section {
    padding: 100px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* --- Navigation --- */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
}

.logo {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
}

/* Signature handled in about section */

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* --- Hero Section --- */

.hero {
    height: 100vh;
    padding: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    opacity: 0;
    pointer-events: none; /* Prevent right click save on hero */
    transform: translateY(-100%);
    transition: transform 1.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 1.5s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.hero-slide.exit {
    opacity: 0;
    transform: translateY(100%);
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s forwards 0.5s;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    margin-bottom: 20px;
    line-height: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* --- Horizontal Gallery --- */

.horizontal-scroll {
    overflow-x: auto;
    display: flex;
    gap: 30px;
    padding: 50px 0;
    scrollbar-width: none;
    /* Firefox */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.scroll-item {
    flex: 0 0 450px;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}

.scroll-item {
    position: relative;
    overflow: hidden;
}

.scroll-item::after {
    content: "ARTESANO";
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    letter-spacing: 2px;
    z-index: 5;
}

.scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.5);
    transition: var(--transition);
    user-select: none;
    -webkit-user-drag: none;
}

.scroll-item:hover img {
    filter: grayscale(0);
    transform: scale(1.05);
}

.scroll-item .caption {
    position: absolute;
    bottom: 30px;
    left: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.scroll-item:hover .caption {
    opacity: 1;
    transform: translateY(0);
}

/* --- Masonry Gallery --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 400px;
    gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--card-bg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: "ARTESANO DE LUZ";
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    letter-spacing: 1px;
    z-index: 5;
    background: rgba(0,0,0,0.2);
    padding: 3px 8px;
    border-radius: 2px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

/* --- Visitor Counter --- */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.count-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.count-number {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--accent-color);
    letter-spacing: 3px;
}

/* --- Mobile Queries --- */

/* --- About Section --- */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.about-text h2 {
    font-size: 3.5rem;
    margin-bottom: 30px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.signature {
    width: 200px;
    margin-top: 10px;
    float: right;
    opacity: 1;
}

/* Clearfix for the float */
.about-text::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Lightbox --- */

.email-link {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-bottom: 10px;
}

.email-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: var(--transition);
}

.email-link:hover {
    color: var(--accent-color);
}

.email-link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .email-link {
        font-size: 1.5rem;
    }
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* --- Custom Cursor --- */

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, opacity 0.3s ease;
    mix-blend-mode: difference;
}

/* --- Animations --- */

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.btn-artistic {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-artistic:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Contact Form --- */

.contact-form {
    max-width: 600px;
    margin: 50px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: #ffffff;
}

.contact-form textarea {
    resize: none;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition);
}

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .brand-logo {
        height: 60px; /* Smaller logo on mobile */
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: var(--transition);
        z-index: 1000;
        padding: 50px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .scroll-item {
        flex: 0 0 300px;
        height: 400px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        grid-auto-rows: auto;
    }

    .gallery-item.wide, .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}