/*
 * XenoComp site header + footer, shared by the homepage (index.html) and every app page (app/layout.php).
 * Edit here only, so all pages stay identical.
 */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

.site-header .nav-inner {
  position: relative;
  width: min(1180px, 92%);
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 950;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-header .logo-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(53, 208, 255, 0.28);
}

.site-header .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#site-nav.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.6;
}

#site-nav.nav-links a { color: inherit; text-decoration: none; }
#site-nav.nav-links a:hover { color: #35d0ff; }
#site-nav.nav-links a[aria-current] { color: #ffffff; box-shadow: inset 0 -2px 0 #35d0ff; }
#site-nav .badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: #c4313b; color: #fff; font-size: .72rem; line-height: 18px; text-align: center; vertical-align: 1px; }

@media (min-width: 681px) {
  #site-nav.nav-links {
    position: fixed;
    top: 0;
    right: max(4%, calc((100vw - 1180px) / 2 + 4%));
    z-index: 51;
    flex-direction: row;
    height: 74px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  #site-nav.nav-links a { display: inline; padding: 0; border: none; background: transparent; }
}

@media (min-width: 681px) and (max-width: 1060px) {
  #site-nav.nav-links { gap: 16px; font-size: 0.86rem; }
}

@media (min-width: 681px) and (max-width: 860px) {
  #site-nav.nav-links a.nav-optional { display: none; }
}

.site-header .nav-toggle {
  display: none;
  flex-direction: column;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.site-header .nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .site-header .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .site-header .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .site-header .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop { display: none; }

@media (max-width: 680px) {
  body { overflow-x: hidden; }

  .site-header { padding-top: env(safe-area-inset-top, 0px); backdrop-filter: none; }
  .site-header .nav-inner { width: min(1180px, 94%); min-height: 64px; }
  .site-header .nav-toggle { display: inline-flex; }
  .site-header .logo { font-size: 1.05rem; }
  .site-header .logo-mark { width: 40px; height: 40px; }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 59;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(7, 17, 31, 0.45);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.28s ease;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  #site-nav.nav-links {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: 4%;
    left: 4%;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    overflow: hidden;
    background: #07111f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    transform: translateY(calc(-100% - 16px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease;
    will-change: transform, opacity;
  }
  body.nav-open #site-nav.nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }

  #site-nav.nav-links a {
    display: block;
    padding: 16px 18px;
    border-radius: 14px;
    font-size: 1.05rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
  }
  #site-nav.nav-links a:hover,
  #site-nav.nav-links a:active { color: #35d0ff; background: rgba(255, 255, 255, 0.08); }
  #site-nav.nav-links a[aria-current] { box-shadow: none; border-color: #35d0ff; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 0;
  color: rgba(255, 255, 255, 0.68);
  background: #050b14;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

.site-footer .footer-row {
  width: min(1180px, 92%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.94rem;
}

.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #35d0ff; }

@media (max-width: 680px) {
  .site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .site-footer .footer-row { width: min(1180px, 94%); flex-direction: column; justify-content: center; text-align: center; }
  .site-footer .footer-links { justify-content: center; }
}

@media print {
  .site-header, #site-nav, .nav-backdrop, .site-footer { display: none !important; }
}
