/* Casos reals: casos reals. Hereta ../style.css; color de Vine perquè són casos de Mostra't. */
.ts :focus-visible { outline-color: var(--vine-ink); }
.ts-site { margin: 8px 0 0; }
.ts-site .door-link { color: var(--vine-ink); padding-top: 12px; }
.ts-check h2, .ts-shots h2, .ts-next h2 { font-size: clamp(26px, 3vw, 36px); }

.ts-check { background: var(--paper-2); padding-block: clamp(48px, 7vw, 88px); }
.ts-queries { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; }
.ts-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; background: var(--paper); border-radius: var(--r-block); padding: 16px 20px; }
.ts-q-text { margin: 0; min-width: 0; font: 600 19px/1.3 var(--f-body); }
.ts-q-text::before { content: "«"; color: var(--ink-2); margin-right: .12em; }
.ts-q-text::after { content: "»"; color: var(--ink-2); margin-left: .12em; }
.ts-q-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-q-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: var(--r-pill); font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .15s ease-out, color .15s ease-out; }
.ts-q-links a:hover { background: var(--ink); color: var(--paper); }
/* Al mòbil, els tres botons en una sola fila (el del mig pot partir-se en dues línies) */
@media (max-width: 560px) {
  .ts-q { padding: 14px 16px; }
  .ts-q-links { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; width: 100%; }
  .ts-q-links a { justify-content: center; padding: 0 10px; font-size: 14px; line-height: 1.2; text-align: center; }
}
.ts-check .fine { margin-top: 20px; max-width: 64ch; }

.ts-shots { padding-block: clamp(48px, 7vw, 88px); }
.ts-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.ts-shot { margin: 0; display: grid; gap: 10px; }
.ts-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-block); }
.ts-shot figcaption { font-size: 14px; color: var(--ink-2); }

.ts-next { padding-block: clamp(32px, 5vw, 64px) clamp(64px, 9vw, 112px); }
.ts-next .cta-band > * { position: relative; }

/* Il·lustracions de «Què vam fer» */

/* Barra de cerca que escriu */
.ts-bar { display: flex; align-items: center; gap: 12px; margin-top: 32px; min-height: 56px; padding: 0 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-pill); font: 600 19px/1.2 var(--f-body); }
.ts-bar-ico { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; }
.ts-bar-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-bar .caret { flex: none; width: 2px; height: 1.2em; background: var(--vine-ink); margin-left: -10px; }
.ts-queries { margin-top: 16px; }
.ts-q { outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .25s ease-out, background-color .25s ease-out; }
.ts-q.is-on { outline-color: var(--vine-ink); }

@media (prefers-reduced-motion: no-preference) {
  .ts-bar .caret { animation: blink 1s steps(1) 5; }
  @keyframes blink { 50% { opacity: 0; } }

  @supports (animation-timeline: view()) {
  }
}

/* Llista de casos (casos/index.html) */
/* Introducció: hero amb la foto del cas a sang (veure .ph-hero a ../style.css) */
.ts-intro { min-height: clamp(440px, 60vh, 560px); }
.ts-intro h1 { font-size: clamp(40px, 5.6vw, 72px); }
.ts-cases { padding-top: clamp(16px, 2.4vw, 32px); padding-bottom: clamp(64px, 9vw, 120px); }
.case-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.case-card { --c: var(--vine-ink); min-width: 0; }
.case-card[data-via="torna"] { --c: var(--torna); }
.case-card[data-via="dues"] { --c: var(--ink); }
.case-card > a { height: 100%; display: flex; flex-direction: column; gap: 10px; padding: clamp(24px, 3vw, 32px); border: 1.5px solid var(--c); border-radius: var(--r-block); text-decoration: none; background: var(--paper); transition: background-color .2s ease-out, translate .25s var(--ease-out); }
.case-card > a:hover { background: var(--paper-2); }
.cc-via { align-self: flex-start; padding: 4px 12px; border-radius: var(--r-pill); background: var(--c); color: var(--on-color); font-weight: 600; font-size: 14px; }
.case-card[data-via="vine"] .cc-via { background: var(--vine); color: var(--on-vine); }
.cc-name { font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--f-body); letter-spacing: -0.025em; margin-top: 6px; }
.cc-where { margin: 0; font-weight: 600; color: var(--c); }
.cc-what { margin: 0; color: var(--ink-2); }
.cc-more { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: 8px; }
.case-card > a:hover .case-next { --c: var(--ink-2); }
.case-next > a { border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .case-card { animation: rise .6s calc(.1s + var(--i, 0) * .08s) var(--ease-out) backwards; }
  .case-card:nth-child(2) { --i: 1; } .case-card:nth-child(3) { --i: 2; } .case-card:nth-child(4) { --i: 3; }
}
@media (max-width: 860px) { .ts-intro { min-height: 0; } }

/* ===== Cas Taxis Velasco (body.tv): resultat, dades de Search Console i què vam fer =====
   Abans = barra buida amb contorn; web nova = oliva ple. Un sol eix per gràfic. */
.tv-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(36px, 6vw, 88px) clamp(40px, 6vw, 72px); }
.tv-hero h1 { font-size: clamp(38px, 4.6vw, 60px); }
.tv-hero .pn { display: block; color: var(--vine-ink); font-size: .55em; margin-top: .2em; }
.tv-hero .lead { margin-top: 16px; }
.tv-head { margin: 28px 0 0; display: grid; gap: 6px; justify-items: start; }
.tv-head-x { font: 400 clamp(64px, 9vw, 112px)/.9 var(--f-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tv-head-t { font: 600 clamp(20px, 2.2vw, 24px)/1.25 var(--f-body); }
.tv-head-s { color: var(--ink-2); }
.tv-head-s b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tv-file { background: var(--paper-2); border-radius: var(--r-block); padding: clamp(20px, 2.6vw, 28px); }
.tv-file .tv-file-h { font: 700 15px/1.3 var(--f-body); color: var(--ink-2); }
.tv-file dl { margin: 12px 0 0; display: grid; }
.tv-file dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tv-file dt { font-size: 14px; color: var(--ink-2); }
.tv-file dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.45; }
.tv-file .ts-site { margin: 4px 0 0; }
.tv-file .door-link { color: var(--vine-ink); padding-top: 8px; font-size: 17px; overflow-wrap: anywhere; }
@media (max-width: 860px) { .tv-hero { grid-template-columns: minmax(0, 1fr); } }

.tv-sec { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.tv-sec h2 { font-size: clamp(28px, 3.2vw, 40px); }
.tv-intro { margin: 10px 0 0; color: var(--ink-2); max-width: 60ch; }
.tv h3 { font-size: 19px; }

/* Fitxes abans → després */
.tv-kpis { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tv-kpi { min-width: 0; display: grid; align-content: start; gap: 10px; padding: 20px; border-radius: var(--r-block); background: var(--paper-2); }
.tv .tv-kpi-l { font-size: 16px; line-height: 1.3; }
.tv-kpi-x { margin: 0; font: 400 clamp(42px, 4.4vw, 54px)/1 var(--f-head); font-variant-numeric: tabular-nums; }
.tv-ba { margin: 2px 0 0; display: grid; gap: 8px; }
.tv-ba > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 10px; }
.tv-ba dt { font-size: 14px; color: var(--ink-2); }
.tv-ba dd { margin: 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
.tv-ba i { flex: 0 1 auto; min-width: 6px; display: block; height: 14px; width: calc(var(--w) * .62); border-radius: 3px; background: var(--torna); }
.tv-ba .is-before i { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.tv-ba b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-kpi-n { margin: 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 900px) { .tv-kpis { grid-template-columns: minmax(0, 1fr); } }

/* Gràfic mensual */
.tv-chart { margin: 16px 0 0; padding: clamp(18px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--r-block); background: var(--paper); overflow: clip; }
.tv-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.tv-bars { list-style: none; margin: 0; padding: 0; height: 100%; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; align-items: end; }
.tv-bars > li { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
@media (max-width: 560px) { .tv-chart { padding-inline: 14px; } }

/* D'on venen les visites */
.tv-hbars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.tv-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; }
.tv-hbars b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tv-hbars i { grid-column: 1 / -1; display: block; height: 8px; width: max(var(--w), 4px); border-radius: 2px; background: var(--torna); }
.tv-hbars small { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.tv-stack { display: flex; gap: 2px; height: 14px; border-radius: 3px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.tv-stack i { display: block; width: var(--w); background: var(--torna); }
.tv-stack i + i { background: var(--vine-ink); }

/* Què vam fer: acció, explicació i la dada que la demostra */
.tv-did-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(24px, 4vw, 56px); align-items: start; }
.tv-shots { position: relative; margin: 0; padding: 0 0 30px; }
.tv-browser { border: 1px solid var(--line); border-radius: var(--r-block); overflow: hidden; background: #fff; box-shadow: 0 18px 40px -24px rgb(44 51 42 / .35); }
.tv-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.tv-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.tv-bar span { margin-left: 10px; font-size: 12px; color: var(--ink-2); }
.tv-browser img { display: block; width: 100%; height: auto; }
.tv-phone { position: absolute; right: -10px; bottom: 0; width: clamp(72px, 22%, 104px); height: auto; border: 4px solid var(--ink); border-radius: 14px; background: #000; box-shadow: 0 16px 30px -18px rgb(44 51 42 / .5); }
.tv-shots figcaption { margin-top: 12px; max-width: 70%; }
.tv-acts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; }
.tv-acts li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px clamp(20px, 3vw, 40px); align-items: start; padding: 22px 0; border-top: 1px solid var(--line); }
.tv-acts h3 { display: flex; align-items: center; gap: 14px; }
.tv-acts .ill { width: 40px; height: 40px; color: var(--ink-2); }
.tv-acts p { margin: 0; color: var(--ink-2); }
.tv-acts p.tv-proof { padding: 12px 14px; border-radius: var(--r-block); background: var(--paper-2); color: var(--ink); font-size: 15px; }
.tv-proof span { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; color: var(--vine-ink); }
.tv-proof a { color: var(--vine-ink); font-weight: 600; }
@media (max-width: 960px) { .tv-acts li { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .tv-did-top { grid-template-columns: minmax(0, 1fr); } .tv-shots { max-width: 420px; } .tv-phone { right: 4px; } }

/* Moviment del cas (taxis-velasco/index.html afegeix .tv-anim): entra un cop, mai lligat al scroll */
@media (prefers-reduced-motion: no-preference) {
  /* Només les xifres entren; la resta del cas ja hi és. Pugen, sense fosa: el text es llegeix amb tot el contrast des del primer moment */
  .tv-anim :is(.tv-kpis, .tv-src) > .tv-rv { transition: translate .7s var(--ease-out); }
  .tv-anim :is(.tv-kpis, .tv-src) > .tv-rv:not(.is-in) { translate: 0 14px; }
  .tv-anim :is(.tv-kpis, .tv-src) > .tv-rv:nth-child(2) { transition-delay: .08s; }
  .tv-anim :is(.tv-kpis, .tv-src) > .tv-rv:nth-child(3) { transition-delay: .16s; }

  /* Abans → després: primer creix l'abans, després la barra nova surt d'allà i s'allarga */
  .tv-anim .tv-ba i { transition: width .9s var(--ease-out); }
  .tv-anim .tv-ba > div:not(.is-before) i { transition-delay: .45s; }
  .tv-anim .tv-ba:not(.is-in) i { width: calc(var(--from, 0%) * .62); }

  /* Barres horitzontals: s'omplen per ordre */
  .tv-anim :is(.tv-hbars, .tv-stack) i { transition: width .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + .15s); }
  .tv-anim :is(.tv-hbars, .tv-stack):not(.is-in) i { width: 0; }
}

/* Targetes de casos: foto a dalt */
.case-card > a { overflow: hidden; }
.cc-img { display: block; width: calc(100% + 2 * clamp(24px, 3vw, 32px)); max-width: none; height: 220px; margin: calc(-1 * clamp(24px, 3vw, 32px)) calc(-1 * clamp(24px, 3vw, 32px)) 6px; object-fit: cover; object-position: 50% 42%; }
