/* ============================================================
   Stacks Garage — layout.css
   Header, footer, section frames, grids
   ============================================================ */

/* ============================================================
   Header / Navbar
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
/* Header is fixed and rides over both dark and light sections on single-page
   scroll — nav--over-light is toggled by menu.js and needs literal "workshop
   floor" values since the :root tokens it would otherwise read stay dark-themed. */
.site-header.nav--over-light {
  background: rgba(238, 242, 248, 0.96);
  border-bottom-color: rgba(0, 56, 168, 0.3);
}
.site-header.nav--over-light.is-scrolled { border-bottom-color: #0038a8; }
.site-header.nav--over-light .nav__link { color: #566380; }
.site-header.nav--over-light .nav__link.is-active { color: #0038a8; }

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav__logo .nav__brand-line {
  display: flex; flex-direction: column; line-height: 1.05;
}
.nav__logo .nav__brand-line span:last-child {
  color: var(--accent); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.nav__logo-img { height: 78px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent);
}

.nav__actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang-toggle button {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease);
}
.lang-toggle button.is-active {
  background: var(--accent);
  color: var(--bg);
}

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
}
.nav__burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text);
  position: relative;
  transition: all var(--t-base) var(--ease);
}
.nav__burger span::before, .nav__burger span::after {
  content: '';
  position: absolute; left: 0;
  width: 22px; height: 2px;
  background: var(--text);
  transition: all var(--t-base) var(--ease);
}
.nav__burger span::before { top: -7px; }
.nav__burger span::after  { top: 7px; }
.nav__burger.is-open span { background: transparent; }
.nav__burger.is-open span::before { top: 0; transform: rotate(45deg); }
.nav__burger.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: var(--nav-h); right: 0;
  width: min(320px, 85vw);
  height: calc(100vh - var(--nav-h));
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: 32px 24px;
  transform: translateX(100%);
  transition: transform var(--t-base) var(--ease);
  z-index: 99;
  display: flex; flex-direction: column; gap: 24px;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer .nav__link {
  display: block;
  font-size: 1.1rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.nav-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
  z-index: 98;
}
.nav-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}
.hero__inner {
  position: relative; z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero__cta-row {
  display: flex; gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ============================================================
   Hero — blueprint drafting-paper backdrop (replaces the old
   sci-fi orbit rings / cityscape / circuit decoration)
   ============================================================ */
.hero__blueprint {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--blueprint) 1px, transparent 1px),
    linear-gradient(90deg, var(--blueprint) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
}
.hero__dims {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero__dims span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--blueprint);
}
.hero__dims .dim-line {
  position: absolute;
  background: var(--blueprint);
}
.hero__dims .dim-line--h { height: 1px; }
.hero__dims .dim-line--v { width: 1px; }

/* ============================================================
   Section header variations
   ============================================================ */
.section--dark {
  background:
    radial-gradient(circle at 85% 8%, var(--accent-soft), transparent 55%),
    radial-gradient(circle at 8% 92%, rgba(76, 134, 176, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
}

.section-light {
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background:
    radial-gradient(circle at 18% 0%, rgba(76, 134, 176, 0.14), transparent 50%),
    radial-gradient(circle at 82% 100%, rgba(255, 122, 41, 0.08), transparent 55%),
    #06080a;
  color: var(--text);
  padding: 80px 0 32px;
  border-top: 1px solid var(--border-strong);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.footer__col p, .footer__col a, .footer__col li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.footer__col a { transition: color var(--t-fast) var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__brand p { margin-top: 16px; max-width: 320px; }
.footer__brand .nav__logo { margin-bottom: 8px; }

.footer__socials {
  display: flex; gap: 12px; margin-top: 20px;
}
.footer__socials a {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease);
}
.footer__socials a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.footer__newsletter {
  display: flex; gap: 8px; margin-top: 14px;
}
.footer__newsletter input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}
.footer__newsletter input::placeholder { color: var(--text-dim); }
.footer__newsletter button {
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============================================================
   Page hero (smaller banner for inner pages)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  background: var(--bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 60%);
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 18px 0 12px; }
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--text-muted); }
.page-hero__breadcrumbs {
  display: flex; justify-content: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-dim);
  margin-top: 14px;
}
.page-hero__breadcrumbs a { color: var(--text-muted); }
.page-hero__breadcrumbs a:hover { color: var(--accent); }
.page-hero__breadcrumbs span { color: var(--accent); }
