img { max-width: 100%; }

/* Keep the CLM logo visible over dark headers. */
.home-page .header:not(.scrolled) .brand img,
.inner-page .brand img,
.content-page .brand img,
.article-page .brand img {
  mix-blend-mode: normal;
  filter: brightness(1.55) contrast(1.08);
}

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  .header { height: 76px !important; padding-inline: 4vw; }
  .header.scrolled { height: 76px !important; }
  .brand img, .home-page .brand img, .inner-page .brand img {
    width: 120px !important;
    height: auto !important;
  }
  .nav {
    top: 76px !important;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    gap: 24px !important;
  }
  .nav.open { width: 100%; }
  .nav a, .inner-page .nav a, .content-page .nav a { color: #171419 !important; }
  .nav-cta { width: 100%; text-align: center; color: #171419 !important; }
  .inner-page .nav-cta, .content-page .nav-cta { color: #111 !important; }

  .reference-hero { height: auto; min-height: 620px; padding: 115px 6vw 50px; }
  .reference-hero h1 { font-size: clamp(42px, 13vw, 62px) !important; line-height: .86 !important; }
  .reference-hero p br { display: none; }
  .hero-ribbon { right: -70px; bottom: 95px; opacity: .55; }

  .brand-strip { overflow-x: auto; justify-content: flex-start; gap: 24px; padding-inline: 5vw; }
  .brand-strip > * { flex: 0 0 auto; }

  .reference-intro,
  .reference-results,
  .reference-services,
  .reference-process,
  .reference-contact { padding-left: 6vw; padding-right: 6vw; }
  .reference-intro-copy h2,
  .reference-results h2,
  .reference-services-head h2,
  .process-title h2,
  .reference-contact h2 { font-size: 42px !important; }
  .reference-service-grid { grid-template-columns: 1fr !important; }
  .reference-service-card.wide { grid-column: auto !important; }
  .process-grid { grid-template-columns: 1fr !important; }
  .reference-work { height: auto !important; grid-template-columns: repeat(2, 1fr) !important; }
  .reference-work figure { height: 220px !important; }
  .reference-proof { grid-template-columns: repeat(2, 1fr) !important; }
  .reference-contact { grid-template-columns: 1fr !important; height: auto !important; }
  .reference-contact > img { height: 300px !important; }

  footer { padding: 65px 6vw !important; }
  footer, .footer-meta { text-align: left !important; }
  .footer-links { flex-wrap: wrap; }
  .footer-meta { align-items: flex-start !important; }

  .inner-hero { height: auto; min-height: 700px; padding: 120px 6vw 45px !important; }
  .inner-hero h1 { font-size: clamp(44px, 13vw, 68px) !important; line-height: .84 !important; }
  .inner-hero-copy p { font-size: 16px; }
  .inner-hero-media { height: 300px; }
  .inner-contact { grid-template-columns: 1fr !important; }

  .whatsapp-button { right: 16px !important; bottom: 16px !important; }
}

@media (max-width: 560px) {
  .header { height: 68px !important; }
  .header.scrolled { height: 68px !important; }
  .brand img, .home-page .brand img, .inner-page .brand img { width: 105px !important; }
  .nav { top: 68px !important; }

  .reference-hero { min-height: 590px; }
  .reference-hero h1 { font-size: 40px !important; }
  .reference-intro-copy h2,
  .reference-results h2,
  .reference-services-head h2,
  .process-title h2,
  .reference-contact h2 { font-size: 34px !important; }
  .reference-intro-copy p, .results-copy p { font-size: 16px; }
  .feature-points { grid-template-columns: 1fr; }
  .reference-service-card img { height: 220px; }
  .reference-work { grid-template-columns: 1fr !important; }
  .reference-work figure { height: 260px !important; }
  .reference-proof { grid-template-columns: 1fr 1fr !important; }
  .reference-proof strong { font-size: 42px; }

  .inner-hero { min-height: 660px; }
  .inner-hero h1 { font-size: 40px !important; }
  .inner-hero-media { height: 250px; }
  .directory-head h2, .inner-story blockquote { font-size: 38px !important; }
  .inner-process-list article { grid-template-columns: 44px 1fr !important; }
  .values-list article { grid-template-columns: 40px 1fr !important; }
  .values-list h3 { grid-column: 2; }
  .values-list p { grid-column: 1 / -1; }
}

.content-page { background: var(--cream); }
.content-page .header { background: #09090a; }
.content-page .header a { color: white; }
.content-page .header .nav-cta { background: var(--orange) !important; color: #111 !important; }
.content-page .inner-page-head {
  min-height: 420px;
  padding: 145px 5vw 70px;
  background: #09090a;
  color: white;
  display: flex;
  align-items: flex-end;
}
.content-page .inner-page-head h1 { max-width: 850px; margin: 18px 0 0; font-size: clamp(58px, 8vw, 110px); line-height: .84; letter-spacing: -.04em; }
.content-page .inner-page-head p { max-width: 620px; color: #d0ced0; line-height: 1.7; }
.content-grid {
  padding: 90px 5vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.content-card { background: white; overflow: hidden; }
.content-card img { width: 100%; height: 280px; object-fit: cover; display: block; }
.content-card div { padding: 28px; }
.content-card span { color: var(--orange); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.content-card h2 { font-size: 28px; margin: 12px 0; }
.content-card p { color: #625d61; line-height: 1.65; }
.content-card a { color: var(--wine); font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr 1fr; padding: 70px 5vw; }
  .content-page .inner-page-head { min-height: 350px; padding-top: 115px; }
  .content-page .inner-page-head h1 { font-size: 58px; }
}

@media (max-width: 560px) {
  .content-grid { grid-template-columns: 1fr; padding: 55px 5vw; }
  .content-card img { height: 240px; }
  .content-page .inner-page-head { min-height: 320px; }
  .content-page .inner-page-head h1 { font-size: 44px; }
}

.article-page { background: var(--cream); }
.article-page .header { background: #09090a; }
.article-page .header a { color: white; }
.article-hero { min-height: 520px; padding: 145px 5vw 60px; background: #09090a; color: white; }
.article-hero > div { max-width: 980px; }
.article-hero h1 { margin: 20px 0; font-size: clamp(48px, 7vw, 92px); line-height: .88; letter-spacing: -.04em; }
.article-meta { color: #c9c6c9; font-size: 13px; }
.article-cover { width: 90%; height: 520px; margin: -120px 5vw 0; object-fit: cover; position: relative; }
.article-body { max-width: 760px; margin: 0 auto; padding: 70px 24px 100px; }
.article-body p { font-size: 18px; line-height: 1.85; color: #49444a; }
.article-body h2 { margin-top: 55px; font-size: clamp(32px, 5vw, 48px); line-height: 1; }
.article-body ul { padding-left: 20px; }
.article-body li { margin: 12px 0; line-height: 1.65; }
.article-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 50px; }
.article-actions .button { text-decoration: none; }

@media (max-width: 900px) {
  .article-hero { min-height: 430px; padding-top: 115px; }
  .article-cover { width: calc(100% - 32px); height: 360px; margin: -80px 16px 0; }
  .article-body { padding-top: 55px; }
}

@media (max-width: 560px) {
  .article-hero { min-height: 390px; padding: 105px 5vw 45px; }
  .article-hero h1 { font-size: 42px; }
  .article-cover { height: 260px; margin-top: -55px; }
  .article-body p { font-size: 16px; }
}

.project-page { background: var(--cream); }
.project-hero.reveal { opacity: 1; transform: none; }
.project-hero { min-height: 520px; padding: 145px 5vw 70px; background: #09090a; color: white; display: flex; align-items: flex-end; }
.project-hero div { max-width: 980px; }
.project-hero h1 { margin: 18px 0 0; font-size: clamp(52px, 8vw, 105px); line-height: .86; letter-spacing: -.04em; }
.project-summary { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; padding: 70px 5vw; background: white; }
.project-facts { display: grid; gap: 18px; }
.project-facts div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.project-facts span { display: block; color: var(--orange); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.project-facts strong { display: block; margin-top: 5px; }
.project-story { color: #504b51; font-size: 18px; line-height: 1.75; }
.project-detail-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 55px; }
.project-detail-blocks section { padding-top: 18px; border-top: 2px solid var(--line); }
.project-detail-blocks section > span { color: var(--orange); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.project-detail-blocks h2 { margin: 16px 0 12px; font-size: 24px; line-height: 1.08; }
.project-detail-blocks p, .project-detail-blocks li { font-size: 15px; line-height: 1.65; }
.project-detail-blocks ul { margin: 0; padding-left: 18px; }
.project-outcome { margin-top: 40px; padding: 24px; border-left: 3px solid var(--orange); background: #f1ede5; font-size: 17px; }
.project-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; padding: 0 5vw 90px; }
.project-gallery img { width: 100%; height: 480px; object-fit: cover; }
.project-gallery img:last-child { height: 480px; }
.project-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.project-actions .button { text-decoration: none; }

@media (max-width: 900px) {
  .project-hero { min-height: 430px; padding-top: 115px; }
  .project-summary { grid-template-columns: 1fr 1.5fr; gap: 35px; }
  .project-detail-blocks { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .project-hero { min-height: 380px; padding: 105px 5vw 45px; }
  .project-hero h1 { font-size: 43px; }
  .project-summary { grid-template-columns: 1fr; padding: 55px 5vw; }
  .project-story { font-size: 16px; }
  .project-gallery { padding-bottom: 65px; }
  .project-gallery img, .project-gallery img:last-child { height: 280px; }
}

/* Four-column footer matching the CLM reference */
footer {
  width: 100%;
  padding: 70px 5vw 24px;
  background: #09090a;
  color: white;
}
footer a { color: inherit; text-decoration: none; }
footer h3 {
  margin: 0 0 22px;
  color: var(--orange);
  font-size: 16px;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.35fr .8fr 1fr 1.15fr;
  gap: 55px;
  align-items: start;
}
.footer-brand { display: block; margin-bottom: 34px; }
.footer-brand img { width: 150px; height: auto !important; }
.footer-about h3 { margin-bottom: 12px; }
.footer-about p, .footer-newsletter p { max-width: 280px; margin: 0; color: #aaa7aa; font-size: 13px; line-height: 1.65; }
.footer-contact { margin-top: 24px; display: grid; gap: 12px; }
.footer-contact a { color: #d8d5d8; font-size: 13px; }
.footer-contact span { display: inline-block; min-width: 48px; color: var(--orange); }
.footer-column { display: grid; align-content: start; gap: 12px; }
.footer-column a { color: #d1ced1; font-size: 14px; width: fit-content; }
.footer-column a:hover, .footer-contact a:hover { color: var(--orange); }
.footer-newsletter form { margin-top: 20px; }
.footer-newsletter input {
  width: 100%; height: 42px; padding: 0 14px; border: 0; border-radius: 3px; background: white; font: inherit; }
.footer-newsletter button {
  height: 38px; margin-top: 10px; padding: 0 22px; border: 0; border-radius: 3px; background: var(--orange); color: #111; font-weight: 800; cursor: pointer; }
.footer-bottom {
  margin-top: 54px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12);
  display: grid; grid-template-columns: 1fr auto;
  align-items: center;
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #111;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.footer-bottom p { margin: 0; color: #aaa7aa; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  footer { padding: 58px 6vw 24px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 45px 30px; }
}

@media (max-width: 560px) {
  footer { padding: 52px 6vw 24px; }
  .footer-main { grid-template-columns: 1fr; gap: 38px; }
  .footer-brand img { width: 132px; }
  .footer-bottom { grid-template-columns: 1fr; gap: 22px; }
  .footer-socials { justify-content: center; }
  .footer-bottom p { text-align: center; }
}

.portfolio-directory { padding: 90px 4vw; background: #f4f5f8; }
.portfolio-directory-head h2 { max-width: 950px; margin: 18px 0 0; font-size: 32px; line-height: 1.08; letter-spacing: -.02em; }
.portfolio-directory-head h2::before { content: ""; width: 3px; height: 40px; margin-right: 18px; display: inline-block; vertical-align: middle; background: var(--orange); }
.portfolio-tabs { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 38px; border-bottom: 1px solid #ddd; }
.portfolio-tab { position: relative; padding: 13px 8px 16px; border: 0; background: transparent; color: #8f9099; font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.portfolio-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.portfolio-tab.active { color: #111; }
.portfolio-tab[data-filter="all"]::after { background: #263b96; }
.portfolio-tab[data-filter="fmcg"]::after { background: var(--orange); }
.portfolio-tab[data-filter="education"]::after { background: #4f9bc4; }
.portfolio-tab[data-filter="events"]::after { background: #ef6d4d; }
.portfolio-tab[data-filter="entertainment"]::after { background: #ef315d; }
.portfolio-tab[data-filter="fintech"]::after { background: #35a98f; }
.portfolio-tab:not(.active)::after { opacity: .18; }
.portfolio-list { margin-top: 18px; }
.portfolio-row { min-height: 150px; margin-bottom: 16px; padding: 18px 22px; border-radius: 7px; background: white; box-shadow: 0 2px 12px rgba(17,20,25,.05); display: grid; grid-template-columns: 120px 1fr auto; gap: 26px; align-items: center; }
.portfolio-row[hidden] { display: none; }
.portfolio-logo { width: 120px; height: 110px; border-radius: 6px; display: grid; place-items: center; overflow: hidden; text-align: center; font-family: 'Manrope', sans-serif; font-weight: 800; }
.portfolio-logo.basella { background: #072b50; color: white; font-size: 20px; }
.portfolio-logo.surestart { background: repeating-linear-gradient(135deg,#d9ecff 0 14px,#fff 14px 28px); color: #1d3c87; font-size: 13px; }
.portfolio-logo.omni27 { background: linear-gradient(135deg,#192a47,#0d101b); color: #fff; font-size: 18px; }
.portfolio-logo.isabee { background: linear-gradient(135deg,#121126,#7043a1); color: #fff; font-size: 18px; }
.portfolio-logo.funding { background: #10171d; color: #31c5a1; font-size: 16px; }
.portfolio-copy h3 { margin: 0 0 5px; font-size: 22px; }
.portfolio-copy span { color: var(--orange); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.portfolio-copy p { max-width: 760px; margin: 10px 0 0; color: #4d5159; font-size: 14px; line-height: 1.55; }
.portfolio-row > a { color: var(--wine); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.portfolio-row > a:hover { color: var(--orange); }

@media (max-width: 900px) {
  .portfolio-directory { padding: 70px 5vw; }
  .portfolio-tabs { overflow-x: auto; grid-template-columns: repeat(6, minmax(110px, 1fr)); }
  .portfolio-row { grid-template-columns: 100px 1fr; }
  .portfolio-logo { width: 100px; height: 96px; }
  .portfolio-row > a { grid-column: 2; }
}

@media (max-width: 560px) {
  .portfolio-directory { padding: 55px 4vw; }
  .portfolio-directory-head h2 { font-size: 27px; }
  .portfolio-directory-head h2::before { height: 34px; margin-right: 12px; }
  .portfolio-row { grid-template-columns: 82px 1fr; gap: 16px; padding: 14px; }
  .portfolio-logo { width: 82px; height: 82px; font-size: 14px !important; }
  .portfolio-copy h3 { font-size: 18px; }
  .portfolio-copy p { grid-column: 1 / -1; font-size: 13px; }
  .portfolio-row > a { grid-column: 1 / -1; justify-self: start; }
}

.contact-page { background: var(--cream); }
.contact-hero { min-height: 720px; display: grid; grid-template-columns: 58% 42%; background: white; }
.contact-image { min-height: 720px; background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(0,0,0,.05)), url('https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=1600&q=90') center/cover; }
.contact-panel { position: relative; overflow: hidden; padding: 150px 6vw 55px; background: white; }
.contact-panel::before { content: ''; position: absolute; width: 260px; height: 260px; right: -115px; top: -85px; border-radius: 50%; border: 55px solid var(--wine); opacity: .95; }
.contact-intro span { font-size: 13px; font-weight: 800; }
.contact-intro h1 { margin: 15px 0 50px; color: var(--orange); font-size: clamp(55px, 6vw, 92px); line-height: .82; letter-spacing: -.04em; }
.contact-intro h1 em { color: var(--wine); font-style: normal; }
.contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.contact-details > div { min-width: 0; }
.contact-details > div > span { display: block; margin-bottom: 8px; color: var(--wine); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.contact-details a, .contact-details p { margin: 0; color: #353039; font-size: 13px; line-height: 1.55; text-decoration: none; overflow-wrap: anywhere; }
.contact-details a:hover { color: var(--orange); }
.contact-form-section { padding: 100px 5vw; background: var(--cream); display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.contact-form-section h2 { max-width: 500px; margin: 18px 0 0; font-size: clamp(42px, 5vw, 68px); line-height: .95; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form label:nth-child(5) { grid-column: 1 / -1; }
.contact-form label span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.contact-form input, .contact-form textarea { width: 100%; border: 0; border-bottom: 1px solid #aaa4a7; border-radius: 0; background: transparent; font: inherit; padding: 12px 0; outline: none; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--orange); }
.contact-form button { grid-column: 1 / -1; justify-self: start; border: 0; }

@media (max-width: 900px) {
  .contact-hero { grid-template-columns: 1fr; }
  .contact-image { min-height: 420px; }
  .contact-panel { min-height: auto; padding: 70px 6vw 60px; }
  .contact-intro h1 { font-size: 62px; }
  .contact-form-section { grid-template-columns: 1fr; gap: 45px; }
}

@media (max-width: 560px) {
  .contact-image { min-height: 300px; }
  .contact-panel { padding: 55px 5vw; }
  .contact-panel::before { width: 190px; height: 190px; right: -100px; top: -75px; border-width: 40px; }
  .contact-intro h1 { font-size: 44px; margin-bottom: 38px; }
  .contact-details { grid-template-columns: 1fr; gap: 24px; }
  .contact-form-section { padding: 70px 5vw; }
  .contact-form-section h2 { font-size: 40px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form label:nth-child(5) { grid-column: auto; }
  .contact-form button { grid-column: auto; }
}
