/* immi.directory — Shared Design System
   Theme: Forest Green + Cream (locked 2026-06-13)
   Distinct from immi.tv (navy+teal) and immi.wiki (white+blue links)
*/

:root {
  --navy: #1c3a2a;
  --navy-lt: #2d5a3d;
  --gold: #c9a84c;
  --gold-lt: #e0c97b;
  --emerald: #16a34a;
  --amber: #c9a84c;
  --red: #dc2626;
  --surface: #fdfaf4;
  --card: #ffffff;
  --border: #e8e0cc;
  --text: #1a2e1f;
  --muted: #5a6e5f;
  --light: #94a3b8;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);

  --nav-h: 64px;
  --max-w: 1180px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}
h4 {
  font-size: 1.05rem;
}
p {
  color: var(--text);
}
a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--gold);
}

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.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;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}
.nav-logo .dot {
  color: var(--gold);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: #fff;
}
.nav-cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
}
.nav-cta:hover {
  background: var(--gold-lt);
  color: var(--navy) !important;
}
.nav-hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: block;
  }
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-verified {
  background: #d1fae5;
  color: #065f46;
}
.badge-not-eligible {
  background: #fef3c7;
  color: #92400e;
}
.badge-suspended {
  background: #fee2e2;
  color: #991b1b;
}
.badge-rcic {
  background: #dbeafe;
  color: #1e40af;
}
.badge-rma {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-au {
  background: #fff3e0;
  color: #e65100;
}
.badge-ca {
  background: #e8f5e9;
  color: #1b5e20;
}
.badge-discipline {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-lt);
  color: #fff;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover {
  background: var(--gold-lt);
  color: var(--navy);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}
.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

/* ── Search bar ── */
.search-bar {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  background: transparent;
}
.search-bar select {
  border: none;
  border-left: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}
.search-bar button {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.search-bar button:hover {
  background: var(--gold-lt);
}

/* ── Registry number ── */
.registry-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Star rating ── */
.stars {
  color: var(--gold);
  letter-spacing: -0.05em;
}
.stars .empty {
  color: var(--border);
}
.rating-count {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Trust score ── */
.trust-ring {
  width: 64px;
  height: 64px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  border: 4px solid var(--emerald);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.trust-ring .score {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.trust-ring .label {
  font-size: 0.55rem;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-brand .name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.footer-brand .tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}
.footer-col h4 {
  color: var(--gold-lt);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
  font-family: var(--font-sans);
}
.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  margin-bottom: 0.45rem;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.65);
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
  margin-left: 1rem;
}
.footer-bottom a:hover {
  color: rgba(255, 255, 255, 0.9);
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Stats strip ── */
.stats-strip {
  background: var(--navy);
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
}

/* ── Internal build banner ── */
.internal-banner {
  background: #fef08a;
  color: #713f12;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #fde047;
}

/* ── Flash messages ── */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.flash.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ── Nav link ── */
.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.nav-link:hover {
  color: var(--navy);
}

/* ── Data notice ── */
.data-notice {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  color: #92400e;
}

/* ── Search page sidebar responsive (DESIGN-01) ── */
.search-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}
.filter-toggle {
  display: none;
  width: 100%;
  margin-bottom: 1rem;
  text-align: left;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--navy);
  font-family: inherit;
}
.search-sidebar {
  /* visible by default on desktop */
}
@media (max-width: 640px) {
  .search-layout {
    grid-template-columns: 1fr;
  }
  .filter-toggle {
    display: flex;
  }
  .search-sidebar {
    display: none;
  }
  .search-sidebar.open {
    display: block;
  }
  /* Stats grid 2-col on mobile (DESIGN-02) */
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Profile page: responsive 2-col layout (H-05) */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* Nav link colour when used inside dark nav (BRAND fix) */
.site-nav .nav-link {
  color: rgba(255, 255, 255, 0.78);
}
.site-nav .nav-link:hover {
  color: #fff;
}

/* ── Utilities ── */
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--muted);
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.75rem;
}
.font-mono {
  font-family: var(--font-mono);
}
.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;
}
.gap-1 {
  gap: 0.5rem;
}
.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section {
  padding: 4rem 0;
}
.section-sm {
  padding: 2.5rem 0;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Ad slot — sidebar placements */
.ad-slot {
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  margin-top: 1rem;
}
.ad-slot-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.ad-slot-inner {
}
.ad-slot-headline {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.4rem;
  line-height: 1.3;
}
.ad-slot-body {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 0.75rem;
}
.ad-slot-cta {
  display: block;
  text-align: center;
  margin-bottom: 0.6rem;
}
.ad-slot-reg {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* Ad banner — full-width horizontal strip for homepage / static pages */
.ad-banner {
  background: var(--surface);
  border-top: 3px solid var(--gold);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.ad-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ad-banner-body {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.ad-banner-text {
  flex: 1;
  min-width: 200px;
}
.ad-banner-text .ad-slot-headline {
  margin-bottom: 0.2rem;
}
.ad-banner-text .ad-slot-body {
  margin-bottom: 0.2rem;
}
.ad-banner-text .ad-slot-reg {
  margin: 0;
}
.ad-banner .ad-slot-cta {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}
@media (max-width: 600px) {
  .ad-banner-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ad-banner .ad-slot-cta {
    width: 100%;
    text-align: center;
  }
}

/* Homepage two-column layout */
.homepage-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}
.homepage-sidebar {
  position: sticky;
  top: 1rem;
}
.homepage-sidebar .ad-slot + .ad-slot {
  margin-top: 1rem;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.featured-section {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .homepage-layout {
    grid-template-columns: 1fr;
  }
  .homepage-sidebar {
    position: static;
  }
}
