/* ─────────────────────────────────────────────
   ORBITA — Services · Bento Grid v2
   ───────────────────────────────────────────── */

.services {
  position: relative;
  overflow: hidden;
}

/* Мягкое свечение за секцией */
.services::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -20%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(110,92,255,0.07), transparent 65%);
  pointer-events: none;
}

/* ── Header ── */
.services__header {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: flex-end;
  gap: var(--sp-8);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}

.services__header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.services__desc {
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.45);
  max-width: 40ch;
  padding-bottom: 0.5rem;
}

/* ── Bento grid ── */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.9rem, 1.4vw, 1.25rem);
  position: relative;
  z-index: 1;
}

.bento-cell {
  padding: clamp(1.5rem, 2.4vw, 2rem);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  will-change: transform;
}

.bento-cell--web,
.bento-cell--mobile {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(1.25rem, 2vw, 2rem);
  min-height: 320px;
}

.bento-cell--launch { grid-column: span 4; min-height: 0; }

.bento-cell__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bento-cell__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.14em;
  margin-bottom: auto;
  padding-bottom: 1.25rem;
}

.bento-cell__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border: 1px solid rgba(110,92,255,0.25);
  margin-bottom: 1.25rem;
  transition: box-shadow var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-spring);
}
.bento-cell:hover .bento-cell__icon {
  box-shadow: 0 0 24px -4px var(--c-accent-glow);
  transform: translateY(-2px);
}
.bento-cell__icon--ai { color: #b39dff; }

.bento-cell__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--c-white);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.bento-cell__desc {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.48);
}

.bento-cell__tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.service-tag {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.02);
  transition: border-color var(--dur-mid) var(--ease-out), color var(--dur-mid) var(--ease-out);
}
.bento-cell:hover .service-tag,
.portfolio-card:hover .service-tag {
  border-color: rgba(110,92,255,0.4);
  color: rgba(255,255,255,0.8);
}

/* ── Visuals: mini browser ── */
.bento-cell__visual {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background:
    radial-gradient(90% 90% at 60% 20%, rgba(110,92,255,0.12), transparent 65%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  padding: 1.25rem;
}

.mini-browser {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  background: rgba(10,10,16,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,0.7);
  transform: rotate(-2.5deg) translateY(4px);
  transition: transform 0.6s var(--ease-out);
}
.bento-cell--web:hover .mini-browser { transform: rotate(0deg) translateY(0); }

.mini-browser__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mini-browser__bar span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.mini-browser__bar span:first-child { background: rgba(110,92,255,0.7); }
.mini-browser__bar i {
  flex: 1;
  height: 8px;
  margin-left: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}
.mini-browser__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mini-browser__hero {
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(120deg, rgba(110,92,255,0.5), rgba(157,123,255,0.25));
  position: relative;
  overflow: hidden;
}
.mini-browser__hero::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: miniShine 4.5s var(--ease-in-out) infinite;
}
@keyframes miniShine {
  0%, 55%  { left: -60%; }
  85%, 100% { left: 130%; }
}
.mini-browser__row { display: flex; gap: 6px; }
.mini-browser__row span {
  flex: 1;
  height: 22px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
}

/* ── Visuals: mini phone ── */
.mini-phone {
  width: 108px;
  border-radius: 18px;
  background: rgba(10,10,16,0.9);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 7px;
  box-shadow: 0 20px 44px -18px rgba(0,0,0,0.7);
  position: relative;
  transform: rotate(3deg) translateY(6px);
  transition: transform 0.6s var(--ease-out);
}
.bento-cell--mobile:hover .mini-phone { transform: rotate(0deg) translateY(0); }

.mini-phone__notch {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.14);
  z-index: 1;
}
.mini-phone__screen {
  border-radius: 12px;
  background: #101018;
  padding: 16px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 160px;
}
.mini-phone__card {
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(130deg, rgba(110,92,255,0.55), rgba(34,211,238,0.2));
}
.mini-phone__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mini-phone__grid span {
  height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,0.07);
}
.mini-phone__grid span:nth-child(2) { background: rgba(110,92,255,0.28); }
.mini-phone__cta {
  height: 18px;
  border-radius: 9px;
  margin-top: auto;
  background: linear-gradient(135deg, rgba(110,92,255,0.75), rgba(157,123,255,0.5));
}

/* ── Launch strip ── */
.bento-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  width: 100%;
}
.bento-launch__left { max-width: 56ch; }
.bento-launch__left .bento-cell__num { padding-bottom: 0.8rem; display: block; }

.bento-launch__badges {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-mid);
  background: rgba(255,255,255,0.03);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  transition: border-color var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-spring);
}
.bento-cell--launch:hover .store-badge {
  border-color: rgba(110,92,255,0.45);
  box-shadow: 0 0 22px -8px var(--c-accent-glow);
}
.store-badge svg { color: var(--c-white); }

/* ══════════════ RESPONSIVE ══════════════ */

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell--web, .bento-cell--mobile { grid-column: span 2; }
  .bento-cell--launch { grid-column: span 2; }
}

@media (max-width: 860px) {
  .services__header {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: var(--sp-5);
  }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-cell--web, .bento-cell--mobile, .bento-cell--launch { grid-column: span 1; }
  .bento-cell--web, .bento-cell--mobile { flex-direction: column; min-height: 0; }
  .bento-cell__visual { flex: 0 0 auto; min-height: 190px; }
  .bento-cell { min-height: 0; }
  .bento-launch { flex-direction: column; align-items: flex-start; }
  .bento-launch__badges { flex-wrap: wrap; }
}
