/* Page section headers + the Services build preview window */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 48px;
}
.section-head .section-heading { margin-bottom: 16px; }
.section-head .section-note { margin: 0; }

/* Build preview window (Services) */
.build-window {
  width: 290px;
  aspect-ratio: 4 / 3;
  margin-bottom: 22px;
  background: var(--jet);
  border: 1px solid var(--silver);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.bw-bar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--silver);
  background: #1e1e1e;
}
.bw-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b6b6b;
}
.bw-bar i:nth-child(2) { background: var(--white); }
.bw-bar i:nth-child(3) { background: var(--white); }
.bw-url {
  flex: 1;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--black);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
}
.bw-body {
  position: relative;
  height: calc(100% - 28px);
}
.bw-panel {
  position: absolute;
  inset: 12px;
  display: none;
  gap: 8px;
}
.build-window[data-variant="web"] .bw-web,
.build-window[data-variant="software"] .bw-soft,
.build-window[data-variant="design"] .bw-design,
.build-window[data-variant="api"] .bw-api,
.build-window[data-variant="brand"] .bw-brand { display: grid; }

.bw-b {
  display: block;
  background: #2a2a2a;
  border-radius: 5px;
  min-height: 8px;
}
.bw-b.a { background: var(--white); }
.bw-b.g { background: var(--white); }
.bw-b.o { background: transparent; border: 1.5px dashed #3a3a3a; }
.is-building .bw-b,
.is-building .bw-node {
  animation: bw-pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes bw-pop {
  from { transform: scale(0.4) translateY(10px); opacity: 0; }
}
.bw-row { display: flex; gap: 6px; align-items: center; }
.bw-row .bw-b { height: 8px; flex: 0 0 18px; }
.bw-row .bw-b:first-child { flex-basis: 26px; }
.bw-row .bw-sp { flex: 1; }
.bw-col { display: flex; flex-direction: column; gap: 7px; justify-content: center; }

.bw-web { grid-template-rows: auto 1fr auto; }
.bw-web .bw-col .bw-b { height: 12px; }
.bw-web .bw-col .bw-b:nth-child(1) { width: 78%; }
.bw-web .bw-col .bw-b:nth-child(2) { width: 54%; }
.bw-web .bw-col .bw-b.a { width: 64px; height: 16px; border-radius: 99px; margin-top: 4px; }
.bw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.bw-cards .bw-b { height: 46px; }

.bw-soft { grid-template-columns: 50px 1fr; }
.bw-soft .bw-side { display: flex; flex-direction: column; gap: 7px; padding-right: 8px; border-right: 1px solid var(--silver); }
.bw-soft .bw-side .bw-b { height: 9px; }
.bw-soft .bw-main { display: grid; grid-template-rows: 44px 1fr; gap: 8px; }
.bw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bw-rows { display: flex; flex-direction: column; gap: 6px; }
.bw-rows .bw-b { height: 10px; }

.bw-design { grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.bw-screen {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  padding: 8px 6px;
  border: 1.5px solid #3a3a3a;
  border-radius: 10px;
}
.bw-screen .bw-b { height: 8px; }
.bw-screen .bw-b.tall { height: 30px; }

.bw-api { place-items: center; }
.bw-api svg { width: 100%; height: 100%; overflow: visible; }
.bw-api .bw-link { stroke: #3a3a3a; stroke-width: 2; stroke-dasharray: 5 5; animation: bw-dash 1s linear infinite; }
.bw-api .bw-link.hot { stroke: var(--white); }
.bw-api .bw-node rect { fill: #2a2a2a; stroke: #3a3a3a; stroke-width: 1.5; }
.bw-api .bw-node.a rect { fill: var(--white); stroke: none; }
.bw-api .bw-node text { font-family: 'DM Mono', monospace; font-size: 10px; fill: var(--white); text-anchor: middle; }
.bw-api .bw-node.a text { fill: #0a0a0a; }
.bw-api .bw-node { transform-box: fill-box; transform-origin: center; }
@keyframes bw-dash { to { stroke-dashoffset: -20; } }

.bw-brand { grid-template-rows: auto 1fr; }
.bw-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bw-swatches .bw-b { height: 34px; border-radius: 8px; }
.bw-swatches .bw-b.k { background: #e0e0e0; }
.bw-swatches .bw-b.d { background: #151515; border: 1px solid #3a3a3a; }
.bw-type { display: flex; align-items: center; gap: 12px; }
.bw-type .bw-aa {
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  line-height: 1;
  color: var(--white);
}
.bw-type .bw-col { flex: 1; }
.bw-type .bw-col .bw-b:nth-child(2) { width: 70%; }


@media (prefers-reduced-motion: reduce) {
  .is-building .bw-b,
  .is-building .bw-node {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .build-window { width: 250px; }
}
@media (max-width: 900px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .build-window { align-self: center; margin-bottom: 0; }
}
@media (max-width: 480px) {
  .build-window { width: 100%; max-width: 300px; }
}

/* ===== Packages & pricing ===== */
.packages { background: var(--jet); border-top: 1px solid var(--silver); }
.packages .section-heading { margin-bottom: 48px; }
.packages .section-note { margin-bottom: 40px; }
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pkg {
  position: relative; display: flex; flex-direction: column;
  background: var(--black); border: 1px solid var(--silver); border-radius: var(--radius);
  padding: 34px 30px 30px;
}
.pkg-featured { border-color: rgba(224,224,224,0.45); }
.pkg-flag {
  position: absolute; top: -11px; left: 30px;
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--white); color: var(--black); padding: 5px 10px;
}
.pkg-name { font-family: 'Cormorant Garamond', serif; font-size: 27px; font-weight: 400; color: var(--white); line-height: 1.15; }
.pkg-for { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 8px; min-height: 42px; }
.pkg-price {
  font-family: 'Instrument Sans', sans-serif; font-weight: 500; font-size: 36px; letter-spacing: -0.01em;
  color: var(--white); margin-top: 26px; font-variant-numeric: tabular-nums;
}
.pkg-from {
  display: block; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gray); margin-bottom: 4px; font-weight: 400;
}
.pkg-time { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--gray); margin-top: 6px; }
.pkg-list { list-style: none; margin: 24px 0 28px; padding: 22px 0 0; border-top: 1px solid var(--silver); flex: 1; }
.pkg-list li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--white); margin-bottom: 10px; }
.pkg-list li::before { content: ''; position: absolute; left: 0; top: 10px; width: 8px; height: 1px; background: var(--gray); }
.pkg-cta { display: block; text-align: center; text-decoration: none; }
.care-plan {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  margin-top: 20px; padding: 28px 30px;
  border: 1px dashed var(--silver); border-radius: var(--radius); background: var(--black);
}
.care-text p { font-size: 14px; line-height: 1.7; color: var(--muted); margin-top: 6px; max-width: 520px; }
.care-prices { display: flex; gap: 36px; flex-shrink: 0; }
.care-prices > div { display: flex; flex-direction: column; }
.care-amt { font-family: 'Instrument Sans', sans-serif; font-size: 24px; font-weight: 500; color: var(--white); font-variant-numeric: tabular-nums; }
.care-per { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin-top: 4px; }
.pkg-fine { font-size: 13px; color: var(--gray); margin-top: 24px; }
.pkg-fine a { color: var(--white); }
@media (max-width: 960px) {
  .pkg-grid { grid-template-columns: 1fr; }
  .pkg-for { min-height: 0; }
  .care-plan { flex-direction: column; align-items: flex-start; }
  .care-prices { gap: 28px; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .pkg { padding: 30px 22px 24px; }
  .care-plan { padding: 24px 22px; }
}

/* ===== 3D + Pixel art build previews ===== */
.build-window[data-variant="3d"] .bw-3d,
.build-window[data-variant="pixel"] .bw-pixel { display: grid; }

.bw-3d { place-items: center; }
.bw-stage { position: relative; width: 120px; height: 120px; perspective: 420px; display: grid; place-items: center; }
.bw-cube {
  position: relative; width: 62px; height: 62px; transform-style: preserve-3d;
  animation: bw-spin 7s linear infinite;
}
.bw-cube i {
  position: absolute; inset: 0; border: 1.5px solid var(--white);
  background: rgba(224, 224, 224, 0.06);
}
.bw-cube .f1 { transform: translateZ(31px); background: rgba(224, 224, 224, 0.18); }
.bw-cube .f2 { transform: rotateY(180deg) translateZ(31px); }
.bw-cube .f3 { transform: rotateY(90deg) translateZ(31px); border-color: #6b6b6b; }
.bw-cube .f4 { transform: rotateY(-90deg) translateZ(31px); border-color: #6b6b6b; }
.bw-cube .f5 { transform: rotateX(90deg) translateZ(31px); background: rgba(224, 224, 224, 0.28); }
.bw-cube .f6 { transform: rotateX(-90deg) translateZ(31px); border-color: #3a3a3a; }
.bw-shadow {
  position: absolute; bottom: 4px; left: 50%; width: 70px; height: 12px; margin-left: -35px;
  border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, 0.55), transparent 70%);
}
.is-building .bw-stage { animation: bw-pop 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes bw-spin {
  from { transform: rotateX(-24deg) rotateY(0deg); }
  to { transform: rotateX(-24deg) rotateY(360deg); }
}

.bw-pixel { grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 0 10px; }
.bw-sprite {
  display: grid; grid-template-columns: repeat(10, 1fr); width: 140px; aspect-ratio: 1;
  justify-self: center; image-rendering: pixelated;
}
.bw-sprite .px { display: block; }
.bw-sprite .px.l { background: var(--white); }
.bw-sprite .px.m { background: #6b6b6b; }
.bw-sprite .px.d { background: #2a2a2a; }
.is-building .bw-sprite .px:not(.e) {
  animation: bw-px 0.25s steps(2) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes bw-px { from { opacity: 0; transform: scale(0); } }
.bw-pal { display: flex; flex-direction: column; gap: 6px; }
.bw-pal .bw-b { width: 22px; height: 22px; min-height: 0; border-radius: 0; }
.bw-pal .bw-b.l { background: var(--white); }
.bw-pal .bw-b.m { background: #6b6b6b; }
.bw-pal .bw-b.d { background: #2a2a2a; }

@media (prefers-reduced-motion: reduce) {
  .bw-cube { animation: none; transform: rotateX(-24deg) rotateY(35deg); }
}

/* ===== Contact widget ===== */
/* Keep the floating "Contact us" button out of the way of menus and panels */
body:has(.mobile-menu.open, .panel-drawer.open, #preloader:not(.fade-out)) #ymap-contact { display: none; }
.c-chat { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.c-chat:hover { opacity: 0.75; }
/* Spam trap: hidden from people, visible to bots */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
