/* =========================================================
   Delow — services hub (/uslugi/): bento of the six services, main and specific
   service cards, "where do I start?" chooser. Loads after service.css (hero, breadcrumb).
   ========================================================= */

/* ---------- Hero: six tiles that assemble on load ---------- */
.phero--hub .phero__title { max-width: 14ch; }
.phero__brief--text p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; max-width: 52ch; }
.hub-bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-tile {
  --n: 0;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 116px; padding: 14px 16px 16px; border-radius: 20px; background: var(--surface); color: var(--ink);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.hub-tile__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--ink); transition: transform .45s var(--ease-out); }
.hub-tile__icon .ico { width: 20px; height: 20px; }
.hub-tile__name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.015em; line-height: 1.2; }
.hub-tile--dark { background: var(--dark); color: #fff; }
.hub-tile--dark .hub-tile__icon { background: rgba(255,255,255,.12); color: #fff; }
.hub-tile--accent { background: var(--accent); color: #fff; }
.hub-tile--accent .hub-tile__icon { background: rgba(255,255,255,.16); color: #fff; }
.hub-tile--light { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hub-tile--light .hub-tile__icon { background: var(--surface); }
.hub-tile:nth-child(2) { --n: 1; } .hub-tile:nth-child(3) { --n: 2; } .hub-tile:nth-child(4) { --n: 3; }
.hub-tile:nth-child(5) { --n: 4; } .hub-tile:nth-child(6) { --n: 5; }
@media (hover: hover) and (pointer: fine) {
  .hub-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
  .hub-tile:hover .hub-tile__icon { transform: rotate(-12deg); }
}
@media (min-width: 768px) {
  .hub-bento { gap: 12px; }
  .hub-tile { min-height: 150px; padding: 18px 20px 20px; border-radius: 22px; }
  .hub-tile__icon { width: 48px; height: 48px; }
  .hub-tile__name { font-size: 1.1875rem; }
}
@media (min-width: 1024px) { .hub-bento { grid-template-columns: repeat(3, 1fr); } .hub-tile { min-height: 168px; } }
/* Assembly: scattered tiles slide into the grid one after another (backwards fill keeps hover free afterwards) */
html.js:not(.is-loaded) .hub-tile { opacity: 0; }
html.js.is-loaded .hub-tile { animation: hub-assemble .8s var(--ease-out) backwards; animation-delay: calc(.3s + var(--n) * 70ms); }
@keyframes hub-assemble { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) rotate(var(--fr, 0)) scale(.9); } }

/* ---------- Main services: dark cards with an example graphic ---------- */
.hub-main .section-head .h2 { color: #fff; }
.hub-main__grid { display: grid; gap: 16px; }
.hcard {
  display: flex; flex-direction: column; border-radius: 28px; background: #1e1c22; color: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.hcard__visual { position: relative; display: grid; place-items: center; margin: 10px 10px 0; min-height: 232px; padding: 42px 16px 20px; border-radius: 20px; background: #2a2730; overflow: hidden; }
.hcard__visual .viz-rank, .hcard__visual .viz-ad, .hcard__visual .viz-funnel { width: min(100%, 360px); }
.hcard__visual .viz-ad__spons, .hcard__visual .viz-ad__title, .hcard__visual .viz-funnel__label { display: block; }
.hcard__visual .viz-ad__call { margin-top: 10px; }
.hcard__body { display: grid; gap: 10px; padding: 22px 24px 26px; flex: 1; align-content: start; }
.hcard__num { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--accent-light); }
.hcard__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.625rem, 1.4rem + .8vw, 2.125rem); letter-spacing: -.03em; line-height: 1.1; }
.hcard__text { color: var(--on-dark); font-size: 1.0625rem; line-height: 1.55; }
.hcard__more { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; font-weight: 600; }
.hcard__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); transition: transform .35s var(--ease-out), background-color .25s ease, color .25s ease; }
.hcard__go .ico { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .hcard:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 30px 60px -30px rgba(0,0,0,.8); }
  .hcard:hover .hcard__go { background: var(--accent-light); transform: rotate(-45deg); }
}
@media (min-width: 1024px) { .hub-main__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .hcard__visual { min-height: 260px; } }

/* ---------- Specific needs: light cards ---------- */
.hub-spec__grid { display: grid; gap: 12px; }
.lcard { position: relative; display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r-card); background: var(--surface); transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background-color .3s ease; }
.lcard__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; background: #fff; color: var(--ink); transition: background-color .25s ease, color .25s ease, transform .35s var(--ease-out); }
.lcard__icon .ico { width: 22px; height: 22px; }
.lcard__title { font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; letter-spacing: -.02em; line-height: 1.2; padding-right: 48px; }
.lcard__text { color: var(--ink-2); line-height: 1.55; }
.lcard__go { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease-out), background-color .25s ease, color .25s ease; }
.lcard__go .ico { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .lcard:hover { transform: translateY(-6px); background: #fff; box-shadow: var(--shadow-lift), 0 0 0 1px var(--line); }
  .lcard:hover .lcard__icon { background: var(--accent); color: #fff; transform: rotate(-8deg); }
  .lcard:hover .lcard__go { background: var(--ink); color: #fff; transform: rotate(45deg); }
}
@media (min-width: 900px) { .hub-spec__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .lcard { padding: 28px; } }

/* ---------- Chooser: "where do I start?" ---------- */
.hub-choose { padding-top: 0; }
.choose { display: grid; gap: 28px; }
.choose__intro { margin-top: 16px; color: var(--ink-2); font-size: var(--fs-lead); max-width: 40ch; }
.choose__opts { display: grid; gap: 10px; margin-top: 28px; }
.choose__opt {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 18px 10px 10px; border-radius: 18px;
  background: var(--surface); text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: -.015em; color: var(--ink);
  transition: background-color .25s ease, color .25s ease, transform .2s var(--ease-out), box-shadow .25s ease;
}
.choose__opt:active { transform: scale(.98); }
.choose__opt-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); transition: background-color .25s ease, color .25s ease; }
.choose__opt-icon .ico { width: 20px; height: 20px; }
.choose__opt[aria-pressed="true"] { background: var(--ink); color: #fff; }
.choose__opt[aria-pressed="true"] .choose__opt-icon { background: var(--accent-light); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .choose__opt:not([aria-pressed="true"]):hover { background: var(--surface-2); } }
.choose__out { position: relative; display: grid; align-content: center; min-height: 280px; padding: 32px 24px; border-radius: 28px; background: var(--dark); color: var(--on-dark); overflow: hidden; isolation: isolate; }
.choose__out::before { content: ""; position: absolute; inset: -30%; z-index: -1; background: radial-gradient(40% 50% at 85% 15%, rgba(107,58,100,.7), transparent 70%), radial-gradient(35% 45% at 10% 95%, rgba(74,37,69,.75), transparent 70%); }
.choose__hint { display: none; gap: 16px; justify-items: start; color: var(--on-dark-2); font-size: 1.0625rem; max-width: 34ch; }
.choose__hint-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
.choose__hint-arrow .ico { width: 20px; height: 20px; }
.choose__res { display: grid; gap: 12px; justify-items: start; }
.choose__res + .choose__res { margin-top: 28px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.choose__res-kicker { font-size: .875rem; font-weight: 600; color: var(--accent-light); }
.choose__res-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.choose__res p:not([class]) { color: var(--on-dark-2); font-size: 1.0625rem; line-height: 1.6; max-width: 44ch; }
.choose__res .btn { margin-top: 8px; }
@media (max-width: 559px) { .choose__res .btn { width: 100%; justify-content: space-between; } }
/* With JS: one answer at a time */
html.js .choose__hint { display: grid; }
html.js .choose.has-answer .choose__hint { display: none; }
html.js .choose__res { display: none; }
html.js .choose__res.is-on { display: grid; margin: 0; padding: 0; border: 0; animation: choose-in .5s var(--ease-out) both; }
@keyframes choose-in { from { opacity: 0; transform: translateY(14px); } }
@media (min-width: 960px) {
  .choose { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: stretch; }
  .choose__out { padding: 48px; min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html.js.is-loaded .hub-tile { animation: none; }
  html.js .choose__res.is-on { animation: none; }
}
