/* Premium interactive engineering blocks v2 */
:root {
  --piv2-ink: #15231f;
  --piv2-muted: #5f6f69;
  --piv2-green: #118754;
  --piv2-green-dark: #0b5f3d;
  --piv2-line: rgba(21, 35, 31, 0.13);
  --piv2-paper: #fbfcfa;
  --piv2-shadow: 0 28px 80px rgba(32, 48, 42, 0.12);
}

.roof-system-section,
#roof-inspection {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--piv2-ink);
  background: #f4f7f4;
}

.roof-system-section::before,
#roof-inspection::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.16;
  background: url("../img/consultation-blueprint-v1.webp") center / cover no-repeat;
  filter: grayscale(1);
}

.roof-system-section::after,
#roof-inspection::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(248, 250, 247, 0.98) 0%, rgba(248, 250, 247, 0.91) 48%, rgba(248, 250, 247, 0.76) 100%),
    radial-gradient(circle at 84% 18%, rgba(17, 135, 84, 0.12), transparent 30%);
}

.roof-system-section {
  padding: clamp(84px, 8vw, 138px) 24px;
}

.roof-sys-container,
#roof-inspection > .inspection-container {
  width: min(1480px, 100%);
  max-width: 1480px;
  margin-inline: auto;
  padding: 0;
}

.piv2-header {
  width: 100%;
  max-width: none;
  margin: 0 0 54px;
  text-align: left;
}

.piv2-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 23px;
  color: var(--piv2-green);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.piv2-kicker::before {
  content: "";
  width: 42px;
  height: 2px;
  background: currentColor;
}

.piv2-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
  gap: clamp(38px, 6vw, 96px);
  align-items: end;
}

.piv2-header .sys-title,
.piv2-inspection-header h2 {
  max-width: 910px;
  margin: 0;
  color: var(--piv2-ink);
  font-size: clamp(42px, 4.1vw, 68px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.piv2-header .sys-title span,
.piv2-inspection-header h2 span {
  color: var(--piv2-green);
}

.piv2-header-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 0 0 5px;
}

.piv2-header-copy p {
  flex-basis: 100%;
  margin: 0 0 10px;
  color: var(--piv2-muted);
  font-size: 17px;
  line-height: 1.65;
}

.piv2-header-copy > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--piv2-ink);
  font-size: 13px;
  font-weight: 650;
}

.piv2-header-copy i {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(17, 135, 84, 0.2);
  border-radius: 50%;
  color: var(--piv2-green);
  background: rgba(17, 135, 84, 0.07);
  font-style: normal;
  font-size: 16px;
}

.piv2-system-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(21, 35, 31, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--piv2-shadow);
}

.piv2-system-aside {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 42px 34px 34px;
  border-right: 1px solid var(--piv2-line);
  background:
    linear-gradient(180deg, rgba(244, 249, 246, 0.98), rgba(255, 255, 255, 0.98)),
    url("../img/consultation-blueprint-v1.webp") 30% 100% / 780px auto no-repeat;
}

.piv2-aside-label {
  margin: 0 0 23px;
  color: var(--piv2-green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.piv2-roof-tabs {
  display: grid;
  gap: 9px;
}

.piv2-roof-tabs button {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1px 13px;
  width: 100%;
  min-height: 84px;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--piv2-ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.piv2-roof-tabs button::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--piv2-green);
  opacity: 0;
  transform: translate(-7px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.piv2-roof-tabs button:hover,
.piv2-roof-tabs button:focus-visible {
  transform: translateX(3px);
  border-color: rgba(17, 135, 84, 0.22);
  outline: none;
}

.piv2-roof-tabs button.is-active {
  border-color: rgba(17, 135, 84, 0.22);
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 67, 52, 0.09);
}

.piv2-roof-tabs button.is-active::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.piv2-roof-tabs button > span {
  grid-row: 1 / 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--piv2-green);
  background: rgba(17, 135, 84, 0.09);
  font-size: 11px;
  font-weight: 750;
}

.piv2-roof-tabs button strong {
  padding-right: 25px;
  font-size: 15px;
  line-height: 1.25;
}

.piv2-roof-tabs button small {
  color: #718079;
  font-size: 11px;
  line-height: 1.35;
}

.piv2-engineer-note {
  margin-top: auto;
  padding: 18px 0 19px;
  border-top: 1px solid var(--piv2-line);
}

.piv2-engineer-note > span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--piv2-green-dark);
  background: rgba(17, 135, 84, 0.1);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.piv2-engineer-note p {
  margin: 0;
  color: var(--piv2-muted);
  font-size: 12px;
  line-height: 1.55;
}

.piv2-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 20px;
  border-radius: 14px;
  color: #fff !important;
  background: var(--piv2-green);
  box-shadow: 0 13px 28px rgba(17, 135, 84, 0.22);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.piv2-inline-cta:hover,
.piv2-inline-cta:focus-visible {
  transform: translateY(-2px);
  background: var(--piv2-green-dark);
  box-shadow: 0 18px 34px rgba(17, 135, 84, 0.28);
  outline: none;
}

.piv2-inline-cta span {
  font-size: 19px;
}

.piv2-system-shell .roof-types-grid {
  position: relative;
  display: block;
  width: 100%;
  min-height: 690px;
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.8)),
    url("../img/consultation-blueprint-v1.webp") center / cover no-repeat;
}

.piv2-system-shell .roof-types-grid::before {
  content: "02 / РАСКРОЙТЕ СИСТЕМУ";
  position: absolute;
  top: 28px;
  left: 32px;
  z-index: 5;
  color: var(--piv2-green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.piv2-system-shell .roof-card {
  display: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 690px;
  margin: 0;
  padding: 76px 42px 34px;
  overflow: hidden;
  opacity: 0;
}

.piv2-system-shell .roof-card.is-active {
  display: flex;
  opacity: 1;
  animation: piv2CardIn 440ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.piv2-system-shell .roof-card-title {
  position: absolute;
  top: 50px;
  right: 38px;
  z-index: 4;
  margin: 0 !important;
  padding: 8px 13px;
  border: 1px solid rgba(21, 35, 31, 0.1);
  border-radius: 999px;
  color: var(--piv2-ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  text-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.piv2-system-shell .roof-engineering-wrapper {
  min-height: 570px;
  justify-content: center;
}

.piv2-system-shell .iso-scene {
  width: 420px;
  height: 420px;
  margin: 46px 0 65px !important;
  transform: scale(1.16) !important;
  cursor: grab;
  filter: drop-shadow(0 24px 24px rgba(35, 46, 40, 0.12));
}

.piv2-system-shell .iso-scene:active {
  cursor: grabbing;
}

.piv2-system-shell .sys-controls {
  position: absolute;
  right: 7%;
  bottom: 29px;
  left: 7%;
  z-index: 7;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid rgba(21, 35, 31, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 15px 34px rgba(33, 51, 44, 0.1);
  backdrop-filter: blur(12px);
}

.piv2-system-shell .slider-hint {
  color: var(--piv2-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.piv2-system-shell .express-slider {
  width: 100%;
  accent-color: var(--piv2-green);
  cursor: ew-resize;
}

.roof-system-section > .roof-sys-container > .sys-cta {
  display: none;
}

#roof-tooltip {
  border-radius: 12px;
  color: #fff;
  background: rgba(16, 31, 26, 0.95);
  box-shadow: 0 13px 30px rgba(15, 31, 25, 0.2);
  backdrop-filter: blur(10px);
}

/* Inspection */
#roof-inspection {
  padding: clamp(82px, 8vw, 132px) 24px;
  background: #f8faf8;
}

.piv2-inspection-header {
  margin-bottom: 38px;
}

.piv2-inspection-header h2 {
  font-size: clamp(40px, 3.8vw, 64px);
}

#roof-inspection #analyzer-block {
  padding: 0;
  background: transparent;
}

#roof-inspection #analyzer-block > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.piv2-inspection-guide {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: -1px;
  border: 1px solid var(--piv2-line);
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.94);
}

.piv2-inspection-guide span {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 14px 22px;
  color: var(--piv2-muted);
  font-size: 12px;
  font-weight: 650;
}

.piv2-inspection-guide span + span {
  border-left: 1px solid var(--piv2-line);
}

.piv2-inspection-guide b {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--piv2-green);
  background: rgba(17, 135, 84, 0.09);
  font-size: 10px;
}

#roof-inspection .inspection-wrapper {
  width: 100%;
  max-width: none !important;
  height: 640px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--piv2-line);
  border-radius: 0 0 28px 28px;
  background: #dce2dc;
  box-shadow: var(--piv2-shadow);
}

#roof-inspection .roof-photo-layer {
  border-radius: 0 !important;
  box-shadow: none !important;
}

#roof-inspection .roof-img {
  filter: saturate(0.82) contrast(1.04);
}

#roof-inspection .roof-view-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 24, 20, 0.14), transparent 45%, rgba(12, 24, 20, 0.05));
}

#roof-inspection .defect-marker-point {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.88) !important;
  background: rgba(17, 135, 84, 0.9) !important;
  box-shadow: 0 0 0 9px rgba(17, 135, 84, 0.16), 0 8px 18px rgba(11, 73, 47, 0.2);
  animation: piv2MarkerPulse 2.4s ease-in-out infinite;
}

#roof-inspection .defect-marker-point::after {
  content: "+";
  color: #fff !important;
  font-size: 20px;
  font-weight: 500;
}

#roof-inspection .magnifier-lens {
  width: 260px;
  height: 260px;
  border: 7px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 65px rgba(10, 25, 19, 0.38), 0 0 0 1px rgba(17, 135, 84, 0.32);
}

#roof-inspection .lens-crosshair,
#roof-inspection .lens-crosshair::after {
  background: rgba(17, 135, 84, 0.65);
}

#roof-inspection .insp-card {
  right: 28px;
  bottom: 28px;
  left: auto;
  min-width: 0;
  width: min(460px, calc(100% - 56px));
  max-width: 460px;
  padding: 23px 25px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: rgba(14, 31, 25, 0.94);
  box-shadow: 0 24px 55px rgba(10, 25, 19, 0.28);
  backdrop-filter: blur(14px);
}

#roof-inspection .insp-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--piv2-green);
  font-size: 0;
}

#roof-inspection .insp-icon::after {
  content: "!";
  font-size: 18px;
  font-weight: 800;
}

#roof-inspection .insp-title {
  margin-bottom: 7px;
  color: #fff;
  font-size: 16px;
}

#roof-inspection .insp-desc {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

#roof-inspection .insp-instruction {
  right: auto;
  bottom: 28px;
  left: 28px;
  gap: 12px;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(20, 39, 32, 0.13);
  backdrop-filter: blur(12px);
}

#roof-inspection .mouse-anim {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--piv2-green);
  background: rgba(17, 135, 84, 0.1);
  font-size: 18px;
}

#roof-inspection .insp-instruction p {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--piv2-ink);
  font-size: 11px;
  line-height: 1.3;
}

#roof-inspection .insp-instruction strong {
  font-size: 12px;
}

#roof-inspection .insp-instruction span {
  color: var(--piv2-muted);
}

#roof-inspection > .inspection-container > .sys-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 24px 0 0;
  padding: 22px 24px 22px 28px;
  border: 1px solid var(--piv2-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

#roof-inspection > .inspection-container > .sys-cta p {
  margin: 0 !important;
  color: var(--piv2-ink) !important;
  font-size: 17px !important;
  font-weight: 650;
}

#roof-inspection .sys-btn {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 13px;
  color: #fff;
  background: var(--piv2-green);
  box-shadow: 0 13px 28px rgba(17, 135, 84, 0.2);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

#roof-inspection .sys-btn:hover,
#roof-inspection .sys-btn:focus-visible {
  transform: translateY(-2px);
  background: var(--piv2-green-dark);
  outline: none;
}

@keyframes piv2CardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes piv2MarkerPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 7px rgba(17, 135, 84, 0.12), 0 8px 18px rgba(11, 73, 47, 0.2); }
  50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 13px rgba(17, 135, 84, 0.02), 0 8px 18px rgba(11, 73, 47, 0.2); }
}

@media (max-width: 1050px) {
  .piv2-header-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .piv2-header-copy {
    max-width: 760px;
  }

  .piv2-system-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .piv2-system-aside {
    padding-inline: 24px;
  }

  .piv2-system-shell .iso-scene {
    transform: scale(1) !important;
  }
}

@media (max-width: 760px) {
  .roof-system-section,
  #roof-inspection {
    padding: 72px 15px;
  }

  .piv2-header {
    margin-bottom: 31px;
  }

  .piv2-kicker {
    margin-bottom: 17px;
    font-size: 10px;
  }

  .piv2-kicker::before {
    width: 28px;
  }

  .piv2-header .sys-title,
  .piv2-inspection-header h2 {
    font-size: clamp(31px, 9.4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .piv2-header-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .piv2-header-copy {
    gap: 10px 14px;
  }

  .piv2-header-copy > span {
    font-size: 11px;
  }

  .piv2-header-copy i {
    width: 27px;
    height: 27px;
    font-size: 14px;
  }

  .piv2-system-shell {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .piv2-system-aside {
    padding: 26px 19px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--piv2-line);
  }

  .piv2-roof-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .piv2-roof-tabs button {
    display: grid;
    grid-template-columns: 32px 1fr;
    min-height: 58px;
    align-items: center;
    justify-content: stretch;
    padding: 10px 13px;
    text-align: left;
  }

  .piv2-roof-tabs button::after,
  .piv2-roof-tabs button small {
    display: none;
  }

  .piv2-roof-tabs button > span {
    display: grid;
    width: 28px;
    height: 28px;
    grid-row: auto;
  }

  .piv2-roof-tabs button strong {
    padding: 0;
    font-size: 12px;
  }

  .piv2-engineer-note {
    margin-top: 20px;
  }

  .piv2-engineer-note p {
    font-size: 11px;
  }

  .piv2-inline-cta {
    margin-top: 2px;
  }

  .piv2-system-shell .roof-types-grid,
  .piv2-system-shell .roof-card {
    min-height: 520px;
  }

  .piv2-system-shell .roof-card {
    padding: 54px 8px 18px;
  }

  .piv2-system-shell .roof-types-grid::before {
    top: 19px;
    left: 18px;
    font-size: 9px;
  }

  .piv2-system-shell .roof-card-title {
    top: 15px;
    right: 14px;
    font-size: 9px;
  }

  .piv2-system-shell .roof-engineering-wrapper {
    min-height: 440px;
  }

  .piv2-system-shell .iso-scene {
    width: 300px;
    height: 300px;
    margin: 40px 0 76px !important;
    transform: scale(0.82) !important;
  }

  .piv2-system-shell .sys-controls {
    right: 14px;
    bottom: 17px;
    left: 14px;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .piv2-system-shell .slider-hint {
    font-size: 10px;
  }

  .piv2-inspection-guide {
    grid-template-columns: 1fr;
    border-radius: 18px 18px 0 0;
  }

  .piv2-inspection-guide span {
    min-height: 47px;
    padding: 8px 13px;
    font-size: 10px;
  }

  .piv2-inspection-guide span + span {
    border-top: 1px solid var(--piv2-line);
    border-left: 0;
  }

  .piv2-inspection-guide b {
    width: 27px;
    height: 27px;
  }

  #roof-inspection .inspection-wrapper,
  #roof-inspection .roof-view-container,
  #roof-inspection .roof-photo-layer {
    height: 420px !important;
  }

  #roof-inspection .roof-img {
    height: 420px !important;
    object-position: 52% center;
  }

  #roof-inspection .defect-marker-point {
    width: 32px;
    height: 32px;
    animation: none !important;
  }

  #roof-inspection .defect-marker-point::after {
    font-size: 16px;
  }

  #roof-inspection .insp-card {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    padding: 14px;
    border-radius: 13px;
  }

  #roof-inspection .insp-title {
    font-size: 13px;
  }

  #roof-inspection .insp-desc {
    font-size: 10px;
  }

  #roof-inspection .insp-instruction {
    bottom: 12px;
    left: 12px;
    padding: 9px 11px;
  }

  #roof-inspection .insp-instruction p {
    font-size: 9px;
  }

  #roof-inspection .insp-instruction strong {
    font-size: 10px;
  }

  #roof-inspection > .inspection-container > .sys-cta {
    align-items: stretch;
    flex-direction: column;
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
  }

  #roof-inspection > .inspection-container > .sys-cta p {
    font-size: 14px !important;
  }

  #roof-inspection .sys-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .piv2-system-shell .roof-card.is-active,
  #roof-inspection .defect-marker-point {
    animation: none !important;
  }

  .piv2-system-shell .roof-card.is-active {
    opacity: 1 !important;
    transform: none !important;
  }

  .piv2-roof-tabs button,
  .piv2-inline-cta,
  #roof-inspection .sys-btn {
    transition: none !important;
  }
}
