/* =====================================================
   HALYON V1 — REVISED PUBLIC WEBSITE

   Typography: system UI stack throughout — clean, modern,
   no external font requests. Matches the OpenAI/ChatGPT
   style of legible, premium, neutral sans-serif.

   ui-sans-serif → SF Pro (macOS/iOS)
   -apple-system / BlinkMacSystemFont → Safari/Chrome on Apple
   "Segoe UI" → Windows
   Arial → universal fallback

   Palette:
     Dark hero + warm off-white content sections
     Steel / brushed-silver highlights
   ===================================================== */

/* 1. CUSTOM PROPERTIES
----------------------------------------------------- */
:root {
  /* Dark surfaces — deep blue-black, not pure black */
  --bg:          #07090d;
  --bg-surface:  #0d1016;
  --bg-alt:      #12161e;

  /* Dark typography */
  --text:        #e8ecf2;
  --text-muted:  #8a93a3;
  --text-dim:    #5a6476;
  --accent:      #c8cdd6;
  --border:      rgba(180, 198, 220, 0.10);
  --border-mid:  rgba(180, 198, 220, 0.18);
  --white:       #ffffff;

  /* Light section palette */
  --lt-bg:       #F3F2EF;
  --lt-surface:  #FFFFFF;
  --lt-text:     #0F0F0F;
  --lt-muted:    #4A505A;
  --lt-dim:      #8A909A;
  --lt-border:   #DCDCD6;
  --lt-accent:   #5A606C;

/* Fonts — system UI stack, no external requests */
  --font-sans:    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-brand:   var(--font-sans);
  --font-display: var(--font-sans);
  --font-body:    var(--font-sans);

  /* Layout */
  --nav-h:  68px;
  --max-w:  1140px;
  --sp:     clamp(80px, 10vw, 140px);
  --px:     clamp(1.25rem, 5vw, 3rem);

  /* Motion */
  --ease:     0.18s ease;
  --ease-out: 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. RESET
----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* 3. TYPOGRAPHY
----------------------------------------------------- */
h1, h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--white);
}
h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
h3 { font-size: clamp(1rem, 1.8vw, 1.25rem); }
h4 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
p  { color: var(--text-muted); line-height: 1.75; }
p + p { margin-top: 1em; }
strong { color: var(--text); font-weight: 500; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

/* 4. LAYOUT
----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
.section      { padding: var(--sp) 0; }
.section--alt { background: var(--bg-surface); }
.rule         { width: 100%; height: 1px; background: var(--border); }

/* 5. NAVIGATION
----------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(7, 9, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 32px rgba(0, 0, 0, 0.5);
}
.site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 28px;
}
.nav-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav-body {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color var(--ease);
  position: relative;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}
.nav-login {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0.35rem 0.875rem;
  border: 1px solid var(--border-mid);
  border-radius: 1px;
  transition: color var(--ease), border-color var(--ease);
}
.nav-login:hover { color: var(--white); border-color: var(--accent); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  color: var(--text-muted);
  transition: color var(--ease);
}
.nav-toggle:hover { color: var(--white); }
.nav-toggle-icon { display: flex; flex-direction: column; gap: 5px; width: 18px; }
.nav-toggle-icon span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* 6. BUTTONS
----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.625rem;
  border: 1px solid transparent;
  border-radius: 1px;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  cursor: pointer;
}
/* On dark backgrounds — white filled */
.btn-light {
  background: var(--white);
  color: var(--bg);
  border-color: var(--white);
}
.btn-light:hover {
  background: var(--accent);
  border-color: var(--accent);
}
/* On light backgrounds — dark filled */
.btn-dark {
  background: var(--bg);
  color: var(--white);
  border-color: var(--bg);
}
.btn-dark:hover {
  background: #1C1C1C;
  border-color: #1C1C1C;
}
/* Ghost — outlined, works on dark sections */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-mid);
}
.btn-ghost:hover { color: var(--white); border-color: var(--accent); }
/* Full-width modifier */
.btn-block { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* 7. HERO (home page)
----------------------------------------------------- */
.hero {
  padding-top: calc(var(--nav-h) + clamp(64px, 11vw, 120px));
  padding-bottom: clamp(80px, 12vw, 140px);
  position: relative;
  overflow: hidden;
  text-align: center;
  /* Multi-layer atmosphere — grid texture + light from above */
  background:
    /* Blueprint precision grid */
    repeating-linear-gradient(
      rgba(180, 198, 220, 0.022) 0px,
      rgba(180, 198, 220, 0.022) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(180, 198, 220, 0.022) 0px,
      rgba(180, 198, 220, 0.022) 1px,
      transparent 1px,
      transparent 60px
    ),
    /* Vignette — soft edge darkness keeps focus centred */
    radial-gradient(ellipse 100% 80% at 50% 45%,
      transparent 45%,
      rgba(0, 0, 0, 0.45) 100%),
    /* Primary atmospheric light — source from above */
    radial-gradient(ellipse 110% 88% at 50% -15%,
      rgba(210, 225, 255, 0.28) 0%,
      rgba(180, 200, 245, 0.13) 28%,
      rgba(140, 165, 215, 0.04) 52%,
      transparent 68%),
    /* Secondary soft fill — centre warmth */
    radial-gradient(ellipse 60% 50% at 50% 5%,
      rgba(240, 244, 255, 0.06) 0%,
      transparent 65%),
    var(--bg);
}

/* Logo focal element */
.hero-brand {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.hero-logo {
  width: clamp(200px, 46vw, 460px);
  height: auto;
  /* RGBA asset with genuine transparency — no invert, no flatten.
     Subtle steel glow lifts the dark logo facets from the dark hero. */
  filter: drop-shadow(0 0 48px rgba(200, 215, 245, 0.22))
          drop-shadow(0 2px 12px rgba(0, 0, 0, 0.40));
}
/* Soft light line beneath logo */
.hero-logo-wrap::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(210, 228, 255, 0.55),
    transparent);
}

/* Brand phrase removed — tagline is baked into the logo lockup asset */

/* Thin atmospheric divider between brand and headline */
.hero-divider {
  width: clamp(48px, 6vw, 80px);
  height: 1px;
  margin: 2.25rem auto;
  background: linear-gradient(90deg,
    transparent,
    rgba(200, 222, 255, 0.45),
    transparent);
}
.hero h1 {
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}
.hero-sub {
  max-width: 48ch;
  margin: 0 auto 2.75rem;
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 8. BORDER-GRID
----------------------------------------------------- */
.bgrid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.bgrid-4 { grid-template-columns: 1fr; }
.bgrid-2 { grid-template-columns: 1fr; }

.bgrid-cell {
  background: var(--bg-surface);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  transition: background var(--ease-out);
}
.bgrid-cell:hover { background: var(--bg-alt); }
.cell-num {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 0.875rem;
}
.bgrid-cell h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.bgrid-cell p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 9. STATEMENT / CLOSING SECTION
----------------------------------------------------- */
.statement {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--sp) 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%,
      rgba(200, 218, 255, 0.07) 0%,
      transparent 60%),
    var(--bg-surface);
}
.statement::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      rgba(180, 198, 220, 0.02) 0px,
      rgba(180, 198, 220, 0.02) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(180, 198, 220, 0.02) 0px,
      rgba(180, 198, 220, 0.02) 1px,
      transparent 1px,
      transparent 60px
    );
  pointer-events: none;
}
.statement .container { position: relative; z-index: 1; }
.statement-quote {
  font-family: var(--font-brand);
  font-size: clamp(1.4rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--white);
  max-width: 28ch;
  margin: 0 auto 1.5rem;
}
.statement p {
  max-width: 44ch;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
  text-align: center;
}

/* 10. PAGE HERO (inner pages)
----------------------------------------------------- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 120px));
  padding-bottom: clamp(56px, 9vw, 100px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 100% 72% at 50% -10%,
      rgba(200, 220, 255, 0.16) 0%,
      rgba(170, 195, 240, 0.06) 40%,
      transparent 65%),
    var(--bg);
}
.page-hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  max-width: 22ch;
  margin-bottom: 1rem;
}
.page-hero .page-sub {
  max-width: 54ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* 11. SECTION HEADER
----------------------------------------------------- */
.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 700px;
}
.section-head .eyebrow { margin-bottom: 0.75rem; }
.section-head h2       { margin-bottom: 0.875rem; }
.section-head > p      { font-size: 1rem; max-width: 52ch; }

/* 12. PROSE (About body text)
----------------------------------------------------- */
.prose { max-width: 640px; }
.prose p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* 13. PRINCIPLES (About approach)
----------------------------------------------------- */
.principles {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.principle {
  background: var(--bg-surface);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.principle-n {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding-top: 0.2rem;
  flex-shrink: 0;
  width: 1.5rem;
}
.principle-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.principle-body p { font-size: 0.875rem; line-height: 1.7; }

/* 14. CONTACT PAGE
----------------------------------------------------- */
.contact-main { max-width: 560px; }
.contact-email-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.625rem;
}
.contact-email-link {
  font-family: var(--font-brand);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--white);
  transition: color var(--ease);
  display: inline-block;
  margin-bottom: 1.75rem;
}
.contact-email-link:hover { color: var(--accent); }

/* 15. LOGIN PAGE
----------------------------------------------------- */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 3rem) var(--px) 5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,
      rgba(200, 220, 255, 0.11) 0%,
      transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  padding: clamp(2rem, 5vw, 2.75rem);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 40px rgba(0, 0, 0, 0.5);
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.625rem 0.875rem;
  border-radius: 1px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color var(--ease);
}
.field input:focus    { border-color: var(--accent); }
.field input::placeholder { color: var(--text-dim); }
.login-note {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.55;
}
.login-note a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 16. LEGAL PAGES
----------------------------------------------------- */
.legal { max-width: 680px; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal p, .legal li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.legal ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
}
.legal ul li + li { margin-top: 0.3rem; }
.legal-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* 17. FOOTER
----------------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.footer-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer-logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  margin-bottom: 1rem;
}
.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: 27ch;
  line-height: 1.65;
}
.footer-email {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer-email:hover { color: var(--white); }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col ul li + li { margin-top: 0.65rem; }
.footer-col ul a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.74rem; color: var(--text-dim); line-height: 1; }

/* =======================================================
   18. LIGHT SECTION OVERRIDES  (.section--light)
   Warm off-white content areas — contrast against dark hero
   ======================================================= */
.section--light { background: var(--lt-bg); }

.section--light h1,
.section--light h2,
.section--light h3,
.section--light h4,
.section--light h5  { color: var(--lt-text); }

.section--light p      { color: var(--lt-muted); }
.section--light strong { color: var(--lt-text); }
.section--light .eyebrow        { color: var(--lt-dim); }
.section--light .section-head > p { color: var(--lt-muted); }

/* Border-grid on light */
.section--light .bgrid {
  background: var(--lt-border);
  border-color: var(--lt-border);
}
.section--light .bgrid-cell           { background: var(--lt-surface); }
.section--light .bgrid-cell:hover     { background: #F8F7F4; }
.section--light .bgrid-cell h3        { color: var(--lt-text); }
.section--light .bgrid-cell p         { color: var(--lt-muted); }
.section--light .cell-num             { color: #C0C5CC; }

/* Principles on light */
.section--light .principles {
  background: var(--lt-border);
  border-color: var(--lt-border);
}
.section--light .principle             { background: var(--lt-surface); }
.section--light .principle-n           { color: #C0C5CC; }
.section--light .principle-body strong { color: var(--lt-text); }
.section--light .principle-body p      { color: var(--lt-muted); }

/* Prose on light */
.section--light .prose p { color: var(--lt-muted); }

/* Contact on light */
.section--light .contact-email-label  { color: var(--lt-dim); }
.section--light .contact-email-link   { color: var(--lt-text); }
.section--light .contact-email-link:hover { color: var(--lt-accent); }
.section--light .contact-main > p     { color: var(--lt-muted); }

/* Legal on light */
.section--light .legal h2 {
  color: var(--lt-text);
  border-color: var(--lt-border);
}
.section--light .legal h2:first-of-type { border-top: none; }
.section--light .legal p,
.section--light .legal li  { color: var(--lt-muted); }
.section--light .legal-date {
  color: var(--lt-dim);
  border-color: var(--lt-border);
}
.section--light .legal a {
  color: var(--lt-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.section--light .rule { background: var(--lt-border); }

/* 19. ANIMATION UTILITIES
----------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.75s var(--ease-out) both; }
/* Explicit delay classes for sequenced animation */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.2s;  }
.delay-3 { animation-delay: 0.35s; }
.delay-4 { animation-delay: 0.5s;  }
.delay-5 { animation-delay: 0.65s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
  html { scroll-behavior: auto; }
}

/* 20. RESPONSIVE
----------------------------------------------------- */
@media (min-width: 640px) {
  .bgrid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .bgrid-4 { grid-template-columns: 1fr 1fr; }
  .footer-body { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .bgrid-4 { grid-template-columns: repeat(4, 1fr); }
  .nav-toggle { display: none !important; }
  .nav-body   { display: flex !important; }
}
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .nav-body {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem var(--px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .nav-body.is-open { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 0.7rem 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
  }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-login {
    margin-top: 1rem;
    border: none;
    padding: 0.7rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
  }
}

/* 21. ACCESSIBILITY
----------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.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;
}
