.scopri {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(295px, 1fr);
  align-items: center;
  overflow: hidden;
  margin-bottom: clamp(32px, 4vw, 64px);
  border: 1px solid #42463e;
  background: var(--ink, #191b18);
  color: var(--paper, #f7f7f2);
}

.scopri__foto {
  position: relative;
  width: 100%;
  aspect-ratio: 708/620;
  overflow: hidden;
  isolation: isolate;
  background: #272b26;
}

/* The photograph and SVG use the same 708 × 620 crop of the 960 × 720 reference. */
.scopri__foto .scopri__immagine {
  position: absolute;
  top: -4.51613%;
  left: -1.69492%;
  width: 135.59322%;
  height: auto;
  max-width: none;
  display: block;
}

.scopri__tracce { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scopri__tracce path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.scopri__tracce g { opacity: .85; }
.scopri__ombra { stroke: #241c15; stroke-width: 6px; }
.scopri__elemento { stroke: var(--orange, #ff8a2b); stroke-width: 3px; }
.scopri__linea { stroke: #ffbb80; stroke-width: 2px; }
.scopri__tracce circle { fill: var(--orange, #ff8a2b); stroke: #29231d; stroke-width: 1px; }

/* Without :has or scripting the three labelled traces and definitions remain visible. */
@supports selector(:has(input:checked)) {
  .scopri__tracce g { opacity: 0; transition: opacity .2s ease-out; }
}
.scopri[data-scelta] :where(.scopri__tracce) g { opacity: 0; }
.scopri[data-scelta="montante"] [data-componente="montante"],
.scopri[data-scelta="fermapiede"] [data-componente="fermapiede"],
.scopri[data-scelta="parapetto"] [data-componente="parapetto"] {
  opacity: 1;
  --scopri-rilievo: var(--orange, #ff8a2b);
  --scopri-inchiostro: #191b18;
  --scopri-tratto: scopri-tratteggia;
}
@supports selector(:has(input:checked)) {
  .scopri:has(#scopri-montante:checked) [data-componente="montante"],
  .scopri:has(#scopri-fermapiede:checked) [data-componente="fermapiede"],
  .scopri:has(#scopri-parapetto:checked) [data-componente="parapetto"] {
    opacity: 1;
    --scopri-rilievo: var(--orange, #ff8a2b);
    --scopri-inchiostro: #191b18;
    --scopri-tratto: scopri-tratteggia;
  }
}

.scopri__punto {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.scopri__punto[data-componente="montante"] { left: 19.35028%; top: 62.90323%; }
.scopri__punto[data-componente="fermapiede"] { left: 65.96045%; top: 80.64516%; }
.scopri__punto[data-componente="parapetto"] { left: 52.82486%; top: 5%; }
.scopri__punto span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 25px;
  border-radius: 2px;
  border: 1px solid #ffab66;
  color: var(--scopri-inchiostro, #fffaf3);
  background: var(--scopri-rilievo, #20231f);
  box-shadow: 0 1px 5px #17181390;
  font: 650 .81rem/1 'Geist Mono', monospace;
}
.scopri__punto:hover span { outline: 2px solid #fffaf3; outline-offset: 2px; }

.scopri__pannello { display: grid; align-content: center; gap: 0; min-width: 0; padding: clamp(24px, 3.4vw, 58px); }
.scopri h3 { margin: 0; color: inherit; font-size: clamp(2.05rem, 3.7vw, 3.75rem); font-weight: 680; line-height: 1; letter-spacing: -.05em; }
.scopri__invito { margin: 14px 0 clamp(15px, 2vw, 31px); color: #c3c8bd; font-size: .99rem; line-height: 1.45; }
.scopri__scelte { display: grid; min-inline-size: 0; padding: 0; margin: 0; border: 0; border-bottom: 1px solid #4a4e44; }
.scopri__scelte legend,
.scopri__scelta input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.scopri__scelta {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: clamp(12px, 1.15vw, 20px) 3px;
  border-top: 1px solid #4a4e44;
  cursor: pointer;
  touch-action: manipulation;
}
.scopri__numero { padding-top: 3px; color: #c3c8bd; font: 500 .84rem/1.3 'Geist Mono', monospace; }
.scopri__testo { display: grid; gap: 4px; }
.scopri__testo strong { font-size: clamp(1.15rem, 1.65vw, 1.5rem); line-height: 1.15; font-weight: 650; letter-spacing: -.025em; }
.scopri__testo > span { color: #c3c8bd; font-size: .93rem; line-height: 1.42; }
.scopri__scelta input:checked ~ .scopri__numero { color: var(--orange, #ff8a2b); font-weight: 700; }
.scopri__scelta input:checked ~ .scopri__testo::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 30px;
  border-top: 2px solid var(--orange, #ff8a2b);
  content: '';
}
.scopri__scelta:hover .scopri__testo strong { color: #ffd6b2; }
.scopri__scelta input:focus-visible ~ .scopri__testo::after {
  content: '';
  position: absolute;
  inset: 3px -5px;
  outline: 2px solid #ffb574;
  outline-offset: 0;
}
.scopri__preventivo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 44px;
  margin-top: clamp(8px, 1.3vw, 18px);
  color: var(--orange, #ff8a2b);
  font-size: .95rem;
  font-weight: 660;
  text-decoration: underline;
  text-underline-offset: .24em;
}
.scopri__preventivo span { font-size: 1.1em; }
.scopri__preventivo:focus-visible { outline: 2px solid #ffb574; outline-offset: 4px; }
@keyframes scopri-tratteggia { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .scopri__elemento, .scopri__linea {
    stroke-dasharray: 1;
    animation: var(--scopri-tratto, none) .36s ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scopri__tracce g { transition: none; }
}
@media (max-width: 760px) {
  .scopri { display: flex; flex-direction: column; align-items: stretch; padding: 22px 0 12px; }
  .scopri__pannello { display: contents; }
  .scopri h3, .scopri__invito, .scopri__scelte, .scopri__preventivo { margin-inline: 18px; }
  .scopri h3 { order: 1; }
  .scopri__invito { order: 2; margin-top: 8px; margin-bottom: 17px; }
  .scopri__foto { order: 3; }
  .scopri__scelte { order: 4; margin-top: 8px; }
  .scopri__scelta { padding-block: 12px; }
  .scopri__preventivo { order: 5; align-self: start; }
}
