/*
================================================
TABLE OF CONTENTS
================================================
1.  CSS Variables (Theme & Layout)
2.  Global Styles & Typography
3.  Layout & Container Styles
4.  Header & Navigation
5.  Hero Section
6.  Component: Cards
7.  Component: Buttons & Forms
8.  Component: Progress Indicators
9.  Section Specific Styles
    - About Us
    - Services
    - Comparison (Pricing)
    - Portfolio (Case Studies)
    - External Resources
    - Contact
10. Footer
11. Page-Specific Styles
    - Success Page
    - Privacy & Terms Pages
12. Animations & Transitions
13. Utility Classes
================================================
*/

/* 1. CSS Variables (Theme & Layout)
================================================ */
:root {
    /* Tetradic Color Scheme */
    --color-primary: #004d7a; /* Deep Corporate Blue */
    --color-primary-dark: #003758;
    --color-secondary: #0081a7; /* Vibrant Teal */
    --color-accent-1: #f07167; /* Coral/Orange Accent */
    --color-accent-2: #fed9b7; /* Light Peach Accent */
    
    /* Neutral Colors */
    --color-text: #2d3748; /* Dark Gray for Text */
    --color-text-light: #ffffff;
    --color-text-subtle: #718096;
    --color-bg-light: #f7fafc;
    --color-bg-dark: #1a202c;
    --color-border: #e2e8f0;
    --color-success: #38a169;
    --color-error: #e53e3e;

    /* Typography */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    
    /* Biomorphic Design & Layout */
    --border-radius-soft: 1rem;  /* 16px */
    --border-radius-flow: 1.5rem; /* 24px */
    --shadow-soft: 0 8px 16px rgba(45, 55, 72, 0.1);
    --shadow-lift: 0 12px 24px rgba(45, 55, 72, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. Global Styles & Typography
================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; } /* 40px */
h2 { font-size: 2rem; }   /* 32px */
h3 { font-size: 1.5rem; } /* 24px */
h4 { font-size: 1.25rem; }/* 20px */

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

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

/* 3. Layout & Container Styles
================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

section h2.text-center {
    color: #222222; /* High contrast for section titles */
}

/* 4. Header & Navigation
================================================ */
header {
    transition: var(--transition-smooth);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-soft);
}

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

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

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

#mobile-menu {
    border-top: 1px solid var(--color-border);
}


/* 5. Hero Section
================================================ */
#hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax Effect */
    color: var(--color-text-light); /* White text for readability */
}

#hero h1, #hero p {
    color: var(--color-text-light); /* Ensure all text inside is white */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* 6. Component: Cards
================================================ */
.card {
    background-color: var(--color-text-light);
    border-radius: var(--border-radius-flow);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    overflow: hidden;
    /* Strict Centering Rules */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lift);
}

.card .card-image, .card .image-container {
    width: 100%;
    height: 200px; /* Fixed height for image containers */
    overflow: hidden;
    margin-bottom: 1.5rem; /* Space between image and content */
}

.card .card-image img, .card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the container without distortion */
    object-position: center;
}

.card .card-content {
    padding: 0 1.5rem 1.5rem;
    width: 100%;
}


/* 7. Component: Buttons & Forms
================================================ */
button,
input[type='submit'],
.btn {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 999px; /* Pill shape */
    transition: var(--transition-smooth);
    text-decoration: none;
}

button:hover,
input[type='submit']:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

/* Primary Button Style (from Tailwind bg-blue-600) */
button[type="submit"],
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

button[type="submit"]:hover,
.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

/* Accent Button Style (from Tailwind bg-teal-500) */
.btn-accent {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}
.btn-accent:hover {
    background-color: #006987;
}


/* Form Inputs */
input[type='text'],
input[type='email'],
textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-secondary);
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-soft);
    transition: var(--transition-smooth);
}

input[type='text']:focus,
input[type='email']:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 77, 122, 0.2);
}

/* 8. Component: Progress Indicators
================================================ */
.progress-bar-container {
    width: 100%;
    background-color: var(--color-border);
    border-radius: 999px;
    height: 1rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 9. Section Specific Styles
================================================ */
#resources .bg-gray-50 {
    border-left: 4px solid var(--color-secondary);
}

#resources h3 a {
    color: var(--color-primary);
}


/* 10. Footer
================================================ */
footer {
    background-color: var(--color-bg-dark);
}

footer h4, footer h5 {
    color: var(--color-text-light);
}

footer a {
    color: var(--color-text-subtle);
    font-weight: 400;
}

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

footer .border-t {
    border-color: rgba(255, 255, 255, 0.1);
}


/* 11. Page-Specific Styles
================================================ */
/* Success Page */
body.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Privacy & Terms Pages */
body.legal-page main {
    padding-top: 10rem; /* Push content below fixed header */
    padding-bottom: 5rem;
}

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

body.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* 12. Animations & Transitions
================================================ */
/* Placeholder for GSAP scroll-triggered animations */
[data-anim] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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


/* 13. Utility Classes
================================================ */
.read-more {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-secondary);
    display: inline-block;
    margin-top: 1rem;
}

.read-more::after {
    content: ' →';
    transition: transform 0.2s ease-out;
    display: inline-block;
}

.read-more:hover::after {
    transform: translateX(5px);
}