/*
  Theme: Consulting
  Design System: Corporate
  Trend: Adaptive Typography
  Color Scheme: Gradient
  Animation Style: Non-linear movements
*/

/* -------------------------------------------------------------------
 *  1. CSS Variables & Global Styles
 * ------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-primary-start: #4f46e5; /* Indigo 600 */
  --color-primary-end: #9333ea;   /* Purple 600 */
  --color-accent: #db2777;        /* Pink 600 */
  --color-text-dark: #1f2937;     /* Gray 800 */
  --color-text-light: #ffffff;
  --color-text-muted: #6b7280;    /* Gray 500 */
  --color-bg-light: #f9fafb;      /* Gray 50 */
  --color-bg-dark: #111827;       /* Gray 900 */
  --color-border: #e5e7eb;        /* Gray 200 */

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

  /* Sizing & Spacing */
  --header-height: 5rem; /* 80px */
}

/* Base styles to complement Tailwind */
html {
  scroll-behavior: smooth;
}

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

/* Adaptive Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h3 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2rem); }
p, li, a { font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.65; }

/* -------------------------------------------------------------------
 *  2. Header & Navigation
 * ------------------------------------------------------------------- */
#header {
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

#header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

#header nav a {
    position: relative;
    padding-bottom: 0.25rem;
}

#header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary-start), var(--color-primary-end));
    transition: width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#header nav a:hover::after {
    width: 100%;
}


/* -------------------------------------------------------------------
 *  3. Page Sections
 * ------------------------------------------------------------------- */

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

/* General Section Styling */
section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Parallax Background Effect */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}


/* -------------------------------------------------------------------
 *  4. Components (Buttons, Forms, Cards)
 * ------------------------------------------------------------------- */

/* Global Button & Micro-interaction Styles */
button, input[type='submit'], .btn {
  display: inline-block;
  font-family: var(--font-header);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s ease;
}

.micro-interaction:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.micro-interaction:active {
  transform: scale(0.98);
  box-shadow: none;
}

/* Form Styles */
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background-color: var(--color-bg-light);
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  font-size: 1rem;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary-start);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Card Styles */
.card {
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%; /* Ensures cards in a grid row have the same height */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card .card-image {
  width: 100%;
  /* Fixed height for image containers */
  height: 14rem;
  overflow: hidden;
  position: relative;
  align-self: center; /* Center the container itself */
}

.card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto; /* Ensure image is centered */
}

/* For portfolio cards with text overlay */
.card .card-content.absolute {
  text-align: left;
}


/* -------------------------------------------------------------------
 *  5. Animations & Transitions
 * ------------------------------------------------------------------- */

/* Page Transition Styles for Barba.js */
.fade-transition-leave-active,
.fade-transition-enter-active {
  transition: opacity 0.5s;
}
.fade-transition-leave-to,
.fade-transition-enter-from {
  opacity: 0;
}

/* Scroll Animation */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-in-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* -------------------------------------------------------------------
 *  6. Footer
 * ------------------------------------------------------------------- */
footer a {
  transition: color 0.3s ease;
}

/* Text-based social links */
footer .flex-col a {
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

footer .flex-col a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    display: block;
    margin-top: 2px;
    right: 0;
    background: var(--color-text-light);
    transition: width .3s ease;
    -webkit-transition: width .3s ease;
}

footer .flex-col a:hover::after {
    width: 100%;
    left: 0;
    background-color: var(--color-text-light);
}

/* -------------------------------------------------------------------
 *  7. Specific Page Styles (Success, Privacy, Terms)
 * ------------------------------------------------------------------- */

/* Success Page */
.success-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(145deg, var(--color-primary-start), var(--color-primary-end));
    color: var(--color-text-light);
}

.success-container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3rem 4rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

.success-container h1 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.success-container p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.success-container .btn-home {
    background-color: var(--color-text-light);
    color: var(--color-primary-start);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
}

/* Privacy & Terms Pages */
.static-page-container {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

.static-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-text-light);
    padding: 2.5rem 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.static-content-wrapper h1,
.static-content-wrapper h2 {
    margin-bottom: 1.5rem;
}
.static-content-wrapper h2 {
    margin-top: 2rem;
}

.static-content-wrapper p,
.static-content-wrapper li {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}
.static-content-wrapper ul {
    list-style-position: inside;
    list-style-type: disc;
    padding-left: 1rem;
}


/* -------------------------------------------------------------------
 *  8. Utility & Helper Classes
 * ------------------------------------------------------------------- */

 @keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}