/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL STYLES
   ========================================================================== */

:root {
    --color-primary-dark: #121212;
    --color-secondary-dark: #1E1E1E;
    --color-background-light: #F4F7F5;
    --color-accent: #FFC300; /* Bright Yellow/Gold */
    --color-accent-dark: #E6B000;
    --color-text-on-dark: #FFFFFF;
    --color-text-on-light: #333333;
    --color-text-subtle: #888888;
    --color-border: #DDDDDD;

    --font-header: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --shadow-volumetric: 0px 8px 15px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.08);
    --shadow-interactive: 0px 12px 20px rgba(0, 0, 0, 0.15), 0px 5px 8px rgba(0, 0, 0, 0.1);
    
    --border-radius: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-text-on-dark);
    color: var(--color-text-on-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 700;
    color: #222222;
    margin-bottom: 0.75rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

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

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

/* ==========================================================================
   2. UTILITY & LAYOUT CLASSES
   ========================================================================== */

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

.bg-light {
    background-color: var(--color-background-light);
}

.bg-dark {
    background-color: var(--color-primary-dark);
}

.bg-dark h2, .bg-dark h3, .bg-dark p {
    color: var(--color-text-on-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    color: var(--color-text-subtle);
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   3. GLOBAL COMPONENTS (Buttons, Forms, Cards)
   ========================================================================== */

/* --- Buttons --- */
.button, button, input[type="submit"] {
    display: inline-block;
    font-family: var(--font-header);
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-volumetric);
}

.button-primary {
    background-color: var(--color-text-on-dark);
    color: var(--color-text-on-light);
    border-color: var(--color-accent);
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-interactive);
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.button-accent {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

.button-accent:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-interactive);
}

.button-secondary {
    background-color: transparent;
    color: var(--color-text-on-light);
    border-color: var(--color-border);
}

.button-secondary:hover {
    background-color: var(--color-text-on-light);
    color: var(--color-text-on-dark);
    border-color: var(--color-text-on-light);
}

/* --- Forms --- */
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #444;
    border-radius: var(--border-radius);
    background-color: var(--color-secondary-dark);
    color: var(--color-text-on-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.3);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--color-text-subtle);
    pointer-events: none;
    transition: all 0.2s ease;
}

.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: -0.75rem;
    left: 0.75rem;
    font-size: 0.8rem;
    background-color: var(--color-primary-dark);
    padding: 0 0.25rem;
    color: var(--color-accent);
}

/* --- Cards --- */
.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-volumetric);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

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

.card-content h3 {
    font-size: 1.4rem;
}

.card-content p {
    flex-grow: 1;
    color: var(--color-text-subtle);
}

.link-arrow {
    font-family: var(--font-header);
    font-weight: 500;
    color: var(--color-accent);
    display: inline-block;
    margin-top: auto;
}

.link-arrow::after {
    content: ' →';
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}

.link-arrow:hover::after {
    transform: translateX(5px);
}


/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 0;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-on-dark);
}

.logo:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-header);
    color: var(--color-text-on-dark);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.nav-links .button {
    padding: 0.5rem 1.5rem;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

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


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

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-on-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem;
}

.hero-title {
    font-size: 4.5rem;
    color: var(--color-text-on-dark);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: var(--color-text-on-dark);
    opacity: 0.9;
}

/* --- Statistics Section --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card {
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.stat-number {
    font-family: var(--font-header);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
}

/* --- Innovation / Timeline Section --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--color-accent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: white;
    border: 4px solid var(--color-accent);
    top: 28px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -7.5px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7.5px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-volumetric);
}

/* --- Research & Blog Section --- */
.research-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card-category {
    font-family: var(--font-header);
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* --- Behind the Scenes (Carousel) --- */
.process-carousel-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.content-carousel {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
}

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 2rem;
    background-color: white;
    text-align: center;
}

.carousel-item img {
    border-radius: var(--border-radius);
    margin: 0 auto 1.5rem auto;
    width: 100%;
    max-width: 500px;
    height: 300px;
    object-fit: cover;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-volumetric);
    color: var(--color-primary-dark);
}

.carousel-prev { left: -25px; }
.carousel-next { right: -25px; }

/* --- Webinars Section --- */
.webinars-grid {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.card-horizontal .card-image {
    flex: 0 0 300px;
    height: 200px;
}
.card-horizontal .card-content {
    text-align: left;
}


/* --- Team Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-grid .card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 1.5rem auto 1rem;
    border: 5px solid white;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.team-grid .card-content {
    text-align: center;
}

/* --- Resources Section --- */
.resources-list .resource-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}
.resources-list .resource-item:hover {
    background-color: var(--color-background-light);
    transform: translateX(10px);
}
.resources-list .resource-item:last-child {
    border-bottom: none;
}
.resource-url {
    font-size: 0.9rem;
    color: var(--color-text-subtle);
    font-family: var(--font-header);
}

/* --- Careers Section --- */
.careers-list {
    max-width: 800px;
    margin: 0 auto;
}
.career-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-volumetric);
    transition: var(--transition-smooth);
}
.career-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-interactive);
}
.career-item span {
    color: var(--color-text-subtle);
    margin-top: 0.25rem;
    display: block;
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--color-primary-dark);
    color: #A9A9A9;
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #333;
}

.footer-logo {
    font-size: 1.5rem;
    color: var(--color-text-on-dark);
}

.footer-links h4, .footer-social h4 {
    font-size: 1.1rem;
    color: var(--color-text-on-dark);
    margin-bottom: 1rem;
}

.footer-links ul, .footer-social ul {
    list-style: none;
    padding: 0;
}

.footer-links li, .footer-social li {
    margin-bottom: 0.75rem;
}

.footer-links a, .footer-social a {
    color: #A9A9A9;
    text-decoration: none;
}

.footer-links a:hover, .footer-social a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}


/* ==========================================================================
   7. ANIMATIONS & OTHER PAGES
   ========================================================================== */

/* --- Scroll Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- Special Pages (Success, Privacy, Terms) --- */
.page-container {
    padding-top: 100px; /* Offset for fixed header */
    padding-bottom: 5rem;
}

.success-page-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--color-background-light);
}

.success-page-container h1 {
    color: var(--color-accent);
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    .hero-title { font-size: 3.5rem; }
    .card-horizontal { flex-direction: column; }
    .card-horizontal .card-image { width: 100%; }
}


@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-primary-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }
    
    .nav-links.active {
        right: 0;
    }

    .nav-links a { font-size: 1.5rem; }

    .burger-menu {
        display: block;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title { font-size: 2.5rem; }
    
    .timeline::after {
        left: 30px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 22.5px;
    }
    .career-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

[data-animate] {
  opacity: 1;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}