/* ------------------------------------------------------------------
   Layout — global header, footer, page containers, section grids
   ------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 13, 0.65);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: var(--border-soft);
  transition: background var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(3, 5, 10, 0.88);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.site-logo svg { height: 38px; width: auto; }
.site-logo img { height: 64px; width: auto; }
.site-header .site-logo img { height: 64px; }
.site-footer .site-logo img { height: 72px; }
.site-logo span {
  font-size: 1.05rem;
  display: none;
}
@media (min-width: 480px) { .site-logo span { display: inline; } }

.nav-main {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  gap: var(--space-md);
}
.nav-main a {
  color: var(--color-text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--grad-brand);
  transition: right var(--duration-fast) var(--ease-out);
}
.nav-main a:hover { color: var(--color-text); }
.nav-main a:hover::after,
.nav-main a.is-active::after { right: 0; }

@media (min-width: 880px) { .nav-main { display: flex; } }

.header-cta { display: inline-flex; align-items: center; gap: var(--space-sm); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
@media (min-width: 880px) { .nav-toggle { display: none; } }

.mobile-menu {
  display: none;
  border-top: var(--border-soft);
  background: var(--color-bg-elev);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  display: grid;
  gap: var(--space-xs);
}
.mobile-menu a {
  display: block;
  padding: 0.6rem 0.4rem;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}
.mobile-menu a:hover { background: var(--color-bg-card); }

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}
.section--tight { padding: var(--space-xl) 0; }
.section--hero {
  padding: calc(var(--space-2xl) + 2rem) 0 var(--space-2xl);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-xl);
}
.section-head p { font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: var(--grad-hero);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--color-bg));
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; }
}

.hero__title {
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  margin-bottom: var(--space-md);
}
.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin-bottom: var(--space-lg);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero__visual {
  position: relative;
  aspect-ratio: 4/4;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--grad-brand-soft);
  border: var(--border-strong);
  display: grid;
  place-items: center;
  box-shadow: var(--glow-accent);
  overflow: hidden;
}
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 0deg, transparent, rgba(63,169,255,0.45), transparent 30%);
  animation: spin 10s linear infinite;
}
.hero__visual::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--color-bg-deep);
  border-radius: calc(var(--radius-lg) - 6px);
}
.hero__visual svg {
  position: relative;
  z-index: 2;
  width: 65%;
  height: auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-deep);
  border-top: var(--border-soft);
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-2xl);
}
.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.site-footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-cyan);
  margin-bottom: var(--space-sm);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.site-footer a { color: var(--color-text-muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--color-text); }

.site-footer__brand p {
  max-width: 320px;
  font-size: 0.92rem;
}
.site-footer__bottom {
  border-top: var(--border-soft);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

/* ---------- Page-banner (sub-pages) ---------- */
.page-banner {
  padding: calc(var(--space-2xl) + 1rem) 0 var(--space-2xl);
  background: var(--grad-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner h1 { margin-bottom: var(--space-sm); }
.page-banner p { max-width: 640px; margin: 0 auto; font-size: 1.08rem; }
