/* =========================================
   ESPAÑA VIVA - DESIGN SYSTEM
   Luxury Travel & Cultural Experiences
========================================= */

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

:root {
    /* Color Palette */
    --c-cream: #FDFBF7;
    --c-sand: #E6D5B8;
    --c-terracotta: #C85A32;
    --c-olive: #556B2F;
    --c-sea: #1F3C59;
    --c-midnight: #1A222B;
    --c-text: #2C3539;
    --c-text-light: #5A6369;
    --c-white: #FFFFFF;
    
    /* Typography */
    --f-serif: 'Marcellus', serif;
    --f-sans: 'Jost', sans-serif;
    --f-accent: 'Playfair Display', serif;

    /* Spacing */
    --s-xs: 0.5rem;
    --s-sm: 1rem;
    --s-md: 2rem;
    --s-lg: 4rem;
    --s-xl: 6rem;
    --s-xxl: 10rem;
    
    /* Layout */
    --max-width: 1440px;
    --nav-height: 90px;
    
    /* Effects */
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
}

/* ================== RESET ================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
    font-family: var(--f-sans);
    color: var(--c-text);
    background-color: var(--c-cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, picture, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ================== TYPOGRAPHY ================== */
h1, h2, h3, h4, h5, h6, .f-serif { font-family: var(--f-serif); font-weight: 400; line-height: 1.2; color: var(--c-midnight); }
h1 { font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 4vw, 4rem); }
h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h4 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; color: var(--c-text-light); }
.text-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 300; line-height: 1.8; }
.text-accent { font-family: var(--f-accent); font-style: italic; color: var(--c-terracotta); }
.text-small { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; }
.section-subtitle { display: block; font-family: var(--f-sans); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--c-terracotta); margin-bottom: 1rem; }

/* ================== UTILITIES ================== */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 5vw; }
.section-pad { padding: var(--s-xxl) 0; }
.section-pad-sm { padding: var(--s-xl) 0; }
.text-center { text-align: center; }
.bg-dark { background-color: var(--c-midnight); color: var(--c-cream); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark p { color: var(--c-cream); }
.bg-dark .text-lead, .bg-dark p { opacity: 0.8; }

/* ================== COMPONENTS ================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.1); transform: translateY(100%); transition: var(--transition); z-index: -1; }
.btn:hover::before { transform: translateY(0); }
.btn-primary { background-color: var(--c-midnight); color: var(--c-white); }
.btn-outline { border: 1px solid var(--c-midnight); color: var(--c-midnight); }
.btn-outline:hover { background-color: var(--c-midnight); color: var(--c-white); }
.btn-outline-light { border: 1px solid var(--c-white); color: var(--c-white); }
.btn-outline-light:hover { background-color: var(--c-white); color: var(--c-midnight); }
.btn-link { padding: 0; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ================== HEADER ================== */
.site-header { position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height); z-index: 1000; transition: var(--transition); display: flex; align-items: center; }
.site-header.scrolled { background-color: rgba(253, 251, 247, 0.95); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); height: 70px; }
.site-header.scrolled-dark { background-color: rgba(26, 34, 43, 0.95); }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-family: var(--f-serif); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.1em; color: var(--c-white); transition: var(--transition); }
.site-header.scrolled .logo { color: var(--c-midnight); }
.site-header.scrolled-dark .logo { color: var(--c-white); }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: var(--c-white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; transition: var(--transition); }
.site-header.scrolled .nav-links a { color: var(--c-midnight); }
.site-header.scrolled-dark .nav-links a { color: var(--c-white); }
.nav-links a:hover { color: var(--c-terracotta); }

.menu-toggle { display: none; width: 30px; height: 20px; position: relative; z-index: 1001; cursor: pointer; }
.menu-toggle span { display: block; position: absolute; height: 2px; width: 100%; background: var(--c-white); transition: var(--transition); }
.site-header.scrolled .menu-toggle span { background: var(--c-midnight); }
.site-header.scrolled-dark .menu-toggle span { background: var(--c-white); }
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* Mobile Menu Active State */
body.menu-open { overflow: hidden; }
.menu-open .menu-toggle span:nth-child(1) { top: 9px; transform: rotate(45deg); background: var(--c-midnight) !important; }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { top: 9px; transform: rotate(-45deg); background: var(--c-midnight) !important; }
.menu-open .logo { color: var(--c-midnight) !important; position: relative; z-index: 1001; }

.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--c-cream); z-index: 1000; padding: 120px 5vw 40px; transform: translateY(-100%); transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1); display: flex; flex-direction: column; overflow-y: auto; }
.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 3rem; }
.mobile-menu ul a { font-family: var(--f-serif); font-size: 2.5rem; color: var(--c-midnight); display: block; opacity: 0; transform: translateY(20px); transition: all 0.4s ease; }
.menu-open .mobile-menu ul a { opacity: 1; transform: translateY(0); }
.menu-open .mobile-menu ul li:nth-child(1) a { transition-delay: 0.2s; }
.menu-open .mobile-menu ul li:nth-child(2) a { transition-delay: 0.3s; }
.menu-open .mobile-menu ul li:nth-child(3) a { transition-delay: 0.4s; }
.menu-open .mobile-menu ul li:nth-child(4) a { transition-delay: 0.5s; }
.menu-open .mobile-menu ul li:nth-child(5) a { transition-delay: 0.6s; }
.menu-open .mobile-menu ul li:nth-child(6) a { transition-delay: 0.7s; }
.menu-open .mobile-menu ul li:nth-child(7) a { transition-delay: 0.8s; }

/* ================== HERO SECTIONS ================== */
.hero { height: 100vh; min-height: 600px; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--c-white); padding-top: var(--nav-height); }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; animation: slowZoom 20s infinite alternate; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%); z-index: -1; }
.hero-content { max-width: 900px; padding: 0 5vw; opacity: 0; transform: translateY(30px); animation: fadeUp 1s 0.5s forwards; }
.hero-subtitle { font-family: var(--f-sans); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.3em; margin-bottom: 1.5rem; display: block; }
.hero h1 { margin-bottom: 1.5rem; text-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.hero p { font-size: clamp(1.1rem, 2vw, 1.4rem); opacity: 0.9; margin-bottom: 2.5rem; max-width: 700px; margin-inline: auto; color: var(--c-white); }
.hero-split { height: auto; min-height: 80vh; text-align: left; justify-content: flex-start; padding: var(--s-xxl) 0; }
.hero-split .hero-content { margin-left: 0; max-width: 600px; }

/* ================== EDITORIAL LAYOUTS ================== */
.editorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); align-items: center; }
.editorial-grid.reverse .ed-content { grid-column: 2; grid-row: 1; }
.editorial-grid.reverse .ed-image { grid-column: 1; grid-row: 1; }
.ed-image { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-md); }
.ed-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.ed-image:hover img { transform: scale(1.05); }
.ed-content { padding: 2rem; }
.ed-content h2 { margin-bottom: 1.5rem; }
.ed-content p { margin-bottom: 2rem; }

/* ================== ASYMMETRIC GALLERY ================== */
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin: var(--s-xl) 0; }
.gal-item { overflow: hidden; border-radius: 4px; position: relative; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.gal-item:hover img { transform: scale(1.08); }
.gal-1 { grid-column: 1 / 8; aspect-ratio: 16/9; }
.gal-2 { grid-column: 8 / 13; aspect-ratio: 4/5; }
.gal-3 { grid-column: 1 / 5; aspect-ratio: 1/1; }
.gal-4 { grid-column: 5 / 13; aspect-ratio: 21/9; }

/* ================== CARDS GRID ================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s-lg); }
.travel-card { background: var(--c-white); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; height: 100%; }
.travel-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }
.tc-image { height: 300px; overflow: hidden; position: relative; }
.tc-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.travel-card:hover .tc-image img { transform: scale(1.05); }
.tc-tag { position: absolute; top: 1rem; left: 1rem; background: var(--c-midnight); color: var(--c-white); padding: 0.4rem 1rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 2px; }
.tc-content { padding: 2.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.tc-content h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.tc-content p { margin-bottom: 2rem; flex-grow: 1; }
.tc-footer { border-top: 1px solid rgba(0,0,0,0.05); padding-top: 1.5rem; margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

/* ================== STORY QUOTE ================== */
.story-quote { text-align: center; max-width: 800px; margin: 0 auto; padding: var(--s-lg) 0; }
.story-quote blockquote { font-family: var(--f-serif); font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.4; color: var(--c-midnight); margin-bottom: 2rem; position: relative; }
.story-quote blockquote::before { content: "“"; font-family: var(--f-serif); font-size: 6rem; color: var(--c-sand); position: absolute; top: -3rem; left: 50%; transform: translateX(-50%); opacity: 0.3; z-index: -1; }
.quote-author { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-terracotta); font-weight: 500; }

/* ================== FOOTER ================== */
.site-footer { background-color: var(--c-midnight); color: var(--c-cream); padding: var(--s-xl) 0 var(--s-sm); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: var(--s-md); margin-bottom: var(--s-lg); }
.footer-brand .logo { font-size: 2rem; margin-bottom: 1rem; display: inline-block; color: var(--c-cream); }
.footer-brand p { color: rgba(253, 251, 247, 0.7); max-width: 300px; }
.footer-title { font-family: var(--f-sans); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1.5rem; color: var(--c-sand); font-weight: 500; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: rgba(253, 251, 247, 0.7); transition: var(--transition); }
.footer-links a:hover { color: var(--c-white); padding-left: 5px; }
.newsletter-form { display: flex; flex-direction: column; gap: 1rem; }
.newsletter-form input { padding: 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--c-white); font-family: var(--f-sans); outline: none; }
.newsletter-form input:focus { border-color: var(--c-sand); }
.newsletter-form button { background: var(--c-sand); color: var(--c-midnight); padding: 1rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; transition: var(--transition); }
.newsletter-form button:hover { background: var(--c-white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--s-sm); display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: rgba(253, 251, 247, 0.5); }

/* ================== ANIMATIONS ================== */
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Reveal on Scroll class */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ================== RESPONSIVE ================== */
@media (max-width: 1024px) {
    .editorial-grid { grid-template-columns: 1fr; gap: var(--s-md); }
    .editorial-grid.reverse .ed-content { grid-column: 1; grid-row: 2; }
    .editorial-grid.reverse .ed-image { grid-column: 1; grid-row: 1; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    :root {
        --s-xxl: 6rem;
        --s-xl: 4rem;
        --s-lg: 3rem;
        --s-md: 2rem;
    }
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .gallery-grid { display: flex; flex-direction: column; }
    .footer-top { grid-template-columns: 1fr; gap: var(--s-md); }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .cards-grid { grid-template-columns: 1fr; }
}
