/* NKSV Store & Service — многостраничный лендинг (landing-cursor, v2).
   Палитра прежняя: почти чёрный фон, фиолетовый акцент, зелёный/янтарный.
   Спокойнее прошлой версии: один мягкий свет сверху, фиолетовый — только на
   действиях, без сетки, лучей и бегущих строк. Без CDN, шрифтов и сборки. */

:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --bg-3: #13131c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #f4f4f7;
  --ink-2: #c9c9d3;
  --muted: #8d8d9b;
  --brand: #9c6cff;
  --brand-2: #7c3aed;
  --brand-3: #c4b5fd;
  --brand-soft: rgba(140, 92, 255, 0.12);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.11);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.11);
  --blue: #93c5fd;
  --blue-soft: rgba(147, 197, 253, 0.11);
  --grad: linear-gradient(135deg, #a67cff 0%, #7c3aed 100%);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --header-h: 72px;
  --tabbar-h: 0px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 520px at 75% -220px, rgba(124, 58, 237, 0.2), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--ink-2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-h);
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-3);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(1160px, 100% - 48px);
  margin-inline: auto;
}

.narrow {
  max-width: 820px;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-2);
  color: #fff;
}

.skip:focus {
  top: 12px;
}

.muted {
  color: var(--muted);
}

/* ---------- кнопки ---------- */

.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  --h: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-lg {
  --h: 52px;
  padding: 0 24px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.28);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 8px 26px rgba(124, 58, 237, 0.42);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(156, 108, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.site-header.is-scrolled {
  background: rgba(7, 7, 11, 0.8);
  border-color: var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: block;
  flex: none;
}

.logo img {
  width: auto;
  height: 58px;
}

.site-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 550;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  color: var(--ink);
  font-weight: 650;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- общие блоки ---------- */

.section {
  padding-top: clamp(56px, 8vw, 104px);
}

.section-tight {
  padding-top: clamp(40px, 5vw, 64px);
}

.section-flush {
  padding-top: 8px;
}

.section-head {
  max-width: 680px;
  margin-bottom: 26px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 750;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16.5px;
}

.eyebrow {
  display: inline-block;
  color: var(--brand-3);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.h3 {
  font-size: 21px;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(16.5px, 1.5vw, 19px);
  max-width: 620px;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--ink);
  font-weight: 650;
}

.more-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}

.more-link:hover svg {
  transform: translateX(3px);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
}

.icon svg {
  width: 22px;
  height: 22px;
}

.accent-blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.accent-green {
  color: var(--green);
  background: var(--green-soft);
}

.accent-amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.accent-purple {
  color: var(--brand-3);
  background: var(--brand-soft);
}

/* ---------- главная: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding-top: clamp(28px, 5vw, 64px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.badge.is-closed .dot {
  background: var(--amber);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.accent {
  color: var(--brand-3);
}

.hero .lead {
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-facts {
  display: flex;
  gap: 32px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
}

.hero-facts b {
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.hero-facts span {
  color: var(--muted);
  font-size: 13.5px;
}

.hero-art {
  --alu-outer: #3a3a40;
  --alu-inner: #1a1a1e;
  --alu-shine: rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 520px;
}

/* Анимированный iPhone: экран в трещинах → луч ремонта → целый экран и
   уведомление бота. Цикл 8 с, пропорции iPhone 15. */

.stage-glow {
  position: absolute;
  width: min(90%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 92, 255, 0.26), transparent 68%);
  filter: blur(18px);
  animation: glow-breathe 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.phone-scene {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 24px 48px 40px;
  perspective: 1400px;
}

.phone-scene::after {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: 52%;
  height: 16px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.phone {
  --w: 228px;
  position: relative;
  z-index: 1;
  width: var(--w);
  aspect-ratio: 716 / 1476;
  transform: rotateY(-10deg) rotateX(6deg) rotateZ(-2.2deg);
  transform-style: preserve-3d;
  animation: phone-float 6.4s ease-in-out infinite;
}

@keyframes phone-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes phone-float {
  0%, 100% { transform: rotateY(-10deg) rotateX(6deg) rotateZ(-2.2deg) translateY(0); }
  50% { transform: rotateY(-7deg) rotateX(4deg) rotateZ(-1.6deg) translateY(-8px); }
}

.phone-btn {
  position: absolute;
  z-index: 4;
  background: linear-gradient(180deg, #5a5a62, var(--alu-outer) 42%, #121214);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.phone-btn.mute,
.phone-btn.vol-up,
.phone-btn.vol-down {
  left: -3px;
  width: 3px;
  border-radius: 2px 0 0 2px;
}

.phone-btn.mute { top: 16.2%; height: 3.1%; }
.phone-btn.vol-up { top: 21.8%; height: 7.6%; }
.phone-btn.vol-down { top: 30.6%; height: 7.6%; }

.phone-btn.power {
  right: -3px;
  top: 21.6%;
  width: 3px;
  height: 10.2%;
  border-radius: 0 2px 2px 0;
}

.phone-bezel {
  position: absolute;
  inset: 0;
  border-radius: 21.8% / 10.5%;
  padding: 1.85%;
  background: #050505;
  container-type: inline-size;
  box-shadow:
    0 30px 60px -12px rgba(0, 0, 0, 0.75),
    0 0 40px -6px rgba(140, 92, 255, 0.25),
    0 0 0 1px var(--alu-outer),
    0 0 0 2px var(--alu-inner),
    0 0 0 2.5px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px var(--alu-shine),
    inset 0 0 8px rgba(0, 0, 0, 0.85);
}

@supports (corner-shape: squircle) {
  .phone-bezel,
  .phone-glass,
  .screen {
    corner-shape: squircle;
  }
}

.phone-glass {
  position: relative;
  height: 100%;
  border-radius: 20.6% / 9.6%;
  overflow: hidden;
  background: #000;
}

.island {
  position: absolute;
  z-index: 7;
  top: 2.2%;
  left: 50%;
  width: 32.5%;
  height: 3.7%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(140, 92, 255, 0.38), transparent 58%),
    radial-gradient(70% 40% at 80% 90%, rgba(74, 222, 128, 0.1), transparent 62%),
    linear-gradient(180deg, #17131f 0%, #08080c 52%, #100e18 100%);
}

.lock {
  position: relative;
  z-index: 1;
  padding-top: 18.5cqi;
  text-align: center;
  color: #fff;
}

.lock-date {
  margin: 0;
  font-size: 4.7cqi;
  font-weight: 590;
  opacity: 0.9;
}

.lock-time {
  margin: 1.2cqi 0 0;
  font-size: 22cqi;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.88;
  font-variant-numeric: tabular-nums;
}

.cracks,
.repair-beam,
.repaired,
.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cracks {
  z-index: 3;
  animation: crack-heal 8s ease-in-out infinite;
}

.crack-shade { stroke: rgba(8, 8, 12, 0.28); }
.crack-lite { stroke: rgba(220, 224, 236, 0.5); }

.repair-beam {
  z-index: 4;
  background: linear-gradient(180deg, transparent 0%, rgba(196, 181, 253, 0) 38%, rgba(255, 255, 255, 0.6) 50%, rgba(74, 222, 128, 0) 62%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: beam 8s ease-in-out infinite;
}

.repaired {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 18%;
  background: radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.07), transparent 56%);
  opacity: 0;
  animation: heal-in 8s ease-in-out infinite;
}

.brand-word {
  margin: 0;
  font-size: 18cqi;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 28px rgba(196, 181, 253, 0.5);
}

/* Уведомление бота выезжает сверху, когда экран «починился». */
.notif {
  position: absolute;
  z-index: 6;
  top: 52cqi;
  left: 5.5%;
  right: 5.5%;
  display: flex;
  align-items: center;
  gap: 3.4cqi;
  padding: 3.4cqi 3.8cqi;
  border-radius: 6cqi;
  background: rgba(40, 36, 54, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  animation: notif-in 8s var(--ease) infinite;
}

.notif-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 11cqi;
  height: 11cqi;
  border-radius: 3cqi;
  background: var(--grad);
}

.notif-ico svg {
  width: 60%;
  height: 60%;
}

.notif-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #fff;
  font-size: 5cqi;
  line-height: 1.3;
}

.notif-text b {
  color: rgba(255, 255, 255, 0.65);
  font-size: 4.2cqi;
  font-weight: 600;
}

.lock-tools {
  position: absolute;
  z-index: 5;
  left: 9%;
  right: 9%;
  bottom: 11cqi;
  display: flex;
  justify-content: space-between;
}

.tool {
  width: 12.4cqi;
  height: 12.4cqi;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.tool svg {
  width: 46%;
  height: 46%;
}

.glare {
  z-index: 2;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.2) 0%, transparent 28%, transparent 64%, rgba(255, 255, 255, 0.07) 100%);
}

.home-bar {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 2.6cqi;
  width: 33cqi;
  height: 1.15cqi;
  margin-left: -16.5cqi;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.5);
}

@keyframes crack-heal {
  0%, 26% { opacity: 1; }
  40%, 80% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes beam {
  0%, 24% { opacity: 0; transform: translateY(-40%); }
  36% { opacity: 0.9; transform: translateY(0); }
  48%, 100% { opacity: 0; transform: translateY(40%); }
}

@keyframes heal-in {
  0%, 32% { opacity: 0; transform: scale(0.92); }
  44%, 76% { opacity: 1; transform: scale(1); }
  90%, 100% { opacity: 0; transform: scale(0.96); }
}

@keyframes notif-in {
  0%, 46% { opacity: 0; transform: translateY(-14cqi) scale(0.96); }
  52%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  86%, 100% { opacity: 0; transform: translateY(-6cqi) scale(0.98); }
}

.stage-chips {
  position: absolute;
  inset: 12% -8px 10%;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(13, 13, 20, 0.8);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  animation: chip-float 4.8s ease-in-out infinite;
}

.float-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.chip-ok i {
  background: var(--brand-3);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.chip-pin i {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.chip-time { top: 6%; right: 0; animation-delay: 0.2s; }
.chip-ok { top: 44%; left: 0; animation-delay: 1s; }
.chip-pin { bottom: 8%; right: 4%; animation-delay: 1.6s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- главная: плитки услуг ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  color: var(--ink-2);
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}

.tile:hover {
  color: var(--ink-2);
  border-color: rgba(156, 108, 255, 0.45);
  background: var(--bg-3);
  transform: translateY(-2px);
}

.tile .icon {
  margin-bottom: 14px;
}

.tile b {
  color: var(--ink);
  font-size: 17px;
}

.tile-price {
  color: var(--muted);
  font-size: 14.5px;
}

.tile-go {
  position: absolute;
  right: 18px;
  top: 20px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s var(--ease);
}

.tile-go svg {
  width: 20px;
  height: 20px;
}

.tile:hover .tile-go {
  color: var(--brand-3);
  transform: translateX(3px);
}

/* ---------- запись ---------- */

.slots {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.slots-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px 24px;
}

.slots-head h2 {
  margin-top: 6px;
  font-size: clamp(21px, 2.4vw, 26px);
}

.slots-head p {
  max-width: 420px;
  color: var(--muted);
  font-size: 14.5px;
}

.slot-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.slot-days:empty {
  display: none;
}

.slot-day {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.slot-day b {
  flex-basis: 100%;
  color: var(--ink);
  font-size: 15px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover {
  color: #fff;
  border-color: rgba(156, 108, 255, 0.6);
}

.chip-on,
.chip-on:hover {
  color: #fff;
  border-color: transparent;
  background: var(--brand-2);
}

.chip-quiet {
  border-style: dashed;
  color: var(--muted);
}

/* ---------- главная: как это работает / выкуп ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.split h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3.4vw, 40px);
}

.mini-steps {
  display: grid;
  gap: 4px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.mini-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 0 12px 48px;
  counter-increment: s;
}

.mini-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--brand-3);
  background: var(--brand-soft);
  font-weight: 750;
  font-size: 14px;
}

.mini-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 48px;
  bottom: -8px;
  width: 1px;
  background: var(--line-2);
}

.mini-steps b {
  color: var(--ink);
  font-size: 16.5px;
}

.mini-steps span {
  color: var(--muted);
  font-size: 14.5px;
}

.quote-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.quote-card p {
  color: var(--ink);
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.quote-card span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.promo-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(156, 108, 255, 0.28);
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(124, 58, 237, 0.24), transparent 70%),
    var(--bg-2);
  color: var(--ink-2);
  transition: border-color 0.25s;
}

.promo-band:hover {
  color: var(--ink-2);
  border-color: rgba(156, 108, 255, 0.55);
}

.promo-band h2 {
  margin: 8px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.promo-go {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--grad);
  font-weight: 650;
}

.promo-go svg {
  width: 18px;
  height: 18px;
}

/* ---------- CTA-полоса ---------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.cta-band h2 {
  font-size: clamp(22px, 2.6vw, 30px);
}

.cta-band p {
  margin-top: 8px;
  max-width: 520px;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- внутренние страницы ---------- */

.page-hero {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: 28px;
}

.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: #fff;
}

.page-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* ---------- прайс ---------- */

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.model-chips.is-collapsed .chip-hidden {
  display: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.col-2 {
  grid-column: span 2;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.card .icon {
  margin-bottom: 16px;
}

.card h3 {
  font-size: 20px;
}

.card-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
}

.price-list {
  margin-top: 14px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.price-row span:last-child {
  flex: none;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Три класса детали в строке прайса: Копия / Копия HQ / Оригинал.
   Пустой класс не выводится — в разметке его просто нет. */
.price-row.price-row-variants {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.price-row .price-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-2);
}

.price-versions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
}

.price-variant {
  display: flex;
  min-width: 78px;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.price-variant-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

.price-variant b,
.price-one {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-one {
  flex: none;
  color: var(--ink);
}

@media (max-width: 560px) {
  .price-row.price-row-variants {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-row .price-name {
    flex: none;
  }

  .price-versions {
    justify-content: flex-start;
  }

  .price-variant {
    align-items: flex-start;
  }
}

.card-highlight {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--brand-3);
  background: var(--brand-soft);
  font-size: 13.5px;
  font-weight: 600;
}

.card-note {
  color: var(--muted);
  font-size: 12.5px;
}

.note-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 12px;
  padding: 18px 22px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}

.note-band b {
  color: var(--ink);
}

/* ---------- выкуп ---------- */

.buy-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.buy-steps,
.deal-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.checks {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.checks li {
  display: flex;
  gap: 12px;
  color: var(--ink-2);
}

.checks svg {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  color: #07170d;
  background: var(--green);
}

.deal-card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  border-color: rgba(156, 108, 255, 0.3);
}

.deal-card dl {
  margin: 14px 0 20px;
}

.deal-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.deal-card dt {
  color: var(--muted);
}

.deal-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  text-align: right;
}

.deal-card .btn + .btn {
  margin-top: 10px;
}

.deal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

.deal-link svg {
  width: 16px;
  height: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------- как мы работаем ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.step-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border-radius: 10px;
  color: var(--brand-3);
  background: var(--brand-soft);
  font-weight: 750;
  font-size: 14px;
}

.steps b {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}

.why article {
  padding: 24px;
  background: var(--bg-2);
}

.why h3 {
  font-size: 17px;
}

.why p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.prose h3 {
  margin-top: 26px;
  font-size: 19px;
}

.prose p {
  margin-top: 12px;
  color: var(--ink-2);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 8px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  transition: border-color 0.25s;
}

.faq details[open] {
  border-color: rgba(156, 108, 255, 0.35);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 22px;
  color: var(--ink);
  font-weight: 650;
  font-size: 16.5px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
  border-color: var(--brand-3);
}

.faq details p {
  padding: 0 22px 20px;
  color: var(--ink-2);
  font-size: 15.5px;
}

/* ---------- контакты ---------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
  color: var(--ink-2);
}

a.contact-card:hover {
  color: var(--ink-2);
  border-color: rgba(156, 108, 255, 0.45);
}

.contact-card .icon {
  margin-bottom: 12px;
}

.contact-card small {
  color: var(--muted);
  font-size: 13px;
}

.contact-card b {
  color: var(--ink);
  font-size: 16px;
}

.contact-card .muted {
  font-size: 13.5px;
}

.booking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.lead {
  max-width: none;
}

form.lead {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(156, 108, 255, 0.3);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.lead-title {
  font-size: 24px;
}

.lead-sub {
  margin: 8px 0 8px;
  color: var(--muted);
  font-size: 14.5px;
}

.lead label,
.lead .label {
  margin: 14px 0 6px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
}

.lead input,
.lead textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lead textarea {
  min-height: 92px;
  resize: vertical;
}

.lead input::placeholder,
.lead textarea::placeholder {
  color: #676775;
}

.lead input:focus,
.lead textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(156, 108, 255, 0.16);
}

.kind-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
}

.kind-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
}

.kind-switch button:hover {
  color: #fff;
}

.kind-switch button.is-on {
  color: #fff;
  background: var(--brand-2);
}

.lead .btn {
  margin-top: 20px;
}

.form-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
}

.form-msg.ok {
  color: var(--green);
  background: var(--green-soft);
}

.form-msg.err {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

.form-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.map {
  height: 380px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- подвал ---------- */

.site-footer {
  margin-top: clamp(64px, 9vw, 112px);
  padding: 40px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-note {
  max-width: 360px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.footer-nav,
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer-nav a,
.footer-contacts a {
  color: var(--ink-2);
}

.footer-nav a:hover,
.footer-contacts a:hover {
  color: #fff;
}

.footer-contacts span {
  color: var(--muted);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- мобильная панель разделов ---------- */

.tabbar {
  display: none;
}

/* ---------- появление при прокрутке ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ================= адаптив ================= */

@media (max-width: 1080px) {
  .site-nav a {
    padding: 8px 9px;
    font-size: 14px;
  }

  .header-phone {
    display: none;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .why {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
    --tabbar-h: calc(66px + env(safe-area-inset-bottom));
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .site-nav,
  .site-header .btn {
    display: none;
  }

  /* Витрину с телефона не спрятать: акцентная кнопка .btn-sale, в отличие от
     .site-nav и кнопки «Записаться», остаётся в шапке на всех ширинах. */
  .site-header .btn.btn-sale {
    display: inline-flex;
  }

  .header-phone {
    display: inline;
    margin-left: auto;
  }

  .header-actions {
    margin-left: auto;
  }

  .logo img {
    height: 46px;
  }

  /* Контакты на телефоне — компактные строки: иконка слева, текст справа. */
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 14px 16px;
  }

  .contact-card .icon {
    grid-row: span 3;
    margin: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* На телефоне сцена идёт под кнопками: телефон меньше и без наклона,
     метки по бокам, чтобы первый экран не раздувался. */
  .hero-art {
    order: 0;
    min-height: 0;
    margin: -4px 0 -8px;
  }

  .phone-scene {
    padding: 8px 0 24px;
    perspective: none;
  }

  .phone {
    --w: min(46vw, 184px);
    transform: none;
    animation: phone-bob 6.4s ease-in-out infinite;
  }

  .stage-chips {
    inset: 10% 0 12%;
  }

  .float-chip {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .chip-time { right: 2%; }
  .chip-ok { left: 2%; }
  .chip-pin { right: 6%; }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-facts {
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .hero-facts b {
    font-size: 20px;
  }

  .tiles {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tile {
    padding: 16px;
  }

  .tile .icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }

  .tile b {
    font-size: 15.5px;
  }

  .tile-price {
    font-size: 13.5px;
  }

  .tile-go {
    display: none;
  }

  .split,
  .buy-grid,
  .booking {
    grid-template-columns: 1fr;
  }

  .deal-card {
    position: static;
  }

  .split-art {
    display: none;
  }

  .promo-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cards .col-2,
  .cards .col-3,
  .cards .col-4,
  .cards .col-6 {
    grid-column: auto;
  }

  .card {
    padding: 20px;
  }

  .model-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 6px;
    scrollbar-width: none;
  }

  .model-chips::-webkit-scrollbar {
    display: none;
  }

  .model-chips.is-collapsed .chip-hidden {
    display: inline-flex;
  }

  .model-chips [data-more] {
    display: none;
  }

  .chip {
    flex: none;
  }

  .steps {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .steps li {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .why {
    grid-template-columns: 1fr;
  }

  .slots {
    padding: 18px;
  }

  .slot-days {
    grid-template-columns: 1fr;
  }

  .map {
    height: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    height: var(--tabbar-h);
    padding: 6px 6px env(safe-area-inset-bottom);
    background: rgba(10, 10, 16, 0.92);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    backdrop-filter: saturate(150%) blur(18px);
  }

  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
  }

  .tab svg {
    width: 23px;
    height: 23px;
  }

  .tab[aria-current="page"] {
    color: #fff;
  }

  .tab[aria-current="page"] svg {
    color: var(--brand-3);
  }

  .tab-cta {
    color: #fff;
  }

  .tab-cta svg {
    width: 46px;
    height: 46px;
    margin-top: -18px;
    padding: 11px;
    border-radius: 16px;
    color: #fff;
    background: var(--grad);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
  }
}

@media (max-width: 400px) {
  .hero-facts span {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  /* Без анимации показываем итог: экран целый, уведомление видно. */
  .cracks,
  .repair-beam {
    opacity: 0 !important;
  }

  .repaired,
  .notif {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Списки «что входит в работу» на страницах услуг */
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

/* Сетки и flex-контейнеры не должны растягиваться из-за широкого содержимого:
   скролл-чипы и шаги иначе раздувают min-content, страница зумится и «ломает» мобильную вёрстку */
.cards > *,
.split > *,
.booking > *,
.hero > *,
.footer-grid > * {
  min-width: 0;
}

.model-chips,
.steps,
.price-list,
.price-row > * {
  min-width: 0;
  max-width: 100%;
}

.price-row > span:first-child {
  overflow-wrap: anywhere;
}

/* ---------- витрина техники (sale.html): карточка устройства с фото ---------- */

.sale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sale-grid > * { min-width: 0; }

/* Карточка устройства — та же .card, но с фото сверху: внутренние отступы снимаем. */
.sale-card { gap: 0; padding: 0; overflow: hidden; justify-content: flex-start; }

.sale-photo { position: relative; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.sale-photo-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sale-photo-ph { display: grid; place-items: center; color: var(--muted); opacity: 0.5; }

.sale-badge {
  position: absolute; left: 12px; top: 12px; padding: 5px 11px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(7, 7, 11, 0.74); color: var(--ink); font-size: 12px; font-weight: 650;
}

.sale-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.sale-title { font-size: 18px; line-height: 1.3; }
.sale-meta, .sale-battery { color: var(--muted); font-size: 14px; }
.sale-battery b { color: var(--green); }

.sale-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 4px; }
.sale-price-now { color: var(--ink); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sale-price-ask { font-size: 17px; }
.sale-price-old { color: var(--muted); font-size: 15px; }

.sale-details { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-3); }
.sale-details summary { padding: 10px 14px; color: var(--brand-3); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.sale-details summary::-webkit-details-marker { display: none; }
.sale-details-body { padding: 0 14px 14px; color: var(--ink-2); font-size: 14px; }
.sale-desc { margin-bottom: 10px; white-space: pre-line; }

.sale-specs { width: 100%; border-collapse: collapse; }
.sale-specs th, .sale-specs td { padding: 7px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.sale-specs th { color: var(--muted); font-weight: 500; }
.sale-specs td { color: var(--ink); text-align: right; }

.sale-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.sale-actions .btn { flex: 1 1 auto; justify-content: center; }
.sale-more-row { display: flex; justify-content: center; margin-top: 20px; }

.sale-skeleton { pointer-events: none; }
.sale-skeleton .sk-bar { display: block; height: 12px; border-radius: 8px; background: var(--bg-3); animation: sale-pulse 1.4s ease-in-out infinite; }
.sale-skeleton .sale-photo .sk-bar { height: 100%; border-radius: 0; }
.sale-skeleton .sk-bar:nth-child(2) { width: 68%; }
.sale-skeleton .sk-bar:nth-child(3) { width: 42%; }
@keyframes sale-pulse { 50% { opacity: 0.5; } }

@media (max-width: 1080px) {
  .sale-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sale-grid { grid-template-columns: 1fr; }
  .sale-actions .btn { flex: 1 1 100%; }
}

/* ---------- блок «Техника к продаже» на главной: те же .sale-* карточки,
   но в 4 колонки и без «Подробнее» (компактный превью-режим, см. sale.js) ---------- */

.sale-home-grid { grid-template-columns: repeat(4, 1fr); }

/* Заглушка «нет в наличии» — та же .cards/.card, что на sale.html: не ломает сетку. */
.sale-home-stub { margin-top: 4px; }

.sale-home-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 20px;
}

.sale-home-foot .sale-home-note {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

@media (max-width: 1080px) {
  .sale-home-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sale-home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  /* 6 вкладок в панели: на узких экранах чуть уменьшаем подписи, чтобы не было переноса */
  .tab { font-size: 10.5px; }
  .tab svg { width: 22px; height: 22px; }
}

@media (max-width: 360px) {
  .tab { font-size: 10px; }
  .tab svg { width: 21px; height: 21px; }
}

/* ---------- витрина: акцентный вход на sale.html ----------
   Пункт .site-nav «Техника к продаже» скрыт на ≤900px, поэтому на телефоне
   витрину было видно только в нижней панели вкладок. Кнопка .btn-sale живёт
   в шапке (рядом с телефоном) и в первом экране главной и не скрывается на
   узких ширинах — в отличие от .site-nav и кнопки «Записаться». */

.btn-sale {
  color: #fff;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 55%, #ef4444 100%);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.btn-sale:hover,
.btn-sale:focus-visible {
  color: #fff;
  box-shadow: 0 8px 26px rgba(249, 115, 22, 0.48);
}

/* В шапке иконка чуть меньше, чем в hero. */
.header-actions .btn-sale svg {
  width: 17px;
  height: 17px;
}

/* Короткая подпись «Витрина» включается там, где полная не помещается. */
.sale-label-short { display: none; }

/* Главная: шапка чуть плотнее, чтобы логотип, меню, телефон и две кнопки
   помещались в одну строку без переноса (на 1081–1200px меню иначе
   переносилось на вторую строку). Правила только для index.html —
   остальные страницы (у них другой data-page) не затронуты. */
body[data-page="index"] .header-row { gap: 20px; }
body[data-page="index"] .header-actions { gap: 12px; }
body[data-page="index"] .site-nav a { padding: 8px 9px; font-size: 14px; }

/* До 1200px полная подпись не помещается — остаётся «Витрина» с иконкой. */
@media (max-width: 1200px) {
  .sale-label-full { display: none; }
  .sale-label-short { display: inline; }
}

/* 938–1080px: телефон в шапке скрыт, поэтому полная подпись снова помещается
   (без иконки). На 1081–1200px телефон виден — там остаётся короткая. */
@media (min-width: 938px) and (max-width: 1080px) {
  .header-actions .btn-sale svg { display: none; }
  .sale-label-full { display: inline; }
  .sale-label-short { display: none; }
}

@media (max-width: 430px) {
  body[data-page="index"] .header-row { gap: 12px; }
  body[data-page="index"] .header-actions { gap: 8px; }
  body[data-page="index"] .header-phone { font-size: 13.5px; }
  .header-actions .btn-sale { padding: 0 12px; }
  .header-actions .btn-sale svg { display: none; }
}

/* Блок «Записаться» вместо выбора окон: объясняем часы работы и убираем
   ощущение, что сервис принимает только утром. */
.booking-cta-note { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.booking-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.booking-cta-actions .btn { min-height: 48px; }

/* Иконка карточки MAX: цвет мессенджера, спокойный к тёмной теме */
.contact-card .icon.accent-cyan { color: #7c5cff; background: rgba(124, 92, 255, 0.12); }

/* Витрина: просмотр всех фото устройства. Обложка карточки — кнопка,
   поверх неё счётчик «1 / 5». Открывается полноэкранной галереей со стрелками,
   миниатюрами, свайпом и клавиатурой. */
.sale-photo { position: relative; }
.sale-photo-open { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: zoom-in; }
.sale-photo-open:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sale-photo-count { position: absolute; right: 10px; bottom: 10px; z-index: 3; padding: 4px 9px; border-radius: 999px; background: rgba(11, 11, 16, 0.72); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }

.gallery[hidden] { display: none; }
.gallery { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.gallery-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 10, 0.92); backdrop-filter: blur(6px); }
.gallery-body { position: relative; width: min(960px, 100%); max-height: 100%; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.gallery-close { position: absolute; top: 8px; right: 10px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; z-index: 3; }
.gallery-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.gallery-img { max-width: 100%; max-height: 70vh; border-radius: 14px; background: #12121a; object-fit: contain; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(11,11,16,0.7); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.gallery-nav:disabled { opacity: 0.25; cursor: default; }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-counter { margin: 0; text-align: center; color: #C9C9D6; font-size: 13px; }
.gallery-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex: none; width: 62px; height: 62px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #12121a; padding: 0; cursor: pointer; }
.gallery-thumb.is-on { border-color: var(--brand); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.gallery-open { overflow: hidden; }
@media (max-width: 640px) {
  .gallery-body { padding: 10px; }
  .gallery-img { max-height: 62vh; }
  .gallery-thumb { width: 54px; height: 54px; }
}

/* Страница устройства: галерея слева, характеристики справа; на телефоне — одна колонка. */
.device-page { padding-top: 24px; }
.device-back { margin: 0 0 14px; }
.device-back a { color: var(--muted); text-decoration: none; font-size: 14px; }
.device-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.device-stage { position: relative; border-radius: 18px; overflow: hidden; background: #12121a; }
.device-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #0f0f16; }
.device-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(11,11,16,0.65); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.device-nav:disabled { opacity: 0.25; cursor: default; }
.device-prev { left: 10px; } .device-next { right: 10px; }
.device-counter { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(11,11,16,0.72); color: #fff; font-size: 12px; }
.device-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.device-thumb { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #12121a; cursor: pointer; }
.device-thumb.is-on { border-color: var(--brand); }
.device-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device-title { margin: 0 0 8px; font-size: clamp(26px, 4vw, 40px); }
.device-price { margin: 0 0 14px; font-size: 26px; font-weight: 700; }
.device-old { margin-left: 8px; color: var(--muted); font-weight: 400; font-size: 18px; }
.device-chip { margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(156,108,255,0.14); color: var(--brand); font-size: 12px; font-weight: 600; vertical-align: middle; }
.device-specs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.device-specs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 14px; }
.device-specs span { color: var(--muted); }
.device-desc { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.device-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.device-note { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }
.device-error { margin-top: 18px; }
.device-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; color: var(--muted); }
@media (max-width: 860px) {
  .device-grid { grid-template-columns: 1fr; gap: 18px; }
  .device-thumb { width: 64px; height: 64px; }
  .device-nav { width: 46px; height: 46px; font-size: 26px; }
}

/* Просмотр фото на странице устройства: по клику — во весь экран,
   повторный клик приближает в 2 раза. Стрелки, свайп, Esc. */
.device-img { cursor: zoom-in; }
.lb[hidden] { display: none; }
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-bg { position: absolute; inset: 0; background: rgba(6,6,10,0.94); backdrop-filter: blur(4px); }
.lb-img { position: relative; max-width: 96vw; max-height: 84vh; object-fit: contain; border-radius: 8px; cursor: zoom-in; transition: transform 0.18s ease; touch-action: pinch-zoom; }
.lb-img.is-zoomed { cursor: zoom-out; max-width: none; max-height: none; }
.lb-close { position: absolute; top: 10px; right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.10); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; z-index: 3; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(11,11,16,0.72); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; z-index: 3; }
.lb-nav:disabled { opacity: 0.22; cursor: default; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-counter { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); margin: 0; color: #C9C9D6; font-size: 13px; }
.lb-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; color: #8A8AA0; font-size: 12px; text-align: center; padding: 0 16px; }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) { .lb-hint { display: none; } .lb-counter { bottom: 18px; } }

/* Кнопка смены адреса API: маленькая, внизу справа, не мешает контенту.
   Нужна на случай переезда CRM (смена домена после аварии у провайдера). */
.api-switch { position: fixed; right: 12px; bottom: 12px; z-index: 60; padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(11,11,16,0.72); color: #C9C9D6;
  font-size: 12px; cursor: pointer; backdrop-filter: blur(6px); }
.api-switch:hover { color: #fff; border-color: var(--brand); }

/* ===== Mac: 3D-MacBook для hero хаба (бета) ===== */

/* ---------- 3D-MacBook ---------- */

.mac-scene {
  --W: clamp(260px, 40vw, 520px);
  --rx: -21deg;
  --ry: 24deg;
  --open: 10deg;
  --alu-1: #4a4a52;
  --alu-2: #2b2b31;
  --alu-3: #1b1b20;
  --t: calc(var(--W) * 0.022);
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: calc(var(--W) * 0.06) 0 calc(var(--W) * 0.12);
  perspective: calc(var(--W) * 3.6);
  perspective-origin: 50% 30%;
}

.mac-scene.size-13 { --H: calc(var(--W) * 0.655); --D: calc(var(--W) * 0.69); }
.mac-scene.size-14 { --H: calc(var(--W) * 0.66); --D: calc(var(--W) * 0.705); }
.mac-scene.size-15 { --H: calc(var(--W) * 0.645); --D: calc(var(--W) * 0.685); }
.mac-scene.size-16 { --H: calc(var(--W) * 0.655); --D: calc(var(--W) * 0.69); }

.mac {
  position: relative;
  width: var(--W);
  height: calc(var(--H) + var(--D) * 0.35);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease);
}

.mac::after {
  /* мягкая тень на «столе» */
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: calc(var(--H) + var(--D) * 0.2);
  height: calc(var(--D) * 0.5);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent);
  transform: translateY(calc(var(--D) * 0.18)) rotateX(90deg);
  filter: blur(14px);
  pointer-events: none;
}

.mac-lid,
.mac-base {
  position: absolute;
  left: 0;
  width: var(--W);
  transform-style: preserve-3d;
}

.mac-lid {
  top: 0;
  height: var(--H);
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--t) * -1)) rotateX(var(--open));
  z-index: 2;
}

.mac-lid-face,
.mac-lid-back {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--W) * 0.03) calc(var(--W) * 0.03) calc(var(--W) * 0.008) calc(var(--W) * 0.008);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mac-lid-face {
  padding: calc(var(--W) * 0.022) calc(var(--W) * 0.022) calc(var(--W) * 0.034);
  background: #050507;
  box-shadow: inset 0 0 0 calc(var(--W) * 0.0045) var(--alu-1), inset 0 0 0 calc(var(--W) * 0.007) #0b0b0e;
}

.mac-lid-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(255, 255, 255, 0.08), transparent 70%),
    linear-gradient(160deg, var(--alu-1), var(--alu-2) 55%, var(--alu-3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mac-lid-back::after {
  /* знак мастерской вместо логотипа */
  content: "NKSV";
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.16);
  font-size: calc(var(--W) * 0.05);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mac-chin {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--W) * 0.034);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.28);
  font-size: calc(var(--W) * 0.018);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.mac-scene.has-notch .mac-chin { display: none; }
.mac-scene.has-notch .mac-lid-face { padding-bottom: calc(var(--W) * 0.018); }

/* экран */

.mac-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--W) * 0.008);
  background: #000;
  container-type: inline-size;
}

.ms-wall,
.ms-fixed {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 18% 110%, rgba(74, 222, 128, 0.28), transparent 60%),
    radial-gradient(80% 90% at 92% -10%, rgba(147, 197, 253, 0.35), transparent 60%),
    radial-gradient(90% 120% at 50% 50%, #5b2bd6, #241047 70%, #0d0820);
}

.ms-wall {
  filter: saturate(0.75) brightness(0.8);
}

.ms-menubar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 3.4cqw;
  height: 3.6cqw;
  padding: 0 2.4cqw;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.9cqw;
  font-weight: 600;
}

.ms-menubar i {
  display: block;
  width: 5cqw;
  height: 1cqw;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
}

.ms-menubar i:first-child { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.ms-menubar .ms-clock { margin-left: auto; letter-spacing: 0.02em; }

.ms-dock {
  position: absolute;
  left: 50%;
  bottom: 2.2cqw;
  z-index: 3;
  display: flex;
  gap: 1.2cqw;
  padding: 1cqw 1.4cqw;
  border-radius: 2.2cqw;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.ms-dock i {
  width: 4.4cqw;
  height: 4.4cqw;
  border-radius: 1.2cqw;
  background: linear-gradient(140deg, #c4b5fd, #7c3aed);
}

.ms-dock i:nth-child(2) { background: linear-gradient(140deg, #86efac, #16a34a); }
.ms-dock i:nth-child(3) { background: linear-gradient(140deg, #93c5fd, #2563eb); }
.ms-dock i:nth-child(4) { background: linear-gradient(140deg, #fde68a, #d97706); }
.ms-dock i:nth-child(5) { background: linear-gradient(140deg, #fda4af, #e11d48); }

.ms-word {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
}

.ms-word b {
  font-size: 9cqw;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 4cqw rgba(196, 181, 253, 0.6);
}

.ms-word span {
  margin-top: 1.4cqw;
  color: rgba(255, 255, 255, 0.72);
  font-size: 2.3cqw;
  font-weight: 600;
}

/* поломка: трещины, полосы, мёртвое пятно */

.ms-broken {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.ms-broken svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ms-broken .crk-shade { stroke: rgba(0, 0, 0, 0.65); }
.ms-broken .crk-lite { stroke: rgba(255, 255, 255, 0.85); }

.ms-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 61%, rgba(74, 222, 128, 0.85) 61%, rgba(74, 222, 128, 0.85) 61.5%, transparent 61.5%),
    linear-gradient(90deg, transparent 66%, rgba(236, 72, 153, 0.8) 66%, rgba(236, 72, 153, 0.8) 66.35%, transparent 66.35%),
    linear-gradient(90deg, transparent 69.4%, rgba(255, 255, 255, 0.7) 69.4%, rgba(255, 255, 255, 0.7) 69.6%, transparent 69.6%),
    radial-gradient(28% 34% at 34% 30%, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.6) 55%, transparent 75%);
  mix-blend-mode: normal;
}

.ms-fixed {
  z-index: 5;
  clip-path: inset(0 100% 0 0);
}

.ms-beam {
  position: absolute;
  top: -5%;
  bottom: -5%;
  left: 0;
  z-index: 6;
  width: 7cqw;
  margin-left: -3.5cqw;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.55) 40%, #fff 50%, rgba(196, 181, 253, 0.55) 60%, transparent);
  filter: blur(0.3cqw);
  opacity: 0;
}

.ms-notif {
  position: absolute;
  top: 5.2cqw;
  right: 2cqw;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  width: 40cqw;
  padding: 1.6cqw 2cqw;
  border-radius: 2.2cqw;
  background: rgba(30, 30, 40, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 2.2cqw;
  line-height: 1.25;
  opacity: 0;
  transform: translateX(120%);
}

.ms-notif b { display: block; font-size: 2.3cqw; }
.ms-notif span:last-child { color: rgba(255, 255, 255, 0.82); }

.ms-notif-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 6cqw;
  height: 6cqw;
  border-radius: 1.6cqw;
  background: linear-gradient(140deg, #38bdf8, #2563eb);
}

.ms-notif-ico svg { width: 3.6cqw; height: 3.6cqw; }

.ms-notch {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 8;
  width: 12cqw;
  height: 3.6cqw;
  border-radius: 0 0 1.4cqw 1.4cqw;
  background: #000;
  transform: translateX(-50%);
}

.ms-glare {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 46%);
  pointer-events: none;
}

.ms-off {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #020203;
  opacity: 0;
  pointer-events: none;
}

/* корпус с клавиатурой */

.mac-base {
  top: var(--H);
  height: var(--D);
  transform-origin: 50% 0;
  transform: rotateX(90deg);
}

.mac-deck {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--W) * 0.008) calc(var(--W) * 0.008) calc(var(--W) * 0.035) calc(var(--W) * 0.035);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 6%),
    linear-gradient(170deg, var(--alu-1), var(--alu-2) 60%, #26262c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mac-kbd {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 7%;
  height: 43%;
  display: flex;
  flex-direction: column;
  gap: 2.2%;
  padding: 1.4%;
  border-radius: calc(var(--W) * 0.008);
  background: rgba(0, 0, 0, 0.42);
}

.mac-scene.has-grille .mac-kbd { left: 15%; right: 15%; }

.kb-row {
  flex: 1;
  display: flex;
  gap: 0.9%;
}

.kb-row.kb-fn { flex: 0.62; }

.kb-row i {
  flex: 1;
  border-radius: calc(var(--W) * 0.0035);
  background: #121216;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

.kb-row i.w15 { flex: 1.5; }
.kb-row i.w2 { flex: 2; }
.kb-row i.w6 { flex: 6.2; }
.kb-row .tbar {
  flex: 14;
  border-radius: calc(var(--W) * 0.004);
  background: linear-gradient(90deg, #0b0b10, #1d1730 40%, #0b0b10);
}

.mac-grille {
  position: absolute;
  top: 7%;
  width: 5.5%;
  height: 43%;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.55) 0.9px, transparent 1.3px);
  background-size: 5px 5px;
  opacity: 0.8;
}

.mac-grille.l { left: 5.5%; }
.mac-grille.r { right: 5.5%; }

.mac-pad {
  position: absolute;
  left: 30%;
  right: 30%;
  top: 55%;
  bottom: 9%;
  border-radius: calc(var(--W) * 0.009);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: box-shadow 0.3s, background 0.3s;
}

.mac-scene.size-15 .mac-pad,
.mac-scene.size-16 .mac-pad { left: 27%; right: 27%; }

/* «рентген»: что под клавиатурой */

.mac-xray {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.xr-board {
  position: absolute;
  left: 31%;
  right: 31%;
  top: 6%;
  height: 40%;
  border-radius: 6px;
  border: 1.5px solid rgba(196, 181, 253, 0.9);
  background:
    linear-gradient(90deg, transparent 38%, rgba(196, 181, 253, 0.85) 38%, rgba(196, 181, 253, 0.85) 62%, transparent 62%) 0 32% / 100% 36% no-repeat,
    repeating-linear-gradient(90deg, rgba(196, 181, 253, 0.22) 0 1px, transparent 1px 9px),
    rgba(30, 16, 60, 0.75);
  opacity: 0.25;
  transition: opacity 0.3s, box-shadow 0.3s;
}

.xr-cells {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 52%;
  bottom: 6%;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4% 3%;
  opacity: 0.25;
  transition: opacity 0.3s;
}

.xr-cells i {
  border-radius: 5px;
  border: 1.5px solid rgba(74, 222, 128, 0.9);
  background: rgba(10, 40, 24, 0.78);
}

.xr-fan {
  position: absolute;
  top: 12%;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(147, 197, 253, 0.9);
  background:
    radial-gradient(circle, rgba(147, 197, 253, 0.9) 12%, transparent 13%),
    repeating-conic-gradient(rgba(147, 197, 253, 0.55) 0 8deg, transparent 8deg 24deg),
    rgba(8, 24, 48, 0.8);
  opacity: 0.25;
}

.xr-fan.l { left: 9%; }
.xr-fan.r { right: 9%; }

.mac-port {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--t);
  height: var(--D);
  transform-origin: 0 50%;
  transform: rotateY(90deg);
  background: linear-gradient(90deg, #303036, #1e1e23);
}

.mac-port i {
  position: absolute;
  left: 18%;
  width: 64%;
  border-radius: 9px;
  background: #050506;
  transition: background 0.3s, box-shadow 0.3s;
}

.mac-port i:nth-child(1) { top: 18%; height: 7%; }
.mac-port i:nth-child(2) { top: 29%; height: 5%; }
.mac-port i:nth-child(3) { top: 37%; height: 5%; }

.mac-front {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--t);
  transform-origin: 50% 0;
  transform: rotateX(-90deg);
  border-radius: 0 0 calc(var(--W) * 0.02) calc(var(--W) * 0.02);
  background: linear-gradient(180deg, #3b3b42, #18181c);
}

.mac-front::after {
  /* выемка под палец */
  content: "";
  position: absolute;
  left: 42%;
  right: 42%;
  top: 0;
  height: 55%;
  border-radius: 0 0 9px 9px;
  background: rgba(0, 0, 0, 0.5);
}

/* ---------- анимация: открытие крышки и цикл ремонта ---------- */

.js .mac-scene .mac-lid { transform: translateY(calc(var(--t) * -1)) rotateX(-88deg); }
.js .mac-scene .ms-off { opacity: 1; }

.js .mac-scene.is-live .mac-lid {
  animation: mac-open 1.7s cubic-bezier(0.25, 0.8, 0.25, 1) 0.25s both;
}

.js .mac-scene.is-live .ms-off {
  animation: mac-wake 0.6s ease 1.5s both;
}

@keyframes mac-open {
  from { transform: translateY(calc(var(--t) * -1)) rotateX(-88deg); }
  70% { transform: translateY(calc(var(--t) * -1)) rotateX(calc(var(--open) + 4deg)); }
  to { transform: translateY(calc(var(--t) * -1)) rotateX(var(--open)); }
}

@keyframes mac-wake {
  from { opacity: 1; }
  to { opacity: 0; }
}

.mac-scene.is-loop.is-live .ms-fixed { animation: ms-fix 8s ease-in-out 2.4s infinite; }
.mac-scene.is-loop.is-live .ms-beam { animation: ms-beam 8s ease-in-out 2.4s infinite; }
.mac-scene.is-loop.is-live .ms-notif { animation: ms-notif 8s var(--ease) 2.4s infinite; }

@keyframes ms-fix {
  0%, 18% { clip-path: inset(0 100% 0 0); opacity: 1; }
  48% { clip-path: inset(0 0 0 0); opacity: 1; }
  94% { clip-path: inset(0 0 0 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

@keyframes ms-beam {
  0%, 16% { left: 0; opacity: 0; }
  19% { left: 0; opacity: 1; }
  48% { left: 100%; opacity: 1; }
  52%, 100% { left: 100%; opacity: 0; }
}

@keyframes ms-notif {
  0%, 52% { opacity: 0; transform: translateX(120%); }
  58% { opacity: 1; transform: translateX(0); }
  86% { opacity: 1; transform: translateX(0); }
  92%, 100% { opacity: 0; transform: translateX(120%); }
}

/* без цикла (страница модели): экран целый */
.mac-scene:not(.is-loop) .ms-fixed { clip-path: inset(0 0 0 0); }

/* ---------- Mac: hero как на главной, с CSS-MacBook ----------
   Блок добавлен бете: визуал собран из тех же токенов, что и iPhone на
   главной (--alu-*, --brand-*, rgba тени), отдельного файла стилей нет.
   Разметка: section.hero.mac-hero > .hero-copy + .hero-art. */

.mac-hero {
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
}

.mac-hero .hero-art {
  min-height: clamp(380px, 42vw, 560px);
}

.mac-hero .mac {
  /* 3D-проекция уводит правый край вправо: компенсируем сдвигом, чтобы
     корпус не упирался в край экрана. */
  transform: translateX(-14%) rotateX(var(--rx)) rotateY(var(--ry));
}

.mac-hero .stage-glow {
  width: min(100%, 520px);
}

.mac-hero .mac-scene {
  --W: clamp(300px, 33vw, 470px);
}

/* метки вокруг MacBook чуть иначе, чем вокруг iPhone: экран шире */
.mac-hero .chip-time { top: 3%; left: 0; right: auto; }
.mac-hero .chip-ok { top: 56%; left: -4%; }
.mac-hero .chip-pin { bottom: 6%; right: 8%; }

@media (max-width: 900px) {
  .mac-hero { grid-template-columns: 1fr; gap: 24px; }
  .mac-hero .hero-art { min-height: 0; margin: 4px 0 0; }
  .mac-hero .mac-scene { --W: min(72vw, 390px); }
  .mac-hero .mac { transform: translateX(-15%) rotateX(var(--rx)) rotateY(var(--ry)); }
  .mac-hero .stage-chips { inset: 8% 0 6%; }
  .mac-hero .chip-time { top: 3%; left: 0; right: auto; }
  .mac-hero .chip-ok { left: 0; }
  .mac-hero .chip-pin { right: 4%; }
}

@media (prefers-reduced-motion: reduce) {
  .js .mac-scene .mac-lid,
  .js .mac-scene.is-live .mac-lid { animation: none; transform: translateY(calc(var(--t) * -1)) rotateX(var(--open)); }
  .js .mac-scene .ms-off { opacity: 0; animation: none; }
  .mac-scene .ms-fixed { animation: none !important; clip-path: inset(0 0 0 0); }
  .mac-scene .ms-beam,
  .mac-scene .ms-notif { animation: none !important; }
}

/* ===== Пункт меню «Ремонт Mac»: место в шапке =====
   В шапку добавлена ссылка «Ремонт Mac». На десктопах до 1500px пунктов меню
   становится больше, и вместе с телефоном и кнопкой они не помещаются в
   строку: убираем из шапки дубль «MAX» (он остаётся в подвале) и чуть ужимаем
   отступы пунктов. Цвета, шрифты и классы — сайтовые, ничего нового. */

@media (max-width: 1500px) {
  .header-row { gap: 16px; }
  #nav-max { display: none; }
  .site-nav a { padding-left: 9px; padding-right: 9px; }
}

/* 1081–1200px: самый тесный диапазон — меню ещё не свернулось, а короткая
   подпись витрины уже включилась. Чуть уменьшаем кегль меню. */
@media (min-width: 1081px) and (max-width: 1200px) {
  .site-nav a { padding-left: 7px; padding-right: 7px; font-size: 13.5px; }
}

/* Главная задаёт пунктам меню свой кегль (body[data-page="index"]) — на этом
   диапазоне он чуть больше и строка не помещается на 15px. */
@media (min-width: 1081px) and (max-width: 1200px) {
  body[data-page="index"] .site-nav a { font-size: 13.5px; padding-left: 7px; padding-right: 7px; }
}

/* ================= полезные статьи (blog) =================
   Хаб blog.html и двадцать статей. Hero — как на страницах моделей,
   колонка текста 740 px, содержание слева sticky на десктопе и обычным
   блоком на телефоне. Новых цветов нет: только токены :root. */

.article-hero {
  padding-bottom: 4px;
}

.article-hero h1 {
  max-width: 900px;
  font-size: clamp(30px, 3.9vw, 46px);
  line-height: 1.08;
}

.article-hero .lead {
  max-width: 740px;
}

/* Обложка статьи: первая картинка первого экрана, поэтому eager и с
   заданными width/height. Ширина — до 1200 px, но не шире колонки wrap. */
.article-cover {
  margin: 28px 0 0;
}

.article-cover img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: var(--r-lg);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-2);
}

.article-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 740px);
  justify-content: center;
  align-items: start;
  gap: 40px;
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(44px, 6vw, 80px);
}

.article-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-2);
}

.article-toc-title {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.article-toc nav {
  display: grid;
  gap: 1px;
  margin-top: 12px;
}

.article-toc a {
  padding: 6px 0;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.4;
}

.article-toc a:hover {
  color: var(--ink);
}

.article-toc-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.article-body {
  width: 100%;
  max-width: 740px;
  min-width: 0;
}

.article-body p {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 16.8px;
  line-height: 1.74;
}

.article-body > p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-size: 18px;
}

.article-body h2 {
  margin-top: clamp(34px, 4.2vw, 48px);
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.18;
}

.article-body h3 {
  margin-top: 26px;
  font-size: 19.5px;
}

.article-body h2 + p,
.article-body h3 + p {
  margin-top: 12px;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.article-body ul li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 16.4px;
  line-height: 1.68;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.article-body ol {
  counter-reset: article-step;
}

.article-body ol li {
  position: relative;
  min-height: 27px;
  padding-left: 40px;
  color: var(--ink-2);
  font-size: 16.4px;
  line-height: 1.68;
}

.article-body ol li::before {
  counter-increment: article-step;
  content: counter(article-step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-3);
  font-size: 13px;
  font-weight: 750;
}

.article-body strong,
.article-body b {
  color: var(--ink);
}

.article-body a {
  color: var(--brand-3);
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.35);
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.article-note {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--bg-2);
}

.article-note-warn {
  border-left-color: var(--amber);
  background: rgba(251, 191, 36, 0.055);
}

.article-note-title {
  display: block;
  color: var(--brand-3);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-note-warn .article-note-title {
  color: var(--amber);
}

.article-note p {
  margin-top: 6px;
  font-size: 15.5px;
  line-height: 1.62;
}

.article-service {
  margin-top: 44px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.article-service h2 {
  margin-top: 0;
  font-size: clamp(22px, 2.4vw, 27px);
}

.article-service p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.65;
}

.article-service-link {
  margin-top: 14px;
  font-weight: 650;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.article-faq {
  margin-top: 44px;
}

.article-body .faq {
  margin-top: 16px;
}

.article-body .faq details p {
  margin-top: 0;
  font-size: 15.5px;
  line-height: 1.62;
}

.article-related {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.article-related h2 {
  margin-top: 0;
  font-size: 22px;
}

.article-related .model-chips {
  margin-top: 14px;
  margin-bottom: 0;
}

.article-related .chip {
  color: var(--ink);
  text-decoration: none;
}

.article-related .chip:hover {
  color: #fff;
}

.article-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* Таблица цен в статье: те же правила, что на страницах моделей. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}

.price-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.price-table caption {
  padding: 14px 16px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.price-table th,
.price-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.price-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.price-table tbody th {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
}

.price-table td {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- хаб blog.html ---------- */

.blog-hero {
  padding-bottom: 4px;
}

.blog-hero h1 {
  max-width: 900px;
  font-size: clamp(32px, 4.2vw, 50px);
}

.blog-hero .lead {
  max-width: 760px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.blog-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.blog-card:hover {
  border-color: rgba(156, 108, 255, 0.35);
  transform: translateY(-2px);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

/* Карточка обрезает картинку по скруглению, поэтому глобальный outline
   с положительным offset здесь не виден — рисуем фокус внутри. */
.blog-card-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -4px;
  border-radius: var(--r-lg);
}

/* Превью 1200×630: aspect-ratio держит место до загрузки, поэтому сетка
   не прыгает. padding — у текстовой части, чтобы картинка шла от края. */
.blog-card-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 24px 24px;
}

.blog-tag {
  color: var(--brand-3);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin-top: 10px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.25;
}

.blog-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.8px;
  line-height: 1.6;
}

.blog-meta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 12.8px;
}

.blog-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.blog-go svg {
  width: 16px;
  height: 16px;
}

.blog-card:hover .blog-go {
  color: var(--brand-3);
}

@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: minmax(0, 740px);
    justify-content: center;
    gap: 26px;
  }

  .article-toc {
    position: static;
    width: 100%;
    max-width: 740px;
    margin-inline: auto;
  }

  .article-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
}

@media (max-width: 720px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card-body {
    padding: 18px 20px 22px;
  }

  .article-cover {
    margin-top: 20px;
  }

  .article-hero h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .article-body p,
  .article-body ul li,
  .article-body ol li {
    font-size: 16px;
  }

  .article-body > p:first-child {
    font-size: 17px;
  }

  .article-toc nav {
    grid-template-columns: 1fr;
  }

  .article-meta {
    font-size: 12.8px;
  }

  .article-related .model-chips {
    gap: 7px;
  }

  .price-table {
    min-width: 520px;
    font-size: 13.5px;
  }

  .price-table th,
  .price-table td {
    padding: 10px 12px;
  }
}

/* Реклама Яндекс.Автоплейсмент: один неброский блок внизу статьи.
   Место под него зарезервировано, чтобы страница не прыгала при загрузке. */
.ad-wrap{max-width:728px;margin:44px auto 8px;padding:0 16px;text-align:center}
.ad-label{display:block;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted,#8A93A0);opacity:.65;margin-bottom:8px}
.ad-slot{min-height:120px;overflow:hidden;border-radius:14px}
@media (max-width:900px){.ad-wrap{margin:32px auto 4px}.ad-slot{min-height:100px}}

/* Страховка: реклама не должна попадать внутрь макета телефона в hero.
   Автоплейсмент на контентных страницах может выбрать любой контейнер — этот
   блок не даёт ему занять экран модели и сломать первый экран. */
.phone .screen [id^="yandex_rtb"],
.phone .screen iframe,
.phone .screen [class*="yandex"],
.hero [id^="yandex_rtb"],
.hero [class*="yandex-rtb"]{display:none !important}

/* Кнопка MAX в быстрых действиях NFC-страницы: тот же размер, свой акцент. */
.q.max .qi{background:rgba(140,120,255,.14);color:#B9A6FF}
.q.max:hover .qi{background:rgba(140,120,255,.22)}
