/* 1. VARIABLES & MASTER LAYOUT TIERS */
:root {
    --color-bg: #EAEAEA;
    --color-text: #000000;
    --color-accent: #FDB913;
    
    --header-height: 70px;
    --footer-height: 60px;
    --section-padding: 25px;
    --section-vertical-spacing: 120px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --animation-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-hero: 3.25rem;
    --font-section: 2.25rem;
    --font-body: 1rem;
    --font-small: 0.8rem;
}

@media (min-width: 768px) {
    :root {
        --header-height: 80px; 
        --footer-height: 70px; 
        --section-padding: 8vw;
        --font-hero: 3.8rem;
        --font-section: 3rem;
        --font-body: 1.05rem;
        --font-small: 0.85rem;
    }
}

@media (min-width: 1200px) {
    :root {
        --section-padding: 10vw;
        --font-hero: 4.5rem;
        --font-section: 3.5rem;
        --font-body: 1.1rem;
        --font-small: 0.9rem;
    }
}

@media (min-width: 1920px) {
    :root {
        --section-padding: 15vw;
        --font-hero: 5.5rem;
        --font-section: 4rem;
        --font-body: 1.15rem;
        --font-small: 0.95rem;
    }
}

/* 2. RESET & BASE */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none !important;

    /* PREVENTS TEXT HIGHLIGHTING/SELECTION */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Re-enable selection ONLY for typing inputs if you add them later */
input, textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

html { 
    scroll-padding-top: var(--header-height); 
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    height: 100vh;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

img {
    max-width: 100%;
    display: block;
}

/* 3. TYPOGRAPHY */
.logo, .app-footer, .text-btn {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
}

.app-footer, .text-btn { 
    font-size: var(--font-body); 
}

.hero-title, .section-title, .mobile-nav a {
    text-transform: uppercase;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.5px;
}

.hero-title { 
    font-size: var(--font-hero); 
    margin-bottom: 1.85rem; 
}

.section-title { 
    font-size: var(--font-section); 
    color: var(--color-text); 
    margin-bottom: 1.5rem;
}

.mobile-nav a {
    font-size: var(--font-section); 
    color: var(--color-text); 
}

.crew-list-preview p, .contact-info, .about-text, .portfolio-intro-text {
    font-weight: 400;
    font-size: var(--font-body);
    line-height: 1.75;
}

.portfolio-intro-text {
    max-width: 800px;
    margin-bottom: 2rem;
}

.text-accent { 
    color: var(--color-accent); 
    font-weight: 800; 
}

/* 4. LINKS & BUTTONS */
.mobile-nav a { 
    text-decoration: none; 
    display: block; 
    padding: 0.5rem 0; 
    transition: var(--transition);
}

.phone-link, .email-link, .whatsapp-link { 
    color: var(--color-text); 
    text-decoration: none; 
    transition: var(--transition);
}

.mobile-nav a:hover, .phone-link:hover, .email-link:hover, .whatsapp-link:hover, .text-btn:hover { 
    color: var(--color-accent); 
}

.text-btn {
    font-family: inherit;
    color: var(--color-accent);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    margin-top: 1.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.text-btn:hover { 
    opacity: 0.8; 
}

/* 5. LAYOUT & NAVIGATION */
.scroll-container {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: var(--header-height) 0 var(--footer-height);
    scroll-padding-top: var(--header-height);
}

.scroll-container::-webkit-scrollbar { 
    display: none; 
}

.section {
    min-height: 100dvh;
    scroll-margin-top: var(--header-height);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--section-vertical-spacing) var(--section-padding);
}

.content-wrapper { 
    max-width: 100%; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
}

.app-header {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: var(--header-height);
    background-color: var(--color-bg); 
    z-index: 100;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 var(--section-padding); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.menu-toggle {
    background: none; 
    border: none; 
    cursor: pointer; 
    color: var(--color-text);
    width: 40px; 
    height: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 50%; 
    transition: var(--transition);
}

.menu-toggle:hover { 
    background-color: rgba(0,0,0,0.05); 
    transform: scale(1.05); 
}

.mobile-nav {
    position: fixed; 
    top: var(--header-height); 
    left: 0; 
    width: 100%;
    height: calc(100vh - var(--header-height)); 
    background: var(--color-bg);
    transform: translateX(100%); 
    transition: transform 0.5s var(--animation-ease);
    z-index: 90; 
    padding: 2rem;
    will-change: transform;
}

.mobile-nav[aria-hidden="false"] { 
    transform: translateX(0); 
}

.mobile-nav ul { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    justify-content: center; 
}

.mobile-nav li { 
    margin-bottom: 1.5rem; 
}

@media (min-width: 768px) {
    .mobile-nav, .menu-toggle { display: none; }
}

/* 6. ANIMATIONS & STATES */
.js-enabled .hero-title, 
.js-enabled .section-title, 
.js-enabled .text-btn, 
.js-enabled .grid-placeholder, 
.js-enabled .crew-list-preview, 
.js-enabled .contact-info, 
.js-enabled .about-text, 
.js-enabled .portfolio-intro-text,
.js-enabled .scroll-down-indicator {
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

.hero-title { transition: opacity 1s var(--animation-ease), transform 1s var(--animation-ease); }

.section-title, .grid-placeholder, .crew-list-preview, .contact-info, .about-text, .portfolio-intro-text { 
    transition: opacity 0.8s var(--animation-ease), transform 0.8s var(--animation-ease); 
}

.hero-title.visible, .section-title.visible, .text-btn.visible, .grid-placeholder.visible, 
.crew-list-preview.visible, .contact-info.visible, .about-text.visible, 
.portfolio-intro-text.visible, .scroll-down-indicator.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.hero-title.visible { transition-delay: 0.1s; }
.section-title.visible { transition-delay: 0.2s; }
.grid-placeholder.visible, .crew-list-preview.visible, .contact-info.visible, 
.about-text.visible, .portfolio-intro-text.visible { transition-delay: 0.3s; }

/* 7. GRIDS & SHARED COMPONENTS */
.grid-placeholder { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin-bottom: 0.15rem;
}

@media (min-width: 768px) {
    .grid-placeholder { grid-template-columns: repeat(4, 1fr); gap: 24px; } 
}

@media (min-width: 1920px) {
    .grid-placeholder { grid-template-columns: repeat(6, 1fr); gap: 30px; } 
}

@media (max-width: 1919px) {
    .grid-placeholder .grid-item:nth-child(n+5) {
        display: none;
    }
}

.grid-item { 
    background: rgba(0,0,0,0.05); 
    border: 2px dashed rgba(0,0,0,0.1); 
    aspect-ratio: 4/5; 
    transition: transform 0.2s var(--animation-ease); 
    border-radius: 12px;
    overflow: hidden;
    will-change: transform;
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

img.grid-item {
    border: none; 
    background: none; 
}

.grid-item:hover { transform: scale(1.02); }

.portfolio-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    width: 100%;
}

@media (min-width: 768px) {
    .portfolio-grid-3 { grid-template-columns: repeat(4, 1fr); gap: 15px; } 
}

@media (min-width: 1200px) {
    .portfolio-grid-3 { grid-template-columns: repeat(5, 1fr); gap: 20px; } 
}

@media (min-width: 1920px) {
    .portfolio-grid-3 { grid-template-columns: repeat(6, 1fr); gap: 24px; } 
}

/* 8. CREW PAGE SPECIFICS */
.crew-list-preview { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    margin-bottom: 0.15rem; 
}

.contact-info { 
    margin-bottom: 2.5rem; 
}

.crew-card {
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--animation-ease), transform 0.5s var(--animation-ease);
    will-change: transform, opacity;
}

.crew-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.crew-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.crew-skills {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-badge {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-small);
    font-weight: 700;
}

/* 9. SOLUTIONS PAGE SPECIFICS */
.solutions-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.75rem;
    transform: translateY(15px); 
    transition: opacity 0.8s var(--animation-ease), transform 0.8s var(--animation-ease);
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-text);
    color: var(--color-text);
    padding: 8px 18px;
    border-radius: 30px;
    font-family: inherit;
    font-size: var(--font-small);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--color-text);
    color: var(--color-bg);
}

.solutions-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 25px;
}

@media (min-width: 768px) {
    .solutions-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (min-width: 1200px) {
    .solutions-grid { grid-template-columns: repeat(4, 1fr); } 
}

@media (min-width: 1920px) {
    .solutions-grid { grid-template-columns: repeat(5, 1fr); } 
}

.solution-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--animation-ease), transform 0.4s var(--animation-ease), box-shadow 0.3s ease;
    will-change: transform, opacity, box-shadow;
}

.solution-card.visible { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
}

.solution-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.solution-img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    background: rgba(0,0,0,0.05);
}

.solution-content { 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.solution-category { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: #888; 
    margin-bottom: 5px; 
}

.solution-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    margin-bottom: 10px; 
}

.solution-price { 
    font-weight: 800; 
    color: var(--color-accent); 
    margin-bottom: 15px; 
    font-size: 0.9rem; 
}

.solution-desc { 
    font-size: 0.9rem; 
    line-height: 1.6; 
    color: #444; 
    margin-bottom: 20px; 
}

.card-wa-btn {
    display: block;
    text-align: center;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-top: auto;
    transition: var(--transition);
}

.card-wa-btn:hover {
    background-color: #1DA851;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

/* 10. FOOTER & SCROLL INDICATOR */
@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.app-footer {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: var(--footer-height);
    background-color: var(--color-bg); 
    z-index: 100; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-content {
    cursor: pointer; 
    user-select: none; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    height: 100%; 
    width: 100%; 
    gap: 8px; 
    transition: background-color 0.3s ease;
}

.footer-content:active { 
    background-color: rgba(0,0,0,0.05); 
    transform: scale(0.98); 
}

.scroll-down-indicator { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.scroll-down-indicator .arrow { 
    display: inline-block; 
    animation: bounceArrow 1.5s infinite ease-in-out; 
}

#footer-text { 
    display: inline-block; 
    animation: pulseText 2s infinite ease-in-out; 
}

.app-footer.whatsapp-footer { 
    background-color: #25D366; 
    box-shadow: 0 -2px 10px rgba(37, 211, 102, 0.2); 
}

.app-footer.whatsapp-footer .footer-content, 
.app-footer.whatsapp-footer .scroll-down-indicator .arrow, 
.app-footer.whatsapp-footer .scroll-down-indicator span { 
    color: white; 
}

/* 11. SUB-PAGE FOOTER */
.sub-footer-link {
    text-decoration: none;
    color: var(--color-text);
}

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

.back-text {
    font-weight: 800;
}

/* 12. COPY TO CLIPBOARD LINKS */
.copy-link {
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    position: relative;
}

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

.copy-link::after {
    content: "COPIED!";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    background-color: var(--color-accent);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-link.copied::after {
    opacity: 1;
    transform: translateY(-50%) translateX(5px);
}

/* 13. LOADING SKELETONS & ERROR STATES */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-load {
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f0f0f0 40px, #e0e0e0 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    color: transparent !important;
}

.loading-text {
    text-align: center;
    font-weight: 700;
    color: var(--color-accent);
    padding: 2rem;
    width: 100%;
    animation: pulseText 1.5s infinite ease-in-out;
}

.error-state {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 0, 0.05);
    border: 1px dashed rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    width: 100%;
    grid-column: 1 / -1;
}

.error-state p {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.retry-btn {
    background: var(--color-accent);
    color: var(--color-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--color-text);
    transform: translateY(-2px);
}