/* TB-Servis — premium hero & directions (home) */

body:has(.tb-hero) {
  background: linear-gradient(180deg, #050a14 0%, #070e18 50%, #060b14 100%);
}

body:has(.tb-hero)::before {
  opacity: 0.42;
  filter: blur(18px);
}

body:has(.tb-hero)::after {
  opacity: 0.38;
  background-size: 64px 64px;
}

.tb-hero {
  position: relative;
  padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}

.tb-hero__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 72% 38%, rgba(59, 130, 246, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 40% at 18% 72%, rgba(139, 92, 246, 0.08), transparent 55%),
    linear-gradient(180deg, #050a14 0%, #070e18 42%, #060b14 100%);
}

.tb-hero__ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 92%);
  opacity: 0.55;
}

.tb-hero__ambient::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -8%;
  top: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.12), transparent 68%);
  filter: blur(40px);
}

.tb-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.tb-hero__copy {
  max-width: 640px;
}

.tb-hero__eyebrow {
  margin: 0 0 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.tb-hero__title {
  margin: 0;
  font-size: clamp(2.35rem, 4.2vw, 3.65rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #f8fafc;
  text-wrap: balance;
}

.tb-hero__title .tb-hero__accent {
  display: block;
  margin-top: 0.12em;
  background: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 42%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tb-hero__lead {
  margin: 22px 0 0;
  max-width: 52ch;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.72;
  color: #94a3b8;
}

.tb-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.tb-hero__cta .btn-primary {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.28);
}

.tb-hero__cta .btn-secondary {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

.tb-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.tb-hero__trust-item strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f1f5f9;
}

.tb-hero__trust-item span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #64748b;
}

/* Visual stage */
.tb-hero__visual {
  position: relative;
  min-height: 480px;
}

.tb-hero__visual::after {
  content: "";
  position: absolute;
  inset: 10% 0 20% 20%;
  border-radius: 50%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 40%), rgba(96, 165, 250, 0.12), transparent 55%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.tb-hero__stage {
  position: relative;
  width: 100%;
  max-width: none;
  margin-left: 0;
  aspect-ratio: auto;
  transform: translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0);
  will-change: transform;
}

@keyframes tbHeroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tb-float {
  position: absolute;
  z-index: 3;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  font-size: 0.72rem;
  color: #cbd5e1;
  max-width: 140px;
  animation: tbHeroFloat 8s ease-in-out infinite;
}

.tb-float strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: #f8fafc;
}

.tb-float--tl {
  top: 6%;
  left: -4%;
  animation-delay: -2s;
}

.tb-float--br {
  right: -2%;
  bottom: 18%;
  animation-delay: -4s;
}

.tb-command {
  position: relative;
  z-index: 2;
  height: auto;
  animation: tbHeroFloat 9s ease-in-out infinite;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(8, 14, 28, 0.94) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    0 32px 64px rgba(2, 6, 23, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}

.tb-command::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.04) 50%, transparent 60%);
  pointer-events: none;
}

.tb-command__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.tb-command__dots {
  display: flex;
  gap: 6px;
}

.tb-command__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.tb-command__dots span:first-child { background: #64748b; }

.tb-command__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.tb-command__body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 12px;
}

.tb-command__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tb-command__metric {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.tb-command__metric span {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tb-command__metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.tb-command__metric em {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-style: normal;
  color: #4ade80;
}

.tb-command__chart {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.tb-command__chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 0.7rem;
  color: #64748b;
}

.tb-command__chart-head strong {
  font-size: 0.82rem;
  color: #e2e8f0;
}

.tb-command__chart svg {
  width: 100%;
  height: 72px;
  display: block;
}

.tb-command__feed {
  display: grid;
  gap: 8px;
}

.tb-command__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.06);
  font-size: 0.72rem;
  color: #cbd5e1;
}

.tb-command__row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  flex-shrink: 0;
}

.tb-command__row time {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
}

/* Directions */
.tb-directions {
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 96px);
}

.tb-directions__head {
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.tb-directions__head .section-eyebrow,
.tb-directions__eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.tb-directions__head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.15;
}

.tb-directions__head p {
  margin: 14px 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #94a3b8;
}

.tb-directions__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tb-dir-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(200px, 1fr) auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(8, 14, 28, 0.85) 100%);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.tb-dir-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(96, 165, 250, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tb-dir-card:hover {
  transform: translateY(-6px);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 28px 56px rgba(2, 6, 23, 0.4);
}

.tb-dir-card:hover::before {
  opacity: 1;
}

.tb-dir-card__visual {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.tb-dir-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 14, 28, 0.85) 100%);
  pointer-events: none;
}

.tb-dir-card__copy {
  padding: 20px 22px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.tb-dir-card__copy h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.35;
  color: #f1f5f9;
}

.tb-dir-card__copy p {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #64748b;
}

.tb-dir-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #93c5fd;
}

/* Card visuals */
.tb-vis-crm {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  height: 100%;
  min-height: 160px;
}

.tb-vis-crm__kanban {
  display: grid;
  gap: 8px;
}

.tb-vis-crm__col {
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.tb-vis-crm__col span {
  font-size: 0.6rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tb-vis-crm__card {
  margin-top: 8px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.tb-vis-crm__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.tb-vis-crm__bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #60a5fa, rgba(59, 130, 246, 0.35));
}

.tb-vis-ads {
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.08);
  min-height: 160px;
}

.tb-vis-ads__line {
  width: 100%;
  height: 100px;
}

.tb-vis-repair {
  position: relative;
  min-height: 160px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 40%, rgba(56, 189, 248, 0.15), transparent 45%),
    rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.tb-vis-repair__board {
  position: absolute;
  inset: 20% 15%;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background:
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(56, 189, 248, 0.08) 18px, rgba(56, 189, 248, 0.08) 19px),
    repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(56, 189, 248, 0.08) 18px, rgba(56, 189, 248, 0.08) 19px),
    rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.12);
}

.tb-vis-web {
  min-height: 160px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.65);
  overflow: hidden;
}

.tb-vis-web__chrome {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.tb-vis-web__chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.3);
}

.tb-vis-web__layout {
  display: grid;
  grid-template-columns: 28% 1fr;
  gap: 8px;
  padding: 12px;
  min-height: 120px;
}

.tb-vis-web__side {
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
}

.tb-vis-web__main {
  display: grid;
  gap: 8px;
}

.tb-vis-web__block {
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.35), rgba(96, 165, 250, 0.15));
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .tb-hero__grid {
    grid-template-columns: 1fr;
  }

  .tb-hero__visual {
    min-height: auto;
    max-width: none;
    margin: 0;
  }

  .tb-hero__stage {
    margin: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .tb-directions__grid {
    grid-template-columns: 1fr;
  }

  .tb-float {
    display: none;
  }

  .tb-hero__trust {
    gap: 16px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tb-command,
  .tb-float {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
