/* ═══════════════════════════════════════════════════════
   Middle Ground HQ — Block Edition v2.1 — Full Whimsy
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500&display=swap');

body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }

::selection { background: #6C3BFF; color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0D0F2B; }
::-webkit-scrollbar-thumb { background: #2A2E55; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #6C3BFF; }

/* ── Labels & type helpers ─────────────────────────── */
.mghq-eyebrow {
  font-family: 'Syne', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}
h1 em, h2 em, h3 em { color: #9B7FFF; }

/* ── Cards ─────────────────────────────────────────── */
.mghq-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), border-color .35s ease, box-shadow .35s ease;
  height: 100%;
}
.mghq-card:hover {
  transform: translateY(-6px);
  border-color: rgba(155,127,255,0.4);
  box-shadow: 0 16px 40px rgba(13,15,43,0.55);
}
.mghq-card-dashed { border: 1px dashed rgba(255,255,255,0.22) !important; }
.mghq-card-featured { border-color: rgba(212,43,58,0.35) !important; }
.mghq-card-highlight {
  border-color: rgba(108,59,255,0.3) !important;
  background: linear-gradient(135deg, rgba(43,79,255,0.10), rgba(108,59,255,0.10)) !important;
}

/* ── Grid paper overlay for covers ─────────────────── */
.mghq-grid-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  border-radius: inherit;
}

/* ── Hero glow (right column of homepage hero) ─────── */
.mghq-hero-glow { position: relative; }
.mghq-hero-glow::before {
  content: '';
  position: absolute; inset: -40px;
  background:
    radial-gradient(ellipse at 60% 35%, rgba(108,59,255,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 85%, rgba(212,43,58,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 60%, rgba(43,79,255,0.22) 0%, transparent 55%);
  animation: mghq-pulse 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.mghq-hero-glow > * { position: relative; z-index: 1; }
@keyframes mghq-pulse { from { opacity: .65; } to { opacity: 1; } }

/* Floating hero cards */
.mghq-float { animation: mghq-float 6s ease-in-out infinite; }
.mghq-float-2 { animation: mghq-float 7s ease-in-out .8s infinite; }
.mghq-float-3 { animation: mghq-float 8s ease-in-out 1.6s infinite; }
@keyframes mghq-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.mghq-float:hover, .mghq-float-2:hover, .mghq-float-3:hover { animation-play-state: paused; }

/* ── Marquee ───────────────────────────────────────── */
.mghq-marquee {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  padding: 18px 0;
  white-space: nowrap;
}
.mghq-marquee-track {
  display: inline-flex;
  animation: mghq-marquee 32s linear infinite;
}
.mghq-marquee:hover .mghq-marquee-track { animation-play-state: paused; }
.mghq-marquee-item {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 0 30px;
  font-family: 'Syne', sans-serif;
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #8B8FA8;
}
.mghq-marquee-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: #D42B3A; display: inline-block;
}
@keyframes mghq-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Scroll reveal (JS adds .mghq-in) ──────────────── */
.mghq-pre { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.mghq-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mghq-pre { opacity: 1; transform: none; }
  .mghq-float, .mghq-float-2, .mghq-float-3, .mghq-marquee-track, .mghq-hero-glow::before { animation: none !important; }
}

/* ── Avatars & pills ───────────────────────────────── */
.mghq-avatar {
  border-radius: 50% !important;
  width: 72px; height: 72px;
  min-width: 72px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  overflow: hidden;
}
.mghq-avatar h4 { margin: 0 !important; }
.mghq-pill a, a.mghq-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  text-decoration: none !important;
  transition: border-color .2s ease, transform .2s ease;
}
.mghq-pill a:hover, a.mghq-pill:hover { border-color: rgba(155,127,255,0.55); transform: translateY(-2px); }

/* Founder badge — class: mghq-badge */
.mghq-badge {
  background: #D42B3A !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(212,43,58,0.4);
  font-family: 'Syne', sans-serif !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Header ────────────────────────────────────────── */
.mghq-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,43,0.88) !important;
}
.mghq-header .wp-block-navigation a {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  position: relative;
  transition: color .2s ease;
}
.mghq-header .wp-block-navigation a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: #FF3348;
  transition: width .3s ease;
}
.mghq-header .wp-block-navigation a:hover::after { width: 100%; }
.mghq-header .wp-block-navigation-item:last-child a {
  background: #D42B3A; color: #F5F0E8 !important;
  padding: 8px 18px; border-radius: 4px;
  transition: background .2s ease, transform .2s ease;
}
.mghq-header .wp-block-navigation-item:last-child a::after { display: none; }
.mghq-header .wp-block-navigation-item:last-child a:hover { background: #FF3348; transform: translateY(-1px); }
.mghq-header .wp-block-site-title a {
  font-family: 'Syne', sans-serif;
  font-weight: 800; text-decoration: none; letter-spacing: -0.02em;
}

/* ── Buttons ───────────────────────────────────────── */
.wp-block-button__link {
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  letter-spacing: 0.04em;
}
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(43,79,255,0.35); }
.is-style-outline .wp-block-button__link {
  border: 1px solid rgba(155,127,255,0.45) !important;
  color: #9B7FFF !important;
  background: transparent !important;
}
.is-style-outline .wp-block-button__link:hover { background: rgba(155,127,255,0.1) !important; box-shadow: none; }

/* ── Blog cards (query loop) ───────────────────────── */
.mghq-post-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), border-color .35s ease;
  height: 100%;
}
.mghq-post-card:hover { transform: translateY(-6px); border-color: rgba(155,127,255,0.4); }
.mghq-post-card .wp-block-post-title a { text-decoration: none; color: #F5F0E8; transition: color .2s ease; }
.mghq-post-card .wp-block-post-title a:hover { color: #9B7FFF; }
.mghq-post-card .wp-block-post-featured-image { margin: 0; }
.mghq-post-card .wp-block-post-featured-image img { transition: transform .5s ease; }
.mghq-post-card:hover .wp-block-post-featured-image img { transform: scale(1.05); }
.mghq-post-card .wp-block-post-terms a {
  text-decoration: none; color: #9B7FFF;
  font-family: 'Syne', sans-serif; font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}

/* Pagination */
.wp-block-query-pagination a, .wp-block-query-pagination-numbers .page-numbers {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.85rem;
  color: #8B8FA8; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 8px 14px;
  transition: color .2s ease, border-color .2s ease;
}
.wp-block-query-pagination a:hover { color: #F5F0E8; border-color: rgba(155,127,255,0.5); }
.wp-block-query-pagination-numbers .page-numbers.current { color: #F5F0E8; background: rgba(108,59,255,0.2); }

/* ── Forms ─────────────────────────────────────────── */
.mghq-input, .mghq-select, .mghq-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #F5F0E8;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
  box-sizing: border-box;
}
.mghq-input:focus, .mghq-textarea:focus, .mghq-select:focus {
  border-color: rgba(108,59,255,0.55);
  background: rgba(108,59,255,0.06);
}
.mghq-input::placeholder, .mghq-textarea::placeholder { color: rgba(139,143,168,0.55); }
.mghq-check { display: flex; align-items: center; gap: 10px; color: #8B8FA8; font-size: 0.9rem; font-family: 'DM Sans',sans-serif; margin-bottom: 10px; cursor: pointer; }
.mghq-check input { width: 16px; height: 16px; accent-color: #6C3BFF; }
.mghq-btn-grad {
  width: 100%;
  background: linear-gradient(135deg, #2B4FFF, #6C3BFF);
  color: #fff; border: none; cursor: pointer;
  padding: 14px 24px; border-radius: 8px;
  font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.04em;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mghq-btn-grad:hover { opacity: .92; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,59,255,0.4); }

/* Contact channel rows */
.mghq-channel { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.mghq-channel-icon {
  width: 40px; height: 40px; min-width: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.mghq-channel a { color: #F5F0E8; text-decoration: none; }
.mghq-channel a:hover { color: #9B7FFF; }
.mghq-channel-label {
  font-family: 'Syne', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8B8FA8;
  display: block; margin-bottom: 2px;
}

/* ── Footer ────────────────────────────────────────── */
.mghq-footer { border-top: 1px solid rgba(255,255,255,0.08); }
.mghq-footer a { text-decoration: none; color: #8B8FA8; transition: color .2s ease; }
.mghq-footer a:hover { color: #F5F0E8; }

.wp-block-cover { border-radius: inherit; }
