.creativity-bg {
  background-image: url("../images/creativity/background.svg");
}
.footer-bg {
  background-image: url("../images/footer-shape-bg.webp") /* Fix 22 */;
}
.banner-bg {
  background-image: url("../images/banner-bg.svg");
}
.help-bg {
  background-image: url("../images/help-bg.svg");
}
.help-card-bg {
  background-image: url("../images/help-card-shape.svg");
}

/* Keep narrow mobile layouts fixed to the viewport while preserving vertical scroll. */
@media (max-width: 767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  @supports (overflow: clip) {
    html,
    body {
      overflow-x: clip;
    }
  }
}

/* Fix 3: also stop sideways scrolling on tablet/desktop (slide-in cards started
   48px off-screen and made the page wider than the window). clip, not hidden,
   so the sticky header keeps working. */
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

/* Sticky header compact mode - Optimized for smooth animations */
.site-header {
  will-change: box-shadow;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout style;
  isolation: isolate;
  overflow: visible; /* Allow dropdown menus to overflow */
}

.site-header__inner {
  will-change: padding;
  transition:
    padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout style;
  overflow: visible; /* Allow dropdown menus to overflow */
  position: relative; /* Ensure proper stacking context */
}

.site-header__logo {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  display: flex;
  align-items: center;
  min-height: 60px;
  transition: min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header__logo img {
  will-change: max-height;
  transition:
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.site-header.is-sticky .site-header__logo {
  min-height: 40px;
}

.nav-menu {
  will-change: gap;
  transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
}

.primary-button {
  will-change: padding, font-size;
  transition:
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
}

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

.site-header.is-sticky .site-header__inner {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.site-header.is-sticky .site-header__logo img {
  max-height: 40px !important;
  height: auto !important;
}

.site-header.is-sticky .nav-menu {
  gap: 1rem !important;
}

.site-header.is-sticky .primary-button {
  padding: 0.625rem 1.5rem !important;
  font-size: 0.875rem !important;
}

.site-header,
.site-header__inner,
.site-header__logo img,
.site-header .nav-menu,
.site-header .nav-menu li,
.site-header .nav-menu li a,
.site-header .primary-button {
  will-change: padding, transform, box-shadow, font-size;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile Menu Overlay - Full Screen Modal */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  min-height: 100dvh;
  z-index: 100;
  background-color: rgba(255, 255, 255, 1);
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

.mobile-menu-overlay:not(.hidden) {
  visibility: visible;
}

.mobile-menu-overlay.hidden {
  visibility: hidden;
}

.mobile-menu-overlay.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-overlay.opacity-100 {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  width: 100%;
  height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-menu-content nav {
  flex: 1;
}

.mobile-menu-content .nav-menu li {
  margin-bottom: 0;
}

.mobile-menu-content .nav-menu li a {
  padding: 0.75rem 0;
  display: block;
  font-size: 1rem;
  line-height: 1.5;
}

.mobile-menu-content .nav-menu {
  gap: 0.75rem !important;
}

.mobile-menu-content .nav-menu > li {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
}

.mobile-menu-content .nav-menu > li > a {
  padding: 0.875rem 1rem;
  font-weight: 500;
  color: #0f172a;
}

.mobile-menu-content .nav-menu .has-submenu > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-menu-content .nav-menu .has-submenu > a span[aria-hidden="true"] {
  margin-left: auto;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f766e;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-menu-content
  .nav-menu
  .has-submenu.submenu-open
  > a
  span[aria-hidden="true"] {
  transform: rotate(180deg);
}

.mobile-menu-content .nav-menu .has-submenu .sub-menu {
  margin: 0 0.75rem 0.75rem;
  padding: 0.5rem;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 1.5rem);
  border-left: 0;
  border-radius: 10px;
  background: #f8fafc;
  white-space: normal;
}

.mobile-menu-content .nav-menu .has-submenu .sub-menu a {
  padding: 0.65rem 0.75rem;
  margin: 0;
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #334155;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mobile-menu-content .nav-menu .has-submenu .sub-menu a:hover {
  color: #0f766e;
  background: #e2e8f0;
}

.mobile-menu-content > .container:last-child {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

/* Desktop nav dropdown: keep icon + text on one row */
.site-header .nav-menu .sub-menu li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header .nav-menu .sub-menu li a svg {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__inner,
  .site-header__logo img,
  .site-header .nav-menu,
  .site-header .nav-menu li,
  .site-header .nav-menu li a,
  .site-header .primary-button {
    transition: none;
  }
}

/* Contact Form 7 - Custom Styling with Prefix */

/* Form wrapper */
.contact-form-wrapper .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* space-y-5 = 20px */
}

/* Remove default CF7 paragraph margins */
.contact-form-wrapper .wpcf7-form p {
  margin: 0;
}

/* Label styling */
.contact-form-wrapper .wpcf7 label {
  display: block;
  margin-bottom: 0.5rem; /* mb-2 = 8px */
  font-size: 0.875rem; /* text-sm = 14px */
  font-weight: 300; /* font-light */
  color: rgba(0, 0, 0, 0.5); /* text-black/50 */
}

/* Optional text in teal */
.contact-form-wrapper .wpcf7 label .text-teal {
  color: #14b8a6; /* teal color */
}

/* Input, Select, Textarea base styling */
.contact-form-wrapper .wpcf7 input[type="text"],
.contact-form-wrapper .wpcf7 input[type="email"],
.contact-form-wrapper .wpcf7 select,
.contact-form-wrapper .wpcf7 textarea {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 1rem 1.25rem; /* py-4 px-5 = 16px 20px */
  font-size: 1rem; /* text-base = 16px */
  color: #000000;
  box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.2s ease;
}

/* Select specific styling */
.contact-form-wrapper .wpcf7 select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 3rem; /* pr-12 = 48px */
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 5 5-5' stroke='rgba(0,0,0,0.4)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center; /* right-5 = 20px */
  background-size: 1rem; /* 16px */
}

/* Textarea specific styling */
.contact-form-wrapper .wpcf7 textarea {
  height: 9rem; /* h-36 = 144px */
  resize: none;
}

/* Focus state */
.contact-form-wrapper .wpcf7 input[type="text"]:focus,
.contact-form-wrapper .wpcf7 input[type="email"]:focus,
.contact-form-wrapper .wpcf7 select:focus,
.contact-form-wrapper .wpcf7 textarea:focus {
  border-color: #14b8a6; /* focus:border-teal */
}

/* Placeholder styling */
.contact-form-wrapper .wpcf7 input::placeholder,
.contact-form-wrapper .wpcf7 textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* Submit button */
.contact-form-wrapper .wpcf7 .primary-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #14b8a6; /* teal */
  color: #ffffff;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0px 12px 30px rgba(20, 184, 166, 0.2);
}

.contact-form-wrapper .wpcf7 .primary-button:hover {
  background-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0px 16px 40px rgba(20, 184, 166, 0.3);
}

/* Remove CF7 validation error styles */
.contact-form-wrapper .wpcf7-form .wpcf7-not-valid-tip {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.contact-form-wrapper .wpcf7-form .wpcf7-not-valid {
  border-color: #ef4444 !important;
}

/* Success/Error messages */
.contact-form-wrapper .wpcf7-response-output {
  margin: 1rem 0 0 0;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.contact-form-wrapper .wpcf7-mail-sent-ok {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.contact-form-wrapper .wpcf7-validation-errors,
.contact-form-wrapper .wpcf7-mail-sent-ng {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Spinner */
.contact-form-wrapper .wpcf7-spinner {
  margin-left: 1rem;
}

/* Banner section: keep the center image fully inside the fixed-height desktop banner (was cropping heads) */
@media (min-width: 1024px) {
    #banner-section img {
        height: calc(100% - 24px);
        width: auto;
        max-width: none;
        object-fit: contain;
        object-position: bottom;
    }
}

/* ==========================================================================
   Mobile type scale (phones, < 768px). Desktop is unchanged.
   H1 34px > H2 30px > H3 22px > body 17px. Body text >= 4.5:1 contrast.
   ========================================================================== */
@media (max-width: 767px) {

    /* Page title must be the largest text on the page */
    #hero-section h1 {
        font-size: 34px;
        line-height: 1.15;
    }

    /* Space between sections (was up to 200px) */
    .content-block-section,
    #brand-comparison-section,
    #service-includes-section,
    #services-section {
        margin-bottom: 80px;
    }

    /* --- Content blocks (heading + paragraph + bullets + quote) --- */
    .content-block-section h2 {
        font-size: 30px;
        line-height: 1.2;
        letter-spacing: -0.01em;
    }
    .content-block-section p.font-light {
        font-size: 17px;
        line-height: 1.6;
        font-weight: 400;
        color: #5f6368;
        margin-bottom: 8px;
    }
    .content-block-section p[class*="border-l-"] {
        font-size: 18px;
        line-height: 1.5;
        border-left-width: 4px;
        margin-bottom: 0;
    }
    .content-block-section ul {
        list-style-position: outside;
        padding-left: 1.25em;
        font-size: 17px;
        line-height: 1.5;
        color: #1f2933;
    }
    .content-block-section ul li + li {
        margin-top: 8px;
    }
    .content-block-section ul li::marker {
        color: #37ACAB;
    }

    /* --- Comparison cards --- */
    #brand-comparison-section .px-16 {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 32px;
    }
    #brand-comparison-section .px-10 {
        padding-left: 20px;
        padding-right: 20px;
    }
    #brand-comparison-section h3 {
        font-size: 24px;
        line-height: 1.3;
    }
    #brand-comparison-section p {
        font-size: 17px;
        line-height: 1.6;
    }
    #brand-comparison-section li {
        font-size: 16px;
        line-height: 1.45;
    }

    /* --- Section headings that were 48px --- */
    #service-includes-section h2 {
        font-size: 30px;
        line-height: 1.2;
        margin-bottom: 40px;
    }

    /* --- Team bios --- */
    #team-section p[class*="text-[22px]"] {
        font-size: 17px;
        line-height: 1.6;
    }
}

/* Fix 4: REVERTED on Jeff's request - original case-study card covers restored (no dark overlay). */

/* Fix 5: "What's Included" pills without a link are plain labels, not buttons */
#service-includes-section span.cursor-default {
  cursor: default;
}

/* Fix 10: homepage hero call-to-action buttons */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.hero-cta-row a {
  min-height: 48px;
}
/* Fix 11: desktop hero - keep the outer cards ("Fresh Content", "Better Branding")
   inside the rounded hero instead of touching/clipping at its edges */
@media (min-width: 1024px) {
  .hero-cards-grid {
    padding-left: clamp(24px, 3.5vw, 64px);
    padding-right: clamp(24px, 3.5vw, 64px);
  }
}

/* Fix 13: REVERTED 21 Oct on Jeff's request - original brand teal restored for text. */

/* Fix 14: pink package names/prices ("Gold" etc.) were #FF9392 at 2.1:1 on white.
   Deeper coral #C9393B = 5.1:1. Only used in the packages section. */
.text-coral {
  color: #C9393B;
}

/* Fix 15: grey text was too light (50% black = 3.98:1, 35-45% = 2.4-3.2:1).
   Raised so all body/secondary text passes 4.5:1. Placeholders unchanged. */
.text-black\/50 {
  color: rgba(0, 0, 0, 0.64);
}
.text-black\/35,
.text-black\/40,
.text-black\/45 {
  color: rgba(0, 0, 0, 0.6);
}

/* Fix 16: contact form - each label now sits right above its own field
   (CF7's <br> made the label closer to the previous field), clearer gaps
   between fields, and darker labels. */
.contact-form-wrapper .wpcf7 form p > br {
  display: none;
}
.contact-form-wrapper .wpcf7 form p {
  margin: 0 0 24px;
}
.contact-form-wrapper .wpcf7 label {
  margin-bottom: 8px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.72);
}

/* Fix 18: blog card/article meta (dates, read time, category tags) was 10-11px.
   Now 12-13px; colour handled by Fix 15. Uppercase labels keep their tracking. */
.text-\[10px\] {
  font-size: 12px;
}
.text-\[11px\] {
  font-size: 13px;
}

/* Fix 19: phone tap targets >= 44px (footer links were 20-23px tall, social
   icons 40px, case-study filter chips 38px, contact phone link 20px) */
@media (max-width: 767px) {
  footer li > a,
  footer a[href^="mailto:"],
  footer a[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  footer a.h-10.w-10 {
    width: 44px;
    height: 44px;
  }
  .portfolio-filter-btn {
    min-height: 44px;
  }
  /* links are now 44px rows themselves, so drop the extra list gap */
  footer ul.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0;
  }
}

/* Fix 24: tablets (768-1023px) - the centred desktop menu overlapped the logo and
   wrapped ("Case Studies" on 2 lines), and neither the CTA nor the menu button
   showed. Use the phone menu (hamburger + full-screen panel) until 1024px. */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header nav.pointer-events-auto {
    display: none;
  }
  #mobile-menu-toggle {
    display: inline-flex;
  }
  #mobile-menu-panel:not(.hidden) {
    display: block;
  }
}

/* Fix 15 (cont.): "/ month" on package prices was 20% black (1.6:1) */
#packages-section .text-black\/20 {
  color: rgba(0, 0, 0, 0.6);
}

/* Fix 25: REVERTED 21 Oct on Jeff's request - original teal buttons/badges/filters restored. */

/* Fix 24 (cont.): keep desktop menu items on one line ("Case Studies" wrapped at 1024px) */
.site-header .nav-menu > li > a {
  white-space: nowrap;
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .site-header nav.pointer-events-auto .nav-menu {
    gap: 6px;
  }
}

@media (min-width: 1024px) and (max-width: 1599px) {
  .hero-inner-box > div.relative.z-10 {
    padding-left: 56px;
  }
  .hero-inner-box > div.relative.z-10 > div span {
    font-size: 22px;
    max-width: 340px;
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-inner-box h1 {
    font-size: 48px;
    line-height: 1.1;
  }
  .hero-inner-box ul {
    max-width: 420px;
  }
  .hero-inner-box ul li {
    padding: 14px 18px;
    font-size: 15px;
  }
  .hero-inner-box > div.relative.z-10 > div span {
    font-size: 20px;
    max-width: 250px;
  }
}

/* Fix 30: About > Meet the Team - the photo is pulled 80px above its card, but the
   heading block only had 56px (phones) / 80px (larger) space, so the photo sat on
   the subtitle. Leave 80px + breathing room. */
#team-section .container > div.text-center:first-child {
  margin-bottom: 128px;
}
@media (min-width: 640px) {
  #team-section .container > div.text-center:first-child {
    margin-bottom: 144px;
  }
}

/* Fix 31: "Prefer a Different Way?" contact cards - label and value now line up.
   (Fix 19 had made the email/phone links 44px tall, which pushed their text below
   the label; labels of different widths also made values start at different x.)
   Phones: label above value. Larger: fixed label column, values aligned. */
#contact-section .space-y-12 .flex-1.flex.gap-4 {
  align-items: baseline;
}
#contact-section .space-y-12 .flex-1.flex.gap-4 > div:first-child {
  flex: 0 0 112px;
}
#contact-section .space-y-12 a[href^="mailto:"],
#contact-section .space-y-12 a[href^="tel:"] {
  display: inline-block;
  padding: 12px 0; /* bigger tap area without moving the text */
  margin: -12px 0;
  word-break: break-word;
}
@media (max-width: 639px) {
  #contact-section .space-y-12 .flex-1.flex.gap-4 {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  #contact-section .space-y-12 .flex-1.flex.gap-4 > div:first-child {
    flex: none;
  }
}

/* Fix 38: case-study cards - white text readable again, but lighter than the old
   fix 4: a soft neutral shade only along the bottom (where the text sits) plus a
   faint text shadow. The top of each photo is untouched. */
.portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0) 60%);
}
.portfolio-item h3,
.portfolio-item p {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* Fix 40: logos on phones - header logo 38px (32px when sticky) instead of 60px;
   footer uses the one-line paw + wordmark (see footer.php) at 44px; less empty
   space above the footer card */
@media (max-width: 639px) {
  .site-header__logo {
    min-height: 40px;
  }
  .site-header__logo img {
    max-height: 38px;
  }
  .site-header.is-sticky .site-header__logo img {
    max-height: 32px !important;
  }
  #footer-section .footer-logo-img {
    height: 44px;
    width: auto;
    max-width: none;
    margin-bottom: 16px;
  }
  #footer-section > div:first-child {
    padding-top: 32px;
  }
}

/* Fixes 45 + 46: About and Contact hero on phones/tablets - the headline sat on
   top of the photo and the photo was cut off at the sides. Now: text on top,
   artwork below it at a width where the whole team (About) / the woman and all
   four labels (Contact) fit, with a soft white fade into the top of the artwork. */
@media (max-width: 1023px) {
  .hero-main-box {
    min-height: 0;
    padding-top: 40px;
    padding-bottom: calc(var(--hm-scale, 150) * 0.48%);
    background-color: #fff;
    background-size: calc(var(--hm-scale, 150) * 1%) auto;
    background-position: 50% 100%;
    background-repeat: no-repeat;
  }
  /* soft white fade over the top edge of the artwork (same height as the artwork) */
  .hero-main-box::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    padding-top: calc(var(--hm-scale, 150) * 0.48%);
    background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 25%);
    pointer-events: none;
  }
  .hero-main-box > div {
    margin-bottom: 0;
  }
}

/* Fix 47: case-study cards on phones - the results (+65%, +48%...) are part of
   the card image on its left side and were cut off; align the image to the left */
@media (max-width: 639px) {
  .portfolio-item img.object-cover {
    object-position: 0% 50%;
  }
}

/* Fix 48: footer logo on tablet/desktop too - same one-line logo, sized to the column */
#footer-section .footer-logo-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 56px;
}
@media (min-width: 1024px) {
  #footer-section .footer-logo-img {
    height: 64px;
    margin-bottom: 24px;
  }
}
@media (max-width: 639px) {
  #footer-section .footer-logo-img {
    height: 44px;
  }
}

/* Decorative backgrounds load when their section nears the viewport. */
html.sp-lazy-images [data-sp-lazy-background]:not([data-sp-background-ready]) {
  background-image: none !important;
}
