/* =====================================================================
   MGC — HEADER EMBLEM: JEWEL-TEAL + GOLD RIM
   Purely additive. Load this LAST — after mgc-style.css, mgc-polish.css,
   mgc-polish-pro.css, mgc-polish-pro-max.css,
   mgc-activities-club-submenu.css, mgc-elegant.css,
   mgc-noticeboard-colors.css and mgc-brighter.css. No markup changes.

   Problem: the header seal (.mgc-header-emblem, "Experience the Joy of
   Quality Learning") is a cream/gold circle sitting on the header's own
   cream/gold band (.mgc-header2), so it visually disappears instead of
   reading as a mark.

   Fix: recolor the seal to a rich jewel-teal — the site's own secondary
   brand color, already used for the nav bar — with a bright gold rim.
   Teal-on-ivory-and-gold is a genuine complementary contrast, so the
   seal now pops instead of blending in. A slow breathing glow on the
   rim makes it read as a deliberate centerpiece.

   Note on motion: mgc-elegant.css already killed this element's old
   fast shine-sweep (.mgc-header-emblem::after, animation:none +
   display:none) because constant sweeping/blinking reads as busy. This
   layer doesn't fight that — it leaves ::after switched off and adds a
   new, much calmer cue (a single slow box-shadow pulse on the seal
   itself) that matches elegant.css's own "alive but quiet" philosophy.
   ===================================================================== */

:root{
  /* Falls back to polish-pro-max's exact nav teal tokens if that file is
     loaded (guaranteeing an exact match with the nav bar); otherwise
     falls back to the base teal tokens from mgc-style.css so this still
     works standalone. */
  --mgc-emblem-teal-deep:  var(--mgc-nav-teal-1, #0a3f39);
  --mgc-emblem-teal-mid:   var(--mgc-nav-teal-2, var(--mgc-teal, #145a52));
  --mgc-emblem-teal-light: var(--mgc-nav-teal-3, var(--mgc-teal-light, #1f7c70));
}

.mgc-header-emblem{
  background:
    radial-gradient(circle at 32% 26%,
      var(--mgc-emblem-teal-light) 0,
      var(--mgc-emblem-teal-mid) 55%,
      var(--mgc-emblem-teal-deep) 100%) !important;
  border: 2px solid var(--mgc-gold) !important;
  box-shadow:
    0 6px 16px -6px rgba(13,22,46,.5),
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 -2px 6px rgba(6,25,22,.35),
    0 0 0 3px rgba(214,161,60,.22) !important;
  animation: mgcEmblemBreathe 4.4s ease-in-out infinite;
}

/* Ceremonial inner ring: switched from translucent maroon (illegible on
   teal) to a warm ivory/gold hairline so it still reads as a fine
   double-rule against the new dark ground. */
.mgc-header-emblem::before{
  border-color: rgba(255,247,224,.45) !important;
}

/* Text + leaf glyphs: from maroon-on-cream to a soft warm cream, so
   they sit clearly on the new teal field. */
.mgc-header-emblem-text{
  color: #fdf3df !important;
  text-shadow: 0 1px 3px rgba(6,25,22,.6) !important;
}
.mgc-header-emblem-leaf{
  color: var(--mgc-gold-soft) !important;
}

/* Slow, quiet breathing glow on the gold rim — the seal's "considered
   centerpiece" cue. Single soft pulse, no color/hue shifting, no
   flicker: it settles rather than nags. */
@keyframes mgcEmblemBreathe{
  0%, 100%{
    box-shadow:
      0 6px 16px -6px rgba(13,22,46,.5),
      inset 0 1px 0 rgba(255,255,255,.2),
      inset 0 -2px 6px rgba(6,25,22,.35),
      0 0 0 3px rgba(214,161,60,.22),
      0 0 0 0 rgba(214,161,60,0);
  }
  50%{
    box-shadow:
      0 8px 20px -6px rgba(13,22,46,.55),
      inset 0 1px 0 rgba(255,255,255,.26),
      inset 0 -2px 6px rgba(6,25,22,.35),
      0 0 0 4px rgba(214,161,60,.4),
      0 0 22px 5px rgba(214,161,60,.4);
  }
}

@media (prefers-reduced-motion: reduce){
  .mgc-header-emblem{ animation: none !important; }
}

@media print{
  .mgc-header-emblem{
    animation: none !important;
    background: var(--mgc-emblem-teal-mid, #145a52) !important;
    box-shadow: none !important;
  }
  .mgc-header-emblem-text, .mgc-header-emblem-leaf{
    color: #fff !important;
    text-shadow: none !important;
  }
}
