/* fx/pecas: "A história real" (#historia). Six part cards + two-bar total comparison.
   The default (no JS / reduced motion) is the final state. Values are filled by fx/pecas.js from the data attributes. */

.hr-list { margin-top: clamp(44px, 5.5vw, 76px); }
.pc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- part cards ---------- */
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(72px, 7.4vw, 92px) clamp(16px, 2vw, 24px); padding-top: 54px; }
.pc-card {
  --c-ink: #fff; --c-ink2: rgba(255, 255, 255, .78); --c-best: #9af5bd; --c-chip: #f5c26b; --c-chipink: #3a2606; --strike: 1;
  position: relative; container-type: inline-size; display: flex; flex-direction: column; box-sizing: border-box; min-width: 0;
  min-height: 336px; padding: 26px 26px 34px; border-radius: 32px; color: var(--c-ink); background: #1f3f78;
  transition: translate .45s cubic-bezier(.34, 1.3, .64, 1), box-shadow .4s;
}
.pc-card.t-deep { background: #1f3f78; }
.pc-card.t-mid { background: #315ea8; }
.pc-card.t-sky { background: #8ab4f8; --c-ink: #0d2147; --c-ink2: rgba(13, 33, 71, .78); --c-best: #064d2b; --c-chip: #0d2147; --c-chipink: #fff; }
.pc-card.t-sun { background: #f5c26b; --c-ink: #2a1d05; --c-ink2: rgba(42, 29, 5, .78); --c-best: #0a5a31; --c-chip: #1f3f78; --c-chipink: #fff; }
.pc-card.t-surf {
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  --c-ink: var(--ink); --c-ink2: var(--ink2); --c-best: var(--ok); --c-chip: var(--ok); --c-chipink: var(--surface);
}
.pc-ill { position: absolute; z-index: 2; top: -54px; right: 6px; width: clamp(132px, 13vw, 170px); aspect-ratio: 1; transform: rotate(var(--tilt, 0deg)); pointer-events: none; }
.pc-ill img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(10, 20, 50, .28)); }
.pc-ill img.fx-broken { visibility: hidden; }

.pc-top { max-width: 58%; min-height: 112px; }
.pc-kick { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink2); }
.pc-name { margin: 0; font-size: 19px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }

.pc-lab { display: block; font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--c-ink2); }
.pc-was { margin-top: auto; padding-top: 18px; }
.pc-s { position: relative; display: inline-block; margin-top: 3px; font-size: 17px; line-height: 24px; height: 24px; font-weight: 400; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--c-ink2); text-decoration: none; white-space: nowrap; }
.pc-s::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 53%; height: 2px; border-radius: 2px; background: currentColor;
  transform: rotate(-2.5deg) scaleX(var(--strike, 1)); transform-origin: 0 50%;
}
.pc-best { margin-top: 14px; }
.pc-n { display: block; margin-top: 2px; height: 1.05em; font-size: clamp(36px, 3.7vw, 52px); font-size: min(52px, 14.6cqi); line-height: 1.05; font-weight: 300; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--c-best); }
.pc-chip {
  position: absolute; z-index: 3; right: 22px; bottom: -15px; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--c-chip); color: var(--c-chipink); font-size: 13.5px; font-weight: 700; letter-spacing: -.005em; font-variant-numeric: tabular-nums; white-space: nowrap;
  transform: rotate(var(--tilt, 0deg)); transform-origin: 100% 100%; box-shadow: 0 8px 16px rgba(10, 20, 50, .2);
}
@media (hover: hover) and (pointer: fine) {
  .pc-card:hover { translate: 0 -8px; box-shadow: 0 22px 36px rgba(15, 25, 60, .24); }
  .pc-card.t-surf:hover { box-shadow: inset 0 0 0 1px var(--line), 0 22px 36px rgba(15, 25, 60, .2); }
}

/* ---------- comparison bars ---------- */
.pc-cmp { margin-top: clamp(72px, 8vw, 112px); }
.pc-cmp-h { margin-bottom: clamp(20px, 2.6vw, 32px); }
.pc-cmp-h h3 { margin: 0; font-size: clamp(24px, 2.8vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.pc-row { --w: 100%; margin-top: clamp(22px, 2.6vw, 32px); }
.pc-rowlab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 10px; }
.pc-rowlab b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.pc-rowlab span { font-size: 13px; color: var(--ink3); }
.pc-track { position: relative; height: clamp(84px, 10.5vw, 136px); }
.pc-fill {
  position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: var(--w); box-sizing: border-box; border-radius: 28px;
  display: flex; align-items: center; padding: 0 clamp(16px, 2.6vw, 38px); color: #fff; background: #1f3f78;
}
:root[data-theme="dark"] .pc-f-store { background: #315ea8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pc-f-store { background: #315ea8; } }
.pc-f-best { background: #1a7f52; }
.pc-big { display: block; font-size: clamp(38px, 6.9vw, 100px); line-height: 1.05; font-weight: 300; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-gap {
  position: absolute; top: 0; right: 0; bottom: 0; width: calc(100% - var(--w) + 40px); box-sizing: border-box; border-radius: 28px;
  border: 2px dashed color-mix(in srgb, var(--ok) 60%, transparent); display: flex; align-items: center; justify-content: flex-end; padding-right: clamp(10px, 1.6vw, 22px);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ok) 13%, transparent) 0 9px, transparent 9px 18px);
}
.pc-diff {
  position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 20px 13px; border-radius: 22px;
  background: #f5c26b; color: #3a2606; transform: rotate(var(--tilt, -4deg)); transform-origin: 100% 100%; box-shadow: 0 12px 22px rgba(10, 20, 50, .22);
}
.pc-diff-n { display: block; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-diff-t { font-size: 13px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.pc-note { margin: clamp(48px, 5vw, 64px) 0 0; max-width: 760px; font-size: 13px; line-height: 1.55; color: var(--ink3); text-wrap: pretty; }
.pc-dots { display: none; }

/* ---------- tablet: two columns ---------- */
@media (max-width: 1000px) {
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-ill { width: clamp(128px, 20vw, 168px); }
}

/* ---------- phone: snap row, bars with the diff chip below ---------- */
@media (max-width: 640px) {
  .hr-list { margin-top: 28px; }
  .pc-grid {
    display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -24px; padding: 70px 24px 40px; scroll-padding: 0 24px; -webkit-overflow-scrolling: touch;
  }
  .pc-grid::-webkit-scrollbar { display: none; }
  .pc-card { flex: 0 0 min(78vw, 320px); scroll-snap-align: start; min-height: 330px; padding: 24px 22px 32px; }
  .pc-ill { top: -52px; width: 140px; }
  .pc-top { max-width: 54%; min-height: 108px; }
  .pc-name { font-size: 18px; }
  .pc-chip { right: 18px; }
  .pc-dots { display: flex; justify-content: center; gap: 7px; margin-top: -14px; }
  .pc-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width .25s, background .25s; }
  .pc-dots i.on { width: 22px; border-radius: 4px; background: var(--focus); }

  .pc-cmp { margin-top: 56px; }
  .pc-track { height: 84px; }
  .pc-fill { border-radius: 24px; padding: 0 16px; }
  .pc-big { font-size: 40px; }
  .pc-gap { border-radius: 24px; }
  .pc-row[data-total="best"] { margin-bottom: 52px; }
  .pc-gap { align-items: flex-end; justify-content: flex-end; padding: 0; }
  .pc-diff { position: absolute; right: 4px; top: calc(100% - 14px); padding: 10px 16px 11px; }
  .pc-diff-n { font-size: 24px; }
}
@media (max-width: 380px) {
  .pc-big { font-size: 36px; }
}
@media (max-width: 640px) { .pc-note { margin-top: 72px; } }

/* ---------- phone fixes: chips contained, art does not run under the title ---------- */
@media (max-width: 640px) {
  .pc-card { overflow: visible; }
  .pc-grid { padding-bottom: 44px; clip-path: inset(0 0 0 0); }
  .pc-top { max-width: none; padding-right: 96px; min-height: 108px; }
  .pc-ill { top: -50px; right: 4px; width: 112px; }
  .pc-kick { font-size: 11.5px; letter-spacing: .08em; }
  .pc-name { font-size: 17.5px; }
  .pc-chip { right: 16px; }
}
