/*
  File: style.css
  Project: YPF Argentina Retro Website
  Author: AI Assistant
  Description: Modern and responsive stylesheet adhering to a Retro design system,
               tetradic color scheme, and non-linear animations.
*/

/* 1. FONT IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Merriweather:wght@400;700&display=swap');

/* 2. ROOT VARIABLES */
:root {
    /* Color Palette (Tetradic) */
    --color-primary: #0057B8; /* YPF Blue */
    --color-primary-dark: #00418a;
    --color-secondary: #FFAA00; /* Retro Amber */
    --color-accent1: #009B77; /* Teal Green */
    --color-accent2: #D9453B; /* Retro Red-Orange */
    
    /* Neutral & Text Colors */
    --color-text-dark: #222222;
    --color-text-medium: #4A4A4A;
    --color-text-light: #FFFFFF;
    --color-bg-light: #FDFBF5; /* Light cream */
    --color-bg-dark: #2c3e50; /* Dark slate */

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Layout & Sizing */
    --header-height: 80px;
    --container-width: 1200px;
    --section-padding: 6rem 0;
    --border-radius: 8px;
    
    /* Animation & Transitions */
    --transition-speed: 0.4s;
    --transition-timing: cubic-bezier(0.645, 0.045, 0.355, 1); /* Non-linear motion */
}

/* 3. GLOBAL & BASE STYLES */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-medium);
    background-color: var(--color-bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    max-width: 75ch; /* Improves readability */
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-primary-dark);
}

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

/* 4. UTILITY & LAYOUT CLASSES */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.section-padding {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--color-text-dark);
}

.bg-light {
    background-color: var(--color-text-light);
}

.text-center {
    text-align: center;
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-bg .hero-overlay,
.parallax-bg .stats-overlay,
.parallax-bg .contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 42, 90, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

/* 5. GLOBAL BUTTON STYLES */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) var(--transition-timing);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width var(--transition-speed) var(--transition-timing);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* 6. HEADER & NAVIGATION */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-medium);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-secondary);
    transition: width var(--transition-speed) var(--transition-timing);
}

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

.burger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-dark);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

/* 7. HERO SECTION */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light); /* Enforced white text */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-light); /* Enforced white text */
    max-width: 60ch;
    margin: 0 auto 2rem auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* 8. GENERIC CARD & ASYMMETRIC LAYOUT */
.card {
    background-color: var(--color-text-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
    display: flex;
    flex-direction: column;
    text-align: center; /* Center content */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for image container */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform var(--transition-speed) var(--transition-timing);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 1rem;
}

.asymmetric-layout,
.asymmetric-layout-reverse {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.asymmetric-layout .image-content {
    grid-column: 2 / 3;
}
.asymmetric-layout .text-content {
    grid-column: 1 / 2;
}

.asymmetric-layout-reverse .image-content {
    grid-column: 1 / 2;
}
.asymmetric-layout-reverse .text-content {
    grid-column: 2 / 3;
}

.image-container img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 9. FEATURES SECTION */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* 10. BEHIND THE SCENES (ASYMMETRIC GALLERY) */
.asymmetric-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.gallery-item-large, .gallery-item-small {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-item-large img, .gallery-item-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-column-small {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color-text-light);
}

.gallery-caption h4 {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.9rem;
}

/* 11. STATS / CLIENTELE SECTION */
.stats-section .section-title {
    color: var(--color-text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}
.stats-overlay {
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent1));
    opacity: 0.9;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}
.stat-item {
    color: var(--color-text-light);
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    display: block;
}
.stat-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 12. SUCCESS STORIES (CAROUSEL) */
.content-carousel {
    max-width: 800px;
    margin: 0 auto;
}

.carousel-slide.card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.story-content blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--color-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.story-author .card-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.story-author cite {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-dark);
}

/* 13. CAREERS SECTION */
.careers-section .section-title {
    text-align: left;
}

/* 14. EXTERNAL RESOURCES */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.resource-card {
    background: var(--color-text-light);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all var(--transition-speed) var(--transition-timing);
    display: flex;
    flex-direction: column;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}
.resource-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}
.resource-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}
.resource-url {
    font-family: var(--font-heading);
    color: var(--color-accent1);
    font-weight: 700;
    font-size: 0.9rem;
}

/* 15. CONTACT FORM */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    position: relative;
    z-index: 2;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 4rem;
    border-radius: var(--border-radius);
}

.contact-info {
    color: var(--color-text-light);
}

.contact-info h3 {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 0 0.5rem 0;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed) ease;
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-speed) ease;
    pointer-events: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: var(--color-secondary);
}

.contact-form input:focus + label,
.contact-form input:valid + label,
.contact-form textarea:focus + label,
.contact-form textarea:valid + label {
    top: -0.75rem;
    left: 0;
    font-size: 0.8rem;
    color: var(--color-secondary);
}

.contact-form button {
    width: 100%;
    background-color: var(--color-secondary);
    color: var(--color-text-dark);
}
.contact-form button:hover {
    background-color: #ffbe33;
    color: var(--color-text-dark);
}

/* 16. FOOTER */
.site-footer {
    background-color: var(--color-text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-speed) ease;
}

.footer-column ul a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

/* 17. SPECIAL PAGE STYLES */
.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

.success-content {
    background: var(--color-text-light);
    padding: 4rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.legal-page {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
}

.legal-page .container {
    max-width: 800px;
}

.legal-page h1 {
    margin-bottom: 2rem;
}

/* 18. MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 992px) {
    .asymmetric-layout,
    .asymmetric-layout-reverse {
        grid-template-columns: 1fr;
    }

    .asymmetric-layout .image-content,
    .asymmetric-layout-reverse .image-content {
        grid-row: 1; /* Image appears first on mobile */
    }

    .asymmetric-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .section-padding {
        padding: 4rem 0;
    }

    /* Mobile Navigation */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-bg-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right var(--transition-speed) var(--transition-timing);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

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

    .burger-menu {
        display: block;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-column {
        margin-bottom: 2rem;
    }
}