/* ============================================================
   Working Magic Group — Motion Layer
   ============================================================ */

/* Base: smooth scrolling & fade in on load */
html{scroll-behavior:smooth;}
body{animation:wmg-page-in 1.1s cubic-bezier(.2,.65,.35,1) both;}
@keyframes wmg-page-in{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important;}
}

/* ---------- Scroll reveal ---------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);will-change:opacity,transform;}
.reveal.is-visible{opacity:1;transform:none;}

.reveal-left{opacity:0;transform:translateX(-22px);transition:opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);}
.reveal-left.is-visible{opacity:1;transform:none;}

.reveal-right{opacity:0;transform:translateX(22px);transition:opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);}
.reveal-right.is-visible{opacity:1;transform:none;}

.reveal-scale{opacity:0;transform:scale(.96);transition:opacity 1s ease, transform 1s cubic-bezier(.22,.61,.36,1);}
.reveal-scale.is-visible{opacity:1;transform:none;}

.reveal-blur{opacity:0;filter:blur(14px);transition:opacity 1s ease, filter 1s ease;}
.reveal-blur.is-visible{opacity:1;filter:blur(0);}

/* Stagger delays */
.d-1{transition-delay:.08s!important;}
.d-2{transition-delay:.16s!important;}
.d-3{transition-delay:.24s!important;}
.d-4{transition-delay:.32s!important;}
.d-5{transition-delay:.4s!important;}
.d-6{transition-delay:.48s!important;}

/* ---------- Word-by-word hero title ---------- */
.wmg-headline .word{display:inline-block;opacity:0;transform:translateY(14px);animation:wmg-word-in 1s cubic-bezier(.22,.61,.36,1) forwards;}
@keyframes wmg-word-in{to{opacity:1;transform:none;}}

/* ---------- Micro interactions ---------- */
.hover-lift{transition:transform .35s cubic-bezier(.2,.65,.35,1), box-shadow .35s ease;will-change:transform;}
.hover-lift:hover{transform:translateY(-3px);box-shadow:0 16px 40px -20px rgba(0,0,0,.25);}
.hover-tilt{transition:transform .5s cubic-bezier(.2,.65,.35,1);}
.hover-tilt:hover{transform:perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-4px);}

/* Kick pulse on primary buttons */
/* pulse-cta disabled — too showy for boutique feel */
.pulse-cta{transition:box-shadow .3s ease;}
.pulse-cta:hover{box-shadow:0 12px 30px -6px rgba(27,27,27,.35);}

/* Shimmer sweep across primary CTAs on hover */
.shimmer{position:relative;overflow:hidden;}
.shimmer::after{content:"";position:absolute;top:0;left:-75%;width:50%;height:100%;background:linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);transform:skewX(-20deg);transition:left .7s ease;pointer-events:none;}
.shimmer:hover::after{left:120%;transition:left 1s ease;}

/* Underline draw for text links */
.link-draw{position:relative;display:inline-block;text-decoration:none;}
.link-draw::after{content:"";position:absolute;left:0;bottom:-3px;height:2px;width:100%;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .35s ease;}
.link-draw:hover::after{transform:scaleX(1);}

/* Ken burns for hero images */
.kenburns{animation:wmg-kenburns 22s ease-in-out infinite alternate;will-change:transform;}
@keyframes wmg-kenburns{from{transform:scale(1) translate(0,0);}to{transform:scale(1.04) translate(-.5%,-.5%);}}

/* ---------- Number counter placeholder ---------- */
.wmg-count{font-variant-numeric:tabular-nums;}

/* ---------- Sticky floating CTA ---------- */
.wmg-fab{
  position:fixed;
  right:24px;bottom:24px;
  z-index:80;
  background:#1B1B1B;color:#fff;
  padding:12px 20px;
  border-radius:9999px;
  font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.14em;
  text-decoration:none;
  box-shadow:0 10px 24px -10px rgba(0,0,0,.35);
  display:flex;align-items:center;gap:.55rem;
  opacity:0;transform:translateY(16px);pointer-events:none;
  transition:opacity .5s ease, transform .5s ease, background .25s ease;
}
.wmg-fab.is-visible{opacity:1;transform:none;pointer-events:auto;}
.wmg-fab:hover{background:#000;transform:translateY(-3px);}
.wmg-fab .dot{width:6px;height:6px;background:#1B1B1B;border-radius:9999px;opacity:.9;}
@media (max-width:520px){.wmg-fab{padding:12px 18px;font-size:.72rem;}}

/* ---------- Scroll progress bar ---------- */
.wmg-progress{position:fixed;top:0;left:0;height:2px;width:0%;background:#1B1B1B;opacity:.85;z-index:120;transition:width .1s linear;}

/* ---------- Marquee (used as trust bar) ---------- */
.wmg-marquee{overflow:hidden;background:#F5F5F5;border-top:1px solid rgba(0,0,0,.06);border-bottom:1px solid rgba(0,0,0,.06);padding:.9rem 0;}
.wmg-marquee-track{display:flex;gap:3rem;white-space:nowrap;animation:wmg-marq 32s linear infinite;font-size:.78rem;letter-spacing:.28em;text-transform:uppercase;color:rgba(0,0,0,.55);font-weight:600;align-items:center;}
.wmg-marquee-track span{display:inline-flex;align-items:center;gap:.6rem;}
.wmg-marquee-track span::before{content:"✦";color:#1B1B1B;font-size:.7rem;}
@keyframes wmg-marq{from{transform:translateX(0);}to{transform:translateX(-50%);}}

/* ---------- Floating shape decorations ---------- */
.wmg-blob{position:absolute;border-radius:9999px;filter:blur(70px);opacity:.35;pointer-events:none;z-index:-1;}
.wmg-blob.a{background:#1B1B1B;width:280px;height:280px;top:-60px;left:-60px;animation:wmg-drift 18s ease-in-out infinite alternate;}
.wmg-blob.b{background:#1B1B1B;width:220px;height:220px;bottom:-40px;right:-40px;animation:wmg-drift 22s ease-in-out infinite alternate-reverse;}
@keyframes wmg-drift{from{transform:translate(0,0);}to{transform:translate(40px,30px);}}

/* ---------- Image reveal (frame-in) ---------- */
.frame-reveal{position:relative;overflow:hidden;}
.frame-reveal::before{content:"";position:absolute;inset:0;background:#F5F5F5;transform-origin:right;transition:transform 1.2s cubic-bezier(.77,0,.18,1);z-index:2;}
.frame-reveal.is-visible::before{transform:scaleX(0);}
.frame-reveal img{transition:transform 1.6s ease;}
.frame-reveal.is-visible img{transform:scale(1);}

/* ---------- Nav hover: subtle underline draw ---------- */
.nav-link{position:relative;}
.nav-link::after{content:"";position:absolute;left:50%;bottom:-6px;height:2px;width:0;background:#1B1B1B;transform:translateX(-50%);transition:width .3s ease;}
.nav-link:hover::after,.nav-link.active::after{width:100%;}

/* ============================================================
   Nav dropdowns
   ============================================================ */
.ge-nav{position:relative;}
.ge-dropdown{position:relative;}
.ge-dd-toggle{
  background:none;border:none;cursor:pointer;
  color:inherit;font:inherit;letter-spacing:inherit;text-transform:inherit;
  display:inline-flex;align-items:center;gap:.35rem;
  padding:0;opacity:.75;transition:opacity .2s;
  font-size:.8rem;font-weight:500;text-transform:uppercase;letter-spacing:.06em;
  color:#1B1B1B;
}
.ge-dd-toggle:hover{opacity:1;}
.ge-dd-toggle.active{opacity:1;font-weight:600;}
.ge-dd-caret{transition:transform .25s ease;flex-shrink:0;margin-top:1px;}
.ge-dropdown.is-open .ge-dd-caret,
.ge-dropdown:hover .ge-dd-caret{transform:rotate(-180deg);}

.ge-dd-menu{
  position:absolute;
  top:calc(100% + 14px);
  left:50%;
  transform:translateX(-50%) translateY(-6px);
  min-width:190px;
  background:#FFFFFF;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  box-shadow:0 20px 45px -18px rgba(0,0,0,.28);
  padding:.55rem 0;
  opacity:0;pointer-events:none;
  transition:opacity .22s ease, transform .22s ease;
  z-index:60;
}
/* Small connector to avoid gap-close */
.ge-dd-menu::before{
  content:"";position:absolute;left:0;right:0;top:-14px;height:14px;
}
.ge-dropdown:hover .ge-dd-menu,
.ge-dropdown:focus-within .ge-dd-menu,
.ge-dropdown.is-open .ge-dd-menu{
  opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0);
}
.ge-dd-item{
  display:block;
  padding:.7rem 1.2rem;
  font-size:.82rem;
  color:#1B1B1B;
  opacity:.75;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:500;
  text-decoration:none;
  transition:opacity .18s ease, background .18s ease;
  white-space:nowrap;
}
.ge-dd-item:hover{opacity:1;background:rgba(0,0,0,.05);}
.ge-dd-item.is-active{opacity:1;font-weight:600;}
.ge-dd-item.is-active::before{content:"→ ";color:#1B1B1B;}

/* Hide default nav-link underline draw on dropdown toggles */
.ge-dd-toggle::after{display:none!important;}

/* ============================================================
   Logo transparency — remove the white JPG background using blend modes
   ============================================================ */
.ge-header-logo, [alt="Working Magic Group"], .ge-wmg-icon, .ge-wmg-hero-logo, .ge-wmg-logo, .ge-popup-logo{
  mix-blend-mode:multiply;
  background:transparent!important;
}
/* On dark backgrounds (footer, hero overlays), use screen blend + invert to keep the mark visible */
footer .ge-wmg-logo, footer [alt="Working Magic Group"]{
  mix-blend-mode:screen;
  filter:invert(1) brightness(1.4);
}
/* If wrapped in a rounded padded chip, kill the chip */
.ge-wmg-logo{background:transparent!important;padding:0!important;border-radius:0!important;}

/* ============================================================
   Refinements — tighter alignment, consistent spacing
   ============================================================ */

/* Container consistency */
.chapter, .wmg-split, .wmg-services, .wmg-reviews{
  max-width:78rem;
  margin-left:auto;margin-right:auto;
}
.chapter, .wmg-split{padding-left:clamp(1.5rem, 4vw, 3rem);padding-right:clamp(1.5rem, 4vw, 3rem);}
.wmg-services, .wmg-reviews{padding-left:clamp(1.5rem, 4vw, 3rem);padding-right:clamp(1.5rem, 4vw, 3rem);}

/* Chapter grid — tighter gap, better alignment */
.chapter-inner{
  grid-template-columns:110px 1fr;
  gap:2.5rem;
  align-items:baseline;
}
.chapter-num{
  font-size:clamp(2.5rem, 4vw, 4.5rem);
  line-height:1;
  color:rgba(0,0,0,.14);
  font-weight:400;
}
.chapter h2{
  font-size:clamp(1.9rem, 4vw, 3.5rem);
  margin-top:0;
  margin-bottom:1.5rem;
}
.chapter-eyebrow{
  display:inline-block;
  font-size:.7rem;
  letter-spacing:.28em;
  margin-bottom:.9rem;
  padding-bottom:.55rem;
  border-bottom:1px solid rgba(27,27,27,.35);
}
.chapter p.lead{max-width:42rem;}

/* Chapter mobile: chapter-num becomes small badge above h2 */
@media (max-width:820px){
  .chapter-inner{grid-template-columns:1fr;gap:1.2rem;}
  .chapter-num{font-size:2rem;color:rgba(0,0,0,.25);}
  .chapter{padding-top:4rem;padding-bottom:4rem;}
}

/* Stats — align baselines */
.wmg-stats-inner .num{margin-bottom:.5rem;}
.wmg-stats-inner .lbl{margin-top:0;}
.wmg-stats-inner > div{display:flex;flex-direction:column;align-items:center;}

/* Split: match padding to chapter */
.wmg-split{
  padding-top:clamp(4rem, 8vh, 7rem);
  padding-bottom:clamp(4rem, 8vh, 7rem);
  gap:clamp(2.5rem, 6vw, 5rem);
}
.wmg-split .visual{aspect-ratio:4/5;max-height:640px;}
.wmg-split .visual img{object-position:center 20%;}
.wmg-split > div:nth-child(2){padding-right:0;}

/* Services */
.wmg-services{margin-top:0;padding-top:0;}
.wmg-service{padding:2.5rem 2.25rem;}
.wmg-service h3{margin-bottom:1rem;}
.wmg-service p{margin-bottom:1.75rem;}

/* Reviews */
.wmg-reviews{gap:1.5rem;padding-top:2.5rem;padding-bottom:5rem;}
.wmg-review{padding:2rem 1.75rem;}
.wmg-review .quote{font-size:1.05rem;line-height:1.55;margin-bottom:1.25rem;}

/* Manifesto */
.wmg-manifesto-inner{padding:0 1rem;}
.wmg-manifesto p{margin-bottom:1.2rem;}
.wmg-manifesto h2{margin-bottom:2rem;}

/* Outro (final CTA) */
.wmg-outro h2{margin-bottom:1.5rem;}
.wmg-outro p{margin-bottom:2.5rem;}

/* Kill the awkward chapter-num alignment on section 06 which is 1-column */
.chapter-inner > div:only-of-type{grid-column:1/-1;}


/* ============================================================
   FINAL QA — Mobile responsiveness + prevent horizontal overflow
   ============================================================ */

/* Kill any accidental horizontal scroll */
html{overflow-x:clip;} body{overflow-x:clip;max-width:100vw;}

/* Cinema hero (unused on new homepage but on some fallbacks): responsive */
@media (max-width:767px){
  .wmg-cinema{height:78vh;min-height:520px;}
  .wmg-cinema .wmg-cinema-title{font-size:clamp(2.4rem,10vw,4rem);}
}

/* Hero slider: ensure it doesn't get too tall on phone */
@media (max-width:767px){
  .ge-hero-slider{aspect-ratio:4/5;max-height:520px;}
}

/* Reduce hero H1 on phone to fit */
@media (max-width:640px){
  section.max-w-6xl h1.font-serif.text-5xl{font-size:2.5rem!important;line-height:1.05!important;}
}

/* Trust marquee: slower & readable on phone */
@media (max-width:767px){
  .wmg-marquee-track{gap:2rem;font-size:.66rem;animation-duration:26s;}
}

/* Buyer/Seller cards + WMG grid: ensure single column stacks cleanly */
@media (max-width:767px){
  .wmg-section-grid{padding:3.5rem 1.5rem!important;gap:2rem!important;}
  .wmg-section-grid img{max-width:200px!important;}
}

/* FAB: hide on very small screens if scrolled way down (keep the primary Contact link in nav) */
@media (max-width:400px){
  .wmg-fab{padding:10px 16px;font-size:.65rem;letter-spacing:.12em;}
}

/* Contact page slider: shorter on mobile */
@media (max-width:767px){
  .ge-cs-thumb{width:56px;height:42px;}
}

/* About page 3-image strip: reduce height */
@media (max-width:767px){
  .ge-strip img{height:240px!important;}
}

/* Fix any inline sections that need mobile padding tightening */
@media (max-width:640px){
  section[style*="padding:5rem"]{padding:3.5rem 1.25rem!important;}
  section[style*="padding: 5rem"]{padding:3.5rem 1.25rem!important;}
}

/* Images should never overflow their parent */
img{max-width:100%;height:auto;}

/* Long words shouldn't break layout */
p, h1, h2, h3, h4, h5, h6{overflow-wrap:break-word;word-wrap:break-word;}

/* Buttons: prevent underscoring/underline weirdness on touch */
a.btn-primary, a.btn-outline, a.wmg-btn-solid, a.wmg-btn-ghost, a.ge-kickoff-btn, a.wmg-outro-cta{-webkit-tap-highlight-color:transparent;text-decoration:none;}

/* Fix nav overflow on mid-width tablets */
@media (max-width:900px) and (min-width:768px){
  .ge-nav{gap:1.5rem;}
}

/* Contact form / textareas: correct sizing on mobile */
@media (max-width:640px){
  input, textarea{font-size:16px!important;} /* prevents iOS zoom-in on focus */
}

/* Focus visible states for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible{
  outline:2px solid #1B1B1B;outline-offset:2px;
}


/* ============================================================
   FINAL POLISH — visual QA fixes for alignment, margins, mobile
   ============================================================ */

/* Ensure body never scrolls horizontally on any device */
html{overflow-x:clip;} body{overflow-x:clip;max-width:100%;}

/* Every section respects a safe side gutter on phone */
@media (max-width:640px){
  section{padding-left:1.25rem!important;padding-right:1.25rem!important;}
  section[class*="max-w"]{padding-left:1.25rem;padding-right:1.25rem;}
  section > div[style*="padding:0 1.5rem"],
  section > div[style*="padding: 0 1.5rem"]{padding-left:0!important;padding-right:0!important;}
}

/* Typography clamp: prevent giant headlines cutting off on phone */
@media (max-width:520px){
  h1{font-size:clamp(1.75rem, 8vw, 3rem)!important;line-height:1.1!important;}
  h2{font-size:clamp(1.5rem, 6.5vw, 2.5rem)!important;line-height:1.15!important;}
  h3{font-size:clamp(1.2rem, 5vw, 1.6rem)!important;line-height:1.2!important;}
  p{font-size:.98rem;line-height:1.7;}
}

/* Touch targets — 44px minimum for accessibility on mobile */
@media (max-width:640px){
  a.btn-primary, a.btn-outline, a.ge-kickoff-btn, a.wmg-outro-cta,
  button.btn-primary, button.btn-save, .ge-fab, .wmg-fab{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
}

/* Grid gaps compress cleanly on small screens */
@media (max-width:640px){
  .grid.md\:grid-cols-2, .grid.md\:grid-cols-3, .grid.md\:grid-cols-4{gap:1.25rem!important;}
  .gap-14{gap:2rem!important;}
  .gap-10{gap:1.5rem!important;}
  .gap-8{gap:1.25rem!important;}
}

/* Hero stat row: better mobile spacing */
@media (max-width:520px){
  .ge-stat-row{gap:.75rem!important;padding-top:1.25rem!important;}
  .ge-stat-row > div{text-align:center;}
  .ge-stat-row .ge-count{font-size:1.35rem!important;}
}

/* Section vertical rhythm — consistent breathing room */
@media (max-width:640px){
  section.py-24, section.py-20{padding-top:3.5rem!important;padding-bottom:3.5rem!important;}
  section.py-16{padding-top:2.5rem!important;padding-bottom:2.5rem!important;}
}

/* CARGO / partners / carousel: safe padding */
@media (max-width:640px){
  .ge-partners-grid{padding:0 .5rem;}
  .ge-future-carousel-wrap{padding:0 8px;}
}

/* Buttons never overflow */
.btn-primary, .btn-outline, .ge-kickoff-btn, .wmg-outro-cta{
  max-width:100%;
  white-space:normal;
  text-align:center;
}

/* Prevent long content overflow */
.ge-listing-card p, .ge-listing-feature p, .ge-review-card p, .ge-mb-feat p{
  word-wrap:break-word;
  overflow-wrap:break-word;
}

/* Hero: mobile-specific title breathing */
@media (max-width:640px){
  section.max-w-6xl.mx-auto.px-6.pt-14{padding-top:1.5rem!important;}
  section.max-w-6xl.mx-auto.px-6.pt-14.md\:pt-20{padding-top:1.5rem!important;padding-bottom:2rem!important;}
}

/* Hero slider aspect on very small phones */
@media (max-width:520px){
  .ge-hero-slider{aspect-ratio:1/1!important;max-height:420px;}
}

/* CTA final band spacing */
@media (max-width:640px){
  section[class*="terracotta"], section[style*="background:#1B1B1B"]{padding-top:3rem!important;padding-bottom:3rem!important;}
}

/* Nav dropdowns positioning: prevent off-screen */
@media (max-width:900px){
  .ge-dd-menu{min-width:170px;}
}

/* Contact page slideshow: better mobile aspect */
@media (max-width:640px){
  .ge-cs-stage{aspect-ratio:4/3!important;}
  .ge-cs-thumbs{gap:8px;padding:0 8px;flex-wrap:wrap;}
  .ge-cs-thumb{width:54px;height:40px;}
}

/* About page 3-strip mobile: taller, one column */
@media (max-width:520px){
  .ge-strip img{height:220px!important;}
}

/* Buyer collage — mobile: 1 column, cleaner */
@media (max-width:520px){
  .ge-buyer-collage{grid-template-columns:1fr!important;grid-auto-rows:280px!important;}
  .ge-tile-tall,.ge-tile-wide{grid-column:span 1!important;grid-row:span 1!important;}
}

/* Sellers listing grid on mobile */
@media (max-width:640px){
  .ge-seller-pair,.ge-listing-pair{grid-template-columns:1fr!important;gap:2rem!important;}
  .ge-seller-card img,.ge-listing-card img{height:220px!important;}
}

/* Form inputs prevent iOS zoom (font-size 16px+) */
@media (max-width:640px){
  input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
  textarea, select{font-size:16px!important;}
}

/* Reveal animation should not cause horizontal jump */
.reveal, .reveal-left, .reveal-right{max-width:100%;}

/* Center align key hero elements consistently */
@media (max-width:640px){
  .max-w-6xl h1[data-headline]{text-align:center!important;}
}

/* Footer padding cleanup */
@media (max-width:640px){
  footer{padding-top:3rem!important;padding-bottom:1.5rem!important;}
}

/* Absolute-positioned decorative absolute overlays — prevent from breaking on tablet */
.wmg-blob{max-width:60vw;max-height:60vh;}

/* Marquee: no wonky heights on mobile */
@media (max-width:640px){
  .wmg-marquee{padding:.7rem 0!important;}
  .wmg-marquee-track{gap:1.75rem;font-size:.62rem;letter-spacing:.2em;}
}

/* Section transitions — soften borders between adjacent cream sections */
section[style*="#F5F5F5"] + section[style*="#F5F5F5"],
section[style*="#FFFFFF"] + section[style*="#FFFFFF"]{border-top:none!important;}

/* Ensure links in text are visible and touch-friendly */
p a{text-decoration:underline;text-underline-offset:2px;}


/* ============================================================
   HOUSE CALL POPUP — mobile fixes
   Fixes: iOS zoom on input focus, tight spacing on small phones,
   position:fixed reliability, scroll-lock without breaking body
   ============================================================ */

/* When popup is open, lock scroll cleanly (works desktop + iOS) */
html.wm-popup-lock, body.wm-popup-lock{
  overflow:hidden!important;
  touch-action:none;
}

/* Force popup overlay ABOVE everything (FAB, header, dropdowns) */
.ge-popup-overlay{z-index:9999!important;}

/* Inputs at 16px minimum to prevent iOS auto-zoom on focus */
.ge-popup-body input{
  font-size:16px!important;
}

/* Mobile popup sizing */
@media (max-width:640px){
  .ge-popup-overlay{padding:12px!important;align-items:flex-start!important;padding-top:5vh!important;}
  .ge-popup{max-width:100%;max-height:90vh;border-radius:14px;}
  .ge-popup-photo{height:110px;}
  .ge-popup-body{padding:1.25rem 1.25rem 1.5rem;}
  .ge-popup-body h3{font-size:1.2rem;line-height:1.25;}
  .ge-popup-body p{font-size:.85rem;line-height:1.55;margin-bottom:.85rem;}
  .ge-popup-logo{height:80px;width:80px;margin-bottom:.75rem;}
  .ge-popup-body input{padding:.75rem .9rem;margin-bottom:.55rem;}
  .ge-popup-submit{padding:1rem;font-size:.78rem;min-height:48px;}
  .ge-popup-close{top:8px;right:8px;width:36px;height:36px;font-size:1.2rem;}
  .ge-popup-fine{font-size:.68rem;margin-top:.6rem;}
}

/* Very small phones */
@media (max-width:380px){
  .ge-popup-photo{height:90px;}
  .ge-popup-body{padding:1rem;}
  .ge-popup-logo{height:64px;width:64px;}
}


/* Popup content safety — ensure it always renders when open */
.ge-popup-overlay.is-open{display:flex!important;visibility:visible!important;}
.ge-popup-overlay.is-open .ge-popup{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
.ge-popup, .ge-popup *{visibility:visible;}


/* ============================================================
   FINAL DEPLOYMENT POLISH — bulletproof mobile alignment
   Applied Sept 15 2026 after popup fix
   ============================================================ */

/* Never allow horizontal overflow, anywhere */
html, body{overflow-x:clip;max-width:100vw;}
*{max-width:100%;}
img, svg, video, canvas{max-width:100%;height:auto;display:block;}

/* Hero image slider — never wider than viewport */
.ge-hero-slider{width:100%;max-width:100%;}

/* Buttons in flex rows should wrap cleanly on mobile */
.flex.flex-wrap.gap-4{gap:.75rem;}
@media (max-width:520px){
  .flex.flex-wrap.gap-4 > a,
  .flex.flex-wrap.gap-4 > button{flex:1 1 auto;min-width:0;text-align:center;justify-content:center;}
}

/* Stat rows: never overflow */
.ge-stat-row{max-width:100%;overflow:hidden;}
.ge-stat-row > div{min-width:0;overflow:hidden;text-overflow:ellipsis;}

/* Card images should always cover their frame properly */
.hover-lift img, .ge-listing-card img, .ge-seller-card img, .ge-review-card img{
  width:100%;height:100%;object-fit:cover;
}

/* Grid buyer/seller cards — proper mobile stacking */
@media (max-width:640px){
  .grid.md\:grid-cols-2, .grid.md\:grid-cols-3, .grid.md\:grid-cols-4{
    grid-template-columns:1fr!important;
    gap:1.5rem!important;
  }
}

/* Marquee — hide overflow completely */
.wmg-marquee{overflow:hidden;width:100%;}

/* Look Into Your Future carousel — safe padding on mobile */
@media (max-width:640px){
  .ge-future-carousel-wrap{padding:0 10px;}
  .ge-future-arrow{width:38px;height:38px;font-size:.95rem;}
  .ge-future-prev{left:6px;}
  .ge-future-next{right:6px;}
  .ge-future-slide{width:min(78vw, 300px)!important;}
}

/* Partners grid — clean mobile spacing */
@media (max-width:640px){
  .ge-partners-grid{padding:0 .5rem;gap:2rem 1.5rem;}
  .ge-partner{max-width:130px;}
}
@media (max-width:400px){
  .ge-partners-grid{grid-template-columns:repeat(2,1fr)!important;}
  .ge-partner{max-width:110px;}
}

/* Contact form — full-width safe on mobile */
@media (max-width:640px){
  .ge-contact-pair{grid-template-columns:1fr!important;gap:2.5rem;}
}

/* Nav dropdowns — better mobile menu spacing */
@media (max-width:768px){
  #mobileMenu{padding:1rem 1.5rem 1.5rem;}
  #mobileMenu a{padding:.85rem 0;}
}

/* Nav header logo — proper mobile size */
.ge-header-logo{
  max-height:44px;
  width:auto;
}
@media (min-width:768px){
  .ge-header-logo{max-height:56px;}
}

/* Section vertical rhythm — no cramped or excessive gaps on mobile */
@media (max-width:640px){
  section{padding-top:3rem;padding-bottom:3rem;}
  section.py-24, section.py-20{padding-top:3rem!important;padding-bottom:3rem!important;}
  section.py-16{padding-top:2.5rem!important;padding-bottom:2.5rem!important;}
  section.py-12{padding-top:2rem!important;padding-bottom:2rem!important;}
}

/* CTA sections (final call-to-action bands) proper mobile padding */
@media (max-width:640px){
  section[style*="background:#1B1B1B"], section[style*="background:#000000"]{
    padding:2.5rem 1.5rem!important;
  }
}

/* Prevent tel/email link underlines from disrupting layout on mobile */
a[href^="tel:"], a[href^="mailto:"]{white-space:nowrap;}

/* iOS smooth scrolling */
html{-webkit-overflow-scrolling:touch;scroll-behavior:smooth;}

/* All inputs and textareas at 16px+ to prevent iOS auto-zoom */
input, textarea, select{font-size:16px!important;}
@media (min-width:641px){
  input, textarea, select{font-size:.95rem!important;}
}

/* Any absolutely-positioned decorative element must stay in bounds */
[style*="position:absolute"], [style*="position: absolute"]{max-width:100vw;}

/* Footer — clean mobile layout */
@media (max-width:640px){
  footer{padding:2.5rem 1.25rem 1.5rem!important;}
  footer .grid{grid-template-columns:1fr!important;gap:2rem;}
  footer .max-w-6xl{padding-left:0;padding-right:0;}
}

/* Prevent hero content from being cut off on small phones */
@media (max-width:400px){
  section.max-w-6xl.mx-auto.px-6.pt-14{padding-top:1rem!important;padding-bottom:1.5rem!important;}
  h1[data-headline]{font-size:2.5rem!important;line-height:1.05!important;}
}

/* Anti-jitter — reveal animations should never cause horizontal shift */
.reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur{
  max-width:100%;
}

/* Popup dialog — ensure it's centered and sized properly on all screens */
#wmhc-dialog[open]{
  padding:20px;
  border:none;
  background:transparent;
  max-width:100vw;
  max-height:100vh;
}
@media (max-width:520px){
  #wmhc-dialog[open]{padding:12px;}
}

/* Never let a button be too small to tap */
button, a[class*="btn"], .ge-kickoff-btn, .wmg-outro-cta{
  min-height:44px;
}
@media (max-width:640px){
  button, a[class*="btn"]{min-height:46px;}
}

/* Fix any overflow issues with dropdowns on tablet */
@media (min-width:768px) and (max-width:900px){
  .ge-nav{gap:1.25rem;}
  .ge-dd-menu{min-width:180px;}
}

/* Ensure page never has awkward gap after the FAB */
.wmg-fab{margin-bottom:env(safe-area-inset-bottom, 0);}
