/* Mediation Group v38 — Global Navigation / IA Shell
   One fixed geometry, transparent at first contact; quiet reading shell after scroll. */

:root{--mg-shell-scroll-offset:6.25rem}
html{scroll-padding-top:var(--mg-shell-scroll-offset)}

.magazine-home,
.mediation-subpage{
  --shell-paper:#ece6dc;
  --shell-ink:#0d0f0d;
  --shell-blue:#0a2236;
  --shell-cream:#f4efe6;
  --shell-ox:#9a3240;
  --shell-serif:"Bodoni 72","Didot","Baskerville","Iowan Old Style","Times New Roman",serif;
  --shell-sans:"Helvetica Neue",Helvetica,Arial,sans-serif;
  --shell-gutter:clamp(1.2rem,3.2vw,4rem);
  --shell-height:5.15rem;
}

.mg-shell{
  top:0;
  z-index:210;
  display:grid;
  grid-template-columns:minmax(10rem,1fr) auto minmax(10rem,1fr);
  align-items:center;
  min-height:var(--shell-height);
  padding:0 var(--shell-gutter);
  border-bottom:1px solid transparent;
  font-family:var(--shell-sans);
  position:fixed;
  inset:0 0 auto;
  background:transparent;
  transition:background-color 200ms ease,color 180ms ease,border-color 180ms ease;
}
.magazine-home .mg-shell{color:#fff;animation:mg-shell-enter 620ms 260ms cubic-bezier(.22,1,.36,1) both}
.mediation-subpage .mg-shell{color:var(--shell-blue)}

.mg-shell[data-shell-state="immersive"]{
  background:transparent;
  border-bottom-color:transparent;
}
.mg-shell[data-shell-state="immersive"][data-shell-tone="dark"]{color:#fff}
.mg-shell[data-shell-state="immersive"][data-shell-tone="light"]{color:var(--shell-blue)}
.mg-shell[data-shell-state="reading"][data-shell-tone="dark"]{
  background:rgba(13,15,13,.97);
  color:var(--shell-cream);
  border-bottom-color:rgba(255,255,255,.15);
}
.mg-shell[data-shell-state="reading"][data-shell-tone="light"]{
  background:rgba(236,230,220,.985);
  color:var(--shell-blue);
  border-bottom-color:rgba(10,34,54,.16);
}

.mg-shell__brand{
  display:inline-flex;
  align-items:baseline;
  gap:.42rem;
  justify-self:start;
  min-height:44px;
  color:inherit;
}
.mg-shell__brand-name{font:500 clamp(1.5rem,2vw,2rem)/1 var(--shell-serif);letter-spacing:-.045em}
.mg-shell__brand-group{font-size:.68rem;font-weight:650;letter-spacing:.17em;text-transform:uppercase}

.mg-shell__nav{display:flex;align-items:center;gap:clamp(1rem,2.15vw,2.8rem)}
.mg-shell__nav a,
.mg-shell__action,
.mg-shell__menu-toggle{
  font-family:var(--shell-sans);
  font-size:.72rem;
  font-weight:720;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.mg-shell__nav a{position:relative;display:flex;align-items:center;min-height:44px;padding:.2rem 0;color:inherit}
.mg-shell__nav a::after{
  position:absolute;left:0;right:0;bottom:.36rem;height:1px;background:currentColor;content:"";
  opacity:.45;transform:scaleX(0);transform-origin:left;transition:transform 240ms ease,opacity 240ms ease;
}
.mg-shell__nav a:hover::after,
.mg-shell__nav a:focus-visible::after,
.mg-shell__nav a[aria-current]::after,
.mg-shell__nav a[data-section-current]::after{opacity:1;transform:scaleX(1)}

.mg-shell__action{
  justify-self:end;
  min-height:44px;
  padding:.2rem 0;
  border:0;
  border-bottom:1px solid currentColor;
  background:transparent;
  color:inherit;
  cursor:pointer;
  transition:opacity 180ms ease;
}
.mg-shell__action:hover,.mg-shell__action:focus-visible{opacity:.62}

.mg-shell__menu-toggle,.mg-shell__menu{display:none}

.mg-shell__brand:focus-visible,
.mg-shell__nav a:focus-visible,
.mg-shell__action:focus-visible,
.mg-shell__menu-toggle:focus-visible,
.mg-shell__menu-nav a:focus-visible,
.mg-shell__menu-action:focus-visible,
.mg-shell__menu-utility button:focus-visible,
.mg-shell__menu-utility a:focus-visible,
.mg-footer a:focus-visible,
.footer-owner:focus-visible{outline:2px solid currentColor;outline-offset:4px}

/* Quiet inverse footer: utility, not another brand scene. */
.mg-footer{
  display:grid;
  grid-template-columns:1.15fr .85fr 1fr;
  gap:clamp(1.5rem,3vw,3rem);
  align-items:start;
  min-height:12rem;
  padding:3rem var(--shell-gutter) max(2rem,env(safe-area-inset-bottom));
  border-top:1px solid rgba(255,255,255,.15);
  background:var(--shell-ink);
  color:#eee8de;
  font-family:var(--shell-sans);
}
.mg-footer>div:first-child{display:flex;flex-direction:column;gap:.5rem}
.mg-footer>div:first-child strong{font:500 clamp(1.65rem,2.2vw,2.35rem)/.95 var(--shell-serif);letter-spacing:-.04em}
.mg-footer>div:first-child span,.mg-footer>div:last-child span{color:rgba(238,232,222,.58);font-size:.68rem;letter-spacing:.08em;text-transform:uppercase}
.mg-footer nav{display:flex;flex-direction:column;gap:.2rem;font-size:.72rem;font-weight:650;letter-spacing:.1em;text-transform:uppercase}
.mg-footer nav a{display:inline-flex;align-items:center;min-height:36px;width:max-content}
.mg-footer nav a:hover,.mg-footer nav a:focus-visible,.mg-footer nav a[aria-current],.mg-footer nav a[data-section-current]{text-decoration:underline;text-underline-offset:.32rem}
.mg-footer>div:last-child{display:flex;flex-direction:column;align-items:flex-start;gap:.8rem}
.footer-owner{display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;border-bottom:1px solid rgba(255,255,255,.38);background:transparent;color:inherit;cursor:pointer;font:500 1rem/1.35 var(--shell-serif);text-align:left}

@keyframes mg-shell-enter{from{opacity:0;transform:translateY(-.55rem)}to{opacity:1;transform:none}}

@media(max-width:900px){
  :root{--mg-shell-scroll-offset:5.25rem}
  .magazine-home,.mediation-subpage{--shell-height:4.25rem;--shell-gutter:max(1rem,env(safe-area-inset-left))}
  .mg-shell{grid-template-columns:1fr auto;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right))}
  .mg-shell__nav,.mg-shell__action{display:none}
  .mg-shell__brand-name{font-size:1.52rem}.mg-shell__brand-group{font-size:.64rem;letter-spacing:.14em}
  .mg-shell__menu-toggle{
    display:inline-flex;align-items:center;justify-content:flex-end;justify-self:end;min-width:56px;min-height:44px;padding:0;
    border:0;background:transparent;color:inherit;cursor:pointer;
  }
  .mg-shell__menu-label{display:block}
  .mg-shell__menu{
    position:fixed;inset:0;z-index:-1;display:flex;flex-direction:column;
    min-height:100dvh;padding:calc(var(--shell-height) + 1.35rem) max(1rem,env(safe-area-inset-right)) max(1.3rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));
    background:var(--shell-ink);color:var(--shell-cream);
    opacity:0;visibility:hidden;pointer-events:none;transition:opacity 180ms ease,visibility 0s linear 180ms;
  }
  .mg-shell__menu.is-open{opacity:1;visibility:visible;pointer-events:auto;transition:opacity 180ms ease}
  .menu-open .mg-shell{background:var(--shell-ink)!important;color:var(--shell-cream)!important;border-bottom-color:rgba(255,255,255,.15)!important}
  .mg-shell__menu-nav{display:flex;flex-direction:column;border-top:1px solid rgba(255,255,255,.15)}
  .mg-shell__menu-nav a{
    display:flex;align-items:center;min-height:clamp(4rem,15vw,5.25rem);padding:.55rem 0;border-bottom:1px solid rgba(255,255,255,.15);
    font:500 clamp(2.55rem,12vw,4.15rem)/.92 var(--shell-serif);letter-spacing:-.05em;
    opacity:.96;transform:none;
  }
  .mg-shell__menu-nav a[aria-current],.mg-shell__menu-nav a[data-section-current]{color:#e2a3aa}
  button.mg-shell__menu-action{
    display:flex;align-items:center;justify-content:space-between;min-height:52px;margin-top:1.15rem;padding:.8rem 1rem;
    border:0;background:var(--shell-cream);color:var(--shell-ink);cursor:pointer;font:500 1.25rem/1.1 var(--shell-serif);
  }
  .mg-shell__menu-utility{display:flex;gap:1.25rem;align-items:center;margin-top:1.1rem;flex-wrap:wrap}
  .mg-shell__menu-utility button,.mg-shell__menu-utility a{
    display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;background:transparent;color:rgba(244,239,230,.74);
    font-size:.72rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;cursor:pointer;
  }
  .mg-shell__menu-note{margin-top:auto;color:rgba(244,239,230,.54);font-size:.68rem;letter-spacing:.09em;text-transform:uppercase}

  .mg-footer{grid-template-columns:1fr;gap:1rem;min-height:0;padding:2.5rem max(1rem,env(safe-area-inset-right)) max(1.5rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left))}
  .mg-footer nav{flex-direction:row;flex-wrap:wrap;gap:.25rem 1.15rem}.mg-footer nav a{min-height:44px}
  .mg-footer>div:last-child{margin-top:.4rem}.footer-owner{min-height:44px}
}

@media(max-width:390px){.mg-shell__brand-group{display:none}}

@media(prefers-reduced-motion:reduce){
  .magazine-home .mg-shell{animation:none}
  .mg-shell,.mg-shell__nav a::after,.mg-shell__menu{transition-duration:.01ms!important}
}
