/* ============================================================
   AVANZATO — Pricing page upgrade (scoped to pricing.html)
   3D-tilt tiers, animated gold border, price shimmer,
   floating background shapes. Gated by reduced-motion + hover.
   ============================================================ */

@property --tier-ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

body[data-page="pricing"] { overflow-x: hidden; }
body[data-page="pricing"] .p-hero,
body[data-page="pricing"] .block { position: relative; z-index: 1; }

/* ---------- tiers as elevated 3D cards ---------- */
body[data-page="pricing"] .tiers {
  border: 0; border-radius: 0; overflow: visible;
  gap: clamp(20px, 2.6vw, 34px); perspective: 1600px;
}
body[data-page="pricing"] .tier {
  border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  background: linear-gradient(180deg, rgba(10, 10, 10,.028), transparent 60%);
  box-shadow: 0 24px 50px -34px rgba(10, 10, 10,.12);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
body[data-page="pricing"] .tier:last-child { border-right: 1px solid var(--hairline); }
body[data-page="pricing"] .tier.featured {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
/* animated gold border on the featured tier */
body[data-page="pricing"] .tier.featured::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1.5px;
  background: conic-gradient(from var(--tier-ang), transparent 0deg, rgba(10, 10, 10,.15) 60deg, var(--accent-2) 110deg, var(--accent) 130deg, rgba(10, 10, 10,.15) 180deg, transparent 250deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: 6;
}
@media (prefers-reduced-motion: no-preference) {
  body[data-page="pricing"] .tier.featured:hover::before { animation: tierGlow 6s linear infinite; }
}
@keyframes tierGlow { to { --tier-ang: 360deg; } }

/* soft gold halo behind the featured tier */
body[data-page="pricing"] .tier.featured::after {
  content: ""; position: absolute; inset: -40px -20px; z-index: -1; border-radius: 40px;
  background: radial-gradient(60% 50% at 70% 0%, rgba(10, 10, 10,.18), transparent 70%);
  filter: blur(10px); pointer-events: none;
}

/* cursor glare */
.tier-glare {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.16), transparent 45%);
  mix-blend-mode: screen; transition: opacity .4s var(--ease);
}

/* depth layers */
body[data-page="pricing"] .tier-h { transform: translateZ(18px); }
body[data-page="pricing"] .price { transform: translateZ(34px); }
body[data-page="pricing"] .tier-badge { transform: translateZ(46px); }
body[data-page="pricing"] .tier-btn { transform: translateZ(24px); }

/* featured badge -> gold */
body[data-page="pricing"] .tier.featured .tier-badge {
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--bg);
  box-shadow: 0 10px 24px -10px rgba(10, 10, 10,.7);
}

/* price shimmer */
body[data-page="pricing"] .price b {
  background: linear-gradient(100deg, var(--ink) 30%, #ffd9c2 50%, var(--ink) 70%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
body[data-page="pricing"] .tier.featured .price b {
  background-image: linear-gradient(100deg, var(--accent) 28%, #ffd9c2 50%, var(--accent-2) 72%);
}
@media (prefers-reduced-motion: no-preference) {
  body[data-page="pricing"] .price b { animation: priceShine 9s ease-in-out infinite; }
}
@keyframes priceShine { 0%,100% { background-position: 130% 0; } 50% { background-position: -30% 0; } }

/* per-tier highlight points */
.tier-points { list-style: none; margin: 22px 0 26px; padding: 22px 0 0; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 13px; }
.tier-points li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: var(--ink); line-height: 1.4; }
.tier-points li i { display: block; margin-top: 3px; font-style: normal; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.tier-points .pk {
  width: 19px; height: 19px; margin-top: 1px; border-radius: 50%; border: 1px solid var(--accent);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23232118' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/11px no-repeat;
  flex: 0 0 auto;
}
body[data-page="pricing"] .tier.featured .tier-points .pk { background-color: rgba(10, 10, 10,.12); }

@media (hover: hover) and (pointer: fine) {
  body[data-page="pricing"] .tier:hover { box-shadow: 0 40px 80px -40px rgba(10, 10, 10,.14), 0 0 50px -24px rgba(10, 10, 10,.3); border-color: rgba(10, 10, 10,.35); }
  body[data-page="pricing"] .tier:hover .tier-glare { opacity: 1; }
}

/* on desktop the featured tier sits slightly forward */
@media (min-width: 721px) {
  body[data-page="pricing"] .tier.featured { transform: scale(1.025); }
}
@media (max-width: 720px) {
  body[data-page="pricing"] .tier { border-right: 1px solid var(--hairline) !important; border-bottom: 1px solid var(--hairline); }
}

/* ---------- interactive estimate calculator ---------- */
.calc { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(18px, 2.6vw, 32px); }
.calc-controls {
  display: flex; flex-direction: column; gap: clamp(26px, 3vw, 38px);
  padding: clamp(26px, 3vw, 42px); border: 1px solid var(--hairline); border-radius: 20px;
  background: linear-gradient(180deg, rgba(10, 10, 10,.028), transparent 60%);
}
.calc-label { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 15px; }
.calc-label em { font-style: normal; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--accent); }
.calc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-opt {
  display: flex; flex-direction: column; gap: 7px; align-items: flex-start; text-align: left;
  padding: 17px 19px; border: 1px solid var(--hairline); border-radius: 14px; background: transparent;
  color: var(--ink); cursor: pointer; font: inherit; font-family: var(--font-display); font-size: 17px;
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.calc-opt small { font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-2); transition: color .35s var(--ease); }
.calc-opt:hover { border-color: rgba(10, 10, 10,.4); transform: translateY(-2px); }
.calc-opt.active { border-color: var(--accent); background: linear-gradient(180deg, rgba(10, 10, 10,.12), transparent); box-shadow: inset 0 0 0 1px rgba(10, 10, 10,.3); }
.calc-opt.active small { color: var(--accent-ink); }
.calc-step { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 100px; overflow: hidden; width: fit-content; }
.calc-step button { width: 54px; height: 52px; background: transparent; border: 0; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.calc-step button:hover { background: rgba(10, 10, 10,.12); color: var(--accent-ink); }
.calc-step button:disabled { opacity: .3; cursor: not-allowed; }
.calc-val { min-width: 66px; text-align: center; font-family: var(--font-display); font-size: 23px; font-variant-numeric: tabular-nums; }

.calc-result {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(26px, 3vw, 42px); border: 1px solid rgba(10, 10, 10,.3); border-radius: 20px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.calc-spot { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(360px circle at var(--gx,72%) var(--gy,14%), rgba(10, 10, 10,.16), transparent 55%); transition: background .2s linear; }
.calc-rlabel { position: relative; font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.calc-total { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.calc-total b {
  font-family: var(--font-display); font-size: clamp(46px, 6.4vw, 70px); font-weight: 350;
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--accent) 28%, #ffd9c2 50%, var(--accent-2) 72%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.calc-total .cur { font-family: var(--font-display); font-size: 26px; color: var(--accent); margin-top: 9px; }
.calc-break { position: relative; list-style: none; margin: 22px 0 24px; padding: 18px 0 0; border-top: 1px solid var(--hairline); width: 100%; display: flex; flex-direction: column; gap: 11px; }
.calc-break li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-2); animation: calcRow .4s var(--ease); }
.calc-break li b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
@keyframes calcRow { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.calc-cta { position: relative; width: 100%; justify-content: center; }
.calc-note { position: relative; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); margin: 16px 0 0; font-style: italic; }
@media (prefers-reduced-motion: no-preference) { .calc-total b { animation: priceShine 9s ease-in-out infinite; } }
.calc-opt { min-width: 0; }
.calc-opt small { white-space: nowrap; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .calc-opt { font-size: 15px; padding: 15px 14px; } .calc-opt small { font-size: 11.5px; } }

@media (prefers-reduced-motion: reduce) {
  .pr-cube, .pr-ring { animation: none !important; }
  body[data-page="pricing"] .tier { transition: none; }
}

/* ============================================================
   Этапы работы (process) + Отзывы (testimonials)
   ============================================================ */
.proc {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline);
  margin-top: 6px;
}
.proc-step {
  padding: clamp(26px, 2.6vw, 38px) clamp(22px, 2vw, 30px);
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  position: relative; transition: background .4s var(--ease);
}
.proc-num {
  font-family: var(--font-display); font-weight: 500;
  font-size: 14px; letter-spacing: .04em; color: var(--accent);
}
.proc-step h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(19px, 2vw, 23px); letter-spacing: -.01em;
  margin: 14px 0 10px; color: var(--ink);
}
.proc-time {
  display: inline-block; margin-bottom: 12px;
  font-family: var(--font-sans); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.proc-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .proc-step:hover { background: var(--tint); }
}
@media (max-width: 860px) { .proc { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .proc { grid-template-columns: 1fr; } }

/* ---- отзывы ---- */
.tm-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.4vw, 30px); margin-top: 6px; align-items: stretch;
}
.tm {
  display: flex; flex-direction: column;
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: border-color .4s var(--ease), transform .5s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tm:hover { border-color: rgba(10,10,10,.22); transform: translateY(-4px); }
}
.tm-quote {
  font-family: var(--font-display); font-weight: 600;
  font-size: 46px; line-height: .8; color: var(--accent); margin-bottom: 14px;
}
.tm-body p { margin: 0 0 14px; font-size: 15px; line-height: 1.62; color: var(--ink); }
.tm-body p:last-child { margin-bottom: 0; }
.tm-who {
  margin-top: auto; padding-top: 22px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.tm-who b { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--ink); }
.tm-who span { font-size: 13px; color: var(--ink-2); letter-spacing: .01em; }
.tm-who span::before { content: "· "; color: var(--ink-3); }
@media (max-width: 720px) { .tm-grid { grid-template-columns: 1fr; } }

/* ---- «Оплачивается отдельно» (сторонние расходы) ---- */
.extra {
  margin-top: clamp(30px, 3.4vw, 50px);
  padding: clamp(26px, 3vw, 40px);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.extra-head { margin-bottom: 20px; }
.extra-head .eyebrow { margin-bottom: 8px; }
.extra-head p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.extra-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(28px, 4vw, 64px);
}
.extra-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 15px 0; border-bottom: 1px solid var(--hairline);
}
.extra-list b { font-weight: 500; font-size: 14.5px; color: var(--ink); }
.extra-list span { flex: none; font-size: 13.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.extra-list span.pval { color: var(--accent-ink); font-weight: 500; }
.extra-foot { margin: 18px 0 0; font-size: 13px; font-style: italic; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 640px) { .extra-list { grid-template-columns: 1fr; } }
