/* ============================================================
   Header / Nav / Footer
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.1rem 0;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out), padding 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(6, 6, 8, 0.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: 0.75rem 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-nav a {
  font-size: 0.86rem;
  color: var(--ink-2);
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out);
}
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--white);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0; width: 18px; height: 1.5px;
  background: var(--white);
  transition: transform 0.3s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 880px) {
  .main-nav { display: none; }
  .header-actions .btn-outline { display: none; }
  .nav-toggle { display: flex; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(6,6,8,0.98);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 6.5rem 2rem 2.5rem;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-in-out);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--white);
}
.mobile-drawer .btn { margin-top: 1.8rem; width: 100%; }
.drawer-close {
  position: absolute;
  top: 1.6rem; right: var(--gutter);
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 4.5rem 0 2.5rem;
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124, 92, 196, 0.08), transparent);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .brand { margin-bottom: 1rem; }

.footer-brand p {
  color: var(--ink-3);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-mascot-note {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.footer-mascot-note img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.footer-bubble {
  background: var(--black-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--ink-2);
  position: relative;
}

.footer-links-grid {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.footer-col a, .footer-col span {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
  transition: color 0.25s;
}
.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.2rem;
}

.footer-contract {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-3);
  font-family: 'Courier New', monospace;
  background: var(--black-2);
  border: 1px solid var(--line);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
}
.footer-contract button { color: var(--gold); flex-shrink: 0; }

.footer-copy {
  font-size: 0.78rem;
  color: var(--ink-4);
}

.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--black-2);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.35s, visibility 0.35s, border-color 0.3s;
  z-index: 400;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--gold); }

@media (max-width: 700px) {
  .footer-top { flex-direction: column; gap: 2.2rem; }
  .footer-links-grid { gap: 2.2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--black-2);
  border: 1px solid var(--gold-dim);
  color: var(--white);
  font-size: 0.85rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 34px -12px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 900;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
