/* WEBZOR — стилі головної сторінки: перший екран, блок «Хаос» із задачами, шоуріл, тизер калькулятора, блок заявки. */

.hero-fallback { position: absolute; right: 9%; top: 50%; width: min(32vw, 400px); transform: translateY(-50%); }
.has-scene .hero-fallback { display: none; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.6rem; min-height: 44px;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(180deg, var(--accent), rgba(127, 227, 255, 0)); animation: hint 2.2s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- блок «Хаос»: задачі ---------- */

.tasks { margin-top: 2.2rem; }
.tasks__hint { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tasks__cloud { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 0.8rem; }
.task {
  --r: 0deg; --dx: 0px; --dy: 0px; --t: 7s;
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 46px; padding: 0.5rem 1.05rem 0.5rem 0.7rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(20, 20, 28, 0.84); color: var(--text-soft);
  font: inherit; font-size: 0.95rem; line-height: 1.2; text-align: left; cursor: pointer;
  transform: translate(var(--dx), var(--dy)) rotate(var(--r));
  animation: task-drift var(--t) ease-in-out infinite;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
@keyframes task-drift { 50% { transform: translate(calc(var(--dx) * -1), calc(var(--dy) * -1)) rotate(calc(var(--r) * -0.6)); } }
.task i { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed var(--muted); transition: border-color 0.3s ease; }
.task i::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px;
  border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform 0.3s 0.1s ease;
}
.task[aria-pressed="true"] {
  animation: none; transform: none; color: var(--text); border-color: transparent;
  background: linear-gradient(rgba(20, 20, 28, 0.96), rgba(20, 20, 28, 0.96)) padding-box, var(--grad) border-box;
  box-shadow: 0 8px 26px rgba(122, 59, 255, 0.28);
}
.task[aria-pressed="true"] i { border: 0; background: var(--grad); }
.task[aria-pressed="true"] i::after { transform: rotate(45deg) scale(1); }
.tasks__count { margin-top: 1.6rem; min-height: 1.6em; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text); }
.tasks__count.is-all { font-size: 1.35rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- посилання під блоками ---------- */

.block__more--row { display: flex; flex-wrap: wrap; gap: 0.25rem 2.25rem; }

/* ---------- тизер калькулятора ---------- */

.cost { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.cost .actions { margin-top: 1.8rem; }
.cost__formula {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 0.8rem; padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 24px; border: 1px solid transparent; text-decoration: none;
  background: linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box, var(--grad) border-box;
  transition: translate 0.25s ease, box-shadow 0.25s ease;
}
.cost__formula:hover { translate: 0 -4px; box-shadow: var(--shadow-glow); }
.cost__formula i { font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--accent); }
.cost__chip {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0.5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  animation: cost-bob 5.4s ease-in-out infinite; transition: border-color 0.3s ease, background-color 0.3s ease;
}
.cost__chip:nth-of-type(2) { animation-delay: -1.3s; }
.cost__chip:nth-of-type(3) { animation-delay: -2.6s; }
.cost__chip--sum { flex: 1 1 100%; justify-content: center; min-height: 64px; margin-top: 0.4rem; border: 0; background: var(--grad-btn); color: #fff; font-size: clamp(1.15rem, 2vw, 1.45rem); animation: none; box-shadow: 0 10px 30px rgba(122, 59, 255, 0.28); }
.cost__formula:hover .cost__chip { border-color: rgba(127, 227, 255, 0.5); background: rgba(127, 227, 255, 0.06); }
.cost__formula:hover .cost__chip--sum { background: var(--grad-btn); }
@keyframes cost-bob { 50% { translate: 0 -5px; } }

/* ---------- шоуріл ---------- */

.reel { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.reel__frame {
  aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #000;
  border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(122, 59, 255, 0.22);
}
.reveal-on .reel__frame[data-reveal], .reel__frame { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.4s ease, rotate 0.4s ease, box-shadow 0.4s ease; }
.reel__frame:hover { translate: 0 -6px; rotate: -1.2deg; box-shadow: 0 40px 100px rgba(122, 59, 255, 0.36); }
.reel__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- заявка ---------- */

.stage--contact { align-items: start; min-height: min(100vh, 860px); min-height: min(100svh, 860px); padding-top: calc(var(--header-h) + 4rem); padding-bottom: 6rem; }
.stage--contact .stage__inner { align-items: start; }
.contact__intro { grid-column: 1 / span 5; }
.stage--contact .lf { grid-column: 7 / span 6; }

@media (max-width: 1080px) {
  .contact__intro { grid-column: 1 / span 5; }
  .stage--contact .lf { grid-column: 6 / span 7; }
}

@media (max-width: 860px) {
  .tasks__cloud { gap: 0.8rem 0.6rem; }
  .hero-fallback { right: auto; left: 50%; top: 27%; width: min(46vw, 220px); transform: translate(-50%, -50%); }
  .stage--hero { padding-bottom: 5.5rem; }
  .stage--contact { align-items: start; padding-top: calc(var(--header-h) + 3rem); }
  .contact__intro, .stage--contact .lf { grid-column: 1 / -1; }
  .reel { grid-template-columns: 1fr; }
  .reel__frame { width: min(100%, 300px); margin-inline: auto; }
  .cost { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .scroll-hint { display: none; }
  .cost__formula { gap: 0.5rem 0.6rem; }
  .cost__chip { min-height: 44px; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .task, .cost__chip { animation: none; }
  .task { transform: none; }
}
