/* =========================================================
   שכבת "בנייה": Blueprint, קוד ותהליך שנדלק שלב אחר שלב.
   קישוטי בלבד (aria-hidden), עדינים, ונכבים ב-prefers-reduced-motion.
   ========================================================= */

/* ---------- Hero: קווי Blueprint ---------- */
.bp { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.bp-line { position: absolute; background: linear-gradient(90deg, transparent, rgba(255, 128, 64, 0.34) 18%, rgba(255, 128, 64, 0.34) 82%, transparent); transform: scaleX(0); transform-origin: right center; transition: transform 1.5s var(--ease) 0.3s; }
.bp-line.h { left: 0; right: 0; height: 1px; }
.bp-line.v { top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(255, 128, 64, 0.26) 22%, rgba(255, 128, 64, 0.26) 78%, transparent); transform: scaleY(0); transform-origin: center top; }
.bp-line.t { top: clamp(86px, 13.5vh, 128px); }
.bp-line.b { bottom: clamp(70px, 10vh, 100px); }
.bp-line.l { left: clamp(28px, 4vw, 64px); }
.bp-line.r { right: clamp(28px, 4vw, 64px); }
.bp-x { position: absolute; width: 14px; height: 14px; opacity: 0; transition: opacity 0.9s 1.1s; }
.bp-x::before, .bp-x::after { content: ''; position: absolute; background: var(--orange); }
.bp-x::before { left: 6px; top: 0; width: 1px; height: 14px; }
.bp-x::after { top: 6px; left: 0; height: 1px; width: 14px; }
.bp-x.tl { left: calc(clamp(28px, 4vw, 64px) - 6px); top: calc(clamp(86px, 13.5vh, 128px) - 6px); }
.bp-x.tr { right: calc(clamp(28px, 4vw, 64px) - 7px); top: calc(clamp(86px, 13.5vh, 128px) - 6px); }
.bp-x.bl { left: calc(clamp(28px, 4vw, 64px) - 6px); bottom: calc(clamp(70px, 10vh, 100px) - 7px); }
.bp-x.br { right: calc(clamp(28px, 4vw, 64px) - 7px); bottom: calc(clamp(70px, 10vh, 100px) - 7px); }
.bp-tag { position: absolute; font: 500 11px/1 'Consolas', 'SFMono-Regular', ui-monospace, monospace; letter-spacing: 0.16em; color: rgba(255, 178, 122, 0.62); direction: ltr; opacity: 0; transition: opacity 1s 1.4s; white-space: nowrap; }
.bp-tag.tl { left: clamp(36px, 4.4vw, 72px); top: calc(clamp(86px, 13.5vh, 128px) + 12px); }
.bp-tag.br { left: clamp(36px, 4.4vw, 72px); bottom: calc(clamp(70px, 10vh, 100px) + 12px); }
#home.is-active .bp-line.h { transform: scaleX(1); }
#home.is-active .bp-line.v { transform: scaleY(1); }
#home.is-active .bp-x, #home.is-active .bp-tag { opacity: 1; }
.bp-line.v { transition-delay: 0.7s; }

/* ---------- Hero: כרטיס קוד שנכתב ---------- */
.code-card {
  position: absolute; z-index: 3; left: clamp(56px, 6.2vw, 104px); top: 50%; translate: 0 -62%;
  width: clamp(200px, 15.5vw, 250px); padding: 12px 14px 14px; border-radius: 14px; direction: ltr; text-align: left;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)); border: 1px solid var(--line-soft);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font: 400 11.5px/1.7 'Consolas', 'SFMono-Regular', ui-monospace, 'Heebo', monospace; color: #e9ddd2;
  opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease) 0.9s, transform 0.9s var(--ease) 0.9s;
  pointer-events: none;
}
#home.is-active .code-card { opacity: 0.92; transform: none; }
.code-card .dots { display: flex; gap: 5px; margin-bottom: 9px; }
.code-card .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.code-card .dots i:first-child { background: var(--orange); }
.code-card .fn { margin-left: auto; color: var(--dim); font-size: 10px; letter-spacing: 0.08em; }
.code-card pre { margin: 0; font: inherit; white-space: pre; min-height: 6.8em; }
.code-card .tg { color: var(--orange-2); }
.code-card .at { color: var(--amber); }
.code-card .st { color: #f1c9a5; }
.code-card .tx { color: #d9cbbd; }
.code-card .cur { display: inline-block; width: 6px; height: 1em; vertical-align: -2px; background: var(--orange); animation: cc-blink 1s steps(1) infinite; }
@keyframes cc-blink { 50% { opacity: 0; } }
@media (max-width: 1279px), (hover: none) { .code-card, .bp-tag { display: none; } }
@media (max-width: 899px) { .bp { display: none; } }

/* ---------- תהליך: קו שמתקדם ושלבים שנדלקים ---------- */
.proc-rail { position: relative; height: 22px; margin: 0 0 clamp(6px, 1.2vh, 14px); direction: rtl; }
.proc-rail::before { content: ''; position: absolute; right: 0; left: 0; top: 10px; height: 1px; background: var(--line-soft); }
.proc-rail .bar { position: absolute; right: 0; top: 9px; height: 3px; width: 100%; border-radius: 3px; background: linear-gradient(270deg, var(--orange), var(--orange-2) 70%, rgba(255, 178, 122, 0.4)); box-shadow: 0 0 14px rgba(255, 90, 31, 0.45); transform: scaleX(0); transform-origin: right center; }
.proc-rail .nd { position: absolute; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--dim); transform: translateX(50%); transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; }
.proc-rail .nd.on { background: var(--orange); border-color: var(--orange-2); box-shadow: 0 0 12px rgba(255, 90, 31, 0.7); }
.proc { transition: border-color 0.5s, box-shadow 0.5s, transform 0.4s var(--ease); }
.proc.is-lit { border-color: rgba(255, 128, 64, 0.42); }
.proc.is-lit .num { color: var(--orange); text-shadow: 0 0 22px rgba(255, 90, 31, 0.4); }
@media (max-width: 899px) { .proc-rail { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .bp-line, .bp-x, .bp-tag, .code-card { transition: none; }
  .code-card .cur { animation: none; }
}
