/* ==========================================================
   African Localization Hub — Design System
   Spyral / Voyant Tools L10n
   ========================================================== */

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

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand palette — African warmth: sunset orange, amber gold, warm earth */
  --clr-primary:        #E8630A;
  --clr-primary-dark:   #C2410C;
  --clr-primary-light:  #FED7AA;
  --clr-gold:           #F59E0B;
  --clr-gold-dark:      #D97706;

  /* Neutrals */
  --clr-ink:            #1C0F05;
  --clr-ink-muted:      #78716C;
  --clr-surface:        #FFFCF9;
  --clr-surface-2:      #FFF7ED;
  --clr-surface-3:      #FDEBD0;
  --clr-border:         #EAD9C8;
  --clr-border-strong:  #C4A882;
  --clr-white:          #FFFFFF;

  /* Header / dark surfaces */
  --clr-hdr-bg:         #16100A;
  --clr-hdr-text:       #FEF0E0;
  --clr-hdr-muted:      #A89070;
  --clr-hdr-border:     rgba(255 255 255 / 0.07);

  /* Status */
  --clr-success:        #15803D;
  --clr-success-bg:     #DCFCE7;
  --clr-success-border: #86EFAC;
  --clr-warning:        #B45309;
  --clr-warning-bg:     #FEF3C7;
  --clr-warning-border: #FCD34D;
  --clr-danger:         #DC2626;
  --clr-danger-bg:      #FEE2E2;
  --clr-danger-border:  #FCA5A5;
  --clr-info:           #1D4ED8;
  --clr-info-bg:        #DBEAFE;
  --clr-info-border:    #93C5FD;

  /* Radius */
  --r-xs:   4px;
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   18px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .07);
  --shadow:    0 4px 6px -1px rgb(0 0 0 / .07), 0 2px 4px -2px rgb(0 0 0 / .05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / .08), 0 4px 6px -4px rgb(0 0 0 / .05);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / .10), 0 8px 10px -6px rgb(0 0 0 / .04);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / .20);

  /* Motion */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:     cubic-bezier(0, 0, 0.2, 1);
  --dur:          150ms;
  --dur-slow:     300ms;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--clr-ink);
  background: var(--clr-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background:
    radial-gradient(ellipse 70% 80% at 10% 0%, rgba(232, 99, 10, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 100%, rgba(245, 158, 11, 0.12) 0%, transparent 55%),
    var(--clr-hdr-bg);
  border-bottom: 1px solid var(--clr-hdr-border);
  padding: 24px 0 20px;
}

.site-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.site-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(232, 99, 10, 0.45);
  font-size: 24px;
  line-height: 1;
  margin-top: 1px;
}

.site-logo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.site-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--clr-hdr-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-subtitle {
  margin: 5px 0 0;
  color: var(--clr-hdr-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 500px;
  font-weight: 400;
}

.site-nav {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
}

.site-nav a {
  display: inline-block;
  text-decoration: none;
  padding: 6px 13px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  color: var(--clr-hdr-muted);
  font-size: 0.83rem;
  font-weight: 500;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  letter-spacing: 0.01em;
}

.site-nav a:hover {
  background: rgba(255 255 255 / 0.08);
  color: var(--clr-hdr-text);
  border-color: rgba(255 255 255 / 0.12);
}

.site-nav a.is-active {
  background: rgba(232, 99, 10, 0.22);
  color: var(--clr-gold);
  border-color: rgba(232, 99, 10, 0.40);
}

/* ── Main ─────────────────────────────────────────────────── */
main {
  padding: 36px 0 56px;
  min-height: calc(100vh - 220px);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background:
    radial-gradient(ellipse 60% 80% at 90% 100%, rgba(245, 158, 11, 0.07) 0%, transparent 55%),
    var(--clr-hdr-bg);
  border-top: 1px solid var(--clr-hdr-border);
  padding: 28px 0;
}

.site-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer .muted {
  color: var(--clr-hdr-muted);
  font-size: 0.83rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.footer-logo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.footer-brand-name {
  color: var(--clr-hdr-muted);
  font-size: 0.83rem;
  font-weight: 600;
}

/* ── Typography ───────────────────────────────────────────── */
h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--clr-ink);
  line-height: 1.2;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 30px 0 12px;
  color: var(--clr-ink);
  line-height: 1.3;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--clr-ink);
}

p  { margin: 0 0 14px; }

ul, ol { margin: 10px 0 14px 22px; }

li { margin-bottom: 5px; }

.muted { color: var(--clr-ink-muted); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.card > :last-child { margin-bottom: 0; }

.card > h2:first-child,
.card > h3:first-child,
.card > h4:first-child { margin-top: 0; }

/* ── Hero Banner ──────────────────────────────────────────── */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 52px 48px;
  margin: 0 0 28px;
  background:
    radial-gradient(ellipse 55% 65% at 15% 40%, rgba(232, 99, 10, 0.25) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 85% 20%, rgba(245, 158, 11, 0.18) 0%, transparent 60%),
    linear-gradient(145deg, #1A0A02 0%, #2C1408 55%, #200E04 100%);
  box-shadow: var(--shadow-xl);
  color: var(--clr-hdr-text);
}

/* Subtle texture overlay */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-banner > * { position: relative; }

.hero-banner h2 {
  color: #FFFFFF;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.hero-banner .hero-sub {
  color: #C4A882;
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 540px;
  margin: 0 0 8px;
}

.hero-banner .hero-meta {
  color: rgba(196, 168, 130, 0.7);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid var(--clr-border-strong);
  border-radius: var(--r);
  background: var(--clr-white);
  color: var(--clr-ink);
  text-decoration: none;
  font: 500 0.9rem / 1 'Outfit', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--clr-surface-2);
  border-color: var(--clr-primary);
  color: var(--clr-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Primary — filled gradient button */
.btn-primary {
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  border-color: transparent;
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232, 99, 10, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--clr-gold-dark) 0%, var(--clr-primary-dark) 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(232, 99, 10, 0.5);
  transform: translateY(-2px);
}

/* Ghost — for dark backgrounds */
.btn-ghost {
  background: rgba(255 255 255 / 0.08);
  border-color: rgba(255 255 255 / 0.18);
  color: var(--clr-hdr-text);
}

.btn-ghost:hover {
  background: rgba(255 255 255 / 0.14);
  border-color: rgba(255 255 255 / 0.28);
  color: var(--clr-white);
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* Focus rings */
.btn:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2.5px solid var(--clr-primary);
  outline-offset: 2px;
}

/* ── Forms ────────────────────────────────────────────────── */
form p { margin: 0 0 14px; }

.form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 6px;
  color: var(--clr-ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r);
  padding: 10px 14px;
  font: 400 1rem / 1.5 'Outfit', system-ui, sans-serif;
  color: var(--clr-ink);
  background: var(--clr-white);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(232, 99, 10, 0.14);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.helptext {
  color: var(--clr-ink-muted);
  font-size: 0.85rem;
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}

.errorlist {
  margin: 6px 0 0 0;
  padding: 0 0 0 16px;
  color: var(--clr-danger);
  font-size: 0.88rem;
}

.js-inline-control { margin-top: 8px; }

.file-meta {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--clr-ink-muted);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--clr-ink-muted);
  letter-spacing: 0.01em;
}

/* Semantic status colors via data-status attribute */
.badge[data-status="approved"]      { background: var(--clr-success-bg); border-color: var(--clr-success-border); color: var(--clr-success); }
.badge[data-status="in_review"]     { background: var(--clr-info-bg); border-color: var(--clr-info-border); color: var(--clr-info); }
.badge[data-status="flagged"]       { background: var(--clr-danger-bg); border-color: var(--clr-danger-border); color: var(--clr-danger); }
.badge[data-status="machine_draft"] { background: var(--clr-warning-bg); border-color: var(--clr-warning-border); color: var(--clr-warning); }

/* QA warning badge */
.badge-qa {
  background: var(--clr-danger-bg);
  border-color: var(--clr-danger-border);
  color: var(--clr-danger);
}

.badge-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Grid ─────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 780px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Feature cards (home page) ────────────────────────────── */
.feature-card {
  display: flex;
  flex-direction: column;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(232, 99, 10, 0.3);
}

.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.feature-card p {
  flex: 1;
  margin-bottom: 16px;
}

/* ── Section heading with rule ────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 38px 0 18px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

.section-label h3 {
  margin: 0;
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-ink-muted);
  font-weight: 600;
}

/* ── Review components ────────────────────────────────────── */
.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.review-item {
  padding: 16px 0;
  border-top: 1px solid var(--clr-border);
  transition: background var(--dur) var(--ease);
}

.review-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.review-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.review-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--clr-primary-dark);
  font-size: 0.93rem;
}

.review-link:hover { text-decoration: underline; }

.review-meta {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--clr-ink-muted);
}

/* ── Stat cards (dashboard) ───────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card__number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-card__label {
  display: block;
  font-size: 0.78rem;
  color: var(--clr-ink-muted);
  margin-top: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* stat color variants */
.stat-card--success .stat-card__number { color: var(--clr-success); }
.stat-card--warning .stat-card__number { color: var(--clr-warning); }
.stat-card--danger  .stat-card__number { color: var(--clr-danger); }

/* ── Team member cards ────────────────────────────────────── */
.member-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.member-photo {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: var(--r);
  border: 2px solid var(--clr-border);
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--clr-ink);
}

.member-role,
.member-affiliation {
  font-size: 0.85rem;
  color: var(--clr-ink-muted);
  margin: 0 0 3px;
}

/* ── Page heading ─────────────────────────────────────────── */
.page-heading {
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--clr-border);
}

.page-heading h2 {
  margin: 0 0 6px;
}

/* ── Action strip ─────────────────────────────────────────── */
.action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Code & Pre ───────────────────────────────────────────── */
pre {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  padding: 16px 18px;
  overflow: auto;
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* ── Details / Summary ────────────────────────────────────── */
details {
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  padding: 14px 18px;
  background: var(--clr-white);
}

details[open] {
  box-shadow: var(--shadow-sm);
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--clr-ink);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

summary::before {
  content: '▶';
  font-size: 0.65em;
  color: var(--clr-ink-muted);
  transition: transform var(--dur) var(--ease);
}

details[open] summary::before { transform: rotate(90deg); }

summary:hover { color: var(--clr-primary); }

/* ── Char counter ─────────────────────────────────────────── */
.js-char-count {
  font-size: 0.8rem;
  color: var(--clr-ink-muted);
  margin-top: 4px;
}

/* ── Utilities ────────────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.list { margin: 10px 0 0 18px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-banner {
    padding: 36px 24px;
  }

  .hero-banner h2 {
    font-size: 1.6rem;
  }

  h2 { font-size: 1.4rem; }

  .site-brand { min-width: unset; }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   Animations & Interactions
   ========================================================== */

/* ── Page load ────────────────────────────────────────────── */
body {
  animation: pageFadeIn 0.45s var(--ease-out) both;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── Sticky header ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    padding var(--dur-slow) var(--ease),
    backdrop-filter var(--dur-slow) var(--ease);
}

.site-header.is-scrolled {
  padding-top: 10px;
  padding-bottom: 8px;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

/* ── Scroll reveal ────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays for grid children */
[data-reveal-delay="1"] { transition-delay:  80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }

/* ── Hero entrance ────────────────────────────────────────── */
.hero-banner {
  animation: heroEntrance 0.9s var(--ease-out) 0.05s both;
}

@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ── Hero rotating word ───────────────────────────────────── */
.hero-word {
  display: inline-block;
  color: var(--clr-gold);
  font-style: italic;
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.hero-word.is-leaving {
  opacity: 0;
  transform: translateY(-12px);
}

/* snap to below, then CSS transition brings it up */
.hero-word.is-entering {
  opacity: 0;
  transform: translateY(14px);
  transition: none;
}

/* ── Hero orbs ────────────────────────────────────────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  pointer-events: none;
  animation: orbFloat var(--orb-dur, 9s) ease-in-out var(--orb-delay, 0s) infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0)  scale(1); }
  50%       { transform: translateY(-20px) scale(1.1); }
}

/* ── Stat counter pop ─────────────────────────────────────── */
@keyframes statPop {
  0%   { transform: scale(0.7); opacity: 0; }
  65%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity: 1; }
}

.stat-card__number.is-animating {
  animation: statPop 0.5s var(--ease-out) both;
}

/* ── Feature icon hover ───────────────────────────────────── */
.feature-icon {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:hover .feature-icon {
  transform: scale(1.13) rotate(-5deg);
  box-shadow: 0 8px 24px rgba(232, 99, 10, 0.44);
}

/* ── Button ripple ────────────────────────────────────────── */
.btn,
button,
input[type="submit"] {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleExpand 0.6s linear;
  pointer-events: none;
  background: rgba(255 255 255 / 0.28);
}

@keyframes rippleExpand {
  to { transform: scale(4.5); opacity: 0; }
}

/* ── Toast notification ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--clr-ink);
  color: var(--clr-hdr-text);
  padding: 10px 20px;
  border-radius: var(--r);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  border-left: 3px solid var(--clr-primary);
  transform: translateY(70px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s var(--ease-out),
    opacity  0.32s var(--ease-out);
}

.toast.is-visible {
  transform: none;
  opacity: 1;
}

/* ── Card hover lift (global) ─────────────────────────────── */
.card {
  transition:
    box-shadow var(--dur-slow) var(--ease),
    transform  var(--dur-slow) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ── Reduced motion — disable all animations ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================
   Extended Components
   ========================================================== */

/* ── Utility: text sizes ──────────────────────────────────── */
.text-sm  { font-size: 0.88rem; }
.text-xs  { font-size: 0.78rem; }

/* ── Hero banner — small variant (about page) ─────────────── */
.hero-banner--sm {
  padding: 36px 40px;
}

.hero-banner__title--sm {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

/* ── Model cards (about page) ─────────────────────────────── */
.model-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.model-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--dur-slow) var(--ease),
    transform  var(--dur-slow) var(--ease);
}

.model-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.model-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--r-full);
  margin-bottom: 10px;
}

.model-card__tag--mt    { background: #DBEAFE; color: #1D4ED8; border: 1px solid #93C5FD; }
.model-card__tag--llm   { background: #EDE9FE; color: #6D28D9; border: 1px solid #C4B5FD; }
.model-card__tag--embed { background: var(--clr-success-bg); color: var(--clr-success); border: 1px solid var(--clr-success-border); }
.model-card__tag--bench { background: var(--clr-warning-bg); color: var(--clr-warning); border: 1px solid var(--clr-warning-border); }

.model-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--clr-ink);
}

/* ── Pipeline steps (workflow page) ───────────────────────── */
.pipeline-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
  padding-left: 48px;
}

.pipeline-step {
  position: relative;
  padding: 0 0 32px 24px;
  border-left: 2px solid var(--clr-border);
}

.pipeline-step:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.pipeline-step__num {
  position: absolute;
  left: -20px;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(232, 99, 10, 0.35);
  flex-shrink: 0;
  z-index: 1;
}

.pipeline-step__icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
  display: block;
}

.pipeline-step__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--clr-ink);
}

.pipeline-step__desc {
  font-size: 0.9rem;
  color: var(--clr-ink-muted);
  margin: 0 0 10px;
  line-height: 1.55;
}

.pipeline-step__engines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pipeline-step__engine-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border-strong);
  color: var(--clr-ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ── Progress page — locale cards ─────────────────────────── */
.locale-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.locale-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--dur-slow) var(--ease),
    transform  var(--dur-slow) var(--ease);
}

.locale-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.locale-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.locale-card-meta { flex: 1; }

.locale-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-ink);
  margin: 0 0 2px;
}

.locale-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--clr-ink-muted);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  display: inline-block;
}

.locale-pct {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
}

.progress-bar-wrap {
  height: 8px;
  background: var(--clr-surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--clr-gold) 0%, var(--clr-primary) 100%);
  width: 0;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.locale-stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.locale-stat {
  font-size: 0.8rem;
  color: var(--clr-ink-muted);
}

.locale-stat strong {
  color: var(--clr-ink);
  font-weight: 700;
}

/* ── Dashboard locale grid ────────────────────────────────── */
.dashboard-locale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

/* ── Application status page ──────────────────────────────── */
.status-hero {
  text-align: center;
  padding: 40px 24px;
}

.status-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.status-hero h2 {
  margin: 0 0 10px;
}

/* ── Alert boxes ──────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.alert--error {
  background: var(--clr-danger-bg);
  border-color: var(--clr-danger-border);
  color: var(--clr-danger);
}

.alert--success {
  background: var(--clr-success-bg);
  border-color: var(--clr-success-border);
  color: var(--clr-success);
}

.alert--warning {
  background: var(--clr-warning-bg);
  border-color: var(--clr-warning-border);
  color: var(--clr-warning);
}

/* ── Import / CSV page ────────────────────────────────────── */
.import-wrap {
  max-width: 580px;
}

/* ── Responsive: extended components ──────────────────────── */
@media (max-width: 640px) {
  .hero-banner--sm { padding: 28px 20px; }
  .pipeline-steps  { padding-left: 28px; }
  .pipeline-step__num { left: -16px; width: 30px; height: 30px; font-size: 0.78rem; }
  .locale-progress-grid { grid-template-columns: 1fr; }
  .dashboard-locale-grid { grid-template-columns: 1fr; }
}
