/* Homepage hero visual: a website building itself (sections/heroBuild.blade.php).
   Sizes are in container units so the scene scales as one piece; every text has a
   13px floor. Brand palette: navy #10155c, purple #7057e8, coral #f45158,
   yellow #f2c21a, mint #42d3a1. data-step: 1 wireframe, 2 build, 3 seo, 4 growth. */
.hb { --hb-ink: #10155c; --hb-purple: #7057e8; --hb-coral: #f45158; --hb-yellow: #f2c21a; --hb-mint: #42d3a1; --hb-line: #c5cdea;
    position: relative; width: 100%; aspect-ratio: 1.18; container-type: inline-size; direction: rtl; font-family: inherit; user-select: none; }
.hb *, .hb *::before, .hb *::after { box-sizing: border-box; }
.hb b { font-weight: inherit; }

/* Backdrop: soft yellow disc + dot grid, as in the previous hero art */
.hb-glow { position: absolute; z-index: 0; top: 4%; left: 22%; width: 56%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fbe7a1, #f6d76a 70%); opacity: .55; filter: blur(.4cqw); }
.hb-dots { position: absolute; z-index: 0; right: 2%; top: 64%; width: 16%; height: 30%; background-image: radial-gradient(#5b5ff0 1.5px, transparent 1.6px); background-size: 2.4cqw 2.4cqw; opacity: .5; }

/* Step rail */
.hb-rail { position: absolute; z-index: 6; top: 0; left: 4%; width: 74%; display: flex; justify-content: center; gap: 1.2cqw; margin: 0; padding: 0; list-style: none; }
.hb-rail li { display: inline-flex; align-items: center; gap: .8cqw; margin: 0; padding: .6cqw 1.6cqw .6cqw 1cqw; border-radius: 30px; background: #ffffffd9; border: 1px solid #e3e6f6; color: #7b80a3; font-size: clamp(13px, 1.55cqw, 15px); font-weight: 600; line-height: 1.6; white-space: nowrap; box-shadow: 0 .8cqw 2cqw -1cqw #5b6fb040; transition: background .4s, color .4s, border-color .4s, transform .4s; }
.hb-rail span { display: grid; place-items: center; width: clamp(20px, 2.4cqw, 26px); aspect-ratio: 1; border-radius: 50%; background: #eef0fa; color: #6c7196; font-size: clamp(13px, 1.3cqw, 14px); transition: inherit; }

/* Browser */
.hb-browser { position: absolute; z-index: 2; top: 9.5%; left: 4%; width: 74%; height: 63%; display: flex; flex-direction: column; border-radius: 2cqw; overflow: hidden; background: #fff; box-shadow: 0 3cqw 6cqw -2.4cqw #3b4f9a55, 0 0 0 1px #e1e6f7; }
.hb-bar { display: flex; align-items: center; gap: .8cqw; flex: 0 0 auto; padding: 1.3cqw 1.8cqw; background: var(--hb-ink); direction: ltr; }
.hb-bar > i { width: 1.2cqw; aspect-ratio: 1; border-radius: 50%; background: var(--hb-coral); }
.hb-bar > i:nth-child(2) { background: var(--hb-yellow); }
.hb-bar > i:nth-child(3) { background: var(--hb-mint); }
.hb-url { display: inline-flex; align-items: center; gap: .8cqw; margin-left: 2cqw; padding: .3cqw 2cqw; border-radius: 30px; background: #ffffff1f; color: #dfe3ff; font-size: clamp(13px, 1.4cqw, 15px); line-height: 1.6; }
.hb-url b { color: var(--hb-mint); }
.hb-site { position: relative; flex: 1; display: flex; flex-direction: column; gap: 2.2cqw; padding: 2.2cqw 2.6cqw; overflow: hidden; }
.hb-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(#e7ebfa 1px, transparent 1px), linear-gradient(90deg, #e7ebfa 1px, transparent 1px); background-size: 3cqw 3cqw; opacity: 0; transition: opacity .5s; }
.hb-site > :not(.hb-grid):not(.hb-cursor) { position: relative; z-index: 1; }

/* Generic block: filled by default, dashed wireframe in step 1 */
.hb-b { display: block; border-radius: .8cqw; border: 1.5px solid transparent; transition: background-color .55s var(--d, 0s), border-color .55s var(--d, 0s), color .55s var(--d, 0s), box-shadow .55s var(--d, 0s), opacity .55s var(--d, 0s); }
.hb-nav { display: flex; align-items: center; gap: 1.2cqw; }
.hb-logo { width: 3cqw; aspect-ratio: 1; border-radius: .9cqw; background: linear-gradient(135deg, var(--hb-purple), #4b8cf0); }
.hb-brand { margin-left: auto; color: var(--hb-ink); font-size: clamp(13px, 1.6cqw, 17px); font-weight: 800; transition: color .5s; }
.hb-menu { width: 5cqw; height: .9cqw; background: #d9ddf0; --d: .05s; }
.hb-navbtn { width: 7cqw; height: 2.6cqw; border-radius: 30px; background: var(--hb-coral); --d: .1s; }
.hb-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.4cqw; align-items: center; padding: 2.4cqw; border-radius: 1.4cqw; background: linear-gradient(120deg, #f4f1ff, #eef6ff); transition: background .55s; }
.hb-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2cqw; }
.hb-headline { color: var(--hb-ink); font-size: clamp(13px, 2.5cqw, 24px); font-weight: 800; line-height: 1.5; transition: color .5s; }
.hb-line { width: 100%; height: 1cqw; background: #cfd5ee; --d: .15s; }
.hb-line--short { width: 70%; --d: .2s; }
.hb-cta { display: inline-grid; place-items: center; min-width: 9cqw; padding: .4cqw 2cqw; border-radius: 30px; background: var(--hb-purple); color: #fff; font-size: clamp(13px, 1.4cqw, 15px); font-weight: 700; line-height: 1.7; --d: .25s; }
.hb-art { position: relative; aspect-ratio: 1.45; overflow: hidden; border-radius: 1.2cqw; background: linear-gradient(160deg, #8f7cf3, #5d8df0); --d: .3s; }
.hb-sun { position: absolute; top: 16%; right: 18%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--hb-yellow); transition: opacity .5s .35s, transform .6s .35s; }
.hb-hill { position: absolute; bottom: -30%; width: 75%; aspect-ratio: 1; border-radius: 50%; transition: opacity .5s .4s, transform .6s .4s; }
.hb-hill--a { left: -12%; background: var(--hb-mint); }
.hb-hill--b { right: -22%; bottom: -42%; background: #2fb889; }
.hb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6cqw; }
.hb-card { display: flex; flex-direction: column; gap: .8cqw; padding: 1.4cqw; background: #fff; box-shadow: 0 .8cqw 2cqw -1cqw #5b6fb040; border-color: #eef1fa; }
.hb-card i { width: 3cqw; aspect-ratio: 1; border-radius: 50%; background: #ece8ff; transition: background .5s; }
.hb-card:nth-child(2) i { background: #e3f8ef; }
.hb-card:nth-child(3) i { background: #fff3d1; }
.hb-card em { height: .8cqw; border-radius: 6px; background: #dfe3f2; transition: background .5s; }
.hb-card em + em { width: 65%; }
.hb-card:nth-child(1) { --d: .35s; } .hb-card:nth-child(2) { --d: .42s; } .hb-card:nth-child(3) { --d: .49s; }
.hb-cursor { position: absolute; z-index: 3; top: 30%; left: 60%; color: var(--hb-ink); font-size: clamp(14px, 2.2cqw, 22px); opacity: 0; transition: opacity .3s; filter: drop-shadow(0 2px 3px #0003); }

/* Phone */
.hb-phone { position: absolute; z-index: 4; left: 3%; bottom: 4%; width: 18%; aspect-ratio: .5; padding: .9cqw; border-radius: 3.2cqw; background: var(--hb-ink); box-shadow: 0 3cqw 5cqw -2cqw #10155c80; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.hb-phone-screen { position: relative; height: 100%; display: flex; flex-direction: column; gap: 1cqw; padding: 1.6cqw 1.2cqw; overflow: hidden; border-radius: 2.4cqw; background: #fff; }
.hb-p-nav { height: 2.2cqw; background: #eef0fa; }
.hb-p-art { position: relative; flex: 0 0 26%; overflow: hidden; border-radius: 1cqw; background: linear-gradient(160deg, #8f7cf3, #5d8df0); --d: .3s; }
.hb-p-line { height: .9cqw; background: #cfd5ee; --d: .15s; }
.hb-p-line--short { width: 60%; --d: .2s; }
.hb-p-btn { width: 55%; height: 2.4cqw; border-radius: 30px; background: var(--hb-coral); --d: .25s; }
.hb-p-card { flex: 1; background: #f4f6fd; border-color: #eef1fa; --d: .35s; }
.hb-p-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; background: #ffffffeb; color: #12806a; font-size: clamp(13px, 1.5cqw, 15px); font-weight: 700; opacity: 0; transform: scale(.9); transition: opacity .4s, transform .4s; }
.hb-p-done b { display: grid; place-items: center; width: 5cqw; aspect-ratio: 1; border-radius: 50%; background: var(--hb-mint); color: #fff; font-size: clamp(14px, 2.2cqw, 22px); }

/* Floating cards */
.hb-float { position: absolute; z-index: 5; padding: 1.4cqw 1.6cqw; border-radius: 1.8cqw; background: #fff; box-shadow: 0 2.4cqw 5cqw -2cqw #3b4f9a59, 0 0 0 1px #edf0fa; opacity: 0; transform: translateY(1.6cqw) scale(.96); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.hb-float-title { display: flex; align-items: center; gap: .8cqw; margin-bottom: 1cqw; color: var(--hb-ink); font-size: clamp(13px, 1.45cqw, 15px); font-weight: 700; line-height: 1.6; white-space: nowrap; }
.hb-float-title b { color: var(--hb-purple); }
.hb-code { top: 24%; right: 0; width: 25%; background: var(--hb-ink); box-shadow: 0 2.4cqw 5cqw -2cqw #10155c99; }
.hb-code .hb-float-title { color: #fff; }
.hb-code .hb-float-title b { color: var(--hb-mint); }
.hb-code code { display: flex; flex-direction: column; gap: .3cqw; padding: 0; background: none; direction: ltr; text-align: left; font-family: Consolas, 'Courier New', monospace; font-size: clamp(13px, 1.4cqw, 15px); line-height: 1.6; }
.hb-code code i { direction: ltr; unicode-bidi: isolate; text-align: left; font-style: normal; color: #9ecbff; opacity: 0; transform: translateX(-1cqw); transition: opacity .35s, transform .35s; }
.hb-code code i:nth-child(2) { color: #ffd479; transition-delay: .35s; }
.hb-code code i:nth-child(3) { color: #7ff0c6; transition-delay: .7s; }
.hb-scores { top: 20%; right: 0; width: 26%; }
.hb-gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1cqw 1.2cqw; }
.hb-gauge { position: relative; display: grid; justify-items: center; }
.hb-gauge svg { width: 78%; transform: rotate(-90deg); }
.hb-gauge circle { fill: none; stroke-width: 4; }
.hb-gauge-track { stroke: #e3f8ef; }
.hb-gauge-fill { stroke: #17b07f; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s cubic-bezier(.3, .7, .3, 1) calc(var(--i) * .12s); }
.hb-gauge strong { position: absolute; top: 0; left: 0; right: 0; display: grid; place-items: center; aspect-ratio: 1; width: 78%; margin: 0 auto; color: #12806a; font-size: clamp(13px, 1.55cqw, 16px); font-weight: 800; }
.hb-gauge small { margin-top: .3cqw; color: #6f7693; font-size: clamp(13px, 1.25cqw, 14px); line-height: 1.6; }
.hb-serp { right: 3%; bottom: 3%; width: 46%; display: flex; align-items: center; gap: 1.4cqw; }
.hb-serp-rank { display: grid; place-items: center; flex-shrink: 0; width: 7.4cqw; min-width: 52px; aspect-ratio: 1; border-radius: 1.6cqw; background: linear-gradient(140deg, var(--hb-purple), #4b8cf0); color: #fff; line-height: 1.2; }
.hb-serp-rank small { font-size: clamp(13px, 1.2cqw, 14px); opacity: .85; }
.hb-serp-rank strong { font-size: clamp(18px, 3.2cqw, 32px); font-weight: 800; }
.hb-serp-body { display: flex; flex-direction: column; gap: .4cqw; min-width: 0; }
.hb-serp-url { display: flex; align-items: center; gap: .8cqw; direction: ltr; justify-content: flex-end; color: #3c8a45; font-size: clamp(13px, 1.3cqw, 14px); line-height: 1.5; }
.hb-serp-url i { width: 1.8cqw; min-width: 12px; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, var(--hb-purple), #4b8cf0); }
.hb-serp-title { overflow: hidden; color: #1a3fd1; font-size: clamp(13px, 1.65cqw, 17px); font-weight: 700; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; }
.hb-serp-line { height: .8cqw; border-radius: 6px; background: #e4e7f2; }
.hb-toast { top: 50%; left: 17%; display: flex; align-items: center; gap: 1.2cqw; padding: 1.2cqw 1.8cqw 1.2cqw 2.2cqw; border-radius: 30px; }
.hb-toast-icon { display: grid; place-items: center; flex-shrink: 0; width: 4.4cqw; min-width: 32px; aspect-ratio: 1; border-radius: 50%; background: #e3f8ef; color: #12806a; font-size: clamp(14px, 2cqw, 20px); }
.hb-toast > span:last-child { color: #6f7693; font-size: clamp(13px, 1.3cqw, 14px); line-height: 1.6; white-space: nowrap; }
.hb-toast strong { display: block; color: var(--hb-ink); font-size: clamp(13px, 1.55cqw, 16px); font-weight: 800; }

/* ---------- Step states ---------- */
/* Rail */
.hb[data-step="1"] .hb-rail [data-for="1"], .hb[data-step="2"] .hb-rail [data-for="2"], .hb[data-step="3"] .hb-rail [data-for="3"], .hb[data-step="4"] .hb-rail [data-for="4"] { background: var(--hb-ink); border-color: var(--hb-ink); color: #fff; transform: translateY(-.3cqw); }
.hb[data-step="1"] .hb-rail [data-for="1"] span, .hb[data-step="2"] .hb-rail [data-for="2"] span, .hb[data-step="3"] .hb-rail [data-for="3"] span, .hb[data-step="4"] .hb-rail [data-for="4"] span { background: var(--hb-yellow); color: var(--hb-ink); }
.hb[data-step="2"] .hb-rail [data-for="1"] span, .hb[data-step="3"] .hb-rail [data-for="1"] span, .hb[data-step="3"] .hb-rail [data-for="2"] span,
.hb[data-step="4"] .hb-rail [data-for="1"] span, .hb[data-step="4"] .hb-rail [data-for="2"] span, .hb[data-step="4"] .hb-rail [data-for="3"] span { background: var(--hb-mint); color: #fff; }

/* 1: wireframe */
.hb[data-step="1"] .hb-grid { opacity: 1; }
.hb[data-step="1"] .hb-b, .hb[data-step="1"] .hb-hero, .hb[data-step="1"] .hb-card i, .hb[data-step="1"] .hb-card em { background: transparent !important; border-color: var(--hb-line); border-style: dashed; box-shadow: none; color: transparent; }
.hb[data-step="1"] .hb-hero { border: 1.5px dashed var(--hb-line); }
.hb[data-step="1"] .hb-card i { border: 1.5px dashed var(--hb-line); }
.hb[data-step="1"] .hb-card em { border: 1px dashed var(--hb-line); }
.hb[data-step="1"] .hb-brand, .hb[data-step="1"] .hb-headline { color: #b7bfdc; }
.hb[data-step="1"] .hb-sun, .hb[data-step="1"] .hb-hill { opacity: 0; transform: translateY(20%); }
.hb[data-step="1"] .hb-cursor { opacity: 1; animation: hb-cursor 2.6s ease-in-out infinite; }
.hb[data-step="1"] .hb-phone { opacity: 0; transform: translateY(8%) rotate(-4deg); }
@keyframes hb-cursor { 0% { top: 62%; left: 18%; } 35% { top: 30%; left: 64%; } 65% { top: 74%; left: 46%; } 100% { top: 62%; left: 18%; } }

/* 2: build */
.hb[data-step="2"] .hb-code { opacity: 1; transform: none; }
.hb[data-step="2"] .hb-code code i { opacity: 1; transform: none; }

/* 3: seo — scores fill, Google result climbs */
.hb[data-step="3"] .hb-scores, .hb[data-step="4"] .hb-scores,
.hb[data-step="3"] .hb-serp, .hb[data-step="4"] .hb-serp { opacity: 1; transform: none; }
.hb[data-step="3"] .hb-serp { transition-delay: .6s; }
.hb[data-step="1"] .hb-gauge-fill, .hb[data-step="2"] .hb-gauge-fill { stroke-dashoffset: 100; transition: none; }

/* 4: growth */
.hb[data-step="4"] .hb-toast { opacity: 1; transform: none; transition-delay: .2s; }
.hb[data-step="4"] .hb-p-done { opacity: 1; transform: none; transition-delay: .5s; }

/* Loop reset: fade everything floating before going back to the wireframe */
.hb.is-resetting .hb-float, .hb.is-resetting .hb-p-done { opacity: 0; transition-delay: 0s; }

@media (max-width: 575px) {
    .hb { aspect-ratio: .98; }
    .hb-glow { top: 8%; left: 10%; width: 70%; }
    .hb-rail { left: 0; width: 100%; gap: 6px; }
    .hb-rail li { padding: 3px 8px 3px 6px; gap: 4px; }
    .hb-browser { top: 10%; left: auto; right: 0; width: 80%; height: 50%; }
    .hb-phone { width: 23%; left: 0; top: 25%; bottom: auto; }
    .hb-code { top: 40%; width: 40%; }
    .hb-scores { top: 47%; width: 66%; padding: 10px 12px; }
    .hb-scores .hb-float-title { margin-bottom: 4px; }
    .hb-gauges { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .hb-gauge svg, .hb-gauge strong { width: 100%; }
    .hb-gauge small { display: none; }
    .hb-serp { right: 0; bottom: 0; width: 78%; }
    .hb-toast { top: 30%; left: 12%; }
    .hb-hero { grid-template-columns: 1.1fr 1fr; }
    .hb-menu:nth-of-type(3), .hb-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hb *, .hb *::before, .hb *::after { transition: none !important; animation: none !important; }
}

/* Placement inside the homepage hero column */
.hero-col-visual .hb { width: 104%; margin-right: -2%; }
@media (max-width: 991px) {
    .hero-col-visual .hb { width: 100%; max-width: 760px; margin: 0 auto; }
}
@media (max-width: 575px) {
    .hero-col-visual .hb { width: 100%; margin: 0; }
}
