/* css/base.css — Reset, global layout, nav, footer, page system */
@import url('variables.css');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html  { scroll-behavior: smooth; }

body {
  background:   var(--black);
  color:        var(--white);
  font-family:  var(--font-body);
  font-weight:  300;
  min-height:   100vh;
  overflow-x:   hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10,10,10,0.96);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  backdrop-filter: blur(8px);
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-decoration: none;
}
.nav-logo .bullseye { width: 38px; height: 38px; flex-shrink: 0; object-fit: contain; }
.nav-logo .logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo .logo-top {
  font-family: var(--font-display);
  font-size: 1.1rem; letter-spacing: 0.12em; color: var(--red-hot);
}
.nav-logo .logo-bottom {
  font-family: var(--font-condensed);
  font-size: 0.65rem; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase;
}

.nav-links { display: flex; list-style: none; }
.nav-links a {
  display: block; padding: 0 1.1rem;
  height: var(--nav-height); line-height: var(--nav-height);
  font-family: var(--font-condensed); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--red-hot);
  background: rgba(255,51,0,0.05);
}
.nav-links a.admin-link { color: rgba(212,160,23,0.45); }
.nav-links a.admin-link:hover { color: var(--gold); background: rgba(212,160,23,0.06); border-bottom-color: var(--gold); }
.nav-links a.admin-link.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── Instagram icon in nav ── */
.nav-instagram {
  display: flex; align-items: center; justify-content: center;
  width: var(--nav-height); height: var(--nav-height);
  color: var(--muted); text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
}
.nav-instagram:hover { color: #e1306c; }  /* Instagram brand pink */
.nav-instagram svg { width: 20px; height: 20px; }

/* Burger */
.nav-burger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--white); }

/* Mobile nav overlay */
.mobile-nav {
  display: none; position: fixed;
  top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: rgba(10,10,10,0.98); z-index: 99;
  flex-direction: column; padding: 2rem;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display); font-size: 2.2rem;
  letter-spacing: 0.08em; color: var(--muted); text-decoration: none;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
  transition: color 0.2s; cursor: pointer;
}
.mobile-nav a:hover { color: var(--red-hot); }

/* ── Pages ── */
.page {
  display: none; min-height: 100vh;
  padding-top: var(--nav-height);
  animation: fadeIn 0.3s ease;
}
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section headers ── */
.section-header {
  padding: 4rem 2rem 2rem;
  max-width: var(--max-width); margin: 0 auto;
}
.section-tag {
  font-family: var(--font-condensed); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; color: var(--red); text-transform: uppercase;
  margin-bottom: 0.8rem; display: flex; align-items: center; gap: 10px;
}
.section-tag::before { content: ''; width: 24px; height: 1px; background: var(--red); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: 0.03em; line-height: 1;
}

/* ── Footer ── */
footer {
  background: var(--dark); border-top: 1px solid var(--border);
  padding: 2.5rem; text-align: center; margin-top: auto;
}
footer .footer-logo {
  font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: 0.15em; color: var(--red); margin-bottom: 0.5rem;
}
footer p { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }

/* Instagram link in footer */
.footer-social { margin-top: 1rem; }
.footer-instagram {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-condensed); font-size: 0.8rem;
  letter-spacing: 0.12em; transition: color 0.2s;
}
.footer-instagram:hover { color: #e1306c; }
.footer-instagram svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Buttons ── */
.btn {
  display: inline-block; cursor: pointer; border: none; text-decoration: none;
  font-family: var(--font-condensed); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.75rem 1.8rem; transition: all 0.2s;
}
.btn-primary {
  background: var(--red-hot); color: white;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-primary:hover { background: var(--red); transform: translateX(2px); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.04); }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-light); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.75rem; }
.btn-danger { background: #7f1d1d; color: var(--white); border: 1px solid #cc2200; }
.btn-danger:hover { background: var(--red); }

/* ── Loading / Error ── */
.data-loading {
  text-align: center; padding: 4rem 2rem;
  font-family: var(--font-condensed); font-size: 0.9rem;
  letter-spacing: 0.15em; color: var(--muted); text-transform: uppercase;
}
.data-loading .spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border); border-top-color: var(--red);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.data-error {
  text-align: center; padding: 3rem 2rem;
  font-family: var(--font-condensed); color: var(--red); line-height: 1.8;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links    { display: none !important; }
  .nav-burger   { display: flex !important; }
  /* Keep Instagram icon visible on mobile next to burger */
  .nav-instagram { width: 44px; }
}
