/* ═══════════════════════════════════════
   ECHO — mobile.css
   Loaded last — overrides everything
   Breakpoints: 768px tablet, 480px phone
   ═══════════════════════════════════════ */


/* ══════════════════════════════════════
   MOBILE NAV OVERLAY
   The nav__links ul lives inside header
   which has its own stacking context.
   We escape it by cloning the overlay
   to body level via JS (see main.js),
   but as a CSS-only fallback we use
   maximum specificity here.
══════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Hide desktop-only elements ── */
  .mega-menu,
  .mega-menu__shimmer { display: none !important; }

  .nav__toggle { display: flex !important; }


  /* ── Logo at top of mobile nav ── */
  .nav__mobile-bg::after {
    content: 'échO' !important;
    position: absolute !important;
    top: 2rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.8rem !important;
    font-style: italic !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    letter-spacing: 0.01em !important;
    pointer-events: none !important;
    z-index: 3 !important;
    white-space: nowrap !important;
  }

  /* Push location tag down to sit below the logo */
  .nav__mobile-tag {
    margin-top: 1rem !important;
  }

  /* ── Nav overlay ── */
  html body header .nav__links,
  #navLinks {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-1 * (100vw - 100%) / 2) !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 2rem !important;
    border: none !important;
    background-color: #0e0a1a !important;
    background-image: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    z-index: 9000 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease, visibility 0.35s ease !important;
    transform: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  html body header .nav__links.open,
  #navLinks.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* ── Toggle above overlay ── */
  .nav__toggle {
    position: relative !important;
    z-index: 9100 !important;
  }

  /* Open state — make X white */
  .nav__toggle.open span {
    background-color: #ffffff !important;
  }

  /* ── Location tag ── */
  .nav__mobile-tag {
    display: block !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    color: rgba(155, 109, 255, 0.55) !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0.5rem !important;
    position: relative !important;
    z-index: 2 !important;
  }

  /* ── Nav list items ── */
  #navLinks li,
  .nav__links li {
    opacity: 0 !important;
    transform: translateY(16px) !important;
    transition: opacity 0.4s ease, transform 0.4s ease !important;
    width: 100% !important;
    text-align: center !important;
    position: relative !important;
    z-index: 2 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #navLinks.open li,
  .nav__links.open li {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Stagger delays */
  .nav__links.open li:nth-child(1) { transition-delay: 0.05s !important; }
  .nav__links.open li:nth-child(2) { transition-delay: 0.12s !important; }
  .nav__links.open li:nth-child(3) { transition-delay: 0.19s !important; }
  .nav__links.open li:nth-child(4) { transition-delay: 0.26s !important; }
  .nav__links.open li:nth-child(5) { transition-delay: 0.33s !important; }

  /* ── Nav link text ── */
  .nav__links a:not(.btn),
  .nav__mega-btn {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: clamp(1.7rem, 6.5vw, 2.2rem) !important;
    font-style: italic !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    padding: 0.4rem 0 !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4) !important;
    transition: color 0.2s ease !important;
    line-height: 1.2 !important;
  }

  .nav__links a:not(.btn):hover,
  .nav__mega-btn:hover {
    color: #9b6dff !important;
  }

  /* ── CTA button ── */
  .nav__links .btn.nav__cta,
  .nav__links .nav__cta {
    margin-top: 1.75rem !important;
    font-size: 0.95rem !important;
    font-family: 'DM Sans', sans-serif !important;
    font-style: normal !important;
    display: inline-block !important;
    width: auto !important;
    border: 1px solid rgba(155, 109, 255, 0.4) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 0.65rem 1.75rem !important;
    border-radius: 100px !important;
  }

  /* ── Mobile rings background ── */
  .nav__mobile-bg {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    overflow: hidden !important;
  }

  /* Ambient glow */
  .nav__mobile-bg::before {
    content: '' !important;
    position: absolute !important;
    top: 65% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 500px !important;
    height: 500px !important;
    background: radial-gradient(circle, rgba(91, 43, 224, 0.35) 0%, rgba(155, 109, 255, 0.1) 40%, transparent 70%) !important;
    pointer-events: none !important;
    animation: mobileNavGlow 5s ease-in-out infinite !important;
  }

  @keyframes mobileNavGlow {
    0%,100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.8; }
    50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
  }

  .nav__mobile-ring {
    position: absolute !important;
    border-radius: 50% !important;
    top: 65% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0 !important;
  }

  .nav__mobile-ring-label {
    position: absolute !important;
    top: 70% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.1rem !important;
    font-style: italic !important;
    font-weight: 700 !important;
    color: rgba(155, 109, 255, 0.45) !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    transition: opacity 0.8s ease 0.4s !important;
    pointer-events: none !important;
  }

  .nav__links.open .nav__mobile-ring-label {
    opacity: 1 !important;
  }

  /* Ring pulse animations — only fire when nav is open */
  .nav__links.open .nav__mobile-ring--1 {
    border: 1px solid rgba(155, 109, 255, 0.9) !important;
    animation: mobileRingOut 4s ease-out infinite 0s !important;
  }
  .nav__links.open .nav__mobile-ring--2 {
    border: 1px solid rgba(155, 109, 255, 0.65) !important;
    animation: mobileRingOut 4s ease-out infinite 1s !important;
  }
  .nav__links.open .nav__mobile-ring--3 {
    border: 0.75px solid rgba(91, 43, 224, 0.5) !important;
    animation: mobileRingOut 4s ease-out infinite 2s !important;
  }
  .nav__links.open .nav__mobile-ring--4 {
    border: 0.75px solid rgba(91, 43, 224, 0.3) !important;
    animation: mobileRingOut 4s ease-out infinite 3s !important;
  }

  @keyframes mobileRingOut {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(1);  }
    5%   { opacity: 1;                                                }
    70%  { opacity: 0.3;                                              }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(22); }
  }

  /* ── Services accordion ── */
  .nav__mobile-services {
    border-left: 1px solid rgba(155, 109, 255, 0.25) !important;
    padding-left: 1.25rem !important;
    margin-left: 0 !important;
    text-align: left !important;
    max-width: 220px !important;
  }
  .nav__mobile-services li {
    padding: 0.3rem 0 !important;
    text-align: left !important;
    width: auto !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .nav__mobile-services a {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 0.88rem !important;
    font-style: normal !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 300 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  .nav__mobile-services a:hover {
    color: rgba(155, 109, 255, 0.9) !important;
  }
  .nav__mobile-services-all a {
    color: rgba(255, 255, 255, 0.2) !important;
    font-size: 0.78rem !important;
  }

  /* View all services link — fix rendering */
  .nav__mobile-services-all {
    margin-top: 0.25rem !important;
    padding-top: 0.35rem !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
  }
  .nav__mobile-services-all a {
    white-space: nowrap !important;
    display: inline-block !important;
  }


  /* Services arrow rotation */
  .nav__arrow {
    display: inline-block !important;
    transition: transform 0.3s ease !important;
  }
  .nav__item--mega.open .nav__arrow {
    transform: rotate(180deg) !important;
  }

  /* Mega btn styling on dark bg */
  .nav__mega-btn {
    cursor: pointer !important;
    background: none !important;
    border: none !important;
  }
  .nav__mega-btn.active,
  .nav__item--mega.open .nav__mega-btn {
    color: #9b6dff !important;
  }

} /* end @media 768px */


/* ══════════════════════════════════════
   HOMEPAGE — mobile
══════════════════════════════════════ */

@media (max-width: 768px) {

  /* Hero */
  .hero { padding-top: 5rem; }
  .hero__headline { font-size: clamp(2rem, 8vw, 3.2rem) !important; }
  .hero__sub { font-size: 0.9rem; max-width: 100%; }
  .hero__cta { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .hero__cta .btn { width: 100%; text-align: center; justify-content: center; }
  .hero__depth { display: none !important; }
  .blob { display: none !important; }

  /* Service rows */
  .svc-rows { border-radius: 10px; }
  .svc-row {
    grid-template-columns: 1fr 28px;
    gap: 1rem;
    padding: 1.5rem;
  }
  .svc-row__visual { display: none !important; }
  .svc-row__title { font-size: 1.3rem; }
  .svc-row__desc { font-size: 0.82rem; }

  /* Work cards */
  .work__grid--upgraded { grid-template-columns: 1fr; gap: 1rem; }
  .case-card--dark.case-card--wide { grid-column: auto; }
  .case-card--wide .case-card__dark-inner { flex-direction: column; gap: 1.25rem; }
  .case-card__dark-results { flex-wrap: wrap; gap: 1.25rem; }

  /* About */
  .about__inner--upgraded { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Contact */
  .contact__inner { grid-template-columns: 1fr; gap: 2rem; }

}

@media (max-width: 480px) {

  /* Hero */
  .hero-ring { display: none !important; }
  .hero__mantra { font-size: 0.78rem; text-align: center; }

  /* Service rows */
  .svc-row {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    position: relative;
  }
  .svc-row__arrow { position: absolute; top: 1.25rem; right: 1.25rem; }
  .svc-row__left { flex-direction: column; gap: 0.4rem; }
  .svc-tag { font-size: 0.62rem; padding: 0.2rem 0.55rem; }
  .services__cta-strip { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .services__cta-strip .services__cta-actions { flex-direction: column; width: 100%; }
  .services__cta-strip .btn { width: 100%; text-align: center; justify-content: center; }

  /* Section typography */
  .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem) !important; }
  .section { padding: clamp(3rem, 8vw, 5rem) 0; }

  /* Inputs — prevent iOS zoom */
  input, select, textarea { font-size: 16px !important; }

}


/* ══════════════════════════════════════
   SERVICE PAGES — mobile
══════════════════════════════════════ */

@media (max-width: 768px) {

  .service-hero { padding-top: 5.5rem; min-height: auto; padding-bottom: 3rem; }
  .service-hero__title { font-size: clamp(1.8rem, 7vw, 3rem) !important; }
  .service-hero__sub { font-size: 0.88rem; }

  /* Process steps */
  .process__steps { grid-template-columns: 1fr 1fr; }

  /* For-who */
  .for-who__grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Timeline */
  .timeline__track { grid-template-columns: 1fr; gap: 0; }
  .timeline__item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
  }
  .timeline__item:last-child { border-bottom: none; }

  /* Service CTA */
  .service-cta__inner { flex-direction: column; text-align: center; align-items: center; gap: 1.5rem; }
  .service-cta__title { font-size: clamp(1.4rem, 5vw, 2rem) !important; }

  /* Dark signature visuals — all go single column */
  .pm-auction__grid,
  .st-spectrum__grid,
  .cr-brief__grid,
  .an-stream__grid { grid-template-columns: 1fr !important; gap: 1rem; }

  .st-spectrum__arrow { transform: rotate(90deg); margin: 0.5rem auto; display: block; text-align: center; }

  /* Services hub page */
  .services-pillars__grid { grid-template-columns: 1fr 1fr !important; }
  .services-hub__category { grid-template-columns: 1fr !important; }

  /* KPIs */
  .kpis__grid { grid-template-columns: 1fr 1fr; }

}

@media (max-width: 480px) {

  .process__steps { grid-template-columns: 1fr !important; }
  .process__step { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
  .process__step:last-child { border-bottom: none; }

  .deliverables__grid { grid-template-columns: 1fr; }

  .services-pillars__grid { grid-template-columns: 1fr !important; }
  .services-pillar {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: 1.5rem;
  }
  .services-pillar:last-child { border-bottom: none; }

  .hub-card { grid-template-columns: 36px 1fr 20px; gap: 0.75rem; padding: 1.1rem; }

  .faq__question { font-size: 0.88rem; }

}


/* ══════════════════════════════════════
   ABOUT PAGE — mobile
══════════════════════════════════════ */

@media (max-width: 768px) {
  .about-why__grid { grid-template-columns: 1fr 1fr !important; }
  .about-process__steps { grid-template-columns: 1fr 1fr !important; }
  .about-numbers__inner { grid-template-columns: 1fr; }
  .about-principles__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .about-hero__headline { font-size: clamp(3rem, 14vw, 7rem) !important; }
  .about-manifesto__quote { font-size: clamp(1.4rem, 5vw, 2.2rem) !important; }
  .about-why__grid { grid-template-columns: 1fr !important; }
  .about-process__steps { grid-template-columns: 1fr !important; }
  .about-cta__inner { padding: 2rem 1.25rem; }
  .about-cta__actions { flex-direction: column; align-items: stretch; }
  .about-cta__actions .btn { text-align: center; justify-content: center; }
}


/* ══════════════════════════════════════
   FOOTER — mobile
══════════════════════════════════════ */

@media (max-width: 768px) {
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .footer__cta { align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer__legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
  .footer__legal a { font-size: 0.72rem; }
  .footer__copy { font-size: 0.72rem; }
  .scroll-top { bottom: 1.25rem; right: 1.25rem; width: 38px; height: 38px; font-size: 0.95rem; }
}


/* ══════════════════════════════════════
   GLOBAL MOBILE UTILITIES
══════════════════════════════════════ */

@media (max-width: 768px) {
  /* Prevent any horizontal overflow */
  body { overflow-x: hidden; }

  /* Container padding tighter on small screens */
  .container { padding: 0 1.25rem; }

  /* Section spacing reduced */
  .section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
}

@media (max-width: 480px) {
  /* Disable body::after global rings on mobile (performance) */
  body::after { display: none !important; }

  /* Tighter container */
  .container { padding: 0 1rem; }
}


/* ══════════════════════════════════════
   GLOBAL READABILITY IMPROVEMENTS
   Loaded last — applies everywhere
══════════════════════════════════════ */

/* Body text — bump weight and tighten line-height on small text */
body {
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Section labels — currently too faint */
.section-label,
.service-detail__label,
.policy__label,
.not-found__label {
  opacity: 0.85 !important;
}

/* Body copy — wherever --text-muted is used as paragraph colour */
.service-detail__text,
.service-detail__lead,
.sf-item__desc,
.for-who__ideal-item,
.process__desc,
.kpi-card__label,
.deliverable__desc,
.timeline__desc,
.faq__answer p,
.about__text p,
.contact__left p,
.policy p,
.policy li,
.footer__tagline {
  font-weight: 400 !important;
}

/* Uppercase labels — letter-spacing makes thin weights even harder to read */
.section-label,
[class*="__label"],
[class*="__tag"],
[class*="__num"] {
  font-weight: 500;
}

/* Positioning spectrum label (Image 1) */
.st-spectrum__label,
.spectrum__label,
[class*="spectrum"] p,
[class*="spectrum"] span {
  opacity: 0.9 !important;
  font-weight: 500 !important;
}

/* "Without strategy / With strategy" panel labels */
.st-panel__label,
.cr-panel__label,
[class*="__panel"] .label,
[class*="panel__label"] {
  opacity: 0.85 !important;
  letter-spacing: 0.08em !important;
}

/* FAQ answer text specifically */
.faq__answer {
  color: var(--text) !important;
}
.faq__answer p {
  color: var(--text) !important;
  opacity: 0.72 !important;
  font-size: 0.95rem !important;
  line-height: 1.8 !important;
}

/* For-who cards body text */
.for-who__ideal-text {
  color: var(--text) !important;
  opacity: 0.78 !important;
}

/* "Probably not for you" card */
.for-who__not li,
.for-who__not p {
  color: var(--text) !important;
  opacity: 0.65 !important;
}