/* ═══════════════════════════════════════
   ECHO — components.css
   Buttons, Nav, Mega Menu, Footer,
   Preloader, shared animations
   ═══════════════════════════════════════ */



/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  box-shadow: 0 0 0 0 rgba(91, 43, 224, 0.4);
  opacity: 0;
  transition: none;
}
.btn:active::after {
  opacity: 1;
  animation: echoRipple 0.7s ease-out forwards;
}
@keyframes echoRipple {
  0%   { box-shadow: 0 0 0 0px  rgba(91, 43, 224, 0.45); opacity: 1; }
  33%  { box-shadow: 0 0 0 10px rgba(91, 43, 224, 0.2); }
  66%  { box-shadow: 0 0 0 20px rgba(91, 43, 224, 0.08); }
  100% { box-shadow: 0 0 0 30px rgba(91, 43, 224, 0);   opacity: 0; }
}
.btn--primary { background: var(--accent); color: #ffffff; }
.btn--primary:hover {
  background: var(--accent-dim);
  box-shadow:
    0 0 0 4px  rgba(91, 43, 224, 0.15),
    0 0 0 8px  rgba(91, 43, 224, 0.07),
    0 0 0 12px rgba(91, 43, 224, 0.03);
}
.btn--outline       { border-color: var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost         { color: var(--text-muted); }
.btn--ghost:hover   { color: var(--text); }
.btn--full          { width: 100%; justify-content: center; }




/* ── Nav ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(237, 233, 244, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header.scrolled::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(91, 43, 224, 0.12) 20%,
    rgba(91, 43, 224, 0.30) 50%,
    rgba(91, 43, 224, 0.12) 80%,
    transparent 100%
  );
  animation: navShimmer 3s ease-in-out infinite;
}
@keyframes navShimmer {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--text);
  position: relative;
  transition: color var(--transition);
}
.nav__logo::before,
.nav__logo::after {
  content: 'échO';
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.nav__logo::before {
  transform: translate(-3px, -2px);
  transition: opacity 0.2s ease 0s, transform 0.4s ease 0s;
}
.nav__logo::after {
  transform: translate(-6px, -4px);
  transition: opacity 0.2s ease 0.08s, transform 0.4s ease 0.08s;
}
.nav__logo:hover::before { opacity: 0.18; transform: translate(-5px, -3px); }
.nav__logo:hover::after  { opacity: 0.08; transform: translate(-10px, -6px); }

/* Logo O — accent treatment */
.logo-o { font-style: normal; font-weight: 400; }

/* Prevent oversized O inside large headlines */
.hero__headline .logo-o {
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-size: 0.88rem;
}
.nav__links a:not(.btn) {
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}
.nav__links a:not(.btn):hover { color: var(--accent); }
.nav__links a.active          { color: var(--accent); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: activeDotPulse 2.5s ease-in-out infinite;
}
@keyframes activeDotPulse {
  0%, 100% { box-shadow: 0 0 0 0px rgba(91, 43, 224, 0.4); opacity: 1; }
  50%       { box-shadow: 0 0 0 5px rgba(91, 43, 224, 0);   opacity: 0.8; }
}
.nav__cta.btn--outline { border-color: var(--border); color: var(--text); transition: all var(--transition); }
.nav__cta.btn--outline:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow:
    0 0 0 3px  rgba(91, 43, 224, 0.10),
    0 0 0 6px  rgba(91, 43, 224, 0.05),
    0 0 0 10px rgba(91, 43, 224, 0.02);
}
.nav__mega-btn {
  background: none; border: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0;
  transition: color var(--transition);
}
.nav__mega-btn:hover,
.nav__item--mega.open .nav__mega-btn { color: var(--accent); }
.nav__arrow { display: inline-block; transition: transform var(--transition); }
.nav__item--mega.open .nav__arrow { transform: rotate(180deg); }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  z-index: 101;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--text);
  transition: all var(--transition);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav__mobile-tag { display: none; }




/* ── Mega Menu ── */
/* ══ MEGA MENU — Dark & Dramatic ══ */
.mega-menu {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #0e0a1a;
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height 0.55s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease;
  pointer-events: none;
  border-bottom: 1px solid rgba(91,43,224,0.2);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 4px 20px rgba(91,43,224,0.15);
}
.mega-menu.open { max-height: 460px; opacity: 1; pointer-events: all; }

/* Top accent line */
.mega-menu::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(91,43,224,.3) 25%, rgba(155,109,255,.7) 50%, rgba(91,43,224,.3) 75%, transparent 100%);
}

/* Ambient glow behind rings */
.mega-menu::after {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(91,43,224,0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: megaGlow 6s ease-in-out infinite;
}
@keyframes megaGlow {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.7; }
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 3.5rem;
  align-items: center;
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
  position: relative; z-index: 1;
}

/* ── Rings panel ── */
.mega-menu__visual { display: flex; align-items: center; justify-content: center; }
.mega-menu__rings {
  position: relative;
  width: 180px; height: 180px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mega-ring {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.mega-ring--1 { width: 28px; height: 28px; border: 1.5px solid rgba(155,109,255,0.9); animation: megaRingPulse 3.2s ease-out infinite 0s; }
.mega-ring--2 { width: 28px; height: 28px; border: 1px solid rgba(155,109,255,0.6);   animation: megaRingPulse 3.2s ease-out infinite 0.8s; }
.mega-ring--3 { width: 28px; height: 28px; border: 1px solid rgba(91,43,224,0.4);     animation: megaRingPulse 3.2s ease-out infinite 1.6s; }
.mega-ring--4 { width: 28px; height: 28px; border: 1px solid rgba(91,43,224,0.2);     animation: megaRingPulse 3.2s ease-out infinite 2.4s; }
@keyframes megaRingPulse {
  0%   { width: 18px;  height: 18px;  opacity: 0.9; }
  100% { width: 175px; height: 175px; opacity: 0; }
}
.mega-ring__label {
  position: relative; z-index: 1;
  font-family: var(--font-head);
  font-size: 1.1rem; font-weight: 700; font-style: italic;
  color: rgba(155,109,255,0.7);
  letter-spacing: 0.02em;
  pointer-events: none; user-select: none;
  text-shadow: 0 0 20px rgba(155,109,255,0.4);
}

/* ── Service grid ── */
.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.mega-menu__col {
  opacity: 0; transform: translateY(12px);
  transition:
    opacity 0.4s ease calc(var(--col-i) * 0.08s + 0.12s),
    transform 0.4s ease calc(var(--col-i) * 0.08s + 0.12s);
  padding: 0 1.75rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.mega-menu__col:first-child { padding-left: 0; }
.mega-menu__col:last-child  { border-right: none; }
/* Hover accent line top */
.mega-menu__col::before {
  content: '';
  position: absolute; top: -2.75rem; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(155,109,255,0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mega-menu__col:hover::before { opacity: 1; }
.mega-menu.open .mega-menu__col { opacity: 1; transform: none; }

.mega-num {
  display: block; font-size: 0.6rem; font-weight: 500;
  color: rgba(155,109,255,0.5);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* Big italic serif titles */
.mega-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  font-weight: 600; font-style: italic;
  line-height: 1.05;
  margin-bottom: 1.25rem; position: relative;
}
.mega-title a {
  color: rgba(255,255,255,0.88);
  transition: color 0.25s ease;
  position: relative; display: inline-block;
}
/* Echo ghost on hover */
.mega-title a::before {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  color: #9b6dff; opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s ease;
  transform: translate(0, 0); white-space: nowrap;
  font-style: italic;
}
.mega-title a:hover { color: #fff; }
.mega-title a:hover::before { opacity: 0.18; transform: translate(5px, 4px); }

/* Sub links */
.mega-list { display: flex; flex-direction: column; gap: 0.55rem; }
.mega-list a {
  font-size: 0.82rem; color: rgba(255,255,255,0.3);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex; align-items: center; gap: 0.35rem;
  letter-spacing: 0.01em;
}
.mega-list a::before {
  content: '—'; font-size: 0.65rem; opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: #9b6dff;
  flex-shrink: 0;
}
.mega-list a:hover { color: rgba(255,255,255,0.85); transform: translateX(6px); }
.mega-list a:hover::before { opacity: 1; transform: translateX(0); }

/* ── CTA column ── */
.mega-menu__cta {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 1rem; text-align: right; opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s ease 0.42s, transform 0.4s ease 0.42s;
  min-width: 160px;
}
.mega-menu.open .mega-menu__cta { opacity: 1; transform: none; }
.mega-menu__cta p {
  font-family: var(--font-head); font-style: italic;
  font-size: 0.95rem; color: rgba(255,255,255,0.45); line-height: 1.5;
}
.mega-cta-btn {
  white-space: nowrap;
  border-color: rgba(155,109,255,0.4) !important;
  color: rgba(255,255,255,0.7) !important;
}
.mega-cta-btn:hover {
  border-color: #9b6dff !important;
  color: #fff !important;
  background: rgba(91,43,224,0.15) !important;
}
.mega-all-services {
  font-size: 0.75rem; color: rgba(255,255,255,0.25);
  transition: color 0.2s ease;
}
.mega-all-services:hover { color: rgba(155,109,255,0.8); }

/* ── Bottom shimmer line ── */
.mega-menu__shimmer {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(91,43,224,.2) 25%, rgba(155,109,255,.5) 50%, rgba(91,43,224,.2) 75%, transparent 100%);
  opacity: 0; transition: opacity 0.5s ease 0.35s;
  position: relative; z-index: 1;
}
.mega-menu.open .mega-menu__shimmer { opacity: 1; }




/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  background: var(--surface);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Top row */
.footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4rem;
  align-items: start;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer__nav {
  display: flex;
  gap: 3rem;
}
.footer__nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 0.25rem;
}
.footer__nav-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__nav-col a:hover { color: var(--accent); }
.footer__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}
.footer__cta p {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Bottom row */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer__copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.6;
}
.footer__legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.footer__legal a {
  color: var(--text-muted);
  opacity: 0.6;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.footer__legal a:hover {
  color: var(--accent);
  opacity: 1;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer__cta { align-items: flex-start; }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}




/* ── Preloader ── */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  animation: preloaderFailsafe 0.7s ease 4.5s forwards;
}
@keyframes preloaderFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; animation: none; }
.preloader__rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.preloader__ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--accent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0); opacity: 0;
}
.preloader__ring--1 { width: 120px; height: 120px; animation: preloaderRing 2.4s ease-out infinite 0s; }
.preloader__ring--2 { width: 120px; height: 120px; animation: preloaderRing 2.4s ease-out infinite 0.6s; }
.preloader__ring--3 { width: 120px; height: 120px; animation: preloaderRing 2.4s ease-out infinite 1.2s; }
.preloader__ring--4 { width: 120px; height: 120px; animation: preloaderRing 2.4s ease-out infinite 1.8s; }
@keyframes preloaderRing {
  0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(4.5); opacity: 0; }
}
.preloader__logo {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.preloader__logo-text {
  font-family: var(--font-head); font-size: 2.8rem;
  font-weight: 700; font-style: italic;
  color: var(--text); letter-spacing: 0.01em;
  animation: preloaderLogoIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.preloader__logo-o { font-style: normal; font-weight: 400; color: var(--accent); }
.preloader__logo-echo {
  position: absolute;
  font-family: var(--font-head); font-size: 2.8rem;
  font-weight: 700; font-style: italic;
  color: var(--accent); letter-spacing: 0.01em;
  pointer-events: none; white-space: nowrap;
  animation: preloaderEcho1 2.4s ease-out infinite 0.8s;
}
.preloader__logo-echo--2 { animation: preloaderEcho2 2.4s ease-out infinite 1.2s; }
@keyframes preloaderLogoIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes preloaderEcho1 {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  15%  { opacity: 0.18; transform: translate(5px, -3px) scale(1.02); }
  60%  { opacity: 0;    transform: translate(14px, -8px) scale(1.06); }
  100% { opacity: 0;    transform: translate(14px, -8px) scale(1.06); }
}
@keyframes preloaderEcho2 {
  0%   { opacity: 0;    transform: translate(0, 0) scale(1); }
  15%  { opacity: 0.08; transform: translate(10px, -6px) scale(1.04); }
  60%  { opacity: 0;    transform: translate(26px, -14px) scale(1.1); }
  100% { opacity: 0;    transform: translate(26px, -14px) scale(1.1); }
}
.preloader__bar {
  position: absolute; bottom: 2.5rem;
  left: 50%; transform: translateX(-50%);
  width: 120px; height: 1px;
  background: var(--border); border-radius: 100px; overflow: hidden;
}
.preloader__bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #9b6dff, #5b2be0);
  border-radius: 100px;
  animation: preloaderBar 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
@keyframes preloaderBar {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}
body.preloader-active { overflow: hidden; }




/* ── Mobile Nav ── */
@media (max-width: 768px) {
  /* Overlay covers everything including the header */
  .nav__links {
    display: flex !important;   /* always rendered, controlled by opacity */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;  /* dynamic viewport on mobile browsers */
    max-width: none !important;
    margin: 0 !important;
    padding: 5rem 2rem 3rem !important;
    box-sizing: border-box !important;
    background: #ede9f4 !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    z-index: 200 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav__links.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
  }

  /* Toggle sits above the overlay so it can close it */
  .nav__toggle {
    display: flex;
    position: relative;
    z-index: 201;
  }
  /* When nav is open, make toggle spans white for dark bg */
  .nav__toggle.open span {
    background: #fff !important;
  }

  /* Keep header above page but below toggle when nav open */
  .site-header {
    z-index: 200;
  }

  .mega-menu { display: none !important; }

  .nav__mobile-tag {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(155,109,255,0.6);
    margin-bottom: 2.5rem;
  }

  /* Stagger animation */
  .nav__links li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
    text-align: center;
  }
  .nav__links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav__links.open li:nth-child(2) { transition-delay: 0.12s; }
  .nav__links.open li:nth-child(3) { transition-delay: 0.19s; }
  .nav__links.open li:nth-child(4) { transition-delay: 0.26s; }
  .nav__links.open li:nth-child(5) { transition-delay: 0.33s; }
  .nav__links.open li { opacity: 1; transform: none; }

  /* Large readable nav items */
  .nav__links a:not(.btn), .nav__mega-btn {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    font-family: var(--font-head);
    font-style: italic;
    font-weight: 600;
    color: #fff !important;
    padding: 0.4rem 0;
    display: block;
    width: 100%;
    text-align: center;
    transition: color 0.2s ease;
  }
  .nav__links a:not(.btn):hover, .nav__mega-btn:hover { color: #9b6dff; }

  /* CTA button — light outline for dark bg */
  .nav__links .btn--outline {
    margin-top: 1.75rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    width: auto;
    display: inline-block;
    border-color: rgba(155,109,255,0.4) !important;
    color: rgba(255,255,255,0.7) !important;
  }
  .nav__links .btn--outline:hover {
    border-color: #9b6dff !important;
    color: #fff !important;
    background: rgba(91,43,224,0.15) !important;
  }

  /* Prevent nav__mobile-bg div from causing layout issues */
  .nav__mobile-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
}




/* ── Mega Menu Responsive ── */
@media (max-width: 1024px) {
  .mega-menu__grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
}
@media (max-width: 900px) {
  .mega-menu__inner { grid-template-columns: 1fr; gap: 2rem; }
  .mega-menu__col { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 1.25rem 0; }
  .mega-menu__col:last-child { border-bottom: none; }
  .mega-menu__col::before { display: none; }
  .mega-menu__visual { display: none; }
  .mega-menu__cta  { align-items: flex-start; text-align: left; }
}




/* ── Scroll To Top ── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(91, 43, 224, 0.25);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 900;
}
.scroll-top:hover {
  background: var(--surface-2);
  transform: translateY(8px);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}




/* ── Mobile Nav Services Accordion ── */
.nav__mobile-services {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(91, 43, 224, 0.2);
  margin-left: 0.25rem;
}
.nav__mobile-services.open {
  max-height: 400px;
  opacity: 1;
}
.nav__mobile-services li {
  padding: 0.5rem 0;
}
.nav__mobile-services a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav__mobile-services a:hover {
  color: var(--accent);
}
.nav__mobile-services-all a {
  color: var(--text-muted) !important; opacity: 0.6;
  font-size: 0.8rem !important;
  letter-spacing: 0.05em;
}

/* Hide mobile accordion on desktop */
@media (min-width: 769px) {
  .nav__mobile-services {
    display: none;
  }
}




/* ── Mobile Nav Echo Background ── */
/* ── Mobile nav bg — always hidden, shown via nav overlay ── */
.nav__mobile-bg {
  display: none;
}

/* ── Mobile nav rings — activated at 768px breakpoint ── */
@media (max-width: 768px) {
  .nav__mobile-bg {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  /* Ambient glow behind rings */
  .nav__mobile-bg::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(91,43,224,0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: mobileNavGlow 5s ease-in-out infinite;
  }
  @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;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
  }
  /* Rings pulse outward continuously when nav is open */
  .nav__links.open .nav__mobile-ring--1 {
    width: 20px; height: 20px;
    border: 1.5px solid rgba(155,109,255,0.9);
    animation: mobileRingPulse 3.5s ease-out infinite 0s;
  }
  .nav__links.open .nav__mobile-ring--2 {
    width: 20px; height: 20px;
    border: 1px solid rgba(155,109,255,0.65);
    animation: mobileRingPulse 3.5s ease-out infinite 0.875s;
  }
  .nav__links.open .nav__mobile-ring--3 {
    width: 20px; height: 20px;
    border: 1px solid rgba(91,43,224,0.45);
    animation: mobileRingPulse 3.5s ease-out infinite 1.75s;
  }
  .nav__links.open .nav__mobile-ring--4 {
    width: 20px; height: 20px;
    border: 1px solid rgba(91,43,224,0.25);
    animation: mobileRingPulse 3.5s ease-out infinite 2.625s;
  }
  @keyframes mobileRingPulse {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(1);   }
    8%   { opacity: 1;                                                  }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(22);  }
  }

  .nav__mobile-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(155,109,255,0.3);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.8s ease 0.4s;
    text-shadow: 0 0 20px rgba(155,109,255,0.4);
  }
  .nav__links.open .nav__mobile-ring-label {
    opacity: 1;
  }

  /* Mobile accordion colours for dark bg */
  .nav__mobile-services a {
    color: rgba(255,255,255,0.4) !important;
  }
  .nav__mobile-services a:hover {
    color: rgba(155,109,255,0.9) !important;
  }
  .nav__mobile-services {
    border-left-color: rgba(155,109,255,0.25) !important;
  }

  /* Make sure nav links sit above the rings */
  .nav__links li {
    position: relative;
    z-index: 1;
  }
}


/* ═══════════════════════════════════════
   MOBILE FIXES — components
   ═══════════════════════════════════════ */

/* ── Nav toggle visible up to 768px ── */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .mega-menu   { display: none !important; }
}

/* ── Footer mobile ── */
@media (max-width: 540px) {
  .footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .footer__legal a { font-size: 0.72rem; }
  .footer__copy { font-size: 0.72rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer__top { gap: 2rem; }
  .footer__brand .nav__logo { font-size: 1.4rem; }
}

/* ── Scroll to top — smaller on mobile ── */
@media (max-width: 480px) {
  .scroll-top { bottom: 1.25rem; right: 1.25rem; width: 38px; height: 38px; font-size: 0.95rem; }
}

/* ── Social icons — nav, footer, contact ── */
.nav__social {
  display: flex; align-items: center; gap: 0.25rem;
  margin-left: 0.5rem;
}
.nav__social-link {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--text-muted); opacity: 0.55;
  transition: opacity 0.25s ease, color 0.25s ease;
}
.nav__social-link svg { width: 14px; height: 14px; }
.nav__social-link:hover {
  opacity: 1;
  color: var(--accent);
}

.footer__social { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.footer__social-link {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  position: relative;
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.footer__social-link svg { width: 14px; height: 14px; position: relative; z-index: 1; }
.footer__social-link:hover {
  color: var(--accent);
  border-color: rgba(91, 43, 224, 0.4);
  box-shadow:
    0 0 0 3px  rgba(91, 43, 224, 0.08),
    0 0 0 6px  rgba(91, 43, 224, 0.04),
    0 0 0 10px rgba(91, 43, 224, 0.02);
}

.contact__social { display: flex; gap: 0.65rem; margin-top: 1.5rem; }
.contact__social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact__social-link svg { width: 16px; height: 16px; }
.contact__social-link:hover {
  color: var(--accent);
  border-color: rgba(91, 43, 224, 0.4);
  box-shadow:
    0 0 0 3px  rgba(91, 43, 224, 0.08),
    0 0 0 6px  rgba(91, 43, 224, 0.04),
    0 0 0 10px rgba(91, 43, 224, 0.02);
}