:root {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;

    --bg-color: #fafafa;
    --text-color: #111;
    --accent-color: #000;
    --spacing-unit: 2rem;
    --gradient-bg: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

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

body {
    background: var(--gradient-bg);
    color: var(--text-color);
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Typography */
h1 {
    font-size: clamp(3.5rem, 12vw, 9rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.85;
    margin-bottom: var(--spacing-unit);
    background: -webkit-linear-gradient(45deg, #000, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

p.lead {
    font-size: 1.5rem;
    max-width: 800px;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Layout */
section {
    padding: 4rem 2rem;
    min-height: auto;
    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: 2rem;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    color: white;
    transition: all 0.3s ease;
}

nav.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    /* Slight shrink for effect */
}

.logo {
    font-weight: 700;
    letter-spacing: -0.05em;
    font-size: 1.2rem;
}

.nav-links a {
    margin-left: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* Hero */
#hero {
    height: 100vh;
    padding-top: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/header-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

#hero h1 {
    background: none;
    -webkit-text-fill-color: initial;
    color: white;
}

#hero .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4px;
}

.gallery-item {
    aspect-ratio: 3/4;
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    /* Hidden until loaded */
}

.gallery-item.loaded img {
    opacity: 1;
}

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

.gallery-item {
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

/* Contact */
.contact-links {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--text-color);
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Footer */
footer {
    padding: 4rem 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

/* Placeholders for missing images */
.placeholder-rect {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #aaa;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Corrección para iPhone/Móviles */
@media (max-width: 820px) {
    #hero {
        background-attachment: scroll; /* La imagen se mueve con el texto, evita el zoom excesivo */
        height: 100svh; /* Mejora: usa la altura real de la pantalla móvil (sin la barra de navegación) */
    }
}
