/* Monopage shared visuals: flat gradient surfaces, the geometric loader, the page-load splash and the 404 art.
   Everything here is flat and 2D. Nothing uses depth, perspective, glare or WebGL.
   Motion only runs inside the no-preference query, so visitors who ask for reduced motion get still shapes. */

/* ---------- flat gradient surfaces (static CSS, no scripts) ---------- */
.gfx-gold{background:linear-gradient(135deg,#FFE27A 0%,#FFC85C 100%)}
.gfx-sky{background:linear-gradient(135deg,#E4EAF6 0%,#BCCDF0 100%)}
.gfx-rose{background:linear-gradient(135deg,#F4E6EB 0%,#E6C7D2 100%)}
.gfx-indigo{background:linear-gradient(160deg,#3F5A96 0%,#2E4577 100%)}
.gfx-mist{background:linear-gradient(135deg,#E8EEFA 0%,#D3DEF4 100%)}

/* ---------- loader: spinning triangles and floating circles ----------
   --u is the size of one design unit. The full loader is 120 x 96 units; the small one fits inside a button. */
.mp-loader{--u:1px;--ml-a:#3F5A96;--ml-b:#A9BBE3;position:relative;display:block;flex:none;width:calc(120 * var(--u));height:calc(96 * var(--u))}
.mp-loader i{position:absolute;display:block}
.ml-c1,.ml-c2,.ml-c3{border-radius:50%}
.ml-t1,.ml-t2{clip-path:polygon(0 0,100% 0,50% 100%);transform-origin:50% 33.3%}
.ml-c1{left:calc(4 * var(--u));top:calc(26 * var(--u));width:calc(58 * var(--u));height:calc(58 * var(--u));background:var(--ml-a)}
.ml-t1{left:calc(56 * var(--u));top:calc(14 * var(--u));width:calc(56 * var(--u));height:calc(52 * var(--u));background:var(--ml-b)}
.ml-c2{left:calc(70 * var(--u));top:calc(70 * var(--u));width:calc(16 * var(--u));height:calc(16 * var(--u));background:var(--ml-b)}
.ml-c3{left:calc(30 * var(--u));top:calc(2 * var(--u));width:calc(12 * var(--u));height:calc(12 * var(--u));background:var(--ml-a)}
.ml-t2{left:calc(96 * var(--u));top:calc(66 * var(--u));width:calc(18 * var(--u));height:calc(16 * var(--u));background:var(--ml-a)}
.mp-loader--sm{--u:0.2px;--ml-a:#FFFFFF;--ml-b:#A9BBE3;display:inline-block;vertical-align:-4px;margin-right:12px}
.mp-loader--sm .ml-c3,.mp-loader--sm .ml-t2{display:none}
.mp-loader--xl{--u:1.5px}  /* splash size; the 404 page sizes it from the digits instead */

@media (prefers-reduced-motion: no-preference){
  @keyframes mlSpin{to{transform:rotate(360deg)}}
  @keyframes mlSpinBack{to{transform:rotate(-360deg)}}
  @keyframes mlFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(calc(-10 * var(--u)))}}
  .ml-t1{animation:mlSpin 3s linear infinite}
  .ml-t2{animation:mlSpinBack 1.7s linear infinite}
  .ml-c1{animation:mlFloat 2.6s ease-in-out infinite}
  .ml-c2{animation:mlFloat 2s ease-in-out -0.6s infinite}
  .ml-c3{animation:mlFloat 2.2s ease-in-out -1.2s infinite}
}

/* ---------- page-load splash (home page, first visit of a session, never with reduced motion) ---------- */
.mp-splash{display:none}
html.has-loader .mp-splash{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#F6F8FC;transition:opacity .45s ease,visibility .45s ease}
html.has-loader.ready .mp-splash{opacity:0;visibility:hidden}
@keyframes splashFailsafe{to{opacity:0;visibility:hidden}}
html.has-loader .mp-splash{animation:splashFailsafe .4s 5s forwards}

/* ---------- 404 page ---------- */
.err{padding-top:40px;padding-bottom:24px;display:flex;flex-direction:column;align-items:flex-start;gap:20px}
.err-art{font-size:clamp(84px,24vw,208px);display:flex;align-items:center;gap:0.02em;margin:0 0 8px -0.03em}
.err-num{font-family:'Outfit',system-ui,sans-serif;font-weight:600;font-size:1em;line-height:1;letter-spacing:-0.04em;color:var(--ink)}
.err-art .mp-loader{--u:0.0125em;margin:0 0.02em}
.err h1{font-size:clamp(34px,5vw,54px);line-height:1.08}
.err p{margin:0;font-size:20px;line-height:1.6;color:var(--muted);max-width:560px}
.err-actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:8px}
.err-links{margin-top:40px;padding-top:28px;border-top:1px solid var(--line);width:100%;max-width:900px}
.err-links h2{font-size:22px;margin-bottom:14px}
.err-links ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px 28px}
.err-links a{display:inline-block;font-size:17px;font-weight:500;color:var(--brand-dark);position:relative}
.err-links a::after{content:"";position:absolute;left:0;bottom:-3px;height:2px;width:100%;background:var(--brand);transform:scaleX(0);transform-origin:left center;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.err-links a:hover::after{transform:scaleX(1)}
