/* ============================================================
   CX Standard Institute — Design System
   Aesthetic: Institutional authority. Refined. Trustworthy.
   Typography: Playfair Display (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #1B3A6B;
  --navy-dark:   #122850;
  --navy-light:  #2a4f8a;
  --blue:        #2E6FAD;
  --blue-light:  #4a8fc7;
  --accent:      #E8A020;
  --accent-light:#f5b940;
  --accent-pale: #fdf3e0;

  --white:       #FFFFFF;
  --off-white:   #F8F7F4;
  --light:       #F0EEE9;
  --border:      #DDD9D0;
  --muted:       #9B9589;
  --text:        #2C2926;
  --text-light:  #5C5751;

  --font-display: 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius:      4px;
  --radius-lg:   8px;
  --shadow-sm:   0 1px 3px rgba(27,58,107,0.08);
  --shadow:      0 4px 16px rgba(27,58,107,0.12);
  --shadow-lg:   0 12px 40px rgba(27,58,107,0.16);

  --transition:  150ms ease;
  --max-width:   1160px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; }
h5 { font-size: .9rem; }

p { max-width: 68ch; }
p + p { margin-top: 1rem; }

.lead {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.75;
  max-width: 58ch;
}

.label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5rem 0; }
.section--lg { padding: 7rem 0; }
.section--sm { padding: 3rem 0; }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Offset body content so fixed nav doesn't overlap it */
/* Only apply to public pages, not admin */
body:not(.admin-body) {
  padding-top: 68px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-logo__mark {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-logo__mark::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--accent);
  border-radius: 50%;
}

.nav-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.nav-logo__sub {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: var(--light);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-verify-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.02em;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-verify-link:hover {
  background: var(--blue);
  color: var(--white);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.btn--primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--accent {
  background: var(--accent);
  color: var(--navy);
  border: 2px solid var(--accent);
}
.btn--accent:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,160,32,0.3);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn--lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 7rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(46,111,173,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(232,160,32,0.08) 0%, transparent 60%);
}

.hero::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-label {
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero .lead {
  color: rgba(255,255,255,0.75);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 340px;
}

.hero-card__title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-stat {
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-stat:last-child { border-bottom: none; }

.hero-stat__label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

.hero-stat__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.hero-stat__value.accent { color: var(--accent); }

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
  margin-bottom: 3.5rem;
}

.section-header--center {
  text-align: center;
}

.section-header--center p {
  margin: 0.75rem auto 0;
}

.section-header .label {
  display: block;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

/* ── Pillars Grid ────────────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pillar-item {
  background: var(--white);
  padding: 2rem 1.5rem;
  transition: background var(--transition);
}

.pillar-item:hover { background: var(--off-white); }

.pillar-item__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.pillar-item__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.pillar-item__desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── Cert Levels ─────────────────────────────────────────────── */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.level-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.level-card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.level-card--featured {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.level-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border);
}

.level-card--standard .level-card__accent  { background: var(--blue); }
.level-card--advanced .level-card__accent  { background: var(--navy); }
.level-card--excellence .level-card__accent { background: var(--accent); }

.level-card__tier {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.level-card--featured .level-card__tier { color: rgba(255,255,255,0.5); }

.level-card h3 {
  margin-bottom: 0.75rem;
}

.level-card--featured h3 { color: var(--white); }

.level-card p {
  font-size: 0.875rem;
  color: var(--text-light);
}

.level-card--featured p { color: rgba(255,255,255,0.7); }

/* ── Registry Search ─────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 0;
  max-width: 600px;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow var(--transition);
}

.search-bar:focus-within {
  box-shadow: 0 0 0 4px rgba(27,58,107,0.12);
}

.search-bar input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: none;
  outline: none;
  color: var(--text);
  background: transparent;
}

.search-bar input::placeholder { color: var(--muted); }

.search-bar button {
  padding: 0.875rem 1.5rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
  white-space: nowrap;
}

.search-bar button:hover { background: var(--navy-dark); }

/* ── Registry Table ──────────────────────────────────────────── */
.registry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.registry-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  background: var(--off-white);
}

.registry-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.registry-table tr:hover td { background: var(--off-white); }

.registry-table .cx-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--navy);
}

/* ── Status Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--active    { background: #E8F5E9; color: #2E7D32; }
.badge--expired   { background: #FFF3E0; color: #E65100; }
.badge--suspended { background: #FCE4EC; color: #C62828; }

.badge--standard   { background: #E3F2FD; color: #1565C0; }
.badge--advanced   { background: #E8EAF6; color: #283593; }
.badge--excellence { background: var(--accent-pale); color: #92520A; }

/* ── Verify Card ─────────────────────────────────────────────── */
.verify-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 640px;
  box-shadow: var(--shadow);
}

.verify-card__header {
  padding: 1.5rem 2rem;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.verify-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.verify-card__header-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--white); }
.verify-card__header-sub   { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 0.15rem; }

.verify-card__body {
  padding: 2rem;
  background: var(--white);
}

.verify-card__body--active  { border-top: 4px solid #2E7D32; }
.verify-card__body--expired { border-top: 4px solid #E65100; }
.verify-card__body--suspended { border-top: 4px solid #C62828; }

.verify-field { margin-bottom: 1.25rem; }
.verify-field__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.verify-field__value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.verify-field__value--large {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
}

.verify-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ── Blog Cards ──────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.blog-card__img {
  aspect-ratio: 1/1;
  background: var(--light);
  overflow: hidden;
}

.blog-card__img img { width: 100%; height: 100%; object-fit: cover; }

.blog-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.blog-card__excerpt {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Prose (Markdown content) ────────────────────────────────── */
.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose p  { margin-bottom: 1rem; color: var(--text-light); }
.prose ul { margin: 1rem 0 1rem 1.25rem; list-style: disc; }
.prose ul li { margin-bottom: 0.4rem; color: var(--text-light); }
.prose strong { color: var(--text); font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand__desc {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 28ch;
}

.footer-col__title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom a {
  transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--white); }

/* ── Admin Panel ──────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: #F0F2F5;
}

.admin-sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar__brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar__name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
}

.admin-sidebar__sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 0.15rem;
}

.admin-nav { padding: 1rem 0; }

.admin-nav__section {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 1rem 1.25rem 0.4rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
  border-left-color: var(--accent);
}

.admin-main { padding: 2rem 2.5rem; overflow-x: auto; }

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  padding: 1rem 2.5rem;
  margin: -2rem -2.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.admin-topbar__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-card__sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.admin-card__body { padding: 1.5rem; }

/* ── Form Inputs ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.1);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-error {
  background: #FFF0F0;
  border: 1px solid #FFCDD2;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #C62828;
  margin-bottom: 1.25rem;
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted   { color: var(--muted); }
.text-navy    { color: var(--navy); }
.text-accent  { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.mono { font-family: var(--font-mono); }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

.animate-in:nth-child(1) { animation-delay: 0ms; }
.animate-in:nth-child(2) { animation-delay: 80ms; }
.animate-in:nth-child(3) { animation-delay: 160ms; }
.animate-in:nth-child(4) { animation-delay: 240ms; }
.animate-in:nth-child(5) { animation-delay: 320ms; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .blog-grid { grid-template-columns: 1fr; }
  .levels-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr 1fr; }
  .verify-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .pillars-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0; }
}

/* ── Input visibility fix (prevents white-on-white in dark containers) ── */
.search-bar input,
.search-bar input:focus {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background: var(--white) !important;
}
.search-bar input::placeholder {
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted) !important;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE FIRST — v10
   ═══════════════════════════════════════════════════════════════ */

/* ── Prevent horizontal overflow globally ───────────────────── */
/* Note: overflow-x:hidden on body breaks position:sticky on nav */
/* Use overflow:hidden only on specific sections that need it */
body {
  max-width: 100vw;
}
/* Prevent horizontal scroll without breaking sticky */
.container {
  overflow-x: clip;
}

/* ── Mobile nav — fixed position so it works at any scroll depth */
.mobile-nav {
  position: fixed;
  top: 68px; /* height of site-nav */
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}

/* ── Carousel — horizontal scroll with snap for mobile cards ── */
.carousel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 1rem;
    /* Hide scrollbar visually but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .carousel::-webkit-scrollbar { display: none; }

  .carousel > * {
    scroll-snap-align: start;
    flex: 0 0 82vw;
    max-width: 320px;
  }

  /* Carousel scroll hint — fade on right edge */
  .carousel-wrap {
    position: relative;
  }
  .carousel-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 1rem;
    width: 48px;
    background: linear-gradient(to right, transparent, var(--off-white));
    pointer-events: none;
  }

  /* Dot indicators for carousels */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin-top: .75rem;
  }
  .carousel-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: background 200ms;
  }
  .carousel-dot.active { background: var(--navy); }
}

@media (min-width: 769px) {
  .carousel-dots { display: none; }
  .carousel-wrap::after { display: none; }
}

/* ── Grid utilities — responsive collapse ───────────────────── */
@media (max-width: 768px) {
  /* All inline grids collapse to single column */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns:1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns:1fr 300px"] {
    grid-template-columns: 1fr !important;
  }

  /* Utility grid classes */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* Hero adjustments */
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero .lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; gap: .75rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Section padding */
  .section { padding: 2.5rem 0; }
  .section--lg { padding: 3.5rem 0; }

  /* Verify card */
  .verify-card { margin: 0 -0.5rem; }

  /* Registry table — horizontal scroll */
  .registry-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Blog post sidebar — stack below article */
  .blog-post-sidebar {
    position: static !important;
  }

  /* Level cards */
  .levels-grid { gap: 1rem; }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Contact form grid */
  .form-grid { grid-template-columns: 1fr !important; }

  /* Search bar */
  .search-bar { max-width: 100% !important; }
  .search-bar button { padding: .875rem 1rem; font-size: .8rem; }

  /* Why section - 2 col stat grid -> 2 col on mobile (already small cards) */
  .why-stats { grid-template-columns: 1fr 1fr !important; }

  /* Certifications detail sidebar */
  [style*="grid-template-columns:2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  .btn--lg { padding: .75rem 1.25rem; font-size: .9rem; }
  .hero-actions .btn { font-size: .875rem; }
  .why-stats { grid-template-columns: 1fr 1fr !important; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ── Back to top button — desktop only ─────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 250ms ease, transform 250ms ease, background 150ms;
  z-index: 150;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--blue);
}

@media (max-width: 768px) {
  .back-to-top { display: none !important; }
}
