/* Vein-Hub — chrome: nav + footer + page scaffolding */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  font-size: 1.05rem;
}
.brand img { height: 28px; width: auto; }
.brand .accent { color: var(--red); }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 0.4em 0;
  transition: color var(--fast) var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--fast) var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* --- Search box (top bar + drawer share this component) ------------------ */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5em;
  width: 190px;
  padding: 0.45em 0.7em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-faint);
  transition: border-color var(--fast) var(--ease);
}
.search-box:focus-within { border-color: var(--red-dim); color: var(--text-dim); }
.search-box svg { width: 14px; height: 14px; flex-shrink: 0; }
.search-box__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.search-box__input::placeholder { color: var(--text-faint); }
.search-box__input::-webkit-search-cancel-button { display: none; }

.search-box__results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.search-box--drawer { width: 100%; }
.search-box--drawer .search-box__results { position: static; margin-top: 0.6rem; box-shadow: none; }
.search-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6em 0.8em;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.is-active { background: var(--panel-hover); color: var(--red-bright); }
.search-result__type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  flex-shrink: 0;
}
.search-empty { padding: 0.8em; font-size: 0.8rem; color: var(--text-faint); }

/* --- Icon-based hamburger / close toggle --------------------------------- */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--white);
  padding: 0.5em;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }

/* --- Icon buttons (used in the drawer bar) ------------------------------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-dim);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover, .icon-btn[aria-pressed="true"] { color: var(--red-bright); border-color: var(--red-dim); }

/* --- Left-side off-canvas drawer ------------------------------------------
   Hidden site-wide by default; only reachable via the hamburger toggle at
   the <=820px breakpoint below (desktop keeps the inline .nav-links). Slides
   in on `transform: translateX()` only (GSAP, see main.js) so opening it is
   a pure GPU-composite cost, nothing runs while it's closed or idle, and it
   never affects layout of the page behind it. */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(3, 3, 3, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--med) var(--ease);
}
.drawer-scrim.is-visible { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 91;
  width: min(84vw, 320px);
  background: var(--bg-alt);
  border-right: 1px solid var(--border-strong);
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateX(-100%);
  visibility: hidden;
  overflow-y: auto;
}
.drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.drawer-bar__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.drawer-bar__actions { display: flex; gap: 0.5rem; }

.drawer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8em 0.5em;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-radius: var(--radius);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.drawer-links a:hover, .drawer-links a.active { color: var(--white); background: var(--panel); }
.drawer-links a.active { color: var(--red-bright); }
.drawer-links__icon { display: inline-flex; color: currentColor; }
.drawer-links__icon svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .nav-primary { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (min-width: 821px) {
  .drawer, .drawer-scrim { display: none; }
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding: 2.5rem 0 3rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--red-bright); }
.footer-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.7;
}

.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, var(--red-glow), transparent 70%);
}

.grid {
  display: grid;
  gap: var(--gap);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section {
  padding: 3rem 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
