/* =====================================================================
   BehKav — site layer (loaded after nk.css)
   Teal identity, home hero, dark scene, questions, closing, demo form
   ===================================================================== */
:root {
  --brand: #17A696; --brand-deep: #0E7F73; --on-brand: #04211D;
  --bg: #070B0B; --bg-2: #0C1212; --bg-3: #121A1A;
  --ink: #E9EEEC; --ink-2: #9AA5A2; --ink-3: #5F6B68; --ink-4: #232C2B;
  --line: rgba(233, 238, 236, .10); --line-2: rgba(233, 238, 236, .22);
  --brand-ink: #35D0BE; --brand-soft: rgba(23, 166, 150, .16); --sel: rgba(23, 166, 150, .5);
  --bk-warn: #D9A441; --bk-red: #E5484D;
}
[data-theme="light"] {
  --bg: #F1F3F0; --bg-2: #E7EBE7; --bg-3: #DCE2DE;
  --ink: #0E1413; --ink-2: #52605C; --ink-3: #84908C; --ink-4: #D2D9D5;
  --line: rgba(14, 20, 19, .11); --line-2: rgba(14, 20, 19, .24);
  --brand-ink: #0E7F73; --brand-soft: rgba(23, 166, 150, .10); --sel: rgba(23, 166, 150, .28);
  --bk-warn: #A8740F; --bk-red: #C22F35;
}
.btn--solid { color: var(--on-brand); }
.head-mark--bk { display: grid; place-items: center; }
.head-mark--bk img { width: clamp(120px, 16vw, 220px); height: auto; }

/* ---------- hero ---------- */
.bkh { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding-top: calc(var(--header-h) + clamp(20px, 4vh, 56px)); }
.bkh__in { width: 100%; }
.bkh__title { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(2.5rem, 5.9vw, 6.6rem); line-height: var(--lh-display); letter-spacing: var(--track-display); margin-top: clamp(12px, 2vh, 24px); text-wrap: balance; }
.bkh__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 72px); align-items: end; margin-top: clamp(14px, 2.4vh, 30px); }
.bkh__sum { max-width: 74ch; color: var(--ink-2); font-size: clamp(1rem, 1.1vw, 1.14rem); line-height: var(--lh-body); }
.bkh__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.bkh__scope { position: relative; flex: 1 1 auto; min-height: clamp(300px, 40vh, 480px); margin-top: clamp(24px, 4vh, 48px); border-block: 1px solid var(--line); overflow: hidden; cursor: crosshair; touch-action: pan-y; transition: border-color .25s; }
.bkh__scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bkh__rows { position: absolute; inset: 22px 0 58px; display: grid; grid-template-rows: repeat(5, 1fr); pointer-events: none; }
.bkh__ln { position: relative; }
.bkh__ln b { position: absolute; inset-inline-start: var(--gutter); top: 50%; transform: translateY(-150%); font: 500 .68rem/1 var(--font-mono); letter-spacing: .08em; color: var(--ink-3); transition: color .4s; }
:lang(fa) .bkh__ln b, :lang(ar) .bkh__ln b { font-family: var(--font-body); font-size: .74rem; letter-spacing: 0; }
.bkh__tag { position: absolute; left: calc(var(--x) * 100%); top: 50%; transform: translate(-50%, -110%) scale(.9); opacity: 0; padding: 5px 11px; border: 1px solid var(--bk-warn); background: var(--bg); color: var(--bk-warn); font-size: .78rem; line-height: 1.5; white-space: nowrap; transition: opacity .35s, transform .5s var(--ease-out); }
.bkh__ln.is-found .bkh__tag { opacity: 1; transform: translate(-50%, -150%) scale(1); }
.bkh__ln.is-found b { color: var(--bk-warn); }
.bkh__tag--ok { border-color: var(--accent-c); color: var(--on-brand); background: var(--accent-c); font-weight: 600; }
.bkh__scope.is-done .bkh__ln--ok .bkh__tag { opacity: 1; transform: translate(-50%, -150%) scale(1); transition-delay: .5s; }
.bkh__scope.is-done .bkh__ln--ok b { color: var(--brand-ink); }
.bkh__scope.is-done .bkh__ln.is-found .bkh__tag { opacity: .7; }
.bkh__scope.is-jolt { border-color: var(--bk-red); }
.bkh__hud { position: absolute; inset-inline: 0; bottom: 0; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .8rem; color: var(--ink-3); pointer-events: none; }
.bkh__count { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.bkh__count b { font: 600 1.05rem/1 var(--font-mono); color: var(--ink); }
.bkh__count i { font-style: normal; opacity: .5; }
.bkh__count em { font-style: normal; margin-inline-start: 8px; }
.bkh__scope.is-done .bkh__count b { color: var(--brand-ink); }
@media (max-width: 860px) {
  .bkh__row { grid-template-columns: 1fr; align-items: start; }
  .bkh__hint { display: none; }
  .bkh__hud { justify-content: flex-end; }
  .bkh__tag { font-size: .72rem; padding: 4px 8px; }
}

/* ---------- dark scene ---------- */
.bkd { position: relative; overflow: hidden; background: #040606; color: #ECEFEC; --lx: 50%; --ly: 30%; padding-block: clamp(170px, 30vh, 300px); transition: background-color .12s, color .12s; }
.bkd::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle 320px at var(--lx) var(--ly), rgba(255, 255, 255, .13), transparent 70%); pointer-events: none; }
.bkd__lit { position: absolute; inset: 0; -webkit-mask-image: radial-gradient(circle 270px at var(--lx) var(--ly), #000 35%, transparent 100%); mask-image: radial-gradient(circle 270px at var(--lx) var(--ly), #000 35%, transparent 100%); pointer-events: none; }
.bkd__lit span { position: absolute; left: min(var(--x), calc(100% - 46vw)); top: var(--y); max-width: 44vw; padding: 6px 12px; border: 1px solid #D9A441; color: #D9A441; font-size: .84rem; line-height: 1.5; }
.bkd__in { position: relative; }
.bkd .label { color: rgba(236, 239, 236, .55); }
.bkd__title { font-family: var(--font-head); font-weight: var(--w-head); font-size: var(--fs-h1); line-height: var(--lh-head); letter-spacing: var(--track-display); margin-top: 26px; max-width: 16ch; }
.bkd__body { margin-top: 22px; max-width: 46ch; font-size: var(--fs-lead); line-height: var(--lh-body); color: rgba(236, 239, 236, .62); }
.bkd__btn { margin-top: 34px; color: inherit; border-color: currentColor; }
.bkd__t2 { display: none; }
.bkd.is-on { background: #F3F5F1; color: #0E1413; }
.bkd.is-on::before { display: none; }
.bkd.is-on .bkd__lit { -webkit-mask-image: none; mask-image: none; }
.bkd.is-on .bkd__lit span { border-color: #0E7F73; color: #0E7F73; }
.bkd.is-on .label, .bkd.is-on .bkd__body { color: rgba(14, 20, 19, .62); }
.bkd.is-on .bkd__t1 { display: none; }
.bkd.is-on .bkd__t2 { display: inline; }
@media (max-width: 700px) { .bkd__lit span { font-size: .74rem; padding: 4px 8px; } }

/* ---------- questions ---------- */
.bkq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.bkq__grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.bkq__item { border-top: 1px solid var(--line); }
.bkq__item:last-child { border-bottom: 1px solid var(--line); }
.bkq__item summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 0; cursor: pointer; list-style: none; }
.bkq__item summary::-webkit-details-marker { display: none; }
.bkq__n { color: var(--ink-3); font-size: .78rem; }
.bkq__q { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: var(--lh-head); transition: color .25s; }
.bkq__item summary:hover .bkq__q, .bkq__item[open] .bkq__q { color: var(--brand-ink); }
.bkq__item i { position: relative; width: 16px; height: 16px; }
.bkq__item i::before, .bkq__item i::after { content: ""; position: absolute; inset: 7px 0; background: currentColor; transition: transform .35s var(--ease-out); }
.bkq__item i::after { transform: rotate(90deg); }
.bkq__item[open] i::after { transform: rotate(0); }
.bkq__item p { padding: 0 0 26px; padding-inline-start: 40px; max-width: 64ch; color: var(--ink-2); line-height: var(--lh-body); }
@media (max-width: 860px) { .bkq__grid { grid-template-columns: 1fr; } .bkq__grid .section-head { position: static; } .bkq__item p { padding-inline-start: 0; } }

/* ---------- closing ---------- */
.bkc { position: relative; overflow: hidden; background: var(--accent-c, #17A696); color: #04211D; padding-block: clamp(90px, 16vh, 190px); --lx: 50%; --ly: 50%; }
.bkc::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle 420px at var(--lx) var(--ly), rgba(255, 255, 255, .16), transparent 70%); pointer-events: none; }
.bkc .wrap { position: relative; }
.bkc .label { color: rgba(4, 33, 29, .7); }
.bkc .label .dm { background: #04211D; }
.bkc__title { font-family: var(--font-head); font-weight: var(--w-head); font-size: var(--fs-h1); line-height: var(--lh-head); letter-spacing: var(--track-display); margin-top: 28px; max-width: 17ch; }
.bkc__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; margin-top: clamp(30px, 5vh, 60px); }
.bkc__row p { max-width: 46ch; font-size: var(--fs-lead); line-height: var(--lh-body); color: rgba(4, 33, 29, .78); }
.bkc .bkc__btn, .p-behkav .bkc .bkc__btn { background: #04211D; border-color: #04211D; color: #EAF6F3; }
.p-behkav .bkc .bkc__btn:hover { background: #000; border-color: #000; color: #fff; }
.bk-home + .site-footer, .bk-home ~ .site-footer { border-top: 0; }

/* ---------- demo form ---------- */
.bkf__form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 24px; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-2); }
.bkf__f { display: grid; gap: 8px; align-content: start; }
.bkf__f--wide, .bkf__go { grid-column: 1 / -1; }
.bkf__f span { font-size: .82rem; color: var(--ink-2); }
.bkf__f input, .bkf__f textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg); color: var(--ink); font: inherit; transition: border-color .2s; }
.bkf__f input:focus, .bkf__f textarea:focus { outline: none; border-color: var(--brand-ink); }
.bkf__f textarea { resize: vertical; min-height: 110px; }
.bkf__f em { font-style: normal; font-size: .8rem; color: var(--bk-red); }
.bkf__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bkf { position: relative; }
.bkf__ok { display: flex; align-items: center; gap: 18px; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--brand-ink); border-radius: 4px; font-size: var(--fs-lead); }
.bkf__ok i { flex: none; width: 14px; height: 26px; border: solid var(--brand-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); margin: 0 10px 6px; }
@media (max-width: 760px) { .bkf__form { grid-template-columns: 1fr; } }

/* ---------- same decision, two ways (pointer moves the line) ---------- */
.bks { padding-top: clamp(70px, 12vh, 150px); }
.bks__stage { position: relative; height: clamp(440px, 64vh, 640px); margin-top: clamp(28px, 4vh, 56px); border-block: 1px solid var(--line); overflow: hidden; cursor: ew-resize; touch-action: pan-y; --sx: 50%; user-select: none; }
.bks__side { position: absolute; inset: 0; }
.bks__side--a { background: var(--bg-2); }
.bks__side--b { background: var(--bg); clip-path: inset(0 0 0 var(--sx)); }
.bks__cap { position: absolute; top: 22px; font-size: .8rem; color: var(--ink-3); }
.bks__side--a .bks__cap { left: var(--gutter); color: var(--bk-red); }
.bks__side--b .bks__cap { right: var(--gutter); color: var(--brand-ink); }
.bks__side ul { list-style: none; margin: 0; padding: 0; }
.bks__side--a li { position: absolute; max-width: 26vw; padding: 10px 16px; border: 1px dashed var(--bk-red); color: var(--ink-2); background: var(--bg-2); font-size: clamp(.82rem, 1.15vw, 1.05rem); line-height: 1.6; }
.bks__side--a li:nth-child(1) { left: 6%; top: 22%; transform: rotate(-6deg); font-family: var(--font-mono); direction: ltr; }
.bks__side--a li:nth-child(2) { left: 37%; top: 15%; transform: rotate(4deg); }
.bks__side--a li:nth-child(3) { left: 69%; top: 25%; transform: rotate(-3deg); }
.bks__side--a li:nth-child(4) { left: 11%; top: 62%; transform: rotate(5deg); }
.bks__side--a li:nth-child(5) { left: 43%; top: 55%; transform: rotate(-8deg); }
.bks__side--a li:nth-child(6) { left: 70%; top: 68%; transform: rotate(3deg); }
.bks__side--b ul { position: absolute; inset: 24% var(--gutter) auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(16px, 3vw, 48px); }
.bks__side--b li { position: relative; padding: clamp(18px, 3vh, 30px) 0; padding-inline-start: 34px; border-top: 1px solid var(--line-2); font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(.95rem, 1.5vw, 1.4rem); line-height: var(--lh-head); }
.bks__side--b li::before { content: ""; position: absolute; inset-inline-start: 4px; top: calc(clamp(18px, 3vh, 30px) + .35em); width: 7px; height: 13px; border: solid var(--brand-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bks__bar { position: absolute; top: 0; bottom: 0; left: var(--sx); width: 1px; background: var(--accent-c); pointer-events: none; }
.bks__bar b { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px; background: var(--accent-c); }
.bks__bar b::before, .bks__bar b::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid #04211D; border-width: 2px 2px 0 0; }
.bks__bar b::before { left: 9px; transform: rotate(-135deg); }
.bks__bar b::after { right: 9px; transform: rotate(45deg); }
@media (max-width: 760px) {
  .bks__side--a li { max-width: 43vw; padding: 7px 10px; }
  .bks__side--a li:nth-child(1) { left: 5%; top: 14%; } .bks__side--a li:nth-child(2) { left: 50%; top: 20%; }
  .bks__side--a li:nth-child(3) { left: 6%; top: 40%; } .bks__side--a li:nth-child(4) { left: 52%; top: 46%; }
  .bks__side--a li:nth-child(5) { left: 5%; top: 68%; } .bks__side--a li:nth-child(6) { left: 50%; top: 74%; }
  .bks__side--b ul { grid-template-columns: repeat(2, minmax(0, 1fr)); inset: 15% var(--gutter) auto; }
  .bks__side--b li { padding-inline-start: 24px; }
  .bks__side--b li::before { inset-inline-start: 2px; }
}

/* ---------- areas ---------- */
.bka__list { border-bottom: 1px solid var(--line-2); }
.bka__row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 6fr) 40px; gap: clamp(14px, 2vw, 32px); align-items: center; padding: clamp(20px, 3.4vh, 38px) clamp(0px, 1vw, 16px); border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; overflow: hidden; isolation: isolate; transition: padding .5s var(--ease-out), color .3s; }
.bka__row::before { content: ""; position: absolute; inset: 0; background: var(--accent-c); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease-out); z-index: -1; }
.bka__n { font-size: .78rem; color: var(--ink-3); transition: color .3s; }
.bka__t { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.4rem, 3vw, 2.9rem); line-height: var(--lh-head); letter-spacing: var(--track-display); }
.bka__d { color: var(--ink-2); line-height: var(--lh-body); transition: color .3s; }
.bka__go svg { width: 22px; height: 22px; transform: scaleX(var(--flip, 1)); opacity: .4; transition: opacity .3s, transform .5s var(--ease-out); }
@media (hover: hover) {
  .bka__row:hover { color: #04211D; padding-inline: clamp(12px, 2.4vw, 40px); }
  .bka__row:hover::before { transform: scaleY(1); }
  .bka__row:hover .bka__n, .bka__row:hover .bka__d { color: rgba(4, 33, 29, .8); }
  .bka__row:hover .bka__go svg { opacity: 1; transform: scaleX(var(--flip, 1)) translateX(6px); }
}
@media (max-width: 760px) { .bka__row { grid-template-columns: 34px minmax(0, 1fr); } .bka__d { grid-column: 2; } .bka__go { display: none; } }

/* ---------- one decision, start to finish (sideways on scroll) ---------- */
.bkj { position: relative; background: var(--bg-2); }
.bkj__sticky { display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 4vh, 44px); padding-block: clamp(60px, 10vh, 110px); overflow: hidden; }
.bkj__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.bkj__track { display: flex; gap: clamp(14px, 1.6vw, 26px); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bkj__track::-webkit-scrollbar { display: none; }
.bkj__card { flex: 0 0 clamp(250px, 32vw, 500px); min-height: clamp(280px, 44vh, 430px); display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 36px); border: 1px solid var(--line-2); background: var(--bg); scroll-snap-align: center; transition: border-color .4s; }
.bkj__n { font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(4rem, 8vw, 8.5rem); line-height: 1; color: var(--ink-4); transition: color .4s; }
.bkj__card h3 { margin-top: auto; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.25rem, 1.9vw, 1.8rem); line-height: var(--lh-head); }
.bkj__card p { margin-top: 10px; color: var(--ink-2); line-height: var(--lh-body); }
.bkj__card.is-on { border-color: var(--accent-c); }
.bkj__card.is-on .bkj__n { color: var(--brand-ink); }
.bkj__card--end.is-on { background: var(--accent-c); color: #04211D; }
.bkj__card--end.is-on .bkj__n, .bkj__card--end.is-on p { color: rgba(4, 33, 29, .8); }
.bkj__bar { display: block; height: 2px; background: var(--line-2); }
.bkj__bar b { display: block; height: 100%; background: var(--accent-c); transform: scaleX(var(--p, 0)); transform-origin: left; }
[dir="rtl"] .bkj__bar b { transform-origin: right; }
.bkj.is-pin .bkj__sticky { position: sticky; top: 0; height: 100svh; padding-block: 0; }
.bkj.is-pin .bkj__track { overflow: visible; scroll-snap-type: none; will-change: transform; }

/* ---------- roles ---------- */
.bkr__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 96px); align-items: start; }
.bkr__tabs { display: grid; }
.bkr__tabs button { position: relative; padding: 16px 0; padding-inline-start: 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink-3); font: inherit; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.05rem, 1.6vw, 1.45rem); text-align: start; cursor: pointer; transition: color .3s, padding .45s var(--ease-out); }
.bkr__tabs button::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--accent-c); transform: scale(0) rotate(45deg); transition: transform .45s var(--ease-out); }
.bkr__tabs button.is-on { color: var(--ink); padding-inline-start: 26px; }
.bkr__tabs button.is-on::before { transform: scale(1) rotate(45deg); }
.bkr__panes { position: relative; min-height: 9em; }
.bkr__panes p { display: none; font-family: var(--font-head); font-weight: var(--w-head); font-size: clamp(1.5rem, 3.3vw, 3.3rem); line-height: var(--lh-head); letter-spacing: var(--track-display); text-wrap: balance; }
.bkr__panes p.is-on { display: block; animation: bkr-in .6s var(--ease-out); }
@keyframes bkr-in { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 860px) {
  .bkr__grid { grid-template-columns: 1fr; }
  .bkr__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
  .bkr__tabs button { padding: 9px 14px; border: 1px solid var(--line-2); font-size: .9rem; }
  .bkr__tabs button::before { display: none; }
  .bkr__tabs button.is-on { padding-inline-start: 14px; border-color: var(--accent-c); color: var(--brand-ink); }
  .bkr__panes { min-height: 7.5em; }
}
@media (prefers-reduced-motion: reduce) { .bkr__panes p.is-on { animation: none; } }
