/* JY Site Kit — portal hero (homepage #jy-yard, EN + AR).
   The 3D yard is retired: the hero is the text column + a DriftWall photo wall (jy-drift.js).
   - Fits the viewport: the stage is at least one screen tall (minus the WP admin bar) and never clips its content.
   - Runs under the frosted-glass navbar: the yard is pulled up by the header height (--jy-hdr-h, measured by
     hero-header.js) so the wall fills its column right up to the top and shows through the glass.
   - Layout only; the hero's own type, buttons and colours stay in its source (WPCode #16169 / Elementor eec36ab). */

:root{--jy-hdr-h:80px;--jy-adminbar:0px;--jy-wall-scrim:33,33,33;}
html[data-jy-theme="light"]{--jy-wall-scrim:250,250,250;}
body.admin-bar{--jy-adminbar:32px;}
@media (max-width:782px){ body.admin-bar{--jy-adminbar:46px;} }

/* leftovers of the 3D scene, in case a cached copy of the old markup is served */
#jy-yard :is(#jyy-scene,#jyy-fallback,#jyy-chip,#jyy-seat,.jyy-hud-top,#jyy-legend){display:none !important;}

#jy-yard{margin-top:calc(-1 * var(--jy-hdr-h)) !important;}
#jy-yard #jyy-stage{
  position:relative !important;
  display:flex !important;align-items:center;
  height:auto !important;
  min-height:calc(100vh - var(--jy-adminbar)) !important;
  min-height:calc(100svh - var(--jy-adminbar)) !important;
  overflow:hidden !important;}
#jy-yard #jyy-stage .jyy-hud{
  position:relative !important;inset:auto !important;z-index:2;
  width:100% !important;max-width:none !important;margin:0 !important;
  padding:calc(var(--jy-hdr-h) + clamp(16px,4vh,40px)) clamp(20px,5vw,82px) clamp(28px,6vh,56px) !important;}

/* the photo wall: the end-side column, full height, fading into the text side and the section below */
#jy-yard .jyy-wall{
  position:absolute;z-index:1;top:0;bottom:0;inset-inline-end:0;width:54%;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 24%),linear-gradient(to top,transparent 0,#000 16%);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to right,transparent 0,#000 24%),linear-gradient(to top,transparent 0,#000 16%);
  mask-composite:intersect;}
html[dir="rtl"] #jy-yard .jyy-wall{
  -webkit-mask-image:linear-gradient(to left,transparent 0,#000 24%),linear-gradient(to top,transparent 0,#000 16%);
  mask-image:linear-gradient(to left,transparent 0,#000 24%),linear-gradient(to top,transparent 0,#000 16%);}
#jy-yard .jyy-wall .drift-wall{position:absolute;inset:0;}

/* desktop: a wider text column (the copy no longer floats over a full-bleed scene), and on short windows tighter
   spacing and a height-aware headline so the whole hero, stats included, fits on one screen */
@media (min-width:901px){
  #jy-yard .jyy-hud-mid{width:auto !important;max-width:none !important;justify-self:start !important;}
  #jy-yard .jyy-lede{width:min(470px,38vw) !important;max-width:none !important;}
}
@media (min-width:901px) and (max-height:760px){
  #jy-yard #jyy-stage .jyy-hud{padding-top:calc(var(--jy-hdr-h) + 12px) !important;padding-bottom:18px !important;}
  #jy-yard .jyy-slide :is(h1,h2){font-size:clamp(28px,6.4vh,44px) !important;}
}

/* tablets and phones: the wall becomes a soft full-bleed backdrop behind the copy */
@media (max-width:900px){
  #jy-yard .jyy-wall{width:100%;inset-inline:0;
    -webkit-mask-image:linear-gradient(to top,transparent 0,#000 18%);mask-image:linear-gradient(to top,transparent 0,#000 18%);}
  html[dir="rtl"] #jy-yard .jyy-wall{-webkit-mask-image:linear-gradient(to top,transparent 0,#000 18%);mask-image:linear-gradient(to top,transparent 0,#000 18%);}
  #jy-yard .jyy-wall::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
    background:linear-gradient(to bottom,rgba(var(--jy-wall-scrim),.5) 0%,rgba(var(--jy-wall-scrim),.86) 34%,rgba(var(--jy-wall-scrim),.9) 100%);}
  #jy-yard .jyy-wall .drift-wall__tile:hover{transform:none;}
}

/* Arabic: the hero's own font tokens (set with ID + !important in its source) → Noto Kufi Arabic.
   Mono labels keep IBM Plex Mono for Latin; Arabic letters fall through to Kufi. No tracking on Arabic. */
html[lang^="ar"] #jy-yard{
  --display:"Noto Kufi Arabic",Tahoma,sans-serif !important;
  --arabic:"Noto Kufi Arabic",Tahoma,sans-serif !important;
  --body:"Noto Kufi Arabic",Tahoma,sans-serif !important;
  --mono:"IBM Plex Mono","Noto Kufi Arabic",monospace !important;}
html[lang^="ar"] #jy-yard *{letter-spacing:normal !important;}
html[lang^="ar"] #jy-yard :is(h1,h2){line-height:1.3 !important;}

/* ---------- Hero stat cards (Uiverse "card" pattern by Yaya12085, re-skinned to Brand V3) ----------
   Markup (in the hero source): li.jy-stat > .jy-stat__title (icon circle + label) + .jy-stat__data (number + meta)
   + .jy-stat__range > i (bar, width = --jy-stat-fill). The bar fills when the portal is first shown. */
html body #jy-yard ul.jyy-stats.jy-stats{display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important;margin-top:18px !important;padding:0 !important;list-style:none !important;}
html body #jy-yard ul.jy-stats > li.jy-stat{
  --st-card:#2A2A2A;--st-line:#3A3A3A;--st-ico:#00EF73;--st-ico-ink:#212121;--st-title:#BDBDBD;--st-num:#FFFFFF;
  --st-meta:#00EF73;--st-track:#3A3A3A;--st-fill:#00EF73;
  display:flex !important;flex-direction:column !important;gap:10px !important;min-width:0;
  padding:14px !important;margin:0 !important;border-radius:18px !important;
  background:var(--st-card) !important;border:1px solid var(--st-line) !important;
  box-shadow:0 10px 15px -3px rgba(0,0,0,.35),0 4px 6px -2px rgba(0,0,0,.2) !important;text-align:start;}
html[data-jy-theme="light"] body #jy-yard ul.jy-stats > li.jy-stat{
  --st-card:#FFFFFF;--st-line:#FFFFFF;--st-ico:#1F7550;--st-ico-ink:#FFFFFF;--st-title:#4B5563;--st-num:#212121;
  --st-meta:#1F7550;--st-track:#E3E2E2;--st-fill:#1F7550;
  box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05) !important;}
html body #jy-yard ul.jy-stats .jy-stat__title{display:flex;align-items:center;gap:8px;min-width:0;}
html body #jy-yard ul.jy-stats .jy-stat__ico{position:relative;flex:none;width:28px;height:28px;border-radius:999px;background:var(--st-ico);color:var(--st-ico-ink);}
html body #jy-yard ul.jy-stats .jy-stat__ico svg{position:absolute;top:50%;left:50%;width:15px;height:15px;transform:translate(-50%,-50%);}
html body #jy-yard ul.jy-stats .jy-stat__label{min-width:0;font-family:var(--display) !important;color:var(--st-title) !important;font-size:12px !important;line-height:1.25 !important;font-weight:500 !important;
  letter-spacing:0 !important;text-transform:none !important;}
html body #jy-yard ul.jy-stats .jy-stat__data{display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap;}
html body #jy-yard ul.jy-stats .jy-stat__num{margin:0;color:var(--st-num) !important;font-size:clamp(24px,min(2.3vw,4vh),32px) !important;line-height:1 !important;font-weight:700 !important;}
html body #jy-yard ul.jy-stats .jy-stat__meta{font-family:var(--display) !important;text-transform:none !important;color:var(--st-meta) !important;font-size:11.5px !important;line-height:1 !important;font-weight:600 !important;white-space:nowrap;letter-spacing:0 !important;}
html body #jy-yard ul.jy-stats .jy-stat__range{position:relative;display:block;width:100%;height:6px;border-radius:4px;background:var(--st-track);overflow:hidden;}
html body #jy-yard ul.jy-stats .jy-stat__range > i{position:absolute;top:0;bottom:0;inset-inline-start:0;width:var(--jy-stat-fill,100%);border-radius:4px;background:var(--st-fill);
  animation:jyStatFill 1.1s cubic-bezier(.22,1,.36,1) .25s both;}
@keyframes jyStatFill{from{width:0}}
@media (prefers-reduced-motion:reduce){ html body #jy-yard ul.jy-stats .jy-stat__range > i{animation:none;} }
/* phones: three narrow cards — smaller icon and type, no meta line */
@media (max-width:600px){
  html body #jy-yard ul.jyy-stats.jy-stats{gap:8px !important;}
  html body #jy-yard ul.jy-stats > li.jy-stat{padding:10px !important;gap:8px !important;border-radius:14px !important;}
  html body #jy-yard ul.jy-stats .jy-stat__title{flex-direction:column;align-items:flex-start;gap:6px;}
  html body #jy-yard ul.jy-stats .jy-stat__ico{width:24px;height:24px;}
  html body #jy-yard ul.jy-stats .jy-stat__ico svg{width:13px;height:13px;}
  html body #jy-yard ul.jy-stats .jy-stat__label{font-size:10.5px !important;}
  html body #jy-yard ul.jy-stats .jy-stat__num{font-size:22px !important;}
  html body #jy-yard ul.jy-stats .jy-stat__meta{font-family:var(--display) !important;display:none;}
}

/* ---------- CTA buttons on the homepage: the same pill as the root hero's "Explore" button ----------
   Hero slide buttons, "See all achievements", the training cards' "Request details" and the contact panel buttons.
   Shape, type, glow and hover lift match #jy-splash .jys-btn; colours stay per context (green primary, outlined
   secondary, dark buttons on the green contact panel). */
html body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn){
  display:inline-flex !important;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;
  border-radius:999px !important;padding:clamp(12px,1.8vh,15px) clamp(22px,2.6vw,30px) !important;
  font-family:"Inter",system-ui,sans-serif !important;font-weight:700 !important;font-size:clamp(14px,1.2vw,15.5px) !important;
  line-height:1.15 !important;letter-spacing:0 !important;text-transform:none !important;text-decoration:none !important;
  transition:transform .25s ease,box-shadow .25s ease,background-color .25s ease,border-color .25s ease,color .25s ease !important;}
html[lang^="ar"] body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn){font-family:"Noto Kufi Arabic",Tahoma,sans-serif !important;}
html body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn):hover{transform:translateY(-2px);}
html body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn):active{transform:translateY(0);}
html body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn):focus-visible{outline:3px solid #79C7C8 !important;outline-offset:3px;}
/* primary: the Explore green with its glow */
html body :is(#jy-yard .jyy-btn-primary, #main .jyach-all, #main section#training a.btn.b1){
  background:#00EF73 !important;color:#111111 !important;border:0 !important;box-shadow:0 8px 28px -8px rgba(0,239,115,.55) !important;}
html body :is(#jy-yard .jyy-btn-primary, #main .jyach-all, #main section#training a.btn.b1):hover{
  background:#2FF58C !important;box-shadow:0 12px 34px -8px rgba(0,239,115,.7) !important;}
/* secondary: outlined pill */
html body #jy-yard .jyy-btn-ghost{background:rgba(255,255,255,.04) !important;color:#F4F4F4 !important;border:1px solid #3A3A3A !important;box-shadow:none !important;}
html body #jy-yard .jyy-btn-ghost:hover{border-color:#00EF73 !important;color:#FFFFFF !important;}
html[data-jy-theme="light"] body #jy-yard .jyy-btn-ghost{background:#FFFFFF !important;color:#212121 !important;border-color:#DADADA !important;}
html[data-jy-theme="light"] body #jy-yard .jyy-btn-ghost:hover{border-color:#1F7550 !important;color:#1F7550 !important;}
/* contact panel (green): keeps its dark buttons, now pills with a soft drop shadow */
html body #main section#contact a.btn{box-shadow:0 8px 24px -12px rgba(0,0,0,.5) !important;}
@media (prefers-reduced-motion:reduce){
  html body :is(#jy-yard .jyy-btn, #main .jyach-all, #main section#training a.btn, #main section#contact a.btn){transition:none !important;transform:none !important;}
}
