/* «آزمایشگاه هیرو» (/test) — docs/HERO-SLIDER-LAB-PLAN.md, v2 (2026-10-16).
   The hero reuses .hero--home (background, dark mode and spacing are the homepage's own); everything below is
   prefixed .hl / .hlp and only exists on the lab page. Text colours are driven by variables set on #hero-lab by the
   lab menu (ink / card / size / palette / accent); the #hero-lab id is only here to win over the homepage's own
   hero text rules in every theme. Colours are rgba()/rgb()/tokens, no new hex. */

@property --hl-tint-c { syntax: '<color>'; inherits: true; initial-value: rgba(0,0,0,0); }

/* ---------- variables ---------- */
#hero-lab {
  --hl-tint-c: rgba(0,0,0,0);
  --hl-title: var(--color-accent-700);
  --hl-body: rgba(42, 67, 53, .72);
  --hl-label: rgba(42, 67, 53, .7);
  --hl-line: rgba(42, 67, 53, .22);
  --hl-chip-bg: rgba(255, 255, 255, .6);
  --hl-card-bg: transparent;
  --hl-card-bd: transparent;
  --hl-card-sh: none;
  --hl-acc: var(--color-accent-700);
  --hl-acc-ink: var(--lt-ffffff, #fff);
}
html[data-theme="dark"] #hero-lab {
  --hl-title: rgb(232, 242, 236); --hl-body: rgba(220, 231, 224, .9); --hl-label: rgba(210, 226, 216, .8);
  --hl-line: rgba(220, 231, 224, .26); --hl-chip-bg: rgba(255, 255, 255, .07);
  --hl-acc: rgb(120, 190, 150); --hl-acc-ink: rgb(10, 28, 20);
}
/* ink (light theme only) */
html:not([data-theme="dark"]) #hero-lab[data-hl-ink="dark"]  { --hl-title: rgb(12, 38, 27); --hl-body: rgb(22, 52, 38); --hl-label: rgb(30, 62, 46); --hl-line: rgba(22, 52, 38, .34); }
html:not([data-theme="dark"]) #hero-lab[data-hl-ink="xdark"] { --hl-title: rgb(5, 22, 14);  --hl-body: rgb(9, 33, 22);  --hl-label: rgb(16, 44, 30); --hl-line: rgba(9, 33, 22, .45); }
/* card behind the text */
html:not([data-theme="dark"]) #hero-lab[data-hl-card="glass"] { --hl-card-bg: rgba(255, 255, 255, .56); --hl-card-bd: rgba(255, 255, 255, .7); --hl-card-sh: 0 18px 44px -26px rgba(20, 50, 36, .45); }
html:not([data-theme="dark"]) #hero-lab[data-hl-card="white"] { --hl-card-bg: rgba(255, 255, 255, .94); --hl-card-bd: rgba(42, 67, 53, .1); --hl-card-sh: 0 20px 48px -26px rgba(20, 50, 36, .5); }
html[data-theme="dark"] #hero-lab[data-hl-card="glass"] { --hl-card-bg: rgba(10, 22, 16, .5); --hl-card-bd: rgba(220, 231, 224, .14); --hl-card-sh: 0 18px 44px -26px rgba(0, 0, 0, .6); }
html[data-theme="dark"] #hero-lab[data-hl-card="white"] { --hl-card-bg: rgba(22, 36, 29, .94); --hl-card-bd: rgba(220, 231, 224, .14); --hl-card-sh: 0 20px 48px -26px rgba(0, 0, 0, .6); }
/* accent */
#hero-lab[data-hl-acc="peach"] { --hl-acc: rgb(190, 98, 58); --hl-acc-ink: var(--lt-ffffff, #fff); }
html[data-theme="dark"] #hero-lab[data-hl-acc="peach"] { --hl-acc: rgb(226, 140, 98); --hl-acc-ink: rgb(40, 16, 6); }

/* ---------- palettes ---------- */
html:not([data-theme="dark"]) #hero-lab[data-hl-pal="mist"]  { background: linear-gradient(160deg, rgb(240, 247, 243) 0%, rgb(224, 239, 231) 58%, rgb(206, 229, 215) 100%); }
html:not([data-theme="dark"]) #hero-lab[data-hl-pal="ivory"] { background: linear-gradient(160deg, rgb(251, 247, 240) 0%, rgb(244, 237, 224) 56%, rgb(229, 237, 227) 100%); }
html body #hero-lab[data-hl-pal="deep"] {
  background: linear-gradient(160deg, rgb(18, 42, 32) 0%, rgb(27, 60, 46) 55%, rgb(38, 80, 60) 100%);
  --hero-fx-ink: 190, 225, 205; --hero-fx-glow: 150, 225, 185;
  --hl-title: rgb(244, 250, 246); --hl-body: rgb(224, 237, 229); --hl-label: rgb(196, 222, 207);
  --hl-line: rgba(224, 237, 229, .32); --hl-chip-bg: rgba(255, 255, 255, .09);
  --hl-acc: rgb(143, 214, 176); --hl-acc-ink: rgb(10, 30, 21);
  --hl-card-bg: rgba(8, 22, 16, .5); --hl-card-bd: rgba(224, 237, 229, .14); --hl-card-sh: 0 18px 44px -26px rgba(0, 0, 0, .6);
}
html body #hero-lab[data-hl-pal="deep"][data-hl-card="none"] { --hl-card-bg: transparent; --hl-card-bd: transparent; --hl-card-sh: none; }
html body #hero-lab[data-hl-pal="deep"][data-hl-card="white"] { --hl-card-bg: rgba(8, 22, 16, .86); }
html body #hero-lab[data-hl-pal="deep"][data-hl-acc="peach"] { --hl-acc: rgb(236, 160, 120); --hl-acc-ink: rgb(40, 16, 6); }

/* ---------- layout ---------- */
#hero-lab .hl { position: relative; }
.hl__tint {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 42%, var(--hl-tint-c), transparent 78%);
  transition: --hl-tint-c .9s var(--ease);
}
html[data-theme="dark"] .hl__tint, html body #hero-lab[data-hl-pal="deep"] .hl__tint { opacity: .45; }

#hero-lab .label.hl__label { display: block; margin-bottom: 10px; color: var(--hl-label); opacity: 1; font-weight: 500; font-size: 14px; }

.hl__stage {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 720px; margin-inline: auto; padding: 22px 18px 24px; border-radius: 26px;
  background: var(--hl-card-bg); border: 1px solid var(--hl-card-bd); box-shadow: var(--hl-card-sh);
  -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1);
}
#hero-lab[data-hl-card="none"] .hl__stage { -webkit-backdrop-filter: none; backdrop-filter: none; padding-inline: 0; }
.hl__ask { width: 100%; margin-bottom: 14px; }
.hl__body { width: 100%; will-change: opacity, transform; transition: opacity .24s var(--ease), transform .24s var(--ease), filter .24s var(--ease); }
.hl__measure { position: absolute; visibility: hidden; pointer-events: none; inset-inline-start: 0; top: 0; }
.hl__body.is-pre { transition: none; }
.hl__body[data-tr="fade"].is-out { opacity: 0; transform: translateY(8px); }
.hl__body[data-tr="slide"].is-out { opacity: 0; transform: translateX(var(--hl-dx, 36px)); }
.hl__body[data-tr="slide"].is-pre { transform: translateX(calc(var(--hl-dx, 36px) * -1)); }
.hl__body[data-tr="blur"].is-out { opacity: 0; filter: blur(10px); transform: scale(.985); }

/* ---------- text ---------- */
#hero-lab .hero__title--home, #hero-lab .hl-orig-title { color: var(--hl-title); }
#hero-lab p.lead.hero__lead--home { color: var(--hl-body); }
#hero-lab .hl-title { margin: 0; font-weight: 800; letter-spacing: 0; line-height: 1.5; font-size: clamp(22px, 2.6vw, 30px); max-width: none; }
#hero-lab p.lead.hl-hook { max-width: 560px; margin: 12px auto 0; line-height: 1.95; font-size: 16px; font-weight: 500; }
#hero-lab[data-hl-size="large"] .hl-title { font-size: clamp(26px, 3.2vw, 38px); }
#hero-lab[data-hl-size="large"] p.lead.hl-hook { font-size: 18px; max-width: 600px; }
#hero-lab .hl-slide { display: flex; flex-direction: column; align-items: center; }
.hl-top { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 22px; margin-bottom: 6px; }
.hl-count { font-size: 12.5px; color: var(--hl-label); }
.hl-pick { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--r-pill); background: var(--hl-acc); color: var(--hl-acc-ink); }
.hl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.hl-chips li { font-size: 13.5px; font-weight: 500; padding: 4px 12px; border-radius: var(--r-pill); background: var(--hl-chip-bg); border: 1px solid var(--hl-line); color: var(--hl-title); }
.hl-chips li.is-free { background: var(--hl-acc); border-color: var(--hl-acc); color: var(--hl-acc-ink); font-weight: 700; }
#hero-lab .hero__actions { margin-top: 20px; }
#hero-lab .btn--ghost { color: var(--hl-title); border-color: var(--hl-title); }
#hero-lab .btn--ghost:hover { background: var(--hl-title); color: var(--hl-card-bg, #fff); }
html:not([data-theme="dark"]) #hero-lab .btn--ghost:hover { color: var(--lt-ffffff, #fff); }
html body #hero-lab[data-hl-pal="deep"] .btn--ghost:hover { color: rgb(10, 30, 21); }
/* accent button */
#hero-lab[data-hl-acc="peach"] .mpt-cta { background: linear-gradient(135deg, rgb(232, 150, 108) 0%, rgb(205, 112, 70) 50%, rgb(184, 92, 54) 100%); box-shadow: 0 14px 30px -12px rgba(160, 80, 40, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }
#hero-lab[data-hl-acc="peach"] .mpt-cta::after { background: radial-gradient(60% 70% at 50% 60%, rgba(232, 150, 108, .55), transparent 75%); }
#hero-lab[data-hl-acc="peach"][data-hl-pal="deep"] .mpt-cta { color: rgb(40, 16, 6); }

/* ---------- the four professional-test cards ---------- */
.hl-ask__q { margin: 0 auto 14px; font-weight: 800; font-size: 20px; line-height: 1.7; color: var(--hl-title); max-width: none; }
.hl-ask + .hl__body { margin-top: 4px; }
.hl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.hl-card {
  display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center; justify-content: flex-start; padding: 14px 10px 12px; cursor: pointer; font: inherit; text-decoration: none;
  color: var(--hl-title); background: var(--hl-chip-bg); border: 1.5px solid var(--hl-line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hl-card__tag { font-size: 11.5px; font-weight: 700; color: var(--hl-label); letter-spacing: 0; }
.hl-card b { font-size: 14.5px; line-height: 1.7; }
.hl-card small { font-size: 12px; line-height: 1.8; color: var(--hl-body); }
.hl-card:hover { border-color: var(--hl-acc); transform: translateY(-2px); }
.hl-card.is-on { border-color: var(--hl-acc); box-shadow: 0 0 0 2px var(--hl-acc) inset; }
.hl-card.is-on .hl-card__tag { color: var(--hl-acc); }
.hl__stage { max-width: 940px; }

/* ---------- pixel overlay: covers the whole hero ---------- */
.hl__px { position: absolute; inset: 0; display: grid; pointer-events: none; z-index: 5; }
.hl__px i {
  display: block; opacity: 0; transition: opacity .22s linear; margin: -.5px;
  background: linear-gradient(var(--hl-tint-c), var(--hl-tint-c)), rgb(214, 233, 222);
}
html[data-theme="dark"] .hl__px i, html body #hero-lab[data-hl-pal="deep"] .hl__px i { background: linear-gradient(var(--hl-tint-c), var(--hl-tint-c)), rgb(20, 36, 28); }
html:not([data-theme="dark"]) #hero-lab[data-hl-pal="ivory"] .hl__px i { background: linear-gradient(var(--hl-tint-c), var(--hl-tint-c)), rgb(244, 237, 224); }
.hl__px.is-on i { opacity: 1; }

@media (max-width: 900px) { .hl-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .hl__stage { padding: 18px 14px 20px; border-radius: 22px; }
  #hero-lab .hl-title { font-size: clamp(22px, 6.2vw, 26px); max-width: 340px; margin-inline: auto; }
  #hero-lab[data-hl-size="large"] .hl-title { font-size: clamp(24px, 6.8vw, 28px); }
  #hero-lab p.lead.hl-hook { font-size: 15.5px; }
  #hero-lab[data-hl-size="large"] p.lead.hl-hook { font-size: 16.5px; max-width: 340px; }
  .hl-ask__q { font-size: 17px; }
  .hl-cards { grid-template-columns: 1fr; gap: 8px; }
  .hl-card { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: start; gap: 2px 10px; padding: 10px 14px; }
  .hl-card__tag { flex-basis: 100%; }
  .hl-card small { flex-basis: 100%; font-size: 12px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- lab menu ---------- */
.hlp-fab {
  position: fixed; z-index: 9000; inset-inline-start: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 14px; border-radius: var(--r-pill);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  color: var(--on-ink, #fff); background: var(--ink, #17191c); border: 0; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5);
}
.hlp {
  position: fixed; z-index: 9001; inset-inline-start: 14px; bottom: 70px; width: min(360px, calc(100vw - 28px)); max-height: min(76vh, 700px); overflow-y: auto;
  padding: 14px 16px 16px; border-radius: 20px; text-align: start;
  background: var(--card, #fff); color: var(--ink, #17191c); border: 1px solid var(--border, rgba(0, 0, 0, .12)); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
}
.hlp.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.hlp__head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.hlp__x { font-size: 24px; line-height: 1; width: 34px; height: 34px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.hlp__next { display: block; width: 100%; margin-top: 8px; min-height: 46px; border-radius: var(--r-pill); border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; color: var(--lt-ffffff, #fff); background: linear-gradient(135deg, var(--lc-5f9a7c, #5f9a7c), var(--lc-2a6047, #2a6047)); }
.hlp__h { margin: 16px 0 6px; font-size: 13px; font-weight: 800; opacity: .75; max-width: none; padding-top: 10px; border-top: 1px solid var(--border, rgba(0, 0, 0, .1)); }
.hlp__s { margin: 10px 0 5px; font-size: 12px; opacity: .6; max-width: none; }
.hlp__modes { display: grid; gap: 6px; }
.hlp-mode { text-align: start; padding: 8px 12px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; background: transparent; border: 1.5px solid var(--border, rgba(0, 0, 0, .14)); }
.hlp-mode b { display: block; font-size: 14px; }
.hlp-mode small { display: block; font-size: 12px; opacity: .65; line-height: 1.6; }
.hlp-mode.is-on { border-color: var(--lc-3d7a5d, #3d7a5d); background: rgba(95, 154, 124, .14); }
.hlp-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hlp-seg button { min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); cursor: pointer; font: inherit; font-size: 13px; color: inherit; background: transparent; border: 1.5px solid var(--border, rgba(0, 0, 0, .14)); }
.hlp-seg button.is-on { background: var(--lc-3d7a5d, #3d7a5d); border-color: var(--lc-3d7a5d, #3d7a5d); color: var(--lt-ffffff, #fff); }
.hlp__sws { display: grid; gap: 2px; margin-top: 6px; }
.hlp-sw { display: flex; align-items: center; gap: 10px; min-height: 38px; cursor: pointer; font-size: 14px; }
.hlp-sw input { position: absolute; opacity: 0; pointer-events: none; }
.hlp-sw__k { flex: none; width: 38px; height: 22px; border-radius: 22px; position: relative; background: rgba(120, 120, 120, .35); transition: background var(--dur) var(--ease); }
.hlp-sw__k::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--lt-ffffff, #fff); transition: transform var(--dur) var(--ease); }
.hlp-sw input:checked + .hlp-sw__k { background: var(--lc-3d7a5d, #3d7a5d); }
.hlp-sw input:checked + .hlp-sw__k::after { transform: translateX(-16px); }
.hlp-sw input:focus-visible + .hlp-sw__k { outline: 2px solid var(--lc-3d7a5d, #3d7a5d); outline-offset: 2px; }
.hlp__row { display: flex; gap: 8px; margin-top: 14px; }
.hlp__row button { flex: 1; min-height: 40px; border-radius: var(--r-pill); cursor: pointer; font: inherit; font-size: 13px; color: inherit; background: transparent; border: 1.5px solid var(--border, rgba(0, 0, 0, .18)); }
.hlp__note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.8; opacity: .6; max-width: none; }
@media (max-width: 600px) {
  .hlp { inset-inline: 10px; width: auto; bottom: 68px; max-height: 68vh; }
}
@media (prefers-reduced-motion: reduce) {
  .hl__body, .hl__px i, .hl__tint { transition: none !important; }
}

/* =====================================================================================================
   v3 (2026-10-16): no box by default (soft halo), corner-radius control, hero-as-floating-card, and a set of
   "make it alive" features. All driven by data-hl-* attributes that the lab menu sets on #hero-lab.
   ===================================================================================================== */

/* ---------- corner radius: one knob for blocks (cards, bubbles, image), pills (buttons, chips) and the hero itself ---------- */
#hero-lab { --hl-rb: 22px; --hl-rp: 999px; --hl-rh: 34px; --hl-halo: rgba(255, 255, 255, .6); --hl-mark: rgba(95, 154, 124, .32); --hl-g1: rgb(22, 84, 60); --hl-g2: rgb(60, 150, 120); }
#hero-lab[data-hl-rad="0"] { --hl-rb: 0px;  --hl-rp: 0px;   --hl-rh: 0px; }
#hero-lab[data-hl-rad="1"] { --hl-rb: 6px;  --hl-rp: 6px;   --hl-rh: 12px; }
#hero-lab[data-hl-rad="2"] { --hl-rb: 14px; --hl-rp: 14px;  --hl-rh: 24px; }
#hero-lab[data-hl-rad="3"] { --hl-rb: 22px; --hl-rp: 999px; --hl-rh: 36px; }
#hero-lab[data-hl-rad="4"] { --hl-rb: 32px; --hl-rp: 999px; --hl-rh: 60px; }
html[data-theme="dark"] #hero-lab { --hl-halo: rgba(8, 18, 13, .55); --hl-mark: rgba(120, 190, 150, .3); --hl-g1: rgb(160, 225, 190); --hl-g2: rgb(240, 200, 150); }
html body #hero-lab[data-hl-pal="deep"] { --hl-halo: rgba(6, 18, 13, .5); --hl-mark: rgba(143, 214, 176, .3); --hl-g1: rgb(170, 232, 200); --hl-g2: rgb(246, 190, 150); }
#hero-lab[data-hl-acc="peach"] { --hl-mark: rgba(232, 150, 108, .42); --hl-g2: rgb(214, 110, 70); }

#hero-lab { border-radius: 0; } /* the hero's corners stay square like the homepage; only the floating-card option rounds them */
#hero-lab[data-hl-float="1"] { margin: 12px 12px 0; border-radius: var(--hl-rh); min-height: calc(100svh - var(--header-h) - 12px); }
#hero-lab .mpt-cta, #hero-lab .btn, #hero-lab .hl-chips li, #hero-lab .hl-pick { border-radius: var(--hl-rp); }
#hero-lab .hl-card, #hero-lab .hl__stage, #hero-lab .hl-img { border-radius: var(--hl-rb); }
#hero-lab[data-hl-rad="0"] .mpt-cta::before { border-radius: 0; }

/* ---------- no box around everything: a soft halo instead ---------- */
#hero-lab[data-hl-card="none"] .hl__stage, #hero-lab[data-hl-card="halo"] .hl__stage { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-inline: 6px; }
#hero-lab[data-hl-card="halo"] .hl__stage::before {
  content: ''; position: absolute; inset: -36px -56px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, var(--hl-halo), transparent);
}

/* ---------- title styles ---------- */
#hero-lab[data-hl-tt="mark"] .hl-title__t { background: linear-gradient(transparent 58%, var(--hl-mark) 58% 92%, transparent 92%); padding: 0 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
#hero-lab[data-hl-tt="grad"] .hl-title__t {
  background: linear-gradient(90deg, var(--hl-g1), var(--hl-g2), var(--hl-g1)); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: hl-shimmer 7s linear infinite;
}
@keyframes hl-shimmer { to { background-position: -220% 0; } }
.hl-wave { display: block; width: 112px; height: 14px; margin: 4px auto 0; fill: none; stroke: var(--hl-acc); stroke-width: 2.4; stroke-linecap: round; overflow: visible; }
.hl-wave path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hl-draw 1.2s .25s var(--ease) forwards; }
@keyframes hl-draw { to { stroke-dashoffset: 0; } }
.hl-hook.is-typing::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 3px; vertical-align: -.15em; background: var(--hl-acc); animation: hl-blink .9s steps(2, start) infinite; }
@keyframes hl-blink { to { visibility: hidden; } }

/* ---------- staggered entrance ---------- */
#hero-lab[data-hl-stagger="1"] .hl-slide > * { opacity: 0; animation: hl-up .6s var(--ease) forwards; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(1) { animation-delay: .02s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(2) { animation-delay: .09s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(3) { animation-delay: .16s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(4) { animation-delay: .23s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(5) { animation-delay: .30s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(6) { animation-delay: .37s; }
#hero-lab[data-hl-stagger="1"] .hl-slide > :nth-child(7) { animation-delay: .44s; }
@keyframes hl-up { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- test image (top, or beside the text on desktop) ---------- */
.hl-img { width: 128px; height: 128px; margin: 2px auto 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 8px); background: radial-gradient(closest-side, var(--hl-tint-c), transparent); }
.hl-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; animation: hl-float 7s ease-in-out infinite; }
html[data-theme="dark"] .hl-img img, html body #hero-lab[data-hl-pal="deep"] .hl-img img { mix-blend-mode: normal; border-radius: inherit; }
@keyframes hl-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(1.2deg); } }
@media (min-width: 760px) {
  #hero-lab[data-hl-img="side"] .hl-slide { display: grid; grid-template-columns: 190px 1fr; column-gap: 24px; text-align: start; align-items: center; }
  #hero-lab[data-hl-img="side"] .hl-slide > * { grid-column: 2; }
  #hero-lab[data-hl-img="side"] .hl-slide > .hl-img { grid-column: 1; grid-row: 1 / span 7; width: 190px; height: 190px; margin: 0; }
  #hero-lab[data-hl-img="side"] .hl-top, #hero-lab[data-hl-img="side"] .hl-chips, #hero-lab[data-hl-img="side"] .hero__actions { justify-content: flex-start; }
  #hero-lab[data-hl-img="side"] p.lead.hl-hook, #hero-lab[data-hl-img="side"] .hl-wave { margin-inline: 0; }
  #hero-lab[data-hl-img="side"] .hl__stage { max-width: 820px; }
}

/* ---------- sparkles ---------- */
.hl__sparks { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: none; overflow: hidden; }
#hero-lab[data-hl-sparks="1"] .hl__sparks { display: block; }
.hl__sparks i {
  position: absolute; width: var(--s); height: var(--s); opacity: 0; background: rgba(232, 150, 108, .9);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: hl-twinkle var(--d) ease-in-out var(--dl) infinite; translate: calc(var(--px, 0) * -12px) calc(var(--py, 0) * -10px);
}
.hl__sparks i:nth-child(3n+2) { background: rgba(120, 190, 150, .9); }
.hl__sparks i:nth-child(3n) { background: rgba(255, 255, 255, .95); }
@keyframes hl-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* ---------- pulsing button, flowing background, touch ripple ---------- */
#hero-lab[data-hl-pulse="1"] .mpt-cta { animation: hl-pulse 2.6s ease-out infinite; }
@keyframes hl-pulse { 0% { box-shadow: 0 14px 30px -12px rgba(36, 74, 57, .65), 0 0 0 0 rgba(95, 154, 124, .5); } 70%, 100% { box-shadow: 0 14px 30px -12px rgba(36, 74, 57, .65), 0 0 0 20px rgba(95, 154, 124, 0); } }
#hero-lab[data-hl-acc="peach"][data-hl-pulse="1"] .mpt-cta { animation-name: hl-pulse-peach; }
@keyframes hl-pulse-peach { 0% { box-shadow: 0 14px 30px -12px rgba(160, 80, 40, .6), 0 0 0 0 rgba(232, 150, 108, .55); } 70%, 100% { box-shadow: 0 14px 30px -12px rgba(160, 80, 40, .6), 0 0 0 20px rgba(232, 150, 108, 0); } }
html body #hero-lab[data-hl-flow="1"][data-hl-pal] { background-size: 240% 240%; animation: hl-flow 22s ease-in-out infinite alternate; }
@keyframes hl-flow { from { background-position: 0% 20%; } to { background-position: 100% 80%; } }
.hl-card { position: relative; overflow: hidden; }
.hl-rip { position: absolute; border-radius: 50%; background: var(--hl-acc); opacity: .3; transform: scale(0); animation: hl-rip .65s ease-out forwards; pointer-events: none; }
@keyframes hl-rip { to { transform: scale(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #hero-lab[data-hl-stagger="1"] .hl-slide > * { opacity: 1; animation: none; }
  .hl-img img, .hl__sparks i, #hero-lab .mpt-cta, #hero-lab[data-hl-tt="grad"] .hl-title__t, html body #hero-lab[data-hl-flow="1"][data-hl-pal] { animation: none; }
  .hl-wave path { stroke-dashoffset: 0; animation: none; }
}
@media (max-width: 600px) { #hero-lab[data-hl-float="1"] { margin: 8px 8px 0; } .hl-img { width: 104px; height: 104px; } }

/* the real homepage: hero bottom stays square like the rest of the site; the lab's page-wide radius never applies there */
#hero-lab[data-hl-home="1"] { border-radius: 0; }

/* «نام تست (توضیح)»: the bracketed part stays in one piece and moves to line two when it does not fit */
.hl-par { display: inline-block; white-space: nowrap; }

/* desktop only (4 cards in a row): the bracketed part always sits on its own second line so all four titles have the same shape;
   on tablet and phone it just follows the title and drops down only when it does not fit */
@media (min-width: 901px) { .hl-card .hl-par { display: block; } }

/* first-screen fit: fallback before JS measures (hero-lab.js fitHero sets the exact value); equal space above the label and under the buttons */
@media (min-width: 601px) {
  #hero-lab { min-height: calc(100svh - var(--header-h) - var(--announce-h, 0px) - 7px); }
  #hero-lab[data-hl-card="none"] .hl__stage, #hero-lab[data-hl-card="halo"] .hl__stage { padding-bottom: 0; }
}

/* /test: the hero stacks above the tests section below it, so its bottom shadow keeps falling onto that section (tests-lab.css) */
#hero-lab:not([data-hl-home]) { position: relative; z-index: 2; }
