/* ========================================
   CP Malcolm – Styles
   ======================================== */

:root {
  --color-primary: #0089F7;
  --color-primary-hover: #0070cc;
  --color-hero-bg: #121629;
  --color-green: #4DD583;
  --color-green-dark: #3bc472;
  --color-text: #24272b;
  --color-text-muted: #626262;
  --color-text-light: #4f4f51;
  --color-bg: #FCFCFC;
  --color-white: #ffffff;
  --color-button-light: #eceef2;
  --color-button-gray: #6c757d;
  --color-border: #e8e8e8;

  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1220px;
  --header-height: 90px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 28px;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 70px 0;
}

.text-accent {
  color: var(--color-primary);
}

.text-white {
  color: var(--color-white);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

.section-title {
  font-size: 40px;
  line-height: 50px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}

.section-title--left {
  text-align: left;
}

.section-title--white {
  color: var(--color-text);
}

.section-title--white .text-white {
  color: var(--color-white);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 20px auto 40px;
  max-width: 80px;
}

.divider--left {
  margin-left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--light {
  background-color: var(--color-button-light);
  color: var(--color-text);
}

.btn--light:hover {
  background-color: #dde0e6;
  color: var(--color-text);
}

.btn--gray {
  background-color: var(--color-button-gray);
  color: var(--color-white);
  border-radius: 4px;
}

.btn--gray:hover {
  background-color: #5a6268;
  color: var(--color-white);
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 4px;
}

.btn--primary:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
}

.btn--dark {
  background-color: #24272b;
  color: var(--color-white);
  border-radius: 50px;
  padding: 14px 32px;
}

.btn--dark:hover {
  background-color: #1a1c1f;
  color: var(--color-white);
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-white);
  height: var(--header-height);
  border-bottom: 1px solid #f0f0f0;
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo img {
  height: 56px;
  width: auto;
}

/* Desktop navigation */
.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-list li {
  display: flex;
  align-items: center;
}

.header__nav-list li:not(:last-child)::after {
  content: '';
  display: block;
  width: 1px;
  height: 18px;
  background-color: #e0e0e0;
  margin: 0 4px;
}

.header__nav-list a {
  display: block;
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

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

.header__nav-list a.is-active {
  color: var(--color-primary);
}

.header__menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.header__menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition);
}

/* ---- Navigation Overlay ---- */
.nav-overlay {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: rgba(30, 30, 30, 0.95);
  z-index: 2000;
  padding: 60px 40px;
  transition: right var(--transition);
}

.nav-overlay--open {
  right: 0;
}

.nav-overlay__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.nav-overlay__list {
  list-style: none;
  margin-top: 40px;
}

.nav-overlay__list li {
  margin-bottom: 8px;
}

.nav-overlay__list a {
  display: block;
  padding: 12px 0;
  color: var(--color-white);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color var(--transition);
}

.nav-overlay__list a:hover,
.nav-overlay__list a.is-active {
  color: var(--color-primary);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.nav-backdrop--visible {
  opacity: 1;
  visibility: visible;
}

/* ---- Hero ---- */
.hero {
  background-color: var(--color-hero-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0, 137, 247, 0.08) 0%, transparent 60%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 80px 20px;
}

.hero__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
  max-width: 600px;
}

.hero__cta {
  margin-bottom: 40px;
}

.hero__experience {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 20px;
}

.hero__experience strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* ---- Roles ---- */
.roles {
  background-color: var(--color-white);
}

.roles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 40px;
}

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

.role-card__icon {
  margin-bottom: 20px;
}

.role-card__icon img {
  margin: 0 auto;
  opacity: 0.6;
}

.role-card__title {
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
  margin-bottom: 10px;
}

.role-card__desc {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 26px;
}

/* ---- CTA Bar ---- */
.cta-bar {
  padding: 40px 0;
  text-align: center;
  background-color: var(--color-white);
}

/* ---- Testimonials ---- */
.testimonials {
  background-color: var(--color-white);
  text-align: center;
}

.testimonials__slider {
  max-width: 800px;
  margin: 0 auto 40px;
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial {
  flex: 0 0 100%;
  padding: 20px 40px;
}

.testimonial p {
  font-size: 17px;
  line-height: 30px;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.testimonial footer {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  font-style: normal;
}

.testimonials__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.testimonials__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-border);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition);
}

.testimonials__dot--active {
  background-color: var(--color-primary);
}

/* ---- Accomplishments ---- */
.accomplishments {
  background-color: var(--color-white);
}

.accomplishments__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.accomplishments__image img {
  border-radius: 4px;
  width: 100%;
}

.accomplishments__content p {
  color: var(--color-text-muted);
  margin-bottom: 30px;
  line-height: 28px;
}

.accomplishments__content a:not(.btn) {
  word-break: break-all;
}

/* ---- Growth Process ---- */
.growth {
  background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.growth::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(
    circle at 50% 100%,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 60px
  );
  pointer-events: none;
}

.growth .container {
  position: relative;
  z-index: 1;
}

.growth__chart {
  margin: 40px auto;
  max-width: 970px;
}

.growth__chart img {
  margin: 0 auto;
  filter: brightness(1.05);
}

.growth__timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 50px 0 40px;
}

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

.timeline-item__marker {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  border: 2px solid var(--color-text);
  background-color: var(--color-text);
}

.timeline-item__marker--diamond {
  border-radius: 2px;
  transform: rotate(45deg);
}

.timeline-item__marker--diamond span {
  display: block;
  transform: rotate(-45deg);
}

.timeline-item__marker--square {
  border-radius: 0;
}

.timeline-item__marker--circle {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background-color: rgba(36, 39, 43, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.timeline-item__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.timeline-item__desc {
  font-size: 14px;
  line-height: 22px;
  color: var(--color-text-muted);
}

/* ---- Contact CTA ---- */
.contact-cta {
  background-image: url('../assets/cpm-home-cta-bg3.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.contact-cta__inner {
  width: 100%;
}

.contact-cta__content {
  max-width: 420px;
}

.contact-cta__title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 28px;
  text-align: left;
}

/* ---- Footer ---- */
.footer {
  background-color: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background-color var(--transition);
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-primary-hover);
}

/* ---- Animations ---- */
.fade-in {
  opacity: 1;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- Responsive ---- */
@media (min-width: 1024px) {
  .header__nav {
    display: block;
    margin-left: auto;
  }

  .header__menu-toggle {
    display: none;
  }
}

@media (max-width: 1023px) {
  .roles__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .growth__timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 28px;
    line-height: 38px;
  }

  .roles__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .accomplishments__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .growth__timeline {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero__title {
    font-size: 32px;
  }

  .testimonial {
    padding: 20px 10px;
  }

  .contact-cta {
    min-height: 320px;
    background-position: 70% center;
    padding: 50px 0;
  }

  .contact-cta__content {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .hero__content {
    padding: 60px 20px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 13px;
  }
}
