/*
Theme Name: Robles & Co
Author: Gemini
Author URI: https://www.google.com/
Description: A replica of Jacob & Co. website.
Version: 1.1
*/

:root {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --color-accent: #c5a059; /* Gold color */
    --color-text: #ffffff;
    --color-text-dark: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --spacing-container: 120px;
}

body, html {
    margin: 0;
    padding: 0;
    /* overflow-x: hidden; breaks sticky sometimes */
    overflow-x: clip; 
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: var(--font-body);
    
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
body::-webkit-scrollbar, html::-webkit-scrollbar {
    display: none;
}

main {
    position: relative;
    width: 100%;
    overflow: visible; /* Critical for sticky */
    padding-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
}

h2 {
    font-size: 3.5rem;
    text-transform: uppercase;
}

p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* a:hover removed per user request */

/* Helper Classes */
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

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

/* Layout */
.panel {
    height: 100vh;
    width: 100%;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: var(--color-primary);
    margin-bottom: 25vh; /* Space for sticky delay before next section overlaps */
    /* Ensure stacking context for sticky */
    z-index: 1; 
}

.panel:last-of-type {
    margin-bottom: 25vh; /* Restore scroll gap for footer overlap */
}

/* Panel Content Structure */
.panel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.panel-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
    z-index: 2;
}

.panel-bg img, .panel-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.33); /* Start at 133% scale for the entrance animation */
    transform-origin: center center;
    will-change: transform; /* Optimize for performance */
    z-index: 1;
}

/* Default state: Hide mobile background */
.bg-mobile {
    display: none;
}

.panel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

#section-1 .panel-content {
    max-width: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* Increased to be above overlay */
    padding: 20px 50px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Footer */
footer {
    position: relative;
    background-color: #dcdcdc; /* Light gray/silver background */
    color: #000;
    width: 100%;
    height: 100vh; /* Full viewport height */
    margin-top: 0; /* Removed large gap per user request */
    z-index: 10; /* Higher than panel to overlap */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
}

.footer-logo {
    width: 60%;
    max-width: 600px;
    height: auto;
    display: inline-block;
    filter: brightness(0); /* Turn white logo to black */
}

.footer-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 50px;
    box-sizing: border-box;
}

/* Big Branding */
.footer-branding {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid #000;
}

.footer-branding h1 {
    font-family: var(--font-heading);
    font-size: 15vw; /* Massive responsive text */
    margin: 0;
    line-height: 0.8;
    font-weight: 400;
    color: #000;
}

/* Socials Bar */
.footer-socials-bar {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #000;
    padding: 20px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-item {
    cursor: pointer;
}

/* Main Content */
.footer-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.contact-info p {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    font-weight: 500;
}

.icon-arrow {
    font-size: 1rem;
    vertical-align: middle;
}

.footer-buttons {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.btn-pill {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #000;
    border-radius: 50px; /* Pill shape */
    color: #000;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-pill:hover {
    background-color: #000;
    color: #fff;
}

/* Bottom Bar */
.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #000;
    padding-top: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-bottom-bar a {
    color: #000;
    text-decoration: none;
}

.author {
    font-weight: 700;
}

/* Lenis Recommended CSS */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Menu Toggle Button */
.menu-toggle {
    cursor: pointer;
    z-index: 1001;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Language Switcher */
.lang-switch {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text);
    margin-right: 20px;
    z-index: 1001;
}

.lang-switch ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.lang-switch ul li a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
    opacity: 0.5;
}

.lang-switch ul li.current-lang a,
.lang-switch ul li a:hover {
    opacity: 1;
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden; /* Managed by GSAP */
}

.menu-overlay-content {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.menu-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    pointer-events: none; /* Prevents hover from triggering on the container itself (gaps) */
}

.menu-overlay ul li {
    margin: 20px 0;
    overflow: hidden; /* For text reveal animation */
}

.menu-overlay ul li a {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease, letter-spacing 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    transform: translateY(100%); /* Initial state for animation */
    pointer-events: auto; /* Re-enable events for the links */
}

/* Dim all items when hovering the list (only works when hovering a child due to pointer-events: none on parent) */
.menu-overlay ul:hover li a {
    opacity: 0.5;
}

.menu-overlay ul li a:hover {
    opacity: 1;
    letter-spacing: 10px;
}

/* Section 1 Specific Styles (Simplified) */
#section-1 {
    /* Standard flex alignment is handled by .panel already */
}

/* Ensure content flows naturally but allows absolute positioning */
#section-1 .panel-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center other content usually */
    align-items: center;
}

/* Tagline Container - Bottom positioned */
.tl-container {
    width: 100vw; 
    max-width: none;
    margin: 0;
    overflow: hidden;
    position: absolute;
    bottom: 40px; 
    left: 0;
    transform: none;
    z-index: 10;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Visibility toggles */
.desktop-tagline {
    display: flex;
}

.mobile-tagline {
    display: none;
    flex-direction: column;
    gap: 0;
}

.tagline {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
    color: #fff;
    white-space: nowrap; 
    
    /* Fluid typography - tuned for full width */
    font-size: 2.8vw; 
    width: auto;
}

/* SplitText generates divs for lines/words/chars */
.tagline div, .tagline span {
    display: inline-block; /* Ensure they can be transformed */
}

/* Responsive Break Logic */
.responsive-break {
    display: none; /* Hidden by default on desktop */
}

/* Estilos limpios para el botón en la sección 1, si es necesario heredar */
#section-1 .panel-content .btn {
    margin-top: 20px;
    opacity: 1; /* Asegurar visibilidad */
    transform: none;
}

/* Elegant Custom Bullet Lists */
.panel-content ul {
    list-style: none;
    padding: 0;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 20px 50px; /* Row gap, Column gap */
    width: 100%;
    max-width: 1000px;
}

.panel-content ul li {
    background: transparent;
    padding: 0 0 0 30px; /* Indent for bullet */
    position: relative;
    text-align: left; /* Standard list alignment */
    display: block;
    
    /* Font styles */
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Custom Diamond Bullet */
.panel-content ul li::before {
    content: "◆"; /* Elegant diamond shape */
    position: absolute;
    left: 0;
    top: 3px; /* Visual alignment with text */
    color: #fff;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Custom Bullet Removal for strong items */
.panel-content ul li:has(strong)::before {
    content: none;
}

/* Typography for titles inside list */
.panel-content ul li strong, 
.panel-content ul li b,
.panel-content ul li h3,
.panel-content ul li h4 {
    display: block; /* Title on its own line */
    margin-bottom: 10px;
    padding-bottom: 5px;
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* No hover effects */
.panel-content ul li:hover {
    transform: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

.panel-content ul li p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

/* =========================================
   Responsive Styles
   ========================================= */

/* Tablet (Landscape) & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --spacing-container: 80px;
    }

    h2 {
        font-size: 3rem;
    }

    .panel-content {
        max-width: 90%;
        padding: 30px;
    }
    
    .desktop-tagline {
        display: none !important;
    }

    .mobile-tagline {
        display: flex !important;
        width: 100%;
        bottom: 15vh;
    }

    /* User requested specific sizes for tablet & phone */
    .mobile-tagline .tagline:nth-child(1) {
        font-size: 7.68vw;
        line-height: 1.1;
        width: 100%;
        white-space: normal;
    }
    
    .mobile-tagline .tagline:nth-child(2) {
        font-size: 6.32vw;
        line-height: 1.1;
        width: 100%;
        white-space: normal;
    }
    
    /* Footer Adjustments */
    .footer-branding h1 {
        font-size: 18vw;
    }

    /* Mobile Background Image Logic */
    .bg-desktop.has-mobile-variant {
        display: none;
    }
    
    .bg-mobile {
        display: block;
    }
}

/* Tablet (Portrait) & Phones (max-width: 767px) */
@media (max-width: 767px) {
    :root {
        --spacing-container: 60px;
    }

    header {
        padding: 15px 25px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    h2, h3 {
        font-size: 1.5rem;
    }

    h2 {
        margin-bottom: 2.25rem;
    }

    p {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.75rem;
    }

    /* Cards adjustments */
    .panel-content ul {
        gap: 10px; /* Reduced gap */
        margin: 20px auto;
    }
    
    .panel-content ul li {
        font-size: 0.8rem; /* Consistent list item size */
        padding: 0 0 10px 0 !important; /* No side padding, bottom padding for border separation */
        min-width: 100%;
        margin-bottom: 0; /* Let gap handle spacing */
        border-bottom: 3px solid rgba(255, 255, 255, 0.3); /* Separator line */
    }

    /* Hide the custom diamond bullet on mobile */
    .panel-content ul li::before {
        content: none !important;
        display: none !important;
    }

    /* List item titles adjustments */
    .panel-content ul li strong, 
    .panel-content ul li b,
    .panel-content ul li h3,
    .panel-content ul li h4 {
        font-size: 1.125rem;
    }

    /* Footer: Stack content vertically */
    .footer-container {
        padding: 30px 25px;
    }

    .footer-main-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 30px;
        padding: 20px 0;
    }
    
    .contact-info {
        width: 100%;
    }

    .footer-socials-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .social-item {
        margin-bottom: 5px;
    }

    .footer-buttons {
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    
    .btn-pill {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure Footer fits on screen or scrolls if content is too long */
    footer {
        height: auto;
        min-height: 100vh;
        padding-bottom: 30px;
    }

    /* Menu Overlay Text */
    .menu-overlay ul li a {
        font-size: 2rem;
    }
    
    /* Footer Branding Override for Mobile */
    .footer-logo {
        width: 90%;
    }
}
