/* hader.ps — the platform and its products' pages. Layout lives inline in the
   pages (as designed); this file holds the base, the animations and the states. */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#ffffff;overflow-x:hidden;-webkit-font-smoothing:antialiased}
img{max-width:100%}
[hidden]{display:none!important}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #2563eb;outline-offset:3px;border-radius:10px}
.p-tab{background:transparent;color:#3d5266}
.p-tab[aria-selected="true"]{background:#14304a;color:#ffffff}
@media (max-width: 640px){
  h1{font-size:38px!important}
  h2{font-size:28px!important}
}
/* ---- Main ---- */

@keyframes h-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
.h-in{animation:h-rise .9s cubic-bezier(.2,.8,.2,1) both}
.h-d1{animation-delay:.8s}.h-d2{animation-delay:.95s}.h-d3{animation-delay:1.1s}.h-d4{animation-delay:1.25s}

/* The platform's mark: the square settles, the tick draws */
@keyframes h-mark{0%{opacity:0;transform:scale(.5) rotate(-12deg)}70%{opacity:1;transform:scale(1.06) rotate(2deg)}100%{transform:none}}
.h-mark{animation:h-mark .9s cubic-bezier(.2,.9,.2,1.2) .1s both}
@keyframes h-draw{to{stroke-dashoffset:0}}
.h-tick{stroke-dasharray:60;stroke-dashoffset:60;animation:h-draw .7s ease-out .7s forwards}
@keyframes h-breathe{0%,100%{box-shadow:0 18px 40px -18px rgba(17,24,39,.55)}50%{box-shadow:0 24px 54px -14px rgba(17,24,39,.35)}}
.h-breathe{animation:h-breathe 4s ease-in-out 1.6s infinite}

@keyframes h-blob{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(60px,-40px) scale(1.12)}66%{transform:translate(-40px,30px) scale(.92)}}
.h-blob{position:absolute;border-radius:999px;filter:blur(80px);animation:h-blob var(--t) ease-in-out infinite}

@keyframes h-words{0%,18%{transform:translateY(0)}25%,43%{transform:translateY(-1.3em)}50%,68%{transform:translateY(-2.6em)}75%,93%{transform:translateY(-3.9em)}100%{transform:translateY(-5.2em)}}
.h-words{display:flex;flex-direction:column;animation:h-words 10s cubic-bezier(.7,0,.2,1) 1.6s infinite}
.h-words span{height:1.3em;line-height:1.3em;display:block}
.h-under{stroke-dasharray:240;stroke-dashoffset:240;animation:h-draw 1.1s cubic-bezier(.6,0,.2,1) 1.7s forwards}

@keyframes h-ping{0%{transform:scale(1);opacity:.7}100%{transform:scale(2.8);opacity:0}}
.h-ping{position:absolute;inset:0;border-radius:999px;background:#111827;animation:h-ping 1.8s ease-out infinite}

/* Two products' screens, one behind the other, leaning toward the cursor */
.h-tilt{transition:transform .25s ease-out}
@keyframes h-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.h-chip{position:absolute;animation:h-bob var(--t) ease-in-out infinite;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
@keyframes h-back{0%,100%{transform:rotate(-7deg) translate(-36px,-26px)}50%{transform:rotate(-5deg) translate(-44px,-34px)}}
.h-back{animation:h-back 7s ease-in-out infinite}
@keyframes h-success{0%{transform:scale(1)}40%{transform:scale(.94)}70%{transform:scale(1.05)}100%{transform:scale(1)}}
.h-done{animation:h-success .45s ease-out}
.h-done-tick{stroke-dasharray:30;stroke-dashoffset:30;animation:h-draw .4s ease-out .1s forwards}

@keyframes h-marquee{from{transform:translateX(0)}to{transform:translateX(50%)}}
.h-marquee{display:flex;width:max-content;animation:h-marquee 38s linear infinite}
.h-strip:hover .h-marquee{animation-play-state:paused}

.h-card{transition:transform .45s cubic-bezier(.2,.8,.2,1),box-shadow .45s;text-decoration:none;color:inherit}
.h-card:hover{transform:translateY(-10px);box-shadow:0 30px 60px -28px rgba(17,24,39,.4);color:inherit}
@keyframes h-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
.h-float{animation:h-float 5s ease-in-out infinite}
.h-logo{transition:transform .5s cubic-bezier(.2,.8,.2,1)}
.h-card:hover .h-logo{transform:scale(1.05)}
.h-arrow{transition:transform .3s}
.h-card:hover .h-arrow{transform:translateX(-6px)}
@keyframes h-shine{0%{background-position:200% 0}100%{background-position:-200% 0}}
.h-soon{background:linear-gradient(110deg,#1f1f1f 35%,#5a5a5a 50%,#1f1f1f 65%);background-size:300% 100%;animation:h-shine 3s linear infinite}
.h-glass{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}

.h-btn{transition:transform .25s,box-shadow .25s}
.h-btn:hover{transform:translateY(-3px);box-shadow:0 12px 26px -12px rgba(17,24,39,.55)}
.h-why{transition:transform .35s,background-color .35s}
.h-why:hover{transform:translateY(-6px);background:#2a3343}

@supports (animation-timeline: view()){
@keyframes h-reveal{from{opacity:0;transform:translateY(60px) scale(.97)}to{opacity:1;transform:none}}
.h-reveal{animation:h-reveal linear both;animation-timeline:view();animation-range:entry 0% cover 28%}
}
@media (prefers-reduced-motion: reduce){
*,*::before,*::after{animation:none!important;transition:none!important}
.h-tick,.h-under,.h-done-tick{stroke-dashoffset:0}
}

/* ---- Pharma ---- */

@keyframes p-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
.p-in{animation:p-rise .9s cubic-bezier(.2,.8,.2,1) both}
.p-d1{animation-delay:.15s}.p-d2{animation-delay:.3s}.p-d3{animation-delay:.45s}.p-d4{animation-delay:.6s}.p-d5{animation-delay:.8s}
@keyframes p-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
.p-float{animation:p-float 5s ease-in-out infinite}
@keyframes p-blob{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(60px,-40px) scale(1.12)}66%{transform:translate(-40px,30px) scale(.92)}}
.p-blob{position:absolute;border-radius:999px;filter:blur(80px);animation:p-blob var(--t) ease-in-out infinite}

/* The laptop: its bars grow, its screen glows */
@keyframes p-bar{from{transform:scaleY(0)}to{transform:scaleY(1)}}
.p-bar{transform-origin:bottom;animation:p-bar 1s cubic-bezier(.2,.8,.2,1) both}
/* The phone: a laser sweeps the barcode, then the item drops into the cart */
@keyframes p-laser{0%,100%{transform:translateY(-34px)}50%{transform:translateY(34px)}}
.p-laser{animation:p-laser 2.2s ease-in-out infinite}
@keyframes p-toast{0%,55%{opacity:0;transform:translateY(14px)}65%,92%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-6px)}}
.p-toast{animation:p-toast 4.4s ease-in-out infinite}
@keyframes p-phone{0%,100%{transform:rotate(-6deg) translateY(0)}50%{transform:rotate(-4deg) translateY(-14px)}}
.p-phone{animation:p-phone 6s ease-in-out infinite}
@keyframes p-chip{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.p-chip{animation:p-chip var(--t) ease-in-out infinite;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}

@keyframes p-marquee{from{transform:translateX(0)}to{transform:translateX(50%)}}
.p-marquee{display:flex;width:max-content;animation:p-marquee 36s linear infinite}

.p-tab{transition:background-color .25s,color .25s}
@keyframes p-panel{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.p-panel{animation:p-panel .45s cubic-bezier(.2,.8,.2,1) both}

.p-card{transition:transform .4s cubic-bezier(.2,.8,.2,1),box-shadow .4s}
.p-card:hover{transform:translateY(-8px);box-shadow:0 26px 50px -26px rgba(20,48,74,.45)}
.p-btn{transition:transform .25s,box-shadow .25s}
.p-btn:hover{transform:translateY(-3px);box-shadow:0 12px 26px -12px rgba(20,48,74,.6)}
@keyframes p-pulse{0%{box-shadow:0 0 0 0 rgba(17,137,111,.45)}100%{box-shadow:0 0 0 18px rgba(17,137,111,0)}}
.p-pulse{animation:p-pulse 2s ease-out infinite}
details summary{cursor:pointer;list-style:none}
details summary::-webkit-details-marker{display:none}
details[open] .p-plus{transform:rotate(45deg)}
.p-plus{transition:transform .3s}

@supports (animation-timeline: view()){
@keyframes p-reveal{from{opacity:0;transform:translateY(60px) scale(.97)}to{opacity:1;transform:none}}
.p-reveal{animation:p-reveal linear both;animation-timeline:view();animation-range:entry 0% cover 28%}
@keyframes p-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.p-track{transform-origin:right center;animation:p-grow linear both;animation-timeline:view();animation-range:entry 20% cover 55%}
@keyframes p-pop{0%{opacity:0;transform:scale(.4)}70%{opacity:1;transform:scale(1.12)}100%{transform:none}}
.p-step{animation:p-pop linear both;animation-timeline:view();animation-range:entry 30% cover 45%}
}
@media (prefers-reduced-motion: reduce){
*,*::before,*::after{animation:none!important;transition:none!important}
}

/* ---- Market ---- */
@keyframes m-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
.m-in{animation:m-rise .9s cubic-bezier(.2,.8,.2,1) both}
.m-d1{animation-delay:.15s}.m-d2{animation-delay:.3s}.m-d3{animation-delay:.45s}.m-d4{animation-delay:.6s}
@keyframes m-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
.m-float{animation:m-float 5s ease-in-out infinite}
@keyframes m-blob{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(60px,-40px) scale(1.12)}66%{transform:translate(-40px,30px) scale(.92)}}
.m-blob{position:absolute;border-radius:999px;filter:blur(80px);animation:m-blob var(--t) ease-in-out infinite}
/* Products drop into the cart, one after another, again and again */
@keyframes m-drop{0%{opacity:0;transform:translateY(-140px) rotate(var(--r))}12%{opacity:1}30%,80%{opacity:1;transform:translateY(0) rotate(var(--r))}92%,100%{opacity:0;transform:translateY(0) rotate(var(--r))}}
.m-item{position:absolute;bottom:58px;border-radius:10px;animation:m-drop 4.8s cubic-bezier(.5,0,.3,1.2) infinite}
@keyframes m-cart{0%,100%{transform:translateX(0)}50%{transform:translateX(-10px)}}
.m-cart{animation:m-cart 4.8s ease-in-out infinite}
@keyframes m-draw{to{stroke-dashoffset:0}}
.m-tick{stroke-dasharray:140;stroke-dashoffset:140;animation:m-draw 1s ease-out .6s forwards}
@keyframes m-shine{0%{background-position:200% 0}100%{background-position:-200% 0}}
.m-soon{background:linear-gradient(110deg,#1f1f1f 35%,#5a5a5a 50%,#1f1f1f 65%);background-size:300% 100%;animation:m-shine 3s linear infinite}
.m-btn{transition:transform .25s,box-shadow .25s}
.m-btn:hover{transform:translateY(-3px);box-shadow:0 12px 26px -12px rgba(31,31,31,.55)}
.m-card{transition:transform .4s cubic-bezier(.2,.8,.2,1),box-shadow .4s}
.m-card:hover{transform:translateY(-8px);box-shadow:0 26px 50px -26px rgba(31,31,31,.4)}
@supports (animation-timeline: view()){
@keyframes m-reveal{from{opacity:0;transform:translateY(60px) scale(.97)}to{opacity:1;transform:none}}
.m-reveal{animation:m-reveal linear both;animation-timeline:view();animation-range:entry 0% cover 28%}
}
@media (prefers-reduced-motion: reduce){
*,*::before,*::after{animation:none!important;transition:none!important}
.m-tick{stroke-dashoffset:0}
}

/* ---- The menu button: only on a phone ---- */
.menu-btn{display:none;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #e5e7eb;border-radius:12px;background:#ffffff;color:#111827;cursor:pointer;flex-shrink:0}
.menu-btn .menu-close{display:none}
.site-header.open .menu-btn .menu-open{display:none}
.site-header.open .menu-btn .menu-close{display:block}

/* ---- Tablets and phones ---- */
@media (max-width: 860px){
  .sec{padding-top:64px!important;padding-bottom:64px!important;padding-inline:20px!important}
  .hero-in{padding-top:40px!important;padding-bottom:72px!important;gap:40px!important}
}

/* ---- Phones ---- */
@media (max-width: 760px){
  /* One tidy bar: the mark, the page's main button, and a menu for the rest */
  .site-bar.sec{padding:10px 16px!important;flex-wrap:nowrap!important;gap:10px!important}
  .site-nav{margin-inline-start:auto!important;flex-wrap:nowrap!important}
  .site-bar > span{white-space:nowrap;font-size:16px!important}
  .site-nav .nav-link{display:none!important}
  .site-nav .nav-cta{margin:0!important;padding:10px 14px!important;font-size:15px!important;white-space:nowrap}
  .menu-btn{display:inline-flex}
  .site-header.open .site-nav{position:absolute;top:100%;inset-inline:0;z-index:20;display:flex!important;flex-direction:column;align-items:stretch!important;gap:2px!important;padding:8px 16px 16px;background:#ffffff;border-bottom:1px solid #e5e7eb;box-shadow:0 24px 40px -24px rgba(17,24,39,.35)}
  .site-header.open .site-nav .nav-link{display:block!important;padding:14px 12px!important;font-size:17px!important;border-radius:12px}
  .site-header.open .site-nav .nav-cta{margin-top:8px!important;text-align:center;padding:14px!important}

  .sec{padding-top:52px!important;padding-bottom:52px!important;padding-inline:18px!important;gap:28px!important}
  .hero-in{padding-top:28px!important;padding-bottom:64px!important;gap:28px!important}
  h1{font-size:38px!important;line-height:1.3!important}
  h2{font-size:28px!important}
  h3{font-size:20px!important}
  .hero-in p{font-size:17px!important}
  /* The hero's own buttons (links, not the demo till's) share the row evenly */
  .hero-in div:has(> a.h-btn),.hero-in div:has(> a.p-btn),.hero-in div:has(> a.m-btn){width:100%}
  .hero-in a.h-btn,.hero-in a.p-btn,.hero-in a.m-btn{flex:1 1 0;min-width:0;text-align:center;justify-content:center;padding:14px 12px!important;font-size:16px!important}

  /* The main page's screens: within the screen, the notes tucked in */
  .hero-visual{padding:34px 0 28px!important}
  .chip-a{left:-6px!important;top:-30px!important}

  /* حاضر فارما's devices: the laptop narrower, the phone and the note inside the screen */
  .laptop{width:calc(100% - 34px)!important;margin-left:34px}
  .laptop > div:last-child{margin:0 -6px!important}
  .p-phone{left:0!important;bottom:-34px!important;width:108px!important;border-radius:22px!important}
  .p-phone > div{height:196px!important}
  .p-chip{right:-8px!important;top:-58px!important}
  .hero-visual.p-in{min-height:0!important;padding:66px 0 30px!important}

  /* The closing calls and the release notes: centred, one under the other */
  .cta-sec{text-align:center;justify-content:center}
  .cta-sec > a,.cta-sec > div:has(> a){flex:1 1 100%!important;text-align:center}
  .whats-new{flex-direction:column;gap:6px!important}

  /* The tour: four tabs in one row */
  .tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-self:stretch!important;gap:4px!important}
  .tabs .p-tab{padding:10px 4px!important;font-size:15px!important}

  /* The steps: a timeline down the page */
  .track-line{display:none!important}
  .steps{display:flex!important;flex-direction:column;gap:24px!important}
  .steps::before{content:"";position:absolute;top:28px;bottom:28px;right:27px;width:3px;border-radius:3px;background:#dfe5ea}
  .steps li{display:grid!important;grid-template-columns:56px minmax(0,1fr);column-gap:16px;row-gap:2px;align-items:start!important;text-align:start!important}
  .steps li > span{grid-row:1 / span 2;width:56px!important;height:56px!important;font-size:22px!important;position:relative;z-index:1}
  .steps li > h3,.steps li > p{grid-column:2;max-width:none!important}

  /* Cards a little tighter */
  .h-card > div:first-child{padding:30px 20px!important;min-height:130px!important}
  .h-card > div:last-child{padding:22px 20px 24px!important}
  .h-why,.p-card,.m-card{padding:20px!important}
  details{padding:16px 18px!important}
  details summary{font-size:17px!important}

  .h-marquee > div,.p-marquee > div{font-size:15px!important;gap:26px!important}

  /* حاضر ماركت's cart, scaled to the screen */
  .cart-art{zoom:.7}

  /* The footer, centred */
  .site-foot{flex-direction:column;align-items:center!important;text-align:center;gap:10px!important;padding:24px 18px!important}
  .site-foot > *{margin-inline-start:0!important}
  .site-foot nav{justify-content:center}
}

/* Narrow phones: the product pages keep the product's name, the mark alone stands for حاضر */
@media (max-width: 440px){
  .brand-word{display:none}
  .site-bar.sec{gap:8px!important}
  .site-bar > span[aria-hidden]{display:none}
  .site-nav .nav-cta{padding:10px 12px!important}
  .units{display:none!important}
}
