/* =====================================================================
   Advoke CV — Page layout primitives
   Containers, header, footer, sections, hero scaffolding, grids
   ===================================================================== */

/* ---------- Containers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-narrow { max-width: var(--container-narrow); }

.container-fluid {
  width: 100%;
  padding-inline: var(--s-5);
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--brand-600);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { text-decoration: none; color: var(--brand-700); }
.brand-mark { flex: 0 0 auto; color: var(--brand-600); }
.brand-name {
  color: var(--text-strong);
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-tight);
}
.brand-accent {
  color: var(--brand-600);
  margin-left: 2px;
}
.brand-footer .brand-name { font-size: var(--fs-base); }

/* ---------- Primary navigation ---------- */
.main-nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 0; }
.nav-list a {
  display: inline-block;
  padding: var(--s-2) 0;
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text-strong);
  border-bottom-color: var(--brand-600);
  text-decoration: none;
}

/* ---------- Header actions ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

/* ---------- Mobile menu toggle ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.menu-toggle:hover { background: var(--surface-2); }
.menu-toggle[aria-expanded="true"] { background: var(--surface-2); }

/* ---------- Main content ---------- */
main { display: block; }

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(48px, 8vw, 96px);
}
.section.alt { background: var(--bg-alt); }
.section.tight { padding-block: clamp(32px, 5vw, 56px); }
.section.tight-top { padding-top: clamp(24px, 4vw, 40px); }
.section.tight-bottom { padding-bottom: clamp(24px, 4vw, 40px); }

.section-head {
  max-width: 780px;
  margin: 0 0 var(--s-10);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 { margin-bottom: var(--s-3); }
.section-head .section-sub {
  color: var(--text-muted);
  font-size: var(--fs-lg);
  margin: 0;
  max-width: 64ch;
}

.section-cta {
  margin-top: var(--s-10);
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* ---------- Hero scaffolding ---------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 9vw, 104px) clamp(40px, 7vw, 80px);
  background:
    radial-gradient(1100px 420px at 15% -8%, var(--brand-100), transparent 62%),
    radial-gradient(900px 380px at 100% 0%, var(--accent-100), transparent 58%),
    var(--bg);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy h1 { margin-bottom: var(--s-4); }
.hero-copy .lead { margin-bottom: var(--s-6); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
.cta-row-center { justify-content: center; }

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  color: var(--text-soft);
  font-size: var(--fs-sm);
}
.hero-points li { margin: 0; }
.hero-points li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: var(--s-2);
  vertical-align: -2px;
  border-radius: var(--r-pill);
  background:
    radial-gradient(circle at 50% 50%, var(--accent-600) 55%, transparent 56%),
    radial-gradient(circle at 50% 50%, var(--accent-100) 100%, transparent 0);
}

.hero-preview {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

/* ---------- Trust bar ---------- */
.trust-bar {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: var(--s-6);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  text-align: center;
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.trust-item strong {
  font-size: var(--fs-2xl);
  color: var(--brand-600);
  letter-spacing: var(--ls-tight);
}
.trust-item span {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ---------- Two/three column wrappers ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.split-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split-narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }

/* ---------- Card grid utilities ---------- */
.grid-auto-240 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-5);
}
.grid-auto-280 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-6);
}
.grid-auto-320 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-6);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: clamp(40px, 6vw, 64px) var(--s-6);
  font-size: var(--fs-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.footer-brand p { margin-top: var(--s-3); max-width: 42ch; }

.site-footer h3 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--text-soft);
  margin: 0 0 var(--s-3);
  font-weight: var(--fw-semibold);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin-bottom: var(--s-2); }
.site-footer li:last-child { margin-bottom: 0; }
.site-footer a {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}
.site-footer a:hover { color: var(--text-strong); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: var(--s-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  color: var(--text-soft);
  font-size: var(--fs-xs);
}

/* ---------- Utility row/stack ---------- */
.row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.row-between { justify-content: space-between; }
.row-center { justify-content: center; }
.row-end { justify-content: flex-end; }

.stack { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-sm { gap: var(--s-2); }
.stack-lg { gap: var(--s-5); }

/* ---------- Aspect helpers ---------- */
.aspect-a4 { aspect-ratio: 210 / 297; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

/* ---------- Sticky helpers ---------- */
.sticky-top { position: sticky; top: calc(var(--header-h) + var(--s-4)); }

/* ---------- Scroll margin for anchor targets ---------- */
:target { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }