/* ==========================================================================
   Base Reset & Editorial Layout Structure
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-main);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--cta-bg);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  transition: top var(--dur-fast) ease;
}

.skip-link:focus {
  top: 16px;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--article {
  max-width: var(--container-article);
}

/* Sections */
.section {
  position: relative;
  padding-block: var(--section-py);
}

.section--compact {
  padding-block: var(--section-py-sm);
}

.section--surface {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section--tinted {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 4.5vw, 52px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.section-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary);
  opacity: 0.85;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.section-desc {
  margin-top: 14px;
  font-size: var(--text-base);
  color: var(--text-body);
  line-height: var(--leading-normal);
}

/* Minimal Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background-color: rgba(250, 250, 252, 0.72);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease;
}

.site-header.is-scrolled {
  background-color: rgba(250, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 450;
  color: var(--text-body);
  padding-block: 6px;
  transition: color var(--dur-fast) ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text-primary);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--brand-primary);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 auto 0;
  z-index: 99;
  background: rgba(250, 250, 252, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px var(--gutter) 28px;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.mobile-nav-links a {
  display: block;
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* Grid Systems */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Subpage Page Header */
.page-hero {
  position: relative;
  padding-block: clamp(44px, 6vw, 72px) clamp(32px, 4.5vw, 48px);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(167, 180, 255, 0.06) 0%, rgba(250, 250, 252, 0) 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 18px;
  list-style: none;
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.breadcrumb-sep {
  color: var(--silver-line);
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 820px;
}

.page-lead {
  margin-top: 14px;
  font-size: var(--text-md);
  color: var(--text-body);
  max-width: 680px;
  line-height: var(--leading-normal);
}

/* Minimal Footer */
.site-footer {
  position: relative;
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
  padding-block: 56px 40px;
  overflow: hidden;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand-desc {
  margin-top: 12px;
  max-width: 440px;
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: 1.65;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--text-body);
  transition: color var(--dur-fast) ease;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-disclosure {
  max-width: 720px;
  line-height: 1.6;
}
