/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Manrope:wght@600;700&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  --color-background: #F9F5EF;
  --color-text: #2C3E50;
  --color-primary: #00796B; /* Deep Teal */
  --color-accent: #D35400; /* Muted Orange */
  --color-light-gray: #ECF0F1;
  --color-white: #FFFFFF;
  --color-black: #000000;

  --header-height: 4.5rem;
}

/* ==================== BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

ul {
  list-style: none;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  font-weight: 700;
}

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

/* ==================== HEADER ==================== */
.header {
  width: 100%;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-light-gray);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.header__container {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.header__logo:hover {
    color: var(--color-primary);
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav-link {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 0.25rem 0;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.header__nav-link:hover::after {
  width: 100%;
}

.header__nav-link--button {
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.header__nav-link--button:hover {
  background-color: #A94400; /* Darker accent */
  color: var(--color-white);
}

.header__nav-link--button::after {
    display: none;
}

.header__burger {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}

/* ==================== FOOTER ==================== */
.footer {
  background-color: var(--color-white);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-light-gray);
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  display: inline-block;
  margin-bottom: 1rem;
}

.footer__copyright {
  font-size: 0.9rem;
  color: #7f8c8d; /* Muted gray */
}

.footer__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer__link {
  font-size: 0.95rem;
  color: #34495e; /* Slightly darker than body text */
}
.footer__link:hover {
    color: var(--color-primary);
}

.footer__list--contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #34495e;
  font-size: 0.95rem;
}

.footer__icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}


/* ==================== RESPONSIVENESS (Mobile First) ==================== */
@media (max-width: 768px) {
  .header__nav {
    /* Styles for mobile menu will be added later with JS */
    display: none;
  }

  .header__burger {
    display: block;
  }

  .footer__container {
    text-align: center;
  }

  .footer__list--contact li {
    justify-content: center;
  }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.button--primary:hover {
    background-color: #A94400; /* Darker accent */
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(211, 84, 0, 0.3);
}

/* ==================== HERO ==================== */
.hero {
    padding-top: var(--header-height); /* Offset for fixed header */
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-bottom: 4rem;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
}

.hero__content {
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero__description {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero__visual {
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto;
    position: relative;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}


/* --- Responsive adjustments for Hero section --- */
@media (min-width: 768px) {
    .hero {
        min-height: 100vh;
    }
    
    .hero__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }

    .hero__content {
        text-align: left;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__description {
        margin: 0 0 2.5rem;
    }

    .hero__visual {
        height: 400px;
    }
}
/* ==================== GENERIC SECTION STYLES ==================== */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.section__subtitle {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==================== ANALYTICS SECTION ==================== */
.analytics {
    background-color: var(--color-white);
}

.analytics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.analytics__item {
    background-color: var(--color-background);
    padding: 2.5rem 2rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics__item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(44, 62, 80, 0.1);
}

.analytics__icon-wrapper {
    margin-bottom: 1.5rem;
}

.analytics__icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    stroke-width: 1.5;
}

.analytics__item-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.analytics__item-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* ==================== STRATEGY SECTION ==================== */
.strategy {
    background-color: var(--color-background);
}

.strategy__process {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.strategy__step {
    position: relative;
    padding: 1.5rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    z-index: 1;
}

.strategy__step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.strategy__step-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-light-gray);
}

.strategy__step-icon {
    width: 28px;
    height: 28px;
    color: var(--color-accent);
}

.strategy__step-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.strategy__step-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* --- Desktop styles with connecting line --- */
@media (min-width: 768px) {
    .strategy__process {
        flex-direction: row;
        gap: 2rem;
        justify-content: space-between;
    }

    .strategy__process::before {
        content: '';
        position: absolute;
        top: 45px; /* Align with icons */
        left: 5%;
        width: 90%;
        height: 2px;
        background-color: var(--color-light-gray);
        z-index: 0;
    }
    
    .strategy__process::after {
        content: '';
        position: absolute;
        top: 45px;
        left: 5%;
        width: 0; /* Initially 0 width for animation */
        height: 2px;
        background-color: var(--color-primary);
        z-index: 0;
        transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .strategy__process.is-visible::after {
        width: 90%; /* Animate to full width */
    }

    .strategy__step {
        flex-basis: 30%;
        text-align: center;
    }

    .strategy__step-header {
        justify-content: center;
    }
}

/* ==================== CASES SECTION ==================== */
.cases {
    background-color: var(--color-white);
}

.cases__accordion {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    overflow: hidden;
}

.cases__item {
    border-bottom: 1px solid var(--color-light-gray);
}

.cases__item:last-child {
    border-bottom: none;
}

.cases__item-header {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.cases__item-header:hover {
    background-color: var(--color-background);
}

.cases__item-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
    margin-left: 1rem;
}

.cases__item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: var(--color-background);
}

.cases__item-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #34495e;
}

.cases__item-body p {
    margin-bottom: 0.75rem;
}
.cases__item-body p:last-child {
    margin-bottom: 0;
}


/* --- Active State for Accordion --- */
.cases__item.is-active .cases__item-icon {
    transform: rotate(180deg);
}

.cases__item.is-active .cases__item-content {
    max-height: 500px; /* Adjust if content is taller */
}

/* ==================== PUBLICATIONS SECTION ==================== */
.publications {
    background-color: var(--color-background);
}

.publications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.publications__card {
    background-color: var(--color-white);
    border-radius: 8px;
    border: 1px solid var(--color-light-gray);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publications__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(44, 62, 80, 0.1);
}

.publications__card-image-wrapper {
    overflow: hidden;
}

.publications__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.publications__card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.publications__card-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.publications__card-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.publications__card-title a {
    color: var(--color-text);
}

.publications__card-title a:hover {
    color: var(--color-primary);
}

.publications__card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

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

.publications__card-link-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.publications__card-link:hover .publications__card-link-icon {
    transform: translateX(4px);
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    background-color: var(--color-white);
}

.contact__container {
    display: grid;
    gap: 4rem;
}

@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.5fr;
    }
}

.contact__info-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact__info-description {
    margin-bottom: 2rem;
    color: #555;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact__info-list a {
    color: var(--color-text);
}
.contact__info-list a:hover {
    color: var(--color-primary);
}

.contact__info-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #34495e;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 5px;
    background-color: var(--color-background);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.1);
}

.form__captcha #captcha-question {
    font-weight: 700;
}

.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}
.form__group--checkbox label {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.form__group--checkbox input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.form__button {
    width: 100%;
}

.form__message {
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}

.form__message--success {
    background-color: #E8F5E9; /* Light green */
    color: #2E7D32; /* Dark green */
    display: block;
}

.form__message--error {
    background-color: #FFEBEE; /* Light red */
    color: #C62828; /* Dark red */
    display: block;
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-text);
    color: var(--color-white);
    padding: 1.5rem 0;
    z-index: 200;
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-hidden {
    transform: translateY(150%);
}

.cookie-popup__content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-popup__text {
    font-size: 0.9rem;
}

.cookie-popup__text a {
    color: var(--color-white);
    text-decoration: underline;
}

.cookie-popup__text a:hover {
    color: var(--color-light-gray);
}

.cookie-popup__button {
    flex-shrink: 0;
    padding: 0.7rem 1.4rem;
}

@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== GENERIC PAGES (privacy, terms, etc.) ==================== */
.pages {
    padding-top: calc(var(--header-height) + 4rem); /* Offset for header + extra space */
    padding-bottom: 5rem;
    background-color: var(--color-white);
}

.pages .container {
    max-width: 800px; /* Optimal width for reading */
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.pages h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.pages p, .pages li {
    font-size: 1rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 1.25rem;
}

.pages ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

.pages strong {
    font-weight: 700;
    color: var(--color-text);
}