/* t4-teams — card dei team (piano v3, P4), renderer in t4-teams.js.
   Misure in px con clamp(): il root del tema cambia tra 10, 12, 15 e 16px
   secondo la larghezza. Da 600px card verticale (media 4:5 sopra), sotto
   card orizzontale (media a sinistra) per non avere 13 foto alte una dopo
   l'altra sul telefono. Il segnaposto è dichiarato: gradiente, iniziale o
   logo e "Foto in arrivo", mai una foto di un altro soggetto. */

.t4s .t4tc { padding-block: clamp(56px, 6vw, 80px) clamp(64px, 7vw, 96px); position: relative; }
@media (min-width: 992px) { .t4s .t4tc { padding-block: clamp(75px, 7vw, 140px); } }

.t4tc__head { align-items: end; display: flex; flex-wrap: wrap; gap: 12px 48px; justify-content: space-between; margin-bottom: clamp(24px, 2.6vw, 44px); }
.t4tc__lead { font-size: clamp(14px, 1.05vw, 17px); line-height: 1.55; margin: 0; max-width: 34em; opacity: .75; }

.t4tc__grid { align-items: start; display: grid; gap: clamp(12px, 1.5vw, 24px); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 600px) { .t4tc__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .t4tc__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.t4tc__item { margin: 0; min-width: 0; }

/* ---------- card ---------- */
.t4tc__card {
  background: #fff; border-radius: clamp(14px, 1.2vw, 18px); box-shadow: 0 1px 0 var(--t4-hair), 0 18px 40px rgba(14, 20, 48, .06);
  color: var(--t4-navy); display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; position: relative;
  scroll-margin-top: 120px; transition: box-shadow var(--t4-dur) var(--t4-ease), transform var(--t4-dur) var(--t4-ease);
}
@media (hover: hover) and (pointer: fine) {
  .t4tc__card:hover { box-shadow: 0 1px 0 var(--t4-hair), 0 26px 60px rgba(14, 20, 48, .14); transform: translateY(-3px); }
}

.t4tc__media { position: relative; }
.t4tc__frame { aspect-ratio: 4 / 5; background: var(--t4-navy); overflow: hidden; position: relative; }
.t4tc__frame > img, .t4tc__frame > video { display: block; height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.t4tc__frame > img { transition: transform 1s var(--t4-ease-out); }
.t4tc__frame > video { opacity: 0; transition: opacity .4s var(--t4-ease); }
.t4tc__media.is-playing .t4tc__frame > video { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .t4tc__card:hover .t4tc__frame > img { transform: scale(1.04); }
}

/* segnaposto dichiarato */
.t4tc__media.is-ph .t4tc__frame { align-items: center; background: var(--t4-grad); color: #fff; display: flex; justify-content: center; }
.t4tc__media.is-ph .t4tc__frame::before { border: 1px dashed rgba(134, 160, 255, .45); border-radius: 10px; content: ""; inset: 10px; pointer-events: none; position: absolute; }
.t4tc__ph-track { fill: none; height: auto; left: -12%; opacity: .22; position: absolute; stroke: var(--t4-sky); stroke-width: 10; top: 18%; width: 124%; }
.t4tc__ph-mark { display: grid; font-family: var(--t4-head); font-size: clamp(56px, 6.5vw, 112px); font-weight: 500; letter-spacing: -.03em; line-height: 1; place-items: center; position: relative; }
.t4tc__ph-mark.has-logo { background: #fff; border-radius: 50%; height: 46%; padding: 12%; width: auto; aspect-ratio: 1; }
.t4tc__ph-mark img { height: 100%; object-fit: contain; width: 100%; }
.t4tc__ph-label {
  background: rgba(14, 20, 48, .55); border: 1px solid var(--t4-hair-dark); border-radius: 999px; bottom: 18px; color: #fff;
  font-family: var(--t4-mono); font-size: 11px; left: 50%; letter-spacing: .08em; line-height: 1.3; padding: 6px 12px; position: absolute;
  text-transform: uppercase; transform: translateX(-50%); white-space: nowrap;
}

/* etichette sopra il media: vetro scuro, testo in Space Mono */
.t4tc__badge, .t4tc__vtag {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); background: rgba(14, 20, 48, .5); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; color: #fff; font-family: var(--t4-mono); font-size: 11px; letter-spacing: .08em; line-height: 1.3; margin: 0;
  padding: 5px 10px; position: absolute; text-transform: uppercase; top: 12px; white-space: nowrap;
}
.t4tc__badge { left: 12px; }
.t4tc__vtag { align-items: center; display: inline-flex; gap: 6px; right: 12px; }

/* logo del team in un cerchio sul bordo tra foto e testo */
.t4tc__logo {
  --lg: clamp(44px, 3.6vw, 60px);
  background: #fff; border: 3px solid #fff; border-radius: 50%; bottom: calc(var(--lg) / -2); box-shadow: 0 6px 18px rgba(14, 20, 48, .18);
  box-sizing: border-box; display: grid; height: var(--lg); left: 16px; overflow: hidden; place-items: center; position: absolute; width: var(--lg); z-index: 2;
}
.t4tc__logo img { height: 100%; object-fit: contain; padding: 12%; width: 100%; box-sizing: border-box; }
.t4tc__logo span { color: var(--t4-ink); font-family: var(--t4-head); font-size: calc(var(--lg) * .45); font-weight: 500; }

.t4tc__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: clamp(16px, 1.4vw, 22px); }
.t4tc__card:not(.is-ph) .t4tc__body { padding-top: calc(clamp(44px, 3.6vw, 60px) / 2 + 12px); }
.t4tc__name { font-family: var(--t4-head); font-size: clamp(18px, 1.45vw, 24px); font-weight: 500; letter-spacing: -.015em; line-height: 1.05; margin: 0; overflow-wrap: anywhere; text-transform: uppercase; }
.t4tc__place { font-family: var(--t4-mono); font-size: clamp(11px, .8vw, 12px); letter-spacing: .06em; margin: 0; opacity: .65; text-transform: uppercase; }
.t4tc__intro { -webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box; font-size: clamp(13px, .95vw, 15px); line-height: 1.5; margin: 2px 0 0; opacity: .85; overflow: hidden; }

.t4tc__facts { border-top: 1px solid var(--t4-hair); display: grid; gap: 4px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 0; padding-top: 12px; }
/* etichetta su una o due righe: il numero resta in basso, allineato a quello accanto */
.t4tc__facts > div { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.t4tc__facts dt { font-family: var(--t4-mono); font-size: clamp(10px, .72vw, 11px); font-weight: 400; letter-spacing: .06em; line-height: 1.3; opacity: .6; text-transform: uppercase; }
.t4tc__facts dd { font-family: var(--t4-head); font-size: clamp(20px, 1.6vw, 26px); font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 0; }

.t4tc__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.t4tc__btn {
  align-items: center; background: transparent; border: 1px solid rgba(14, 20, 48, .22); border-radius: 999px; color: var(--t4-navy); cursor: pointer;
  display: inline-flex; flex: 1 1 auto; font-family: var(--t4-mono); font-size: clamp(11px, .8vw, 12px); gap: 8px; justify-content: center;
  letter-spacing: .06em; min-height: 44px; padding: 0 16px; text-transform: uppercase;
  transition: background-color var(--t4-dur) var(--t4-ease), border-color var(--t4-dur) var(--t4-ease), color var(--t4-dur) var(--t4-ease);
}
.t4tc__btn:hover { border-color: var(--t4-blue); color: var(--t4-blue); }
.t4tc__btn--look { background: var(--t4-navy); border-color: var(--t4-navy); color: #fff; }
.t4tc__btn--look:hover { background: var(--t4-blue); border-color: var(--t4-blue); color: #fff; }
.t4tc__btn:focus-visible, .t4tc__cl:focus-visible { outline: 2px solid var(--t4-blue); outline-offset: 3px; }
.t4tc__chev { transition: transform var(--t4-dur) var(--t4-ease); }
.t4tc__btn[aria-expanded="true"] { border-color: var(--t4-blue); color: var(--t4-blue); }
.t4tc__btn[aria-expanded="true"] .t4tc__chev { transform: rotate(180deg); }

/* contatti: sul telefono si aprono sotto la card (righe 0fr -> 1fr, come le
   altre tendine); da 600px coprono la card dal basso, così le altre card della
   riga non si allungano */
.t4tc__contacts { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--t4-ease-out); }
.t4tc__card.is-open .t4tc__contacts { grid-template-rows: 1fr; }
.t4tc__cin { min-height: 0; overflow: hidden; transition: visibility 0s .45s; visibility: hidden; }
.t4tc__card.is-open .t4tc__cin { transition-delay: 0s; visibility: visible; }
.t4tc__cbody { display: flex; flex-direction: column; gap: 10px; padding: 0 clamp(16px, 1.4vw, 22px) clamp(16px, 1.4vw, 22px); }
.t4tc__cbody p { font-size: clamp(12px, .85vw, 14px); line-height: 1.5; margin: 0; opacity: .75; }
.t4tc__chead { align-items: center; display: none; font-family: var(--t4-mono); font-size: 11px; justify-content: space-between; letter-spacing: .1em; text-transform: uppercase; }
.t4tc__cx {
  align-items: center; background: transparent; border: 1px solid rgba(14, 20, 48, .2); border-radius: 50%; color: var(--t4-navy); cursor: pointer;
  display: grid; height: 40px; justify-items: center; padding: 0; transition: background-color var(--t4-dur) var(--t4-ease), color var(--t4-dur) var(--t4-ease); width: 40px;
}
.t4tc__cx:hover { background: var(--t4-navy); color: #fff; }
.t4tc__cx:focus-visible { outline: 2px solid var(--t4-blue); outline-offset: 2px; }
@media (min-width: 600px) {
  .t4tc__grid { align-items: stretch; }
  .t4tc__card { grid-template-rows: auto 1fr; height: 100%; }
  .t4tc__acts { margin-top: auto; padding-top: 8px; }
  .t4tc__contacts {
    background: #fff; bottom: 0; box-shadow: 0 -18px 40px rgba(14, 20, 48, .12); display: block; left: 0; max-height: 100%; overflow: auto;
    overscroll-behavior: contain; position: absolute; right: 0; transform: translateY(101%); visibility: hidden; z-index: 3;
    transition: transform .5s var(--t4-ease-out), visibility 0s .5s;
  }
  .t4tc__card.is-open .t4tc__contacts { transform: none; transition-delay: 0s; visibility: visible; }
  .t4tc__cin { overflow: visible; transition: none; visibility: inherit; }
  .t4tc__card.is-open .t4tc__cin { visibility: inherit; }
  .t4tc__cbody { gap: 12px; padding: 16px clamp(16px, 1.4vw, 22px) clamp(16px, 1.4vw, 22px); }
  .t4tc__chead { display: flex; }
}
.t4tc__clinks { display: flex; flex-direction: column; gap: 6px; }
.t4tc__cl {
  align-items: center; background: var(--t4-page); border-radius: 10px; color: var(--t4-navy); display: flex; font-size: clamp(12px, .85vw, 14px);
  gap: 8px; justify-content: space-between; line-height: 1.3; min-height: 44px; overflow-wrap: anywhere; padding: 8px 14px; text-decoration: none;
  transition: background-color var(--t4-dur) var(--t4-ease), color var(--t4-dur) var(--t4-ease);
}
.t4tc__cl:hover { background: #dfe3f3; color: var(--t4-ink); text-decoration: none; }
.t4tc__cl--main { background: var(--t4-blue); color: #fff; }
.t4tc__cl--main:hover { background: var(--t4-ink); color: #fff; }
.t4tc__cl svg { flex: 0 0 auto; }
/* 22/10: social (due per riga) e indirizzo della sede, solo con il consenso del team */
.t4tc__soc { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.t4tc__addr { font-size: clamp(12px, .85vw, 14px); line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.t4tc__addr span { display: block; font-family: var(--t4-mono); font-size: 11px; letter-spacing: .08em; opacity: .65; text-transform: uppercase; }
.t4tc__cbody p.t4tc__addr { opacity: 1; }

.t4tc-sr { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

/* ---------- telefono: card orizzontale ---------- */
@media (max-width: 599px) {
  .t4tc__card { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); }
  .t4tc__contacts { grid-column: 1 / -1; }
  .t4tc__card:not(.is-ph) .t4tc__body { padding-top: 14px; }
  .t4tc__body { gap: 6px; padding: 14px; }
  .t4tc__frame { height: 100%; min-height: 100%; }
  .t4tc__media { min-height: 0; }
  .t4tc__logo { --lg: 38px; border-width: 2px; bottom: 8px; left: 8px; }
  .t4tc__badge, .t4tc__vtag { font-size: 9px; padding: 4px 7px; top: 8px; }
  .t4tc__badge { left: 8px; }
  .t4tc__vtag { bottom: 8px; left: auto; right: 8px; top: auto; }
  .t4tc__ph-mark { font-size: 56px; }
  .t4tc__ph-label { bottom: 10px; font-size: 9px; padding: 4px 8px; }
  .t4tc__name { font-size: 17px; }
  /* frame senza 4:5: con l'altezza della riga il rapporto ne allargava la colonna */
  .t4tc__frame { aspect-ratio: auto; }
  .t4tc__facts { gap: 2px; grid-template-columns: minmax(0, 1fr); margin-top: 2px; padding-top: 8px; }
  .t4tc__facts > div { align-items: baseline; flex-direction: row; gap: 8px; }
  .t4tc__facts dd { font-size: 16px; margin: 0; }
  .t4tc__acts { flex-direction: column; margin-top: 4px; }
  .t4tc__btn { min-height: 40px; }
  /* 22/10: un po' d'aria tra il riquadro blu e la prima riga (ora "Servizi") */
  .t4tc__cbody { padding: 12px 14px 14px; }
}

/* ---------- pannello "Guarda" (t4fx.sheet) ---------- */
.t4tc-look__in { display: flex; flex-direction: column; gap: 16px; padding: clamp(20px, 2vw, 32px); padding-top: 24px; }
.t4tc-look__k { font-family: var(--t4-mono); font-size: 11px; letter-spacing: .1em; margin: 0; opacity: .65; text-transform: uppercase; }
.t4tc-look__t { font-family: var(--t4-head); font-size: clamp(28px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.025em; line-height: 1; margin: -6px 0 0; padding-right: 56px; text-transform: uppercase; }
.t4tc-look__vid { margin: 0; }
.t4tc-look__vid video { background: #000; border-radius: 12px; display: block; max-height: 64vh; max-height: 64dvh; object-fit: contain; width: 100%; }
.t4tc-look__vid figcaption { font-family: var(--t4-mono); font-size: 11px; letter-spacing: .04em; margin-top: 8px; opacity: .65; }
.t4tc-look__photos { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.t4tc-look__photos li { aspect-ratio: 4 / 5; background: var(--t4-navy); border-radius: 10px; margin: 0; overflow: hidden; }
.t4tc-look__photos li:first-child { aspect-ratio: 3 / 2; grid-column: 1 / -1; }
/* l'ultima foto rimasta da sola nella sua riga prende tutta la larghezza */
.t4tc-look__photos li:last-child:nth-child(even) { aspect-ratio: 3 / 2; grid-column: 1 / -1; }
.t4tc-look__photos.is-one li:first-child { aspect-ratio: auto; }
.t4tc-look__photos img { display: block; height: 100%; object-fit: cover; width: 100%; }
.t4tc-look__photos.is-one img { height: auto; }
.t4tc-look__intro { font-size: clamp(14px, 1vw, 16px); line-height: 1.55; margin: 0; }
/* 22/10: scheda senza foto (logo su bianco), titoletti, elenco dei risultati e servizi */
.t4tc-look__logo { align-items: center; background: #fff; border-radius: 12px; box-shadow: 0 1px 0 var(--t4-hair); display: flex; height: clamp(150px, 22vh, 210px); justify-content: center; padding: 20px; }
.t4tc-look__logo img { display: block; height: 100%; max-width: min(100%, 320px); object-fit: contain; width: 100%; }
.t4tc-look__h { font-family: var(--t4-mono); font-size: 11px; letter-spacing: .1em; margin: 0 0 -8px; opacity: .65; text-transform: uppercase; }
.t4tc-look__list { border-top: 1px solid var(--t4-hair); list-style: none; margin: 0; padding: 0; }
.t4tc-look__list li { border-bottom: 1px solid var(--t4-hair); display: flex; font-size: clamp(13px, .95vw, 15px); gap: 12px; line-height: 1.4; margin: 0; padding: 9px 0; }
.t4tc-look__y { flex: 0 0 auto; font-family: var(--t4-mono); font-size: 12px; letter-spacing: .04em; opacity: .6; padding-top: 2px; }
.t4tc-look__svc { display: flex; flex-direction: column; gap: 16px; }
.t4tc-look__svc ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.t4tc-look__svc li { background: #fff; border: 1px solid rgba(14, 20, 48, .14); border-radius: 999px; font-size: 13px; line-height: 1.3; margin: 0; padding: 7px 12px; }
.t4tc-look .t4tc__facts { margin: 0; }
.t4tc-look .t4tc__cl { background: #fff; }
.t4tc-look .t4tc__cl--main { background: var(--t4-blue); }

@media (prefers-reduced-motion: reduce) {
  .t4tc__card, .t4tc__frame > img, .t4tc__frame > video, .t4tc__contacts, .t4tc__cin, .t4tc__chev { transition: none; }
  .t4tc__card:hover { transform: none; }
}
/* "Scrivi al team" (30/10/2026): modulo nel pannello al posto del mailto */
button.t4tc__cl { border: 0; cursor: pointer; font: inherit; text-align: left; width: 100%; }
.t4tc-wf { display: flex; flex-direction: column; gap: 12px; }
.t4tc-wf__lead { font-size: clamp(13px, .95vw, 15px); line-height: 1.5; margin: 0; }
.t4tc-wf__f { display: flex; flex-direction: column; gap: 5px; }
.t4tc-wf__f span { color: var(--t4-navy); font-size: 13px; font-weight: 600; }
.t4tc-wf__f small { font-weight: 400; opacity: .7; }
.t4tc-wf__f input, .t4tc-wf__f textarea {
  background: #fff; border: 1px solid #c9cfe6; border-radius: 10px; color: var(--t4-ink); font: inherit; font-size: 16px;
  min-height: 46px; padding: 10px 12px; width: 100%;
}
.t4tc-wf__f textarea { min-height: 120px; resize: vertical; }
.t4tc-wf__f input:focus, .t4tc-wf__f textarea:focus { border-color: var(--t4-blue); outline: 2px solid var(--t4-blue); outline-offset: 0; }
.t4tc-wf__hp { height: 1px; left: -9999px; overflow: hidden; position: absolute; width: 1px; }
.t4tc-wf__ck { align-items: flex-start; display: flex; font-size: 13px; gap: 10px; line-height: 1.45; }
.t4tc-wf__ck input { flex: 0 0 auto; height: 20px; margin: 0; width: 20px; }
.t4tc-wf__ck a { color: var(--t4-blue); }
.t4tc-wf__msg { font-size: 14px; margin: 0; min-height: 1em; }
.t4tc-wf__msg:empty { display: none; }
.t4tc-wf__msg.is-bad { color: #b42318; font-weight: 600; }
.t4tc-wf__go { justify-content: center; }
.t4tc-wf__go:disabled { cursor: wait; opacity: .6; }
.t4tc-wf__done { background: #e8f5ec; border-radius: 10px; color: #14532d; font-size: 15px; line-height: 1.5; margin: 0; padding: 14px 16px; }
