/* ==========================================================
   CSS for "Diseño Argento"
   Theme: Neomorphism with Warped Grids
   Color Scheme: Complementary (Teal & Coral)
   Animation Style: Hand-drawn inspired
========================================================== */

/* ==================== 1. VARIABLES & ROOT STYLES ==================== */
:root {
    /* Colors */
    --primary-hue: 195;
    --accent-hue: 25;
    --bg-hue: 210;
    --bg-saturation: 30%;

    --primary-color: hsl(var(--primary-hue), 75%, 50%);
    --primary-color-dark: hsl(var(--primary-hue), 75%, 40%);
    --accent-color: hsl(var(--accent-hue), 95%, 60%);
    --accent-color-dark: hsl(var(--accent-hue), 95%, 50%);

    --bg-color: hsl(var(--bg-hue), var(--bg-saturation), 96%);
    --bg-color-darker: hsl(var(--bg-hue), var(--bg-saturation), 92%);
    --text-color: hsl(var(--bg-hue), 15%, 25%);
    --text-color-light: hsl(var(--bg-hue), 10%, 45%);
    --title-color: hsl(var(--bg-hue), 20%, 15%);
    --white-color: #FFFFFF;
    --black-color: #000000;
    --shadow-light-color: hsla(var(--bg-hue), var(--bg-saturation), 100%, 0.7);
    --shadow-dark-color: hsla(var(--bg-hue), var(--bg-saturation), 75%, 0.5);

    /* Fonts */
    --font-headings: 'Raleway', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Spacing */
    --header-height: 5rem;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Neumorphism Shadows */
    --neumorphic-shadow-outset: 6px 6px 12px var(--shadow-dark-color), -6px -6px 12px var(--shadow-light-color);
    --neumorphic-shadow-inset: inset 6px 6px 12px var(--shadow-dark-color), inset -6px -6px 12px var(--shadow-light-color);
    --neumorphic-shadow-outset-sm: 3px 3px 6px var(--shadow-dark-color), -3px -3px 6px var(--shadow-light-color);
    --neumorphic-shadow-inset-sm: inset 3px 3px 6px var(--shadow-dark-color), inset -3px -3px 6px var(--shadow-light-color);

    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media screen and (min-width: 992px) {
    :root {
        --h1-font-size: 4rem;
        --h2-font-size: 2.5rem;
        --h3-font-size: 1.75rem;
        --normal-font-size: 1.125rem;
    }
}


/* ==================== 2. BASE & TYPOGRAPHY ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    font-size: var(--normal-font-size);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 900;
    color: var(--title-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: var(--spacing-sm);
}

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

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

ul {
    list-style: none;
}

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


/* ==================== 3. REUSABLE COMPONENTS & UTILITY CLASSES ==================== */
.container {
    max-width: 1200px;
    margin-left: var(--spacing-sm);
    margin-right: var(--spacing-sm);
}

@media screen and (min-width: 1240px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.section {
    padding: var(--spacing-lg) 0;
    position: relative;
}

.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px hsla(var(--accent-hue), 95%, 60%, 0.5);
}

/* --- Global Button Styles --- */
.button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-headings);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--neumorphic-shadow-outset);
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
}

.button:hover {
    transform: translateY(-3px);
}

.button:active {
    transform: translateY(0);
    box-shadow: var(--neumorphic-shadow-inset);
}

.button--primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    box-shadow: 6px 6px 12px hsla(var(--primary-hue), 75%, 40%, 0.4),
                -6px -6px 12px hsla(var(--primary-hue), 75%, 60%, 0.7);
}

.button--primary:active {
    box-shadow: inset 6px 6px 12px hsla(var(--primary-hue), 75%, 40%, 0.4),
                inset -6px -6px 12px hsla(var(--primary-hue), 75%, 60%, 0.7);
}

.button--full {
    width: 100%;
}

/* --- Card Styles --- */
.card {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: 20px;
    box-shadow: var(--neumorphic-shadow-outset);
    text-align: center;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 12px 12px 24px var(--shadow-dark-color), -12px -12px 24px var(--shadow-light-color);
}

.card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--neumorphic-shadow-inset);
    padding: var(--spacing-xs);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.card__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--spacing-xs);
}

.card__subtitle {
    font-size: var(--small-font-size);
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.card__description {
    color: var(--text-color-light);
    font-size: var(--normal-font-size);
}

/* ==================== 4. LAYOUT ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.nav__toggle, .nav__close {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--title-color);
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color-darker);
        box-shadow: var(--neumorphic-shadow-outset);
        padding: var(--spacing-xl) var(--spacing-md);
        transition: var(--transition-normal);
        z-index: 100;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.nav__link {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--text-color);
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-md);
}

/* Show menu */
.show-menu {
    right: 0;
}

.footer {
    background-color: var(--bg-color-darker);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    text-align: center;
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0% 100%);
    margin-top: var(--spacing-lg);
}

.footer__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--spacing-sm);
}

.footer__description, .footer__link {
    color: var(--text-color-light);
}

.footer__links, .footer__social {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer__social-link {
    color: var(--text-color-light);
    padding: var(--spacing-xs);
    transition: var(--transition-fast);
}

.footer__social-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.footer__copy {
    margin-top: var(--spacing-xl);
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== 5. SECTION-SPECIFIC STYLES ==================== */

/* --- Hero Section --- */
#hero {
    padding: 0;
}
.hero__section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    z-index: -1;
}

.hero__container {
    color: var(--white-color);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero__title {
    font-size: var(--h1-font-size);
    color: var(--white-color);
    margin-bottom: var(--spacing-md);
}

.hero__description {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
}

.hero__section .button {
    background-color: var(--accent-color);
    box-shadow: 6px 6px 12px hsla(var(--accent-hue), 95%, 50%, 0.4),
                -6px -6px 12px hsla(var(--accent-hue), 95%, 70%, 0.7);
}

.hero__section .button:active {
     box-shadow: inset 6px 6px 12px hsla(var(--accent-hue), 95%, 50%, 0.4),
                inset -6px -6px 12px hsla(var(--accent-hue), 95%, 70%, 0.7);
}

/* --- Wavy Sections (Curved Grid) --- */
.section--wavy {
    background-color: var(--bg-color-darker);
    clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%);
}

.section--wavy-inverse {
    background-color: var(--bg-color-darker);
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
}

/* --- Team Section --- */
.team__container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* --- Workshops (Slider) --- */
.workshops__container .slider {
    background-color: var(--bg-color);
    border-radius: 25px;
    box-shadow: var(--neumorphic-shadow-inset);
    overflow: hidden;
    padding: var(--spacing-md);
}

.slide {
    text-align: center;
}

.slide__image {
    border-radius: 20px;
    margin: 0 auto var(--spacing-md);
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.slide__content h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
}

/* --- Projects Section --- */
.projects__container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project__card {
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: var(--neumorphic-shadow-outset);
    overflow: hidden;
    transition: var(--transition-normal);
}

.project__card:hover {
     transform: scale(1.05);
}

.project__card .image-container {
    height: 250px;
    width: 100%;
}

.project__card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project__info {
    padding: var(--spacing-sm);
    text-align: center;
}

/* --- Clientele Section --- */
.clientele__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
}

.clientele__logo img {
    height: 40px;
    width: auto;
    filter: grayscale(100%) contrast(0%) brightness(1.2);
    opacity: 0.8;
    transition: var(--transition-normal);
}

.clientele__logo img:hover {
    filter: none;
    opacity: 1;
}

/* --- Research Section --- */
.research__container {
    max-width: 900px;
}
.research__content {
    display: grid;
    gap: var(--spacing-md);
    align-items: center;
}
.research__content img {
    border-radius: 20px;
    box-shadow: var(--neumorphic-shadow-outset);
}

/* --- Resources Section --- */
.resources__container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.resource__card {
    background-color: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: var(--neumorphic-shadow-outset);
    display: flex;
    flex-direction: column;
}
.resource__title {
    font-size: 1.2rem;
    color: var(--primary-color);
}
.resource__description {
    flex-grow: 1;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color-light);
}
.resource__link {
    font-weight: 700;
    color: var(--accent-color);
    align-self: flex-start;
}
.resource__link:hover {
    color: var(--accent-color-dark);
    text-decoration: underline;
}

/* --- Contact Form --- */
.contact__form {
    max-width: 700px;
    margin: 0 auto;
}

.form__group {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.form__input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background-color: var(--bg-color-darker);
    box-shadow: var(--neumorphic-shadow-inset-sm);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: var(--normal-font-size);
    transition: var(--transition-fast);
}

.form__input:focus {
    outline: none;
    box-shadow: var(--neumorphic-shadow-inset-sm), 0 0 0 2px var(--primary-color);
}

.form__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color-light);
    pointer-events: none;
    transition: var(--transition-fast);
}

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    background-color: var(--bg-color-darker);
    padding: 0 0.25rem;
}

textarea.form__input {
    resize: vertical;
    min-height: 150px;
}

/* ==================== 6. PAGE-SPECIFIC STYLES ==================== */

/* --- About Page --- */
.about__container {
    align-items: center;
    grid-template-columns: 1fr;
}
.about__image-content img {
    border-radius: 25px;
    box-shadow: var(--neumorphic-shadow-outset);
}

/* --- Contacts Page --- */
.contact-page__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}
.contact__info h3 {
    color: var(--primary-color);
}
.contact__info p {
    margin-bottom: var(--spacing-md);
}
.map-placeholder img {
    border-radius: 20px;
    box-shadow: var(--neumorphic-shadow-outset);
}

/* --- Legal Pages (Privacy & Terms) --- */
.legal__container {
    padding-top: var(--header-height);
    max-width: 800px;
}
.legal__container h2 {
    margin-top: var(--spacing-lg);
    color: var(--primary-color);
}
.legal__container p {
    margin-bottom: var(--spacing-sm);
}

/* --- Success Page --- */
.success__container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - var(--header-height) - 15rem); /* Adjust 15rem for footer height */
}
.success__message {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
}

/* ==================== 7. ANIMATIONS & TRANSITIONS (Barba.js) ==================== */
.fade-transition {
    transition: opacity 0.5s;
    opacity: 0;
}
html.is-animating .fade-transition {
    opacity: 1;
}

/* ==================== 8. MEDIA QUERIES (RESPONSIVENESS) ==================== */

@media screen and (min-width: 768px) {
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    .nav__list {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    .nav__toggle, .nav__close {
        display: none;
    }

    .footer__container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        text-align: left;
    }
    .footer__links, .footer__social {
        align-items: flex-start;
    }
    .footer__copy {
        text-align: center;
    }
    .research__content {
        grid-template-columns: 1fr 1fr;
    }
    .about__container,
    .contact-page__container {
        grid-template-columns: 1fr 1fr;
    }
}