/* ============================================================
   MOSMATES — MIDNIGHT OPULENCE DESIGN SYSTEM
   Premium dark theme: deep navy + rich gold + warm coral
   ============================================================ */

:root {
  /* ── Backgrounds ── */
  --bg-base:      #080B14;   /* Near-black navy */
  --bg-surface:  #0F1523;   /* Dark navy surface */
  --bg-elevated: #161D2E;   /* Lifted surface */
  --bg-muted:    #0C1020;   /* Muted navy */
  --bg-overlay:  rgba(8, 11, 20, 0.85);

  /* ── Text ── */
  --text-primary:   #F5F0E8;  /* Warm cream */
  --text-secondary: #8B9BB4;  /* Muted blue-gray */
  --text-muted:    #4A5578;  /* Faint blue-gray */
  --text-faint:    #2A3352;  /* Very faint */

  /* ── Borders ── */
  --border:        rgba(239, 192, 123, 0.12);
  --border-subtle: rgba(239, 192, 123, 0.06);
  --border-gold:    rgba(232, 168, 56, 0.3);

  /* ── Brand: Gold (primary) ── */
  --gold:       #E8A838;
  --gold-light: #F5C56B;
  --gold-dark:  #C48A1A;
  --gold-glow:  rgba(232, 168, 56, 0.25);
  --gold-dim:   rgba(232, 168, 56, 0.08);

  /* ── Brand: Coral (secondary) ── */
  --coral:       #FF6B6B;
  --coral-light: #FF9E9E;
  --coral-dark:  #E85555;
  --coral-glow:  rgba(255, 107, 107, 0.2);
  --coral-dim:   rgba(255, 107, 107, 0.08);

  /* ── Supporting ── */
  --teal:    #14B8A6;
  --purple:  #A855F7;
  --rose:    #F43F5E;
  --emerald: #10B981;

  /* ── Typography ── */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Spacing ── */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 40px;

  /* ── Shadows ── */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:   0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:   0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 32px rgba(232, 168, 56, 0.15);
  --shadow-coral: 0 8px 32px rgba(255, 107, 107, 0.15);

  /* ── Transitions ── */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /* Subtle noise texture overlay */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text-primary);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section { padding: 80px 0; }
.section-dark { background: var(--bg-muted); }

/* ── Grain texture SVG filter (referenced by elements) ── */
.grain-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Navigation ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 11, 20, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.35rem;
  color: var(--text-primary); letter-spacing: -0.025em;
}
.nav-logo span { color: var(--gold); }

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.88rem; font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -5px; left: 0; right: 0;
  height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { transform: scaleX(1); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-muted);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 44px;
}
.footer-brand .logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  color: var(--text-primary); margin-bottom: 14px; letter-spacing: -0.02em;
}
.footer-brand .logo span { color: var(--gold); }
.footer-brand p {
  font-size: 0.84rem; color: var(--text-secondary);
  line-height: 1.75; max-width: 280px;
}
.footer-col h4 {
  font-size: 0.72rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  font-size: 0.84rem; color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  text-align: center; padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem; color: var(--text-muted);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 600;
  transition: all 0.2s var(--ease-out);
  border: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #0A0800;
  box-shadow: 0 4px 20px var(--gold-glow), 0 1px 0 rgba(255,255,255,0.1) inset;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--gold-glow), 0 1px 0 rgba(255,255,255,0.15) inset;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232, 168, 56, 0.1);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
  background: rgba(232, 168, 56, 0.08);
  color: var(--gold);
  border-color: var(--border-gold);
}

/* ── Glassmorphism Cards ── */
.glass-card {
  background: rgba(22, 29, 46, 0.6);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), border-color 0.2s;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), 0 1px 0 rgba(255,255,255,0.06) inset, 0 0 40px var(--gold-dim);
  border-color: var(--border-gold);
}

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-light) 60%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header p {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 500px; margin: 0 auto;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 56px;
}
.stat-item {
  background: rgba(15, 21, 35, 0.8);
  padding: 24px 20px;
  text-align: center;
  transition: background 0.2s;
}
.stat-item:hover { background: rgba(22, 29, 46, 0.9); }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800;
  line-height: 1; margin-bottom: 6px;
}
.stat-label {
  font-size: 0.75rem; color: var(--text-muted);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em;
}

/* ── Category Badges ── */
.cat-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 10px;
  border-radius: 20px; margin-bottom: 12px; width: fit-content;
}
.cat-Health   { background: rgba(244,63,94,0.15);  color: #FB7185; }
.cat-Education{ background: rgba(20,184,166,0.15); color: #2DD4BF; }
.cat-Art      { background: rgba(168,85,247,0.15); color: #C084FC; }
.cat-Food     { background: rgba(232,168,56,0.15); color: var(--gold-light); }
.cat-Music    { background: rgba(244,63,94,0.15); color: #FB7185; }
.cat-Sports   { background: rgba(14,165,233,0.15); color: #38BDF8; }
.cat-Business { background: rgba(20,184,166,0.15); color: #2DD4BF; }
.cat-Social   { background: rgba(232,168,56,0.12); color: var(--gold-light); }
.cat-Culture  { background: rgba(168,85,247,0.15); color: #C084FC; }
.cat-Other    { background: rgba(139,155,180,0.1); color: var(--text-secondary); }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4, 6, 14, 0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal-panel {
  background: rgba(15, 21, 35, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-2xl);
  max-width: 640px; width: 100%; max-height: 88vh;
  overflow-y: auto; position: relative;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(232, 168, 56, 0.06);
  animation: slideUp 0.22s var(--ease-spring);
}
@keyframes slideUp { from { opacity:0; transform:translateY(28px) scale(0.97); } }
@keyframes fadeIn  { from { opacity:0; } }

.modal-close {
  position: absolute; top:16px; right:16px;
  width:36px; height:36px; border-radius:50%;
  background: rgba(255,255,255,0.06); border:1px solid var(--border);
  font-size:20px; line-height:1; color:var(--text-secondary);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all 0.15s; z-index:1;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color:var(--text-primary); }

.modal-body { padding: 36px; }
.modal-category { margin-bottom:12px; }
.modal-title {
  font-family:var(--font-display); font-size:1.6rem; font-weight:800;
  color:var(--text-primary); margin-bottom:24px; padding-right:40px;
  line-height:1.2;
}
.modal-meta { display:flex; flex-direction:column; gap:12px; margin-bottom:24px; }
.modal-meta-row { display:flex; align-items:flex-start; gap:14px; font-size:0.9rem; }
.modal-meta-row .icon { font-size:1.1rem; width:26px; text-align:center; flex-shrink:0; margin-top:2px; }
.modal-meta-row .label { color:var(--text-muted); min-width:82px; font-weight:500; }
.modal-meta-row .value { color:var(--text-primary); font-weight:500; }
.modal-meta-row .value a { color:var(--gold); text-decoration:underline; text-underline-offset:3px; }
.modal-divider { height:1px; background:var(--border-subtle); margin:24px 0; }
.modal-desc-label {
  font-size:0.72rem; font-weight:700; letter-spacing:0.12em;
  text-transform:uppercase; color:var(--text-muted); margin-bottom:10px;
}
.modal-desc { font-size:0.9rem; color:var(--text-secondary); line-height:1.8; white-space:pre-wrap; }
.modal-actions { display:flex; flex-direction:column; gap:10px; margin-top:28px; }
.btn-full { width:100%; }

/* ── Filter Bar ── */
.filter-bar-wrap {
  position:sticky; top:68px; z-index:90;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom:1px solid var(--border-subtle);
  padding: 14px 0;
}
.filter-bar { display:flex; gap:8px; flex-wrap:wrap; }
.filter-pill {
  padding: 6px 16px; border-radius:20px;
  font-size:0.82rem; font-weight:600;
  border:1px solid var(--border);
  color:var(--text-secondary); background:transparent;
  transition:all 0.18s var(--ease-out); cursor:pointer;
}
.filter-pill:hover {
  border-color:var(--gold); color:var(--gold);
  background:var(--gold-dim);
  transform:translateY(-1px);
}
.filter-pill.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color:var(--gold);
  color:#0A0800;
  box-shadow:0 4px 16px var(--gold-glow);
  font-weight:700;
}

/* ── Page Hero ── */
.page-hero {
  position:relative; overflow:hidden;
  padding: 80px 0 64px; text-align:center;
}
.hero-orb {
  position:absolute; border-radius:50%; pointer-events:none;
  filter: blur(100px);
}
.orb-1 {
  width:800px; height:800px;
  background: radial-gradient(circle, rgba(232,168,56,0.12) 0%, transparent 65%);
  top:-300px; right:-200px;
}
.orb-2 {
  width:600px; height:600px;
  background: radial-gradient(circle, rgba(255,107,107,0.08) 0%, transparent 65%);
  bottom:-200px; left:-150px;
}
.hero-kicker {
  display:inline-flex; align-items:center; gap:6px;
  font-size:0.78rem; font-weight:700; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  padding: 5px 14px; border-radius:20px;
  margin-bottom:20px;
}
.hero-title {
  font-size:clamp(2.4rem, 5vw, 4rem);
  font-weight:800; margin-bottom:16px; letter-spacing:-0.03em;
}
.title-gradient {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hero-sub {
  font-size:1.05rem; color:var(--text-secondary);
  max-width:520px; margin:0 auto; line-height:1.7;
}

/* ── Loading ── */
.loading-spinner {
  width:40px; height:40px;
  border:2px solid var(--border);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:spin 0.7s linear infinite;
  margin:0 auto 16px;
}
@keyframes spin { to{transform:rotate(360deg)} }
.loading-state { grid-column:1/-1; text-align:center; padding:80px 0; color:var(--text-muted); }

/* ── Empty State ── */
.empty-state { grid-column:1/-1; text-align:center; padding:80px 20px; }
.empty-icon { font-size:3.5rem; margin-bottom:16px; opacity:0.3; }
.empty-state h3 { font-size:1.3rem; margin-bottom:8px; }
.empty-state p { color:var(--text-muted); font-size:0.9rem; }

/* ── Entrance Animations ── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s var(--ease-out) both; }
.animate-in:nth-child(2) { animation-delay: 0.06s; }
.animate-in:nth-child(3) { animation-delay: 0.12s; }
.animate-in:nth-child(4) { animation-delay: 0.18s; }
.animate-in:nth-child(5) { animation-delay: 0.24s; }
.animate-in:nth-child(6) { animation-delay: 0.30s; }

/* ── Accent helpers ── */
.gold { color: var(--gold); }
.accent { color: var(--coral); }

/* ── Divider ── */
.divider {
  height:1px; background:linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  margin:0;
}

/* ── Responsive ── */
@media(max-width:1024px) {
  .footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
}
@media(max-width:768px) {
  .nav-links { display:none; }
  .stats-bar { grid-template-columns:repeat(2,1fr); }
  .card-grid { grid-template-columns:1fr; }
  .section { padding:56px 0; }
  .footer-grid { grid-template-columns:1fr 1fr; gap:24px; }
  .page-hero { padding:56px 0 48px; }
}
@media(max-width:480px) {
  .footer-grid { grid-template-columns:1fr; }
  .container { padding:0 18px; }
}
