/*
================================================================================
  TABLE OF CONTENTS
================================================================================
1.  :root - CSS Variables & Global Styles
2.  Base & Typography
3.  Utility Classes
4.  Header & Navigation
5.  Hero Section
6.  Content Sections & Layouts
7.  Cards (Methodology, Blog, Team, etc.)
8.  Specific Sections Styling
    - History
    - Behind the Scenes (Carousel)
    - Gallery
    - External Resources
    - Contact Form
9.  Footer
10. Special Pages (Success, Privacy, Terms)
11. Animations & Transitions
12. Responsive Design (Media Queries)
================================================================================
*/

/* 1. :root - CSS Variables & Global Styles
-------------------------------------------------------------------------------- */
:root {
  /* Color Palette - Complementary (Deep Blue & Vibrant Yellow) */
  --primary-color: #0d2c4f;  /* Deep Sapphire Blue */
  --accent-color: #ffc107;   /* Amber Yellow */
  --accent-color-hover: #ffb300; /* Darker Amber for hover */

  --bg-light: #f8f9fa;
  --bg-dark: #121212;
  --bg-dark-secondary: #1e1e1e;

  /* Text Colors */
  --text-dark: #212121;
  --text-light: #ffffff;
  --text-muted: #6c757d;

  /* Neo-Brutalism Elements */
  --neo-border: 2px solid var(--text-dark);
  --neo-shadow: 5px 5px 0px var(--text-dark);
  --neo-shadow-light: 5px 5px 0px rgba(255, 255, 255, 0.7);

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

  /* Sizing & Spacing */
  --header-height: 80px;
  --container-width: 1200px;
  --container-padding: 2rem;
  --section-padding: 5rem 0;
  --card-padding: 1.5rem;
  --border-radius: 8px;
}

/* 2. Base & Typography
-------------------------------------------------------------------------------- */
*,
*::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(--text-dark);
  background-color: var(--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);
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  max-width: 75ch;
}

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

a:hover {
  color: var(--accent-color-hover);
  text-decoration: underline;
}

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

/* 3. Utility Classes
-------------------------------------------------------------------------------- */
.main-container {
  overflow-x: hidden;
}

.cta-button, button, input[type="submit"] {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--text-dark);
  background-color: var(--accent-color);
  padding: 1rem 2.5rem;
  border: var(--neo-border);
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s;
  box-shadow: var(--neo-shadow);
}

.cta-button:hover, button:hover, input[type="submit"]:hover {
  background-color: var(--accent-color-hover);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0px var(--text-dark);
  color: var(--text-dark);
  text-decoration: none;
}

.cta-button:active, button:active, input[type="submit"]:active {
  transform: translate(5px, 5px);
  box-shadow: 0px 0px 0px var(--text-dark);
}

.section-title-light {
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 4. Header & Navigation
-------------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: top 0.3s ease;
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
}

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

.main-nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    box-shadow: none;
}
.burger-menu:hover, .burger-menu:active {
    background: none;
    transform: none;
    box-shadow: none;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-dark);
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding-top: calc(var(--header-height) + 2rem);
    z-index: 999;
}
.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.mobile-nav a {
    font-size: 1.5rem;
    color: var(--text-light);
    font-family: var(--font-heading);
}

.mobile-nav.active {
    right: 0;
}
.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 5. Hero Section
-------------------------------------------------------------------------------- */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: var(--container-padding);
}

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

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--text-light);
    font-weight: 900;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin: 1rem auto 2.5rem;
    max-width: 600px;
    font-weight: 400;
    color: var(--text-light);
}

/* 6. Content Sections & Layouts
-------------------------------------------------------------------------------- */
.content-section, .content-section-dark {
    padding: var(--section-padding);
}
.content-section-dark {
    background-color: var(--bg-dark-secondary);
    color: var(--text-light);
}
.content-section-dark h2, .content-section-dark h3, .content-section-dark h4 {
    color: var(--text-light);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.two-columns-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.column-content {
    max-width: 600px;
}

/* 7. Cards (Methodology, Blog, Team, etc.)
-------------------------------------------------------------------------------- */
.card {
    background-color: var(--text-light);
    border: var(--neo-border);
    box-shadow: var(--neo-shadow);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 8px 12px 0px var(--accent-color);
}
.content-section-dark .card {
    background-color: var(--bg-dark);
    border-color: var(--accent-color);
    box-shadow: 5px 5px 0px var(--accent-color);
    color: var(--text-light);
}
.content-section-dark .card h3 { color: var(--text-light); }
.content-section-dark .card:hover {
    box-shadow: 8px 12px 0px var(--primary-color);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-content {
    padding: var(--card-padding);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 0.75rem;
}
.card-content p {
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-top: 1rem;
    display: inline-block;
}

.methodology-card {
    text-align: center;
    padding: 2rem;
}
.methodology-card .card-icon {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* 8. Specific Sections Styling
-------------------------------------------------------------------------------- */
/* History Section */
.parallax-container {
    position: relative;
    overflow: hidden;
    color: var(--text-light);
}
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%; /* Taller to allow for movement */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
.section-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(13, 44, 79, 0.85); /* primary-color with alpha */
    z-index: 1;
}
.two-columns-layout {
    position: relative;
    z-index: 2;
}

/* Behind the Scenes (Carousel) */
.carousel-container {
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    padding: 0 50px; /* Space for arrows */
}
.carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.carousel-wrapper::-webkit-scrollbar { display: none; } /* Chrome, Safari */

.carousel-card {
    flex: 0 0 100%;
    max-width: 320px;
    margin-right: 2rem;
    scroll-snap-align: center;
}
.carousel-card .card-content {
    text-align: center;
}
.carousel-card h4 { margin-top: 1rem; }
.carousel-card span { color: var(--text-muted); font-size: 0.9rem; }

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: var(--text-dark);
    border: var(--neo-border);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-button.prev { left: -10px; }
.carousel-button.next { right: -10px; }

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.gallery-item {
    overflow: hidden;
    position: relative;
    border: var(--neo-border);
    border-color: var(--accent-color);
}
.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/* External Resources Section */
.resources-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.resource-card {
    display: block;
    padding: 1.5rem;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent-color);
    transition: background-color 0.3s, transform 0.3s;
}
.resource-card:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    text-decoration: none;
}
.resource-card h4 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.resource-card p {
    color: var(--text-light);
    opacity: 0.8;
    margin-bottom: 1rem;
}
.resource-url {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--text-light);
    padding: 3rem;
    border: var(--neo-border);
    box-shadow: var(--neo-shadow);
}
.contact-form {
    display: flex;
    flex-direction: column;
}
.contact-form p {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-muted);
}
.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text-dark);
    border: none;
    border-bottom: 2px solid var(--text-muted);
    outline: none;
    background: transparent;
    font-family: var(--font-body);
}
.form-group label {
    position: absolute;
    top: 10px;
    left: 0;
    padding: 0;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s ease all;
}
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--primary-color);
}
.form-group input:focus, .form-group textarea:focus {
    border-bottom-color: var(--accent-color);
}
.form-submit-button {
    align-self: center;
    width: 100%;
    max-width: 300px;
}

/* 9. Footer
-------------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem var(--container-padding) 2rem;
}
.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-column h4 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.footer-column ul {
    list-style: none;
}
.footer-column li {
    margin-bottom: 0.5rem;
}
.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
.footer-column a:hover {
    color: var(--text-light);
    text-decoration: underline;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 10. Special Pages (Success, Privacy, Terms)
-------------------------------------------------------------------------------- */
.success-page, .legal-page {
    display: flex;
    flex-direction: column;
}
.success-container, .legal-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.success-page {
    min-height: 100vh;
    text-align: center;
    padding: var(--container-padding);
}
.success-page h1 {
    color: var(--primary-color);
}
.legal-page {
    padding-top: var(--header-height); /* Offset for fixed header */
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem var(--container-padding);
    align-items: flex-start;
}

/* 11. Animations & Transitions
-------------------------------------------------------------------------------- */
[data-animation] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
[data-animation].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 12. Responsive Design (Media Queries)
-------------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .two-columns-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .column-content {
        max-width: 100%;
        order: 2;
    }
    .column-image {
        order: 1;
    }
    .column-image .image-container {
        margin: 0 auto;
        max-width: 500px;
    }
}

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

    .main-nav {
        display: none;
    }
    .burger-menu {
        display: block;
    }
    .mobile-nav {
        display: block;
    }
    .hero-section {
        height: 80vh;
    }
    .carousel-container {
        padding: 0;
    }
    .carousel-button {
        display: none; /* Hide arrows, rely on swipe */
    }
    .contact-form-container {
        padding: 2rem;
        box-shadow: none;
        border: none;
    }
}