/* Apps page — own layout, forest concept, no homepage clone, no blue */

body[data-page="apps"] .home-niche,
body[data-page="sites"] .home-niche,
body[data-page="bots"] .home-niche,
body[data-page="services"] .home-niche,
body[data-page="ai"] .home-niche {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
body[data-page="apps"] .home-niche img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.app-hero {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  color: #fff;
  padding: clamp(22px, 3.5vw, 32px);
  min-height: 0;
  display: grid;
  align-content: start;
  background-color: #101816;
  background-image:
    var(--hero-photo-veil),
    var(--hero-photo-veil-extra),
    url("../assets/hero-app.jpg");
  background-repeat: no-repeat;
  background-size: auto, auto, 142% auto;
  background-position: 0 0, 0 0, 100% 14%;
}
.app-hero > * {
  position: relative;
  z-index: 2;
}
body[data-page="services"] .app-hero {
  background-image: url("../assets/hero-services.jpg?v=v1exact");
  background-size: cover;
  background-position: center;
}
body[data-page="services"] #napravleniya,
body[data-page="services"] #napravleniya .container,
body[data-page="services"] .dir-slider,
body[data-page="services"] .dir-slider-track {
  background: transparent;
  box-shadow: none;
}
body[data-page="sites"] .app-hero {
  background-image: url("../assets/sites-hero-v1.jpg?v=v1exact");
  background-size: cover;
  background-position: center;
}
.app-hero .kicker {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.app-hero .kicker a {
  color: #fff;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
}
.app-hero h1 {
  margin: 0;
  max-width: 18ch;
  color: #fff;
  line-height: 1.08;
}
.app-hero .lead {
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
  margin: 14px 0 18px;
}
.app-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.app-hero .btn-dark { background: #fff; color: #101816; }
.app-hero .btn-line { border-color: rgba(255, 255, 255, 0.4); color: #fff; }

.app-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.app-proof article {
  border-radius: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.app-proof strong { display: block; font-size: 1.05rem; }
.app-proof p { margin: 6px 0 0; color: var(--copy); font-size: 0.92rem; font-weight: 500; }

.app-work {
  border-radius: 28px;
  padding: clamp(18px, 3vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.dir-tabs {
  border-radius: 28px;
  padding: clamp(20px, 3vw, 28px);
  background: linear-gradient(160deg, #141816 0%, #1c2420 100%);
  color: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 22, 0.22);
}
.dir-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.dir-tabs-nav button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 22px;
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.dir-tabs-nav button:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.45); }
.dir-tabs-nav button.is-on {
  background: #fff;
  color: #141816;
  border-color: #fff;
}
.dir-tabs-panel { display: none; }
.dir-tabs-panel.is-on {
  display: block;
  border-radius: 22px;
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dir-tabs-panel h3 { margin: 0 0 18px; font-size: 1.2rem; color: #fff; }
.dir-tabs-panel p { margin: 0 0 22px; color: rgba(255, 255, 255, 0.78); font-size: 0.98rem; line-height: 1.6; }
.dir-tabs-panel a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.dir-tabs-panel p.dir-tabs-ex,
.dir-tabs-ex {
  margin: 36px 0 16px;
  padding-top: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}
.dir-tabs-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.dir-tabs-panel li {
  position: relative;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
  line-height: 1.45;
}
.dir-tabs-panel li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  position: absolute;
  left: 0;
  top: 0.5em;
}
.app-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.app-steps article {
  border-radius: 22px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  min-height: 170px;
}
.app-steps .num {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-items: center;
  display: grid;
  background: #141816;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.app-steps h3 { margin: 0 0 8px; font-size: 1.08rem; }
.app-steps p { margin: 0; color: var(--copy); font-size: 0.92rem; font-weight: 500; }

.app-stage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.app-stage article {
  border-radius: 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.app-price.popular {
  background: linear-gradient(160deg, #132f2a, #1c4b42);
  color: #fff;
  border: 0;
}
.app-price.popular .tag,
.app-price.popular .sub,
.app-price.popular ul { color: rgba(255, 255, 255, 0.78); }
.app-price.popular h3,
.app-price.popular .amount { color: #fff; }

.shot-carousel { position: relative; background: transparent; }
.shot-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 2px 6px;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}
.shot-track::-webkit-scrollbar { display: none; }
.shot-slide {
  flex: 0 0 calc((100% - 60px) / 6);
  scroll-snap-align: start;
  min-width: 0;
  background: transparent;
}
.phone-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone-card:hover { transform: translateY(-6px); }
.phone-shot {
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.phone-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone-card:hover .phone-shot img { transform: scale(1.04); }
.phone-meta { display: grid; line-height: 1.25; }
.phone-meta strong { font-size: 0.95rem; }
.phone-meta small { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.shot-nav {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 12px;
  background: transparent;
}
.dir-slider {
  position: relative;
  background: transparent;
  box-shadow: none;
}
.dir-slider-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dir-slider-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.dir-slider-names button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 22px;
  min-height: 40px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.dir-slider-names button:hover { transform: translateY(-2px); }
.dir-slider-names button.is-on {
  background: #141816;
  color: #fff;
  border-color: #141816;
}
html[data-theme="dark"] .dir-slider-names button.is-on {
  background: #fff;
  color: #141816;
  border-color: #fff;
}
.dir-slider-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0;
  margin: 0;
  cursor: grab;
  scrollbar-width: none;
  touch-action: pan-y;
  background: transparent;
  box-shadow: none;
}
.dir-slider-track::-webkit-scrollbar { display: none; }
.dir-slider-track.is-drag {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}
.dir-slide {
  flex: 0 0 min(860px, 92%);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 280px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 68%),
    linear-gradient(160deg, #34756a 0%, #1c4b42 55%, #163832 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(19, 47, 42, 0.14);
}
.dir-slide .pic {
  min-height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.dir-slide .pic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.28), transparent 60%);
}
.dir-slide .body { padding: 24px 26px 22px; }
.dir-slide h3 { margin: 0 0 10px; color: #fff; font-size: 1.28rem; }
.dir-slide p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 0.96rem; line-height: 1.55; }
.dir-slide .dir-tabs-ex {
  margin: 14px 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}
.dir-slide ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}
.dir-slide li {
  position: relative;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  line-height: 1.45;
}
.dir-slide li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  position: absolute;
  left: 0;
  top: 0.5em;
}
.dir-slide a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) {
  .dir-slide { grid-template-columns: 1fr; flex-basis: 88%; }
  .dir-slide .pic { min-height: 160px; }
}

.shot-nav button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}
.shot-nav button:hover { border-color: var(--forest); }
html[data-theme="dark"] .shot-nav button {
  background: #1a1f1c;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1100px) {
  .shot-slide { flex-basis: calc((100% - 36px) / 4); }
}
@media (max-width: 900px) {
  .app-proof, .app-steps, .app-stage { grid-template-columns: 1fr 1fr; }
  .shot-slide { flex-basis: calc((100% - 12px) / 2); }
}
@media (max-width: 560px) {
  .app-proof, .app-steps, .app-stage { grid-template-columns: 1fr; }
  .app-hero {
    background-size: auto, auto, cover;
    background-position: 0 0, 0 0, 85% top;
  }
  body[data-page="sites"] .app-hero,
  body[data-page="services"] .app-hero,
  body[data-page="bots"] .app-hero {
    background-size: cover;
    background-position: center;
  }
  .app-hero h1 { max-width: 18ch; }
  .app-hero .lead { max-width: 88%; }
  .app-hero-actions { max-width: 100%; }
  .shot-slide { flex-basis: 82%; }
}
