/* ═══════════════════════════════════════════════════════════
   PAPIK · Mur façana Passivhaus — interactive wall section
   Reskinned to PAPIK tokens: brand green #002819, TT Firs Neue
   (300/400/500 only, never italic), card language, mint accents.
   Material colors (wood / OSB / membranes) are technical illustration.
═══════════════════════════════════════════════════════════ */

.pvh-wall {
  --pvh-soft: rgba(0, 40, 25, 0.74);
  background: #fff;
  padding: clamp(64px, 8vw, 116px) clamp(20px, 5vw, 56px);
}
.pvh-wall__container { max-width: 1180px; margin: 0 auto; }

/* header · ara integrat dins de cada targeta (kicker+títol a l'esquerra, subtítol a la dreta) */
.pvh-stage-head { text-align: left; margin: 0 0 clamp(22px, 2.6vw, 32px); }
.pvh-kicker {
  display: inline-block; font-size: 11.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--pvh-soft); font-weight: var(--fw-regular);
  margin-bottom: 14px;
}
.pvh-title {
  font-size: clamp(24px, 2.4vw, 34px); line-height: 1.12; font-weight: var(--fw-light);
  letter-spacing: -0.01em; margin: 0; color: var(--text);
}
.pvh-sub { font-size: clamp(15px, 1.1vw, 16px); line-height: 1.55; color: var(--muted); margin: 0; }
/* títol propi de la targeta de la llegenda (dreta) */
.pvh-panel-head { margin: 0; }
.pvh-ptitle {
  font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; font-weight: var(--fw-light);
  letter-spacing: -0.01em; margin: 0; color: #fff;
}

/* layout · format de 2 targetes grans iguals (com .rl-combo__row): capes + llegenda */
.pvh-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
@media (min-width: 980px) { .pvh-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* Les dues targetes comparteixen el mateix fons verd clar (salvia) i radi gran */
.pvh-stage,
.pvh-panel {
  background:
    radial-gradient(125% 120% at 78% 12%, rgba(255,255,255,0.60) 0%, rgba(255,255,255,0) 52%),
    radial-gradient(120% 120% at 12% 100%, rgba(0,40,25,0.12) 0%, rgba(0,40,25,0) 55%),
    #d9e4e0;
  border-radius: var(--r-xl);
}
.pvh-stage { position: relative; padding: clamp(28px, 3.2vw, 48px); }
.pvh-svg { width: 100%; height: auto; max-width: 560px; margin: 0 auto; display: block; overflow: visible; }

/* orientation rail */
.pvh-orient {
  display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 6px;
  font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-light);
}
.pvh-orient-line { flex: 0 0 110px; height: 1px; background: var(--border-soft); }

/* ── SVG element states (fills via tokens so palette stays centralized) ── */
.pvh-layer { cursor: pointer; transition: transform 0.42s var(--ease-bounce); }
.pvh-layer.is-active { transform: translate(-12.88px, 5.04px); }

.pvh-l-top { stroke: rgba(0, 40, 25, 0.30); stroke-width: 0.5; stroke-linejoin: round; }
.pvh-l-toplight { transition: opacity 0.25s; }
.pvh-layer.is-active .pvh-l-toplight { opacity: 0; }

.pvh-reveal { opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.pvh-layer.is-active .pvh-reveal { opacity: 1; }

.pvh-l-edge { fill: none; stroke: rgba(0,40,25,0.45); stroke-width: 0.7; stroke-linejoin: round; transition: stroke 0.2s, stroke-width 0.2s; }
.pvh-layer.is-active .pvh-l-edge { stroke: var(--green); stroke-width: 1.6; }
.pvh-clad-edge { fill: none; stroke: rgba(0,40,25,0.38); stroke-width: 0.5; stroke-linejoin: round; transition: stroke 0.2s, stroke-width 0.2s; }
.pvh-layer.is-active .pvh-clad-edge { stroke: var(--green); stroke-width: 1.4; }
.pvh-cover-edge { fill: none; stroke: var(--green); stroke-width: 1.2; stroke-linejoin: round; }

.pvh-dim { fill: #002819; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.pvh-stage.has-active .pvh-layer:not(.is-active) .pvh-dim { opacity: 0.16; }

.pvh-l-badge { fill: #fff; stroke: rgba(0,40,25,0.55); stroke-width: 1; r: 7; transition: fill 0.2s, stroke 0.2s, r 0.2s; }
.pvh-layer.is-active .pvh-l-badge { fill: var(--green); stroke: var(--green); r: 9; }
.pvh-l-bnum { fill: #002819; font-size: 9px; font-weight: var(--fw-medium); text-anchor: middle; transition: fill 0.2s; }
.pvh-layer.is-active .pvh-l-bnum { fill: #fff; }

/* leader lines + labels */
.pvh-ld { cursor: pointer; transition: opacity 0.2s; }
.pvh-stage.has-active .pvh-ld:not(.is-active) { opacity: 0.55; }
.pvh-ld-halo { fill: none; stroke: #fff; stroke-width: 2.6; stroke-opacity: 0.7; stroke-linecap: round; stroke-linejoin: round; }
.pvh-ld-line { fill: none; stroke: rgba(0,40,25,0.35); stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s, stroke-width 0.2s; }
.pvh-ld.is-active .pvh-ld-line { stroke: var(--green); stroke-width: 1.5; }
.pvh-ld-c { fill: #fff; stroke: rgba(0,40,25,0.28); stroke-width: 1; transition: fill 0.2s, stroke 0.2s; }
.pvh-ld.is-active .pvh-ld-c { fill: var(--green); stroke: var(--green); }
.pvh-ld-num { fill: var(--muted-light); font-size: 9px; font-weight: var(--fw-medium); text-anchor: middle; transition: fill 0.2s; }
.pvh-ld.is-active .pvh-ld-num { fill: #fff; }
.pvh-ld-name { fill: var(--text); font-size: 11.5px; font-weight: var(--fw-medium); letter-spacing: -0.01em; transition: fill 0.2s; }
.pvh-ld.is-active .pvh-ld-name { fill: var(--green); }
.pvh-ld-mm { fill: var(--muted-light); font-size: 10.5px; font-weight: var(--fw-regular); }

/* info panel · 2a targeta (llegenda) amb el degradat verd FOSC autoritzat (com .rl-combo__box--main) */
.pvh-panel {
  display: flex; flex-direction: column; gap: 22px; justify-content: flex-start;
  padding: clamp(28px, 3.2vw, 48px);
  background:
    radial-gradient(125% 120% at 78% 12%, rgba(217,228,224,0.18) 0%, rgba(217,228,224,0) 52%),
    radial-gradient(120% 120% at 12% 100%, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 55%),
    #002819;
  color: #fff;
}
/* llegenda sobre verd fosc · textos i vores en clar */
.pvh-panel .pvh-kicker {font-size: 11.5px;font-weight: var(--fw-regular); color: #d9e4e0; }
.pvh-panel .pvh-sub { color: rgba(255,255,255,0.74); margin: 0 0 2px; max-width: 360px; }
.pvh-panel .pvh-stats { border-bottom-color: rgba(255,255,255,0.16); }
.pvh-panel .pvh-stat-k,
.pvh-panel .pvh-card-idx { color: rgba(255,255,255,0.60); }
.pvh-panel .pvh-stat-v,
.pvh-panel .pvh-stat-v.pvh-green,
.pvh-panel .pvh-card-name { color: #fff; }
.pvh-panel .pvh-card-thick,
.pvh-panel .pvh-card-desc,
.pvh-panel .pvh-idle-t { color: rgba(255,255,255,0.74); }
.pvh-panel .pvh-idle-dot,
.pvh-panel .pvh-num { border-color: rgba(255,255,255,0.30); color: rgba(255,255,255,0.60); }
/* llista mòbil sobre verd fosc */
.pvh-panel .pvh-list { border-top-color: rgba(255,255,255,0.16); }
.pvh-panel .pvh-row { color: #fff; border-bottom-color: rgba(255,255,255,0.12); }
.pvh-panel .pvh-row:hover { background: rgba(255,255,255,0.06); }
.pvh-panel .pvh-row.is-on { background: rgba(255,255,255,0.10); }
.pvh-panel .pvh-row.is-on .pvh-row-name { color: #fff; }
.pvh-panel .pvh-rownum { color: rgba(255,255,255,0.70); border-color: rgba(255,255,255,0.28); }
.pvh-panel .pvh-row.is-on .pvh-rownum { background: #fff; color: #002819; border-color: #fff; }
.pvh-panel .pvh-row-thick { color: rgba(255,255,255,0.55); }
.pvh-panel .pvh-row.is-on .pvh-row-thick { color: rgba(255,255,255,0.80); }
.pvh-stats { display: flex; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); padding-bottom: 20px; }
.pvh-stat { display: flex; flex-direction: column; gap: 5px; min-width: 92px; }
.pvh-stat-k { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-light); }
.pvh-stat-v { font-size: 18px; font-weight: var(--fw-medium); letter-spacing: -0.01em; color: var(--text); }
.pvh-stat-v.pvh-green { color: var(--green); }

/* card */
.pvh-card { min-height: 150px; }
.pvh-card__inner { animation: pvhFade 0.28s var(--ease-img); }
@keyframes pvhFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pvh-card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.pvh-num {
  width: 34px; height: 34px; border-radius: var(--r-full); display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: var(--fw-medium); color: var(--muted-light);
  border: 1.5px dashed var(--border); background: transparent;
}
.pvh-card-idx { font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-light); font-weight: var(--fw-regular); }
.pvh-card-name { font-size: 21px; font-weight: var(--fw-medium); letter-spacing: -0.015em; margin: 0 0 6px; line-height: 1.18; color: var(--text); }
.pvh-card-thick { font-size: 15px; color: var(--pvh-soft); font-weight: var(--fw-medium); margin-bottom: 13px; }
.pvh-card-desc { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.pvh-idle { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.pvh-idle-dot {
  width: 34px; height: 34px; border-radius: var(--r-full); border: 1.5px dashed var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  font-weight: var(--fw-medium); color: var(--muted-light);
}
.pvh-idle-t { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 320px; }

/* mobile list (desktop uses the SVG labels) */
.pvh-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-soft); }
.pvh-row {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  background: transparent; border: 0; border-bottom: 1px solid var(--border-soft); cursor: pointer;
  text-align: left; font: inherit; color: var(--text); border-radius: var(--r-lg); transition: background 0.2s ease;
}
.pvh-row:hover { background: rgba(0, 40, 25, 0.05); }
.pvh-row.is-on { background: rgba(0, 40, 25, 0.08); }
.pvh-row.is-on .pvh-row-name { color: var(--green); }
.pvh-rownum {
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: var(--r-sm); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; color: var(--muted);
}
.pvh-row.is-on .pvh-rownum { background: var(--green); color: #fff; border-color: var(--green); }
.pvh-dot { width: 11px; height: 11px; border-radius: var(--r-full); flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.pvh-row-name { flex: 1; font-size: 14px; letter-spacing: -0.01em; }
.pvh-row-thick { font-size: 13px; color: var(--muted-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pvh-row.is-on .pvh-row-thick { color: var(--pvh-soft); }

@media (min-width: 980px) { .pvh-list { display: none; } }
@media (max-width: 979px) { .pvh-card { min-height: auto; } }

@media (prefers-reduced-motion: reduce) {
  .pvh-layer, .pvh-l-toplight, .pvh-reveal, .pvh-l-edge, .pvh-clad-edge, .pvh-l-badge,
  .pvh-l-bnum, .pvh-ld, .pvh-ld-line, .pvh-ld-c, .pvh-ld-num, .pvh-ld-name { transition: none; }
  .pvh-card__inner { animation: none; }
}
