/* ==========================================================================
   Page sections: header, hero, feature grids, security, stack, footer
   ========================================================================== */

/* --- Header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
  flex-wrap: wrap;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  flex-wrap: wrap;
}
.nav-menu a:not(.btn) {
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-menu a:not(.btn):hover { color: var(--text); background: var(--bg-alt); }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }

/* Collapsed menu is a JS enhancement, so it is scoped to .has-js.
   Without JS every link stays visible and simply wraps. */
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .has-js .nav-toggle { display: inline-flex; }
  .has-js .nav-menu {
    display: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: var(--space-4);
    flex-direction: column;
    align-items: stretch;
  }
  .has-js .nav-menu[data-open="true"] { display: flex; }
  .has-js .nav-menu .btn { width: 100%; }
}

/* --- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto;
  height: 620px;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 45%,
              color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%);
  opacity: .5;
}
.hero > * { position: relative; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.02fr .98fr; } }

.hero h1 { font-size: var(--step-3); margin: var(--space-5) 0 .4em; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-6) 0 var(--space-4); }
.cta-note { font-size: var(--step--1); color: var(--muted); margin: 0; }

/* --- Feature and step cards ------------------------------------------- */
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--muted); font-size: var(--step--1); }

.steps { counter-reset: step; }
.step { position: relative; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: .9rem;
}
.step h3 { font-size: var(--step-1); }
.step p { color: var(--muted); font-size: var(--step--1); }

/* --- Security grid ---------------------------------------------------- */
.guard h3 { font-size: var(--step-0); display: flex; align-items: center; gap: var(--space-2); }
.guard h3 svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--ok);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.guard p { color: var(--muted); font-size: var(--step--1); }

/* --- Stack strip ------------------------------------------------------ */
.strip { padding: var(--space-12) 0; border-block: 1px solid var(--border); background: var(--bg-alt); }
.strip > .wrap > p {
  margin-bottom: var(--space-5);
  text-align: center;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* --- Final call to action --------------------------------------------- */
.final {
  padding: clamp(2.75rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--brand-soft), var(--surface) 65%);
  text-align: center;
}
.final h2 { font-size: var(--step-2); }
.final p { color: var(--muted); font-size: var(--step-1); max-width: 50ch; margin-inline: auto; }
.final .cta-row { justify-content: center; margin-bottom: 0; }

/* --- Footer ----------------------------------------------------------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: var(--space-12) 0 var(--space-8);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.foot-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  margin-bottom: var(--space-8);
}
.foot-grid h2 {
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.foot-grid ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.foot-grid a { color: var(--muted); font-size: var(--step--1); text-decoration: none; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.foot-about { color: var(--muted); font-size: var(--step--1); max-width: 30ch; margin-top: var(--space-4); }
.foot-bot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--step--1);
}
