/* ============================================================
   X Space motion shell — header, footer, quick-contact bar.
   Only loaded on the coded front page, which runs without the
   theme's style.css / Elementor, so this file is self-contained.
   ============================================================ */

/* ---------- Reset the bits style.css used to provide ---------- */
body.motion-on { margin: 0; -webkit-font-smoothing: antialiased; }
body.motion-on * { box-sizing: border-box; }
body.motion-on img { max-width: 100%; height: auto; }
body.motion-on a { text-decoration: none; color: inherit; }
body.motion-on h1, body.motion-on h2, body.motion-on h3,
body.motion-on h4, body.motion-on p, body.motion-on figure { margin: 0; }
body.motion-on ul { margin: 0; padding: 0; list-style: none; }
body.motion-on button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.xsm-skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  padding: 12px 20px; background: var(--xsm-bg-2); color: var(--xsm-text);
  border-radius: 0 0 12px 0;
}
.xsm-skip:focus { left: 0; }

/* ---------- Header ---------- */
.xsm-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 300;
  transition: background-color .35s ease, backdrop-filter .35s ease, box-shadow .35s ease;
}
body.xsm-scrolled .xsm-nav {
  background: rgba(5, 5, 16, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.xsm-nav-inner {
  display: flex; align-items: center; gap: 28px;
  max-width: 1320px; margin: 0 auto; padding: 18px 24px;
}
.xsm-nav-logo { flex: 0 0 auto; line-height: 0; }
.xsm-nav-logo img { width: 132px; height: auto; }

.xsm-nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.xsm-nav-links a {
  position: relative; font-size: 15px; font-weight: 500; letter-spacing: .01em;
  color: var(--xsm-text); opacity: .82; transition: opacity .25s ease;
}
.xsm-nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--xsm-grad); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.xsm-nav-links a:hover { opacity: 1; }
.xsm-nav-links a:hover::after { transform: scaleX(1); }

.xsm-nav-cta { flex: 0 0 auto; padding: 11px 22px; font-size: 14px; }

/* Hamburger. The `body.motion-on` prefix matches the specificity of
   motion.css's `body.motion-on .xsm-btn { display: inline-flex }`, which
   otherwise wins over a bare `.xsm-nav-*` display rule. */
body.motion-on .xsm-nav-toggle {
  display: none; width: 44px; height: 44px; margin-left: auto;
  flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px;
}
.xsm-nav-toggle span {
  display: block; height: 2px; background: var(--xsm-text); border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}
.xsm-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.xsm-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.xsm-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Slide-in panel. `hidden` is kept in sync for assistive tech; the visual
   state rides on body.xsm-nav-open so the panel can animate out. */
.xsm-nav-panel {
  position: fixed; inset: 0; z-index: 290;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: 96px 32px 40px;
  background: linear-gradient(160deg, var(--xsm-bg) 0%, var(--xsm-bg-2) 100%);
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.xsm-nav-panel[hidden] { display: flex; }
body.xsm-nav-open .xsm-nav-panel { opacity: 1; visibility: visible; transform: none; }
body.xsm-nav-open { overflow: hidden; }
.xsm-nav-panel-links { display: flex; flex-direction: column; gap: 18px; }
.xsm-nav-panel-links a {
  font-family: var(--xsm-font-display); font-size: clamp(26px, 8vw, 40px);
  font-weight: 600; color: var(--xsm-text);
}
.xsm-nav-panel .xsm-btn { align-self: flex-start; }
.xsm-nav-panel-contact { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.xsm-nav-panel-contact a { color: var(--xsm-cyan); font-size: 16px; }

/* ---------- Footer ---------- */
.xsm-foot { position: relative; background: var(--xsm-bg-2); }
.xsm-foot-map { line-height: 0; }
.xsm-foot-map iframe {
  width: 100%; height: 320px; border: 0; display: block;
  filter: invert(92%) hue-rotate(180deg) saturate(.7) contrast(.9);
}
.xsm-foot-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 44px;
  max-width: 1320px; margin: 0 auto; padding: 72px 24px 48px;
}
.xsm-foot-brand img { width: 150px; height: auto; }
.xsm-foot-brand p { margin-top: 16px; color: var(--xsm-muted); font-size: 15px; line-height: 1.7; }
.xsm-foot-social { display: flex; gap: 12px; margin-top: 22px; }
.xsm-foot-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--xsm-glass-border); color: var(--xsm-text);
  transition: background .3s ease, transform .3s ease, border-color .3s ease;
}
.xsm-foot-social a:hover {
  background: var(--xsm-grad); border-color: transparent; transform: translateY(-3px);
}
.xsm-foot-col h3 {
  font-family: var(--xsm-font-display); font-size: 13px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--xsm-text);
  margin-bottom: 12px;
}
.xsm-foot-col h3 + h3 { margin-top: 26px; }
.xsm-foot-col p { color: var(--xsm-muted); font-size: 15px; line-height: 1.75; }
.xsm-foot-col p a { color: var(--xsm-muted); transition: color .25s ease; }
.xsm-foot-col p a:hover { color: var(--xsm-cyan); }
.xsm-foot-link {
  display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 500;
  color: var(--xsm-cyan); border-bottom: 1px solid rgba(0, 229, 255, .35);
  padding-bottom: 2px; transition: color .25s ease, border-color .25s ease;
}
.xsm-foot-link:hover { color: var(--xsm-magenta); border-color: rgba(241, 7, 163, .5); }
.xsm-foot-nav { display: flex; flex-direction: column; gap: 9px; }
.xsm-foot-nav a { color: var(--xsm-muted); font-size: 15px; transition: color .25s ease; }
.xsm-foot-nav a:hover { color: var(--xsm-cyan); }
.xsm-foot-base {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 22px 24px; text-align: center;
}
.xsm-foot-base p { color: var(--xsm-muted); font-size: 12px; letter-spacing: .08em; }

/* ---------- Quick-contact bar ---------- */
.xsm-bar {
  position: fixed; z-index: 280; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; padding: 10px 6px;
  border-radius: 999px; background: rgba(11, 11, 34, .82);
  border: 1px solid rgba(0, 229, 255, .28);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 14px rgba(0, 229, 255, .16), 0 0 24px rgba(0, 229, 255, .12);
}

/* Pulsing halo carried over from the previous floating CTA — it is what makes
   the bar catch the eye. Rings expand out of the icons rather than the whole
   bar so the blurred panel edge stays crisp. */
@keyframes xsm-bar-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 229, 255, .55); }
  55%  { box-shadow: 0 0 0 13px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}
.xsm-bar img {
  border-radius: 50%;
  animation: xsm-bar-pulse 3.4s cubic-bezier(.4, 0, .2, 1) infinite;
}
.xsm-bar a:nth-child(2) img { animation-delay: .45s; }
.xsm-bar a:nth-child(3) img { animation-delay: .9s; }
.xsm-bar a:nth-child(4) img { animation-delay: 1.35s; }
.xsm-bar-book img { animation-duration: 2.4s; }
.xsm-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 62px; padding: 8px 2px; border-radius: 999px;
  color: var(--xsm-text); transition: background .25s ease;
}
.xsm-bar a:hover { background: rgba(255, 255, 255, .08); }
.xsm-bar img { width: 28px; height: 28px; }
.xsm-bar span { font-size: 10px; font-weight: 600; letter-spacing: .04em; line-height: 1.1; }
.xsm-bar-book span {
  background: var(--xsm-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  body.motion-on .xsm-nav-links,
  body.motion-on .xsm-nav-cta { display: none; }
  body.motion-on .xsm-nav-toggle { display: flex; }
  .xsm-nav-inner { padding: 14px 18px; }
  .xsm-nav-logo img { width: 112px; }

  .xsm-foot-inner { grid-template-columns: 1fr 1fr; gap: 34px; padding: 56px 20px 40px; }
  .xsm-foot-brand { grid-column: 1 / -1; }

  .xsm-bar {
    right: 0; left: 0; top: auto; bottom: 0; transform: none;
    flex-direction: row; justify-content: space-around;
    border-radius: 0; padding: 6px 4px; border-width: 1px 0 0;
  }
  .xsm-bar a { width: auto; flex: 1; }
  .xsm-foot-base { padding-bottom: 88px; }
}

@media (max-width: 600px) {
  .xsm-foot-inner { grid-template-columns: 1fr; }
  .xsm-foot-map iframe { height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .xsm-nav, .xsm-nav-panel, .xsm-foot-social a, .xsm-nav-links a::after { transition: none; }
  .xsm-bar img { animation: none; }
}
