/* ============================================================
   Xzidian · site.css
   Shared design system — single source of truth for every page.
   Owns: tokens, base/reset, .page, .mono, announcement bar,
   navigation (incl. responsive mobile menu), buttons, footer, reveal.
   Page-specific styles live in each page's own <style> or css file.
   ============================================================ */

:root {
  --bg:          #FAFAF7;
  --bg-deep:     #F2F1EC;
  --bg-elev:     #FFFFFF;
  --accent:      #E85C3A;
  --accent-soft: #F07558;
  --accent-2:    #E85C3A;
  --text-light:  #FAFAF7;
  --text-dark:   #0A0A0A;
  --text-muted:  #6B6B68;
  --surf-warm:   #0A0A0A;
  --surf-card:   #FFFFFF;
  --line-dark:   rgba(255,255,255,0.12);
  --line-accent: #E85C3A3D;
  --line-ink:    rgba(15,26,61,0.12);
}

/* Base / reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Layout container */
.page { max-width: 1320px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 800px) { .page { padding: 0 22px; } }

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Announcement bar */
.annc {
  background: var(--text-dark);
  color: var(--text-light);
  text-align: center;
  padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
}
.annc span { color: var(--accent); }

/* ===================== Navigation ===================== */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,247,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(10,10,10,0.1);
}
nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }

.logo-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logo-mark { width: 34px; height: 34px; color: var(--accent); }
.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text-dark);
}
.logo-text em {
  display: block;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.22em;
  font-style: normal;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
}

.nav-links { display: flex; align-items: center; gap: 38px; list-style: none; }
.nav-links a {
  color: rgba(10,10,10,0.82);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* Buttons */
.cta-btn {
  background: var(--accent);
  color: var(--text-light);
  border: none;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.cta-btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.cta-btn.outline {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid rgba(10,10,10,0.3);
}
.cta-btn.outline:hover { background: var(--text-dark); color: var(--text-light); }

/* In-menu CTA lives inside the nav list; only shown inside the mobile menu */
.nav-cta-li { display: none; }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-wrap.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-wrap.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-wrap.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile navigation — drop-down panel */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  nav > .cta-btn { display: none; }          /* desktop CTA hides; it lives inside the menu on mobile */

  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid rgba(10,10,10,0.1);
    padding: 8px 22px 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }
  .nav-wrap.open .nav-links {
    max-height: 80vh;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(10,10,10,0.06);
  }
  .nav-links .nav-cta {
    display: block;
    margin-top: 16px;
    text-align: center;
    border-bottom: none;
  }
  .nav-cta-li { display: block; }
}

/* ===================== Footer ===================== */
footer { background: var(--text-dark); color: var(--bg); padding: 80px 0 32px; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250,250,247,0.15);
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 16px;
}
.foot-desc { font-size: 14px; color: rgba(250,250,247,0.65); line-height: 1.6; max-width: 38ch; }
.foot-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: rgba(250,250,247,0.75); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.foot-col a:hover { color: var(--bg); }
.foot-base {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,250,247,0.5);
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================== Scroll reveal ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
