
  /* Mobile overrides for hero heading and agency name */

  @media (max-width: 768px) {
    .hero-heading {
      font-size: 2rem !important;
      line-height: 1.25 !important;
      padding-top: 3rem !important;
      padding-left: 1rem !important;
      padding-right: 1rem !important;
    }

    #hero h2 .agency-name .amicus,
    #hero h2 .agency-name .ae {
      text-shadow: none !important;
    }
  }

  @media (max-width: 480px) {
    .hero-heading {
      font-size: 1.9rem !important;
      line-height: 1.2 !important;
      padding-top: 2.5rem !important;
    }
  }

  

  /* ===== Home Page Overrides: Services Typography =====
   Load this AFTER main.css so these rules win. 
   Uses featured font if defined, otherwise falls back to default site font. 
*/

:root {
  /* Optional: ensure a featured font var exists; falls back cleanly */
  --featured-font: var(--featured-font, var(--default-font, system-ui));
}

/* Base: target exactly the Services descriptions on the main page */
.services .service-item p.description {
  font-family: var(--featured-font), sans-serif;      /* match featured font */
  font-size: clamp(1.0625rem, 0.6vw + 0.9rem, 1.25rem); /* ~17–20px fluid */
  line-height: 1.7;
  color: color-mix(in srgb, var(--default-color), transparent 10%);
  font-weight: 400;                                    /* cleaner for body text */
  letter-spacing: normal;
  max-width: 62ch;                                     /* readable measure */
  margin: 0.35rem auto 1.25rem auto;                   /* center & space */
  padding-inline: 0;                                   /* no odd indents */
}

/* Emphasis inside the paragraph */
.services .service-item p.description strong,
.services .service-item p.description b {
  font-weight: 650;
  color: var(--default-color);
}

/* Desktop-only and mobile-only variants */
.services .service-item p.description.desktop-only { display: block; }
.services .service-item p.description.mobile-only  { display: none;  }

@media (max-width: 576px) {
  .services .service-item p.description {
    font-size: clamp(1rem, 1.5vw + 0.75rem, 1.125rem); /* tighten for small screens */
    max-width: 68ch;
    padding-inline: 1rem;
  }
  .services .service-item p.description.desktop-only { display: none; }
  .services .service-item p.description.mobile-only  { display: block; }
}

/* Optional: match headings above these paragraphs to the same rhythm */
.services .service-item h3 {
  font-family: var(--featured-font), sans-serif;
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2.125rem);  /* ~24–34px */
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--default-color);
  margin: 0 0 0.5rem 0;
}

@media (max-width: 768px) {
  .about-david .about-david-visual .client-counter.hide-on-mobile {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
}


  /* Mobile-only: make the hero image a true, full-viewport background */
@media (max-width: 767px) {
  /* keep layout intact, just add a background layer */
  #hero {
    position: relative;
    min-height: 100svh;                 /* fill the viewport height */
  }
  #hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("https://www.amicusae.com/assets/img/sections/amicusae-hero-mobile.webp")
                center / cover no-repeat;
    z-index: 0;                          /* sits behind all content */
  }

  /* ensure all existing hero children sit above the background */
  #hero > * { position: relative; z-index: 1; }

  /* don't render the separate <picture> on mobile (we're using ::before instead) */
  #hero picture.d-block.d-md-none { display: none !important; }

  /* optional: hide the desktop video wrapper on mobile to avoid any overlap */
  #hero .hero-media-wrapper { display: none !important; }
}

  /* === Hero Video Background Fix === */
.hero-media-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-video,
.hero-media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ensure content stays visible above video */
.hero.section {
  position: relative;
  z-index: 1;
}

      /* =========================
         Glass panel (kept)
      ========================= */
      #hero .glass-panel{
        background: rgba(255,255,255,.12);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,.2);
        padding: 1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,.25);
        position: relative;
        z-index: 1;
      }

      @media (max-width: 768px){
        #hero .glass-panel{ padding: 0 1rem !important; }
      }

      /* =========================
         Mobile-only hero heading (kept)
      ========================= */
      @media (max-width: 767px){
        #hero h2.hero-heading.mobile-only{
          font-size: clamp(1.7rem, 4.5vw, 1.7rem) !important;
          font-weight: 300 !important;
          line-height: 1.35 !important;
          text-align: center !important;
          padding: 1.5rem 0 .5rem !important;
          color: var(--heading-color, #f8f6f2) !important;
        }

        #hero h2.hero-heading.mobile-only .site-accent-strong{
          color: #F4A488 !important;
          font-weight: 600 !important;
          text-shadow: 0 0 6px rgba(244,164,136,.3) !important;
        }
      }

      /* =========================
         Mobile CTA block (deduped)
      ========================= */
      @media (max-width: 767px){
        #hero .hero-mobile-cta{
          display: flex;
          flex-direction: column;
          gap: 1rem;
          margin-top: 1.25rem;
          text-align: center;
        }

        #hero .hero-mobile-cta .btn-hero{
          display: inline-block;
          padding: 0.75rem 1.25rem;
          border-radius: 10px;
          font-weight: 700;
          font-size: 1.05rem;
          text-decoration: none;
          background: var(--accent-color, #F4A488);
          color: var(--contrast-color, #fff);
          transition: background 0.3s ease, transform 0.2s ease;
        }

        #hero .hero-mobile-cta .btn-hero:hover{
          background: color-mix(in srgb, var(--accent-color, #F4A488) 85%, #000 15%);
          transform: translateY(-2px);
        }
      }

      /* =========================
         Optional helper class
      ========================= */
      #hero .hidden-option{ display: none; }

      /* =========================
         Quote rotator (kept)
      ========================= */
      #hero .quote-rotator{
        position: relative;
        width: 100%;
        min-height: 420px; /* taller container prevents vertical shift */
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem;
        overflow: hidden;
      }

      #hero .quote-wrapper{
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 2rem;
        box-sizing: border-box;
      }

      #hero .quote-wrapper.visible{
        opacity: 1;
        z-index: 2;
      }

      #hero .quote-rotator blockquote{
        margin: 0;
        padding: 0;
        width: 100%;
      }

      #hero .quote-rotator blockquote p{
        font-style: italic;
        line-height: 1.6;
        color: #f8f6f2;
        margin: 0;
      }

      #hero .quote-rotator blockquote footer{
        margin-top: 1rem;
        font-weight: 600;
        color: #ddd;
      }

      #hero .hero-quote-box{
        margin-top: -1.5rem; /* adjust upward if needed */
      }

      /* ============================================================
   TABLET FIX — prevent black bars on the desktop (horizontal) video
   Applies only when the desktop video is showing (md+), and only on
   common “tablet / small laptop” widths.
   ============================================================ */

/* Tablet landscape + small laptop range (tweak if needed) */
@media (min-width: 768px) and (max-width: 1199px){

  /* Ensure the media wrapper is a stable clipping box */
  #hero .hero-media-wrapper{
    overflow: hidden; /* already true inline, but reinforce */
  }

  /* Make the desktop background video fill the available hero space */
  #hero video.hero-bg-video.d-none.d-md-block{
    width: 100%;
    height: 100%;
    object-fit: cover;      /* removes bars by cropping instead of letterboxing */
    object-position: center;
    display: block;
  }

  /* Match the placeholder behavior so you don't see edges during load */
  #hero img.hero-placeholder{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

@media (max-width: 991.98px){
  #hero .col-lg-5.desktop-only{
    display: none !important;
  }
}

/* ============================================================
   HERO — Unified glass panels (headline + quote)
   Goal: more uniform look + improved readability (less see-through)
============================================================ */

/* Shared “glass” style for both panels */
#hero .glass-panel,
#hero .hero-quote-box .quote-rotator{
  /* Less transparent than before */
  background: rgba(30, 33, 38, 0.62);

  /* Stronger blur for a smoother glass effect */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  /* Consistent rounding + border */
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);

  /* Depth */
  box-shadow:
    0 12px 36px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Optional: subtle gradient for even better text contrast */
@supports (background: color-mix(in srgb, #000, #fff)){
  #hero .glass-panel,
  #hero .hero-quote-box .quote-rotator{
    background: linear-gradient(
      to bottom,
      rgba(30, 33, 38, 0.58),
      rgba(30, 33, 38, 0.70)
    );
  }
}

/* Improve legibility without changing your typography */
#hero .glass-panel,
#hero .quote-rotator{
  color: rgba(248, 246, 242, 0.97);
}

/* Give headline & quote text a gentle lift */
#hero .glass-panel .hero-heading,
#hero .quote-rotator blockquote p,
#hero .quote-rotator blockquote footer{
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

/* Optional: tighten quote panel padding to match glass panel feel */
#hero .quote-rotator{
  padding: 2rem; /* keep if you like; reduce to 1.75rem if you want tighter */
}

/* ============================================================
   HERO QUOTE ROTATOR — Typography (clamp) without shifting panel
   Fix: do NOT constrain the panel width; constrain the text width instead.
============================================================ */

/* Keep the panel layout as-is (no max-width here) */
#hero .quote-rotator{
  /* explicitly ensure the panel fills its column consistently */
  width: 100%;
}

/* Constrain ONLY the text measure so it reads nicely */
#hero .quote-rotator blockquote{
  max-width: 46ch;          /* readable measure */
  margin: 0 auto;           /* centers the text block within the panel */
}

/* Quote text */
#hero .quote-rotator blockquote p{
  font-size: clamp(1.05rem, 0.55vw + 0.95rem, 1.4rem);
  line-height: clamp(1.55, 0.35vw + 1.45, 1.75);
  font-style: italic;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* Attribution */
#hero .quote-rotator blockquote footer{
  font-size: clamp(0.95rem, 0.25vw + 0.9rem, 1.05rem);
  line-height: 1.35;
  margin-top: clamp(0.9rem, 0.6vw + 0.6rem, 1.25rem);
  font-style: normal;
  letter-spacing: 0.02em;
  opacity: 0.92;
}





