/*
* File: style.css
* Author: AI Assistant
* Description: Custom styles for the 'Ahorro Argento' website, implementing a Brutalist design system with a Triadic color scheme and bouncy animations. This file complements the Tailwind CSS framework.
*/

/* ---------------------------------- */
/*      1. CSS Variables & Setup      */
/* ---------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Nunito:wght@400;600;700&display=swap');

:root {
    /* Color Palette (Triadic) */
    --color-primary: #0D47A1;    /* Deep Blue */
    --color-secondary: #FFD600; /* Vibrant Yellow */
    --color-accent: #D50000;     /* Strong Red */
    
    /* Neutral Colors */
    --color-text: #212121;
    --color-text-light: #FFFFFF;
    --color-background: #F5F5F5;
    --color-dark-bg: #212121;

    /* Fonts */
    --font-headings: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Brutalism Elements */
    --border-main: 3px solid var(--color-text);
    --shadow-main: 8px 8px 0 var(--color-text);
    --shadow-small: 4px 4px 0 var(--color-text);
    --shadow-accent: 6px 6px 0 var(--color-accent);

    /* Animation */
    --transition-bouncy: all 0.25s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --transition-smooth: all 0.3s ease-in-out;
}

/* ---------------------------------- */
/*          2. Base Styles            */
/* ---------------------------------- */

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

h2 {
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

a {
    transition: var(--transition-smooth);
}

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 1024px) {
    section {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.text-shadow-strong {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 3px 3px 8px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------- */
/*       3. Brutalism Utilities       */
/* ---------------------------------- */

.brutalist-border {
    border: var(--border-main);
}

.brutalist-shadow {
    box-shadow: var(--shadow-main);
    transition: var(--transition-bouncy);
}

.brutalist-shadow-sm {
    box-shadow: var(--shadow-small);
    transition: var(--transition-bouncy);
}

/* ---------------------------------- */
/*       4. Global Components         */
/* ---------------------------------- */

/* General Button Styles */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border: var(--border-main);
    transition: var(--transition-bouncy);
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-text);
    box-shadow: var(--shadow-small);
}

.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-4px) translateX(-4px);
    box-shadow: var(--shadow-main);
    background-color: #ffe033; /* Slightly brighter yellow */
}

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

.btn-secondary:hover, .btn-secondary:focus {
    transform: translateY(-4px) translateX(-4px);
    box-shadow: var(--shadow-accent);
    background-color: #0e5ab8; /* Slightly brighter blue */
}

/* Form Styles */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--color-text-light);
    border: var(--border-main);
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--color-secondary);
}

/* ---------------------------------- */
/*        5. Layout: Header & Footer   */
/* ---------------------------------- */

header {
    background-color: var(--color-background);
    border-bottom: var(--border-main);
}

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

#mobile-menu a:hover {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

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

footer a {
    color: var(--color-text-light);
    text-decoration: none;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-secondary);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ---------------------------------- */
/*        6. Section Styling          */
/* ---------------------------------- */

/* Hero Section */
#hero {
    color: var(--color-text-light);
}

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

/* Projects Section (Cards) */
.card {
    display: flex;
    flex-direction: column;
    text-align: center;
    background-color: var(--color-text-light);
    transition: var(--transition-bouncy);
}

.card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 12px 12px 0 var(--color-primary);
}

.card .card-image {
    width: 100%;
    height: 224px; /* 14rem */
    overflow: hidden;
    border-bottom: var(--border-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.card .card-content {
    flex-grow: 1;
    padding: 1.5rem;
}

/* Behind the Scenes (Accordion & Progress Bar) */
.accordion-toggle svg {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.accordion-toggle .rotate-180 {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.progress-bar-fill {
    transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Resources Section */
#resources a.font-bold:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

/* ---------------------------------- */
/*       7. Page-Specific Styles      */
/* ---------------------------------- */

/* For pages like privacy.html and terms.html */
.page-container {
    padding-top: 120px; /* Offset for sticky header */
    padding-bottom: 80px;
}

.page-container h1 {
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.page-container h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
}

.page-container p, .page-container li {
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* For success.html */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--color-background);
}

.success-box {
    background-color: var(--color-text-light);
    padding: 3rem 4rem;
    max-width: 600px;
}

.success-box h1 {
    color: var(--color-primary);
}

/* ---------------------------------- */
/*         8. Animations              */
/* ---------------------------------- */

[data-scroll-animation] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-scroll-animation].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Barba.js Transitions */
.barba-leave-active,
.barba-enter-active {
  transition: opacity 0.5s ease-in-out;
}

.barba-leave-to {
  opacity: 0;
}

.barba-enter-from {
  opacity: 0;
}