/* pbt videography / v10 */
:root{
  --bg:#262626;--gold:#bf9f5b;--white:#fff;--muted:#c3c3c3;
  --subtle:#929292;--border:#464646;--panel:#303030;
  --radius:18px;--gutter:clamp(16px,2.7vw,50px);--stack-gap:clamp(9px,1.25vh,14px);
  --font:"pbt Inter",Inter,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --title-font:"pbt Argent CF", "Argent CF", "Bodoni 72", Georgia, serif;
}
/* Serve the approved title font to every device, including phones. */
@font-face{
  font-family:"pbt Inter";
  src:url("assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight:100 900;font-style:normal;font-display:swap;
}
@font-face{
  font-family:"pbt Argent CF";
  src:url("assets/fonts/ArgentCF-Regular.ttf") format("truetype");
  font-weight:400;font-style:normal;font-display:swap;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--white);font:400 14px/1.5 var(--font);-webkit-font-smoothing:antialiased}
body.modal-open,body.info-open{overflow:hidden}
button,a{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
::selection{background:var(--gold);color:var(--bg)}
.skip-link{position:absolute;top:-100px;left:15px;background:#fff;color:#222;padding:8px 12px;z-index:999}
.skip-link:focus{top:12px}
[hidden]{display:none!important}

/* Logo e navigazione, centrati */
.site-header{position:relative;z-index:4;width:100%;flex-shrink:0;padding:9px var(--gutter) 0;display:flex;flex-direction:column;align-items:center;gap:var(--stack-gap)}
.brand{display:inline-flex;justify-content:center;align-items:center}
.brand img{display:block;width:clamp(85px,7.6vw,111px);height:auto;aspect-ratio:794/505;object-fit:contain}
.main-nav{display:flex;justify-content:center;align-items:center;gap:clamp(13px,3.3vw,42px);flex-wrap:wrap}
.nav-link{color:#ededed;font-size:10px;font-weight:700;letter-spacing:.115em;text-transform:uppercase;line-height:1.5;white-space:nowrap;transition:color .18s}
.nav-link:hover,.nav-link.is-current{color:var(--gold)}
#main{min-height:0}
.site-footer{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px var(--gutter) 9px;color:#a1a1a1;letter-spacing:.045em;font-size:9px;border-top:1px solid #3b3b3b}

/* Homepage */
body.home-view{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.home-view #main{flex:1;min-height:0;display:flex}
.home{width:100%;min-height:0;display:flex;flex-direction:column;padding:0 var(--gutter)}
.toolbar{display:flex;justify-content:center;align-items:center;flex:0 0 auto;padding:var(--stack-gap) 0 13px}
.filters{display:flex;justify-content:center;align-items:center;gap:clamp(5px,1.2vw,16px);flex-wrap:wrap}
.filter{border:1px solid transparent;border-radius:var(--radius);background:transparent;color:#a6a6a6;font-size:10px;font-weight:650;letter-spacing:.10em;text-transform:uppercase;padding:5px 13px}
.filter.active{color:var(--gold);border-color:rgba(191,159,91,.56);background:rgba(191,159,91,.1)}
.filter:hover{color:var(--gold)}
.work-grid{display:grid;flex:1;min-height:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(10px,1.4vh,17px) clamp(12px,1.3vw,23px);padding-bottom:10px}
.work-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.work-card{display:flex;align-items:center;gap:clamp(9px,.9vw,17px);min-width:0;min-height:0;overflow:hidden}
.cover{position:relative;height:100%;width:auto;flex:0 0 auto;aspect-ratio:9/16;max-width:51%;max-height:100%;overflow:hidden;background:#353535;border-radius:var(--radius)}
.cover img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .45s cubic-bezier(.2,.8,.2,1),filter .3s;filter:saturate(.9)}
.work-card:hover .cover img,.work-card:focus-visible .cover img{transform:scale(1.05);filter:saturate(1.06)}
.work-meta{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;overflow:hidden}
.work-meta-main{min-width:0}
.work-category{display:block;color:var(--subtle);font-size:9px;letter-spacing:.075em;text-transform:uppercase;margin-bottom:7px}
.work-name{margin:0;color:var(--gold);font-family:var(--title-font);font-size:clamp(19px,1.5vw,27px);line-height:1.08;letter-spacing:-.022em;font-weight:400;text-transform:lowercase;overflow-wrap:anywhere}
.work-desc{color:#f5f5f5;font-size:clamp(10px,.85vw,12px);line-height:1.4;margin:8px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}

.work-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;margin:auto;max-width:460px;padding:30px}
.work-empty h1{font-family:var(--title-font);font-size:39px;font-weight:400;color:var(--gold);margin:0;text-transform:lowercase}
.work-empty p{font-size:13px;line-height:1.65;margin:0;color:var(--muted)}

/* Scheda progetto: tre colonne che occupano una sola viewport desktop */
body.project-view{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.project-view #main{flex:1;min-height:0;display:flex}
.detail-page{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;padding:4px var(--gutter) 12px}
.detail-topline{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:2px 0 10px}
.back-link{background:transparent;border:0;color:var(--white);font-size:10px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;padding:5px 0}
.back-link:hover{color:var(--gold)}
.back-arrow{font-size:17px;margin-right:7px;vertical-align:-1px}

.detail-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(175px,.77fr) minmax(220px,.84fr) minmax(0,1.65fr);gap:clamp(14px,1.65vw,32px);align-items:stretch}
.detail-cover{min-width:0;min-height:0;margin:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.detail-cover img{width:min(100%, calc((100dvh - 175px) * 9 / 16));height:auto;max-height:100%;aspect-ratio:9/16;object-fit:cover;display:block;border-radius:var(--radius)}
.detail-info{display:flex;min-height:0;min-width:0;flex-direction:column;justify-content:center;padding:10px 0;overflow:auto;scrollbar-width:thin;scrollbar-color:#5e5e5e transparent}
.eyebrow{color:var(--gold);font-size:10px;font-weight:700;letter-spacing:.13em;text-transform:uppercase}
.detail-info h1{font-family:var(--title-font);font-size:clamp(38px,3.5vw,62px);line-height:1.02;letter-spacing:-.035em;font-weight:400;text-transform:lowercase;color:var(--gold);margin:12px 0 12px;overflow-wrap:anywhere}
.detail-summary{font-size:clamp(12px,1vw,15px);line-height:1.6;color:#fff;margin:0 0 16px}
.detail-facts{display:grid;gap:10px;border-top:1px solid var(--border);padding-top:14px;margin:0}
.detail-facts div{min-width:0}
.detail-facts dt{color:var(--gold);font-size:9px;font-weight:700;letter-spacing:.11em;text-transform:uppercase;margin-bottom:3px}
.detail-facts dd{margin:0;color:#f2f2f2;font-size:11px;line-height:1.5}
.detail-notes{font-size:11px;line-height:1.65;color:#c9c9c9;margin:16px 0 0}
.detail-archive{min-height:0;min-width:0;display:flex;flex-direction:column;border-left:1px solid var(--border);padding-left:clamp(13px,1.4vw,26px)}
.archive-heading{display:flex;flex-shrink:0;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:12px}
.archive-heading h2{font-family:var(--title-font);font-size:clamp(22px,2vw,30px);line-height:1.1;font-weight:400;text-transform:lowercase;margin:0;color:var(--gold)}
.archive-heading p{font-size:10px;color:#aaa;margin:0;white-space:nowrap}
.detail-video-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;gap:7px;padding:1px 5px 4px 0;scrollbar-color:#656565 #292929;scrollbar-width:thin}
.video-tile{position:relative;display:flex;align-items:center;text-align:left;gap:8px;width:100%;min-width:0;min-height:0;padding:5px;background:#303030;border:1px solid #3e3e3e;border-radius:var(--radius);color:inherit}
button.video-tile:hover{background:#3b352a;border-color:var(--gold)}
button.video-tile:active{transform:scale(.985)}
.video-tile.is-placeholder{opacity:.87}
.video-poster{position:relative;flex:0 0 auto;height:clamp(56px,8.2dvh,78px);aspect-ratio:9/16;background:linear-gradient(160deg,#4b473e,#282826);border:1px solid #504a3f;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:0} /* i video restano squadrati */
.video-index{color:var(--gold);font-size:15px;font-weight:400}
.video-play{position:absolute;right:3px;bottom:3px;color:#262626;background:var(--gold);font-size:9px;padding:2px 4px;line-height:1}
.video-tile-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
.video-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;font-family:var(--title-font);font-size:clamp(13px,1.06vw,16px);color:var(--gold);text-transform:lowercase;line-height:1.12;font-weight:400;overflow-wrap:anywhere}
.video-duration{font-size:9px;color:#a4a4a4;line-height:1.2}
.video-link-note{color:var(--gold);font-size:8px;letter-spacing:.035em}

/* Pannelli informativi sopra la pagina senza allungarla */
.info-panel{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:22px}
.info-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(6px)}
.info-card{position:relative;z-index:1;background:var(--panel);border:1px solid rgba(191,159,91,.48);border-radius:var(--radius);padding:clamp(23px,4vw,48px);width:min(650px,100%);max-height:86dvh;overflow-y:auto}
.info-card.tools-card{width:min(760px,100%)}
.info-close{position:absolute;right:12px;top:10px;background:transparent;border:0;color:var(--gold);padding:8px 12px;font-size:17px}
.lower-heading{margin:10px 0 13px;color:var(--gold);font-family:var(--title-font);font-size:clamp(32px,3.6vw,49px);font-weight:400;letter-spacing:-.035em;text-transform:lowercase;line-height:1.06}
.lower-copy{margin:0;max-width:650px;color:#eee;line-height:1.7;font-size:13px}
.contact-link{color:#fff;display:inline-block;margin-top:14px;border-bottom:1px solid var(--gold);padding-bottom:4px;overflow-wrap:anywhere}
.coming-soon{color:#b7b7b7;font-size:12px}
.socials{display:flex;gap:18px;margin-top:14px;color:var(--gold);font-size:12px}
.tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px}
.tool-group{padding:17px;background:#373737;border:1px solid #494949;border-radius:var(--radius);min-height:108px}
.tool-group h3{font-family:var(--title-font);font-weight:400;font-size:21px;text-transform:lowercase;letter-spacing:-.01em;color:var(--gold);margin:0 0 10px;line-height:1.08}
.tool-group p{margin:0;color:#b0b0b0;font-size:11px}
.tool-items{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.tool-items li{font-size:11px;padding:4px 9px;background:#434343;border-radius:var(--radius);color:#fff}

/* Player YouTube: bordi rettangolari, niente radius */
.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.9)}
.modal-dialog{position:relative;z-index:1;width:min(430px,86vw)}
.modal-close{position:absolute;top:-43px;right:0;color:#fff;background:transparent;border:0;font-size:24px;padding:6px}
.player-shell{width:100%;max-height:calc(100dvh - 95px);aspect-ratio:9/16;background:#111;overflow:hidden;border-radius:0}
.player-shell iframe{display:block;width:100%;height:100%;border:0;border-radius:0}
@media(min-width:1350px){.work-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:850px) and (max-width:1349px){
  .work-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
  .work-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .work-category{margin-bottom:4px}.work-meta{gap:5px}.work-desc{margin-top:5px;-webkit-line-clamp:3;line-clamp:3}
  .detail-layout{grid-template-columns:minmax(135px,.66fr) minmax(170px,.8fr) minmax(0,1.7fr);gap:14px}
  .detail-video-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:850px) and (max-height:700px){
  .site-header{padding-top:4px;padding-bottom:0;gap:7px}
  .brand img{width:78px}.toolbar{padding:7px 0 8px}
  .site-footer{padding-top:4px;padding-bottom:4px}
  .work-meta{gap:4px}.work-desc{margin-top:3px;-webkit-line-clamp:3;line-clamp:3}
  .detail-topline{padding-bottom:5px}.detail-summary{margin-bottom:10px}
  .detail-facts{gap:6px;padding-top:8px}.detail-notes{margin-top:9px}
}
@media(max-width:849px){
  body.home-view,body.project-view{display:block;height:auto;min-height:100dvh;overflow:auto}
  .home-view #main,.project-view #main{display:block;min-height:auto}
  .home,.detail-page{display:block;height:auto;padding-left:var(--gutter);padding-right:var(--gutter)}
  .work-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:17px 13px;padding-bottom:28px}
  .work-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
  .work-card{min-height:185px;gap:10px}
  .cover{height:auto;width:36%;max-width:none;align-self:center}
  .work-meta{gap:7px}.work-name{font-size:13px}.work-desc{font-size:11px}
  .detail-page{padding-bottom:30px}.detail-topline{padding-bottom:16px}
  .detail-layout{display:grid;grid-template-columns:minmax(120px,.6fr) minmax(0,1fr);gap:17px;min-height:auto}
  .detail-cover{max-height:440px}.detail-cover img{max-height:440px;width:100%}
  .detail-archive{grid-column:1/-1;border-left:0;border-top:1px solid var(--border);padding:17px 0 0}
  .detail-video-list{overflow:visible;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .video-poster{height:75px}.detail-info{overflow:visible}
}
@media(max-width:600px){
  .site-header{padding:12px var(--gutter) 0;gap:10px}
  .main-nav{gap:clamp(10px,3vw,20px)}.nav-link{font-size:9px;letter-spacing:.045em}
  .brand img{width:97px}.toolbar{padding:10px 0 15px}
  .filters{gap:4px}.filter{font-size:9px;padding:5px 10px}
  .work-grid,.work-grid[data-count="4"]{grid-template-columns:1fr;gap:15px}
  .work-card{min-height:0;gap:16px}.cover{width:30%;max-width:140px}
  .work-category{font-size:9px}.work-name{font-size:22px}.work-desc{font-size:11px}
  .detail-layout{grid-template-columns:minmax(100px,.6fr) minmax(0,1fr);gap:12px}
  .detail-cover,.detail-cover img{max-height:290px}
  .detail-info h1{font-size:clamp(30px,7vw,40px);margin:7px 0}
  .detail-summary{font-size:11px;margin-bottom:10px}
  .detail-notes{font-size:10px;line-height:1.5;margin-top:10px}
  .detail-facts{gap:7px;padding-top:10px}.detail-facts dd{font-size:10px}
  .detail-video-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tools-grid{grid-template-columns:1fr}.info-card{padding:26px 19px}
  .site-footer{flex-wrap:wrap;font-size:8px}
}
@media(max-width:360px){.nav-link{font-size:8px}.main-nav{gap:9px}.filter{padding:5px 7px}.detail-video-list{grid-template-columns:1fr}}
@media(min-width:850px) and (max-height:500px){body.home-view,body.project-view{overflow:auto;height:auto;min-height:100dvh}.home-view #main,.project-view #main{min-height:500px}.detail-page{min-height:490px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
::view-transition-old(pbt-cover),::view-transition-new(pbt-cover){animation-duration:.42s;animation-timing-function:cubic-bezier(.22,1,.36,1)}

/* Macroaree sempre in maiuscolo, indipendentemente dai titoli */
.work-category,.eyebrow{text-transform:uppercase;font-family:var(--font)}


/* v6 — language switch and Instagram social link */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.language-control{display:inline-flex;align-items:center;justify-content:center;position:relative}
.language-control select{color:var(--gold);border:1px solid #605641;border-radius:7px;background:#292929;padding:4px 20px 4px 8px;font:700 10px/1.2 var(--font);letter-spacing:.06em;cursor:pointer;appearance:none;-webkit-appearance:none}
.language-control::after{content:'⌄';position:absolute;right:7px;top:calc(50% - 8px);font-size:13px;color:var(--gold);pointer-events:none}
.language-control select:hover{background:#353029;border-color:var(--gold)}
.language-control select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.site-footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.footer-copyright{justify-self:start;grid-column:1;grid-row:1}
.footer-instagram{justify-self:center;grid-column:2;grid-row:1;display:inline-flex;align-items:center;justify-content:center;color:var(--gold);padding:1px;line-height:1}
.instagram-icon:hover,.contact-instagram:hover{color:#efd18e}
.contact-instagram{display:inline-flex;align-items:center;gap:10px;color:var(--gold);font-size:13px;line-height:1.1}
.contact-instagram svg{flex:none}
@media(max-width:600px){
 .site-footer{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px}
 .language-control select{font-size:9px;padding:3px 18px 3px 7px}
 .main-nav{column-gap:clamp(7px,2.3vw,15px);row-gap:9px}
 .footer-instagram svg{width:17px;height:17px}
}

/* v7 — Copertina alternativa: seconda immagine scaricata solo al primo hover/focus */
.cover .cover-primary{position:relative;z-index:1}
.cover .cover-secondary{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:cover;opacity:0;pointer-events:none;transition:opacity .32s ease,transform .45s cubic-bezier(.2,.8,.2,1)}
.work-card.has-hover-ready:is(:hover,:focus-visible) .cover-secondary{opacity:1}
.work-card:is(:hover,:focus-visible) .cover-primary{transform:scale(1.04)}
.work-card.has-hover-ready:is(:hover,:focus-visible) .cover-secondary{transform:scale(1.04)}
@media(hover:none){.work-card .cover-secondary{display:none}}
/* Vero centraggio verticale dell'icona rispetto a EN e IT */
.language-control{display:inline-flex;align-items:center;justify-content:center}
.language-control select{height:27px;line-height:1;min-width:56px;padding:0 24px 0 11px;display:block}
.language-control::after{content:none}
.language-chevron{position:absolute;right:7px;top:50%;transform:translateY(-50%);display:block;pointer-events:none;color:var(--gold)}
/* Collaborazioni in About: sezioni separate, senza occupare la homepage */
.info-card.about-card{width:min(850px,100%)}
.collaborations{margin-top:24px;padding-top:18px;border-top:1px solid var(--border)}
.collaborations-heading{margin:0 0 14px;color:var(--gold);font:400 clamp(24px,3vw,34px)/1.12 var(--title-font);text-transform:lowercase}
.collab-groups{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.collab-group h3{color:var(--white);font:700 10px/1.3 var(--font);letter-spacing:.13em;text-transform:uppercase;margin:0 0 11px}
.logo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.logo-cell{min-width:0;min-height:62px;background:#383838;border:1px solid #505050;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;padding:12px;text-align:center}
.logo-cell img{max-width:100%;max-height:50px;width:auto;height:auto;object-fit:contain}
.logo-placeholder{color:#dfdfdf;font:500 11px/1.35 var(--font);letter-spacing:.025em}
.collab-empty{display:flex;align-items:center;justify-content:center;border:1px dashed #535353;border-radius:var(--radius);color:#bcbcbc;font-size:11px;min-height:62px;padding:12px;text-align:center}
.collab-note{color:#a9a9a9;font-size:10px;margin:12px 0 0;line-height:1.5}
@media(max-width:600px){
 .language-control select{height:24px;min-width:54px;padding:0 21px 0 10px}
 .language-chevron{width:11px;height:11px;right:7px}
 .collab-groups{grid-template-columns:1fr;gap:20px}
 .info-card.about-card{width:min(850px,100%)}
 .logo-cell{min-height:58px}
}

/* v8 — Due nuovi progetti e griglia densa, sempre con copertine realmente 9:16 */
@media(min-width:1300px){
  .work-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));column-gap:clamp(9px,.85vw,17px)}
  .work-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .work-grid[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .work-card{gap:clamp(8px,.7vw,13px)}
  .work-card .cover{height:auto;width:clamp(70px,40%,175px);max-width:44%;aspect-ratio:9/16;align-self:center}
  .work-name{font-size:clamp(17px,1.25vw,25px);line-height:1.05}
  .work-desc{font-size:clamp(10px,.75vw,11px);line-height:1.34;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3}
  .work-category{font-size:8px;letter-spacing:.04em;margin-bottom:5px}
}
@media(min-width:850px) and (max-width:1299px){
  .work-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));column-gap:10px;row-gap:8px}
  .work-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .work-grid[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .work-card{gap:8px}
  .work-card .cover{height:auto;width:clamp(64px,38%,115px);max-width:43%;aspect-ratio:9/16;align-self:center}
  .work-name{font-size:clamp(17px,1.6vw,21px)}
  .work-desc{font-size:10px;-webkit-line-clamp:2;line-clamp:2}
  .work-category{font-size:8px;margin-bottom:3px}
}
.archive-channel-link{display:inline-flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--gold);border-radius:var(--radius);padding:12px 15px;color:var(--gold);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;transition:background .18s,color .18s;max-width:100%;margin-bottom:15px}
.archive-channel-link:hover{background:var(--gold);color:var(--bg)}
.archive-channel-link span{font-size:16px;line-height:1}
.archive-pending{font-size:12px;color:#c5c5c5;line-height:1.65;padding:8px 1px;max-width:380px}
@media(max-width:600px){.archive-channel-link{padding:10px 12px}}


/* v10 — riflesso AI continuo a due strisce, senza stellina. Le due strisce
   oltrepassano per intero la chip prima che la sequenza ricominci fuori vista. */
.filter[data-filter="ai"]{
  position:relative;isolation:isolate;overflow:hidden;
  transition:color .2s, background .24s, box-shadow .24s, border-color .24s;
}
.filter[data-filter="ai"] .ai-label{position:relative;z-index:1}
.filter[data-filter="ai"].active{
  color:#ffe4a4;
  border:1px solid transparent;
  background:linear-gradient(#332d20,#332d20) padding-box,
             linear-gradient(110deg,#806334 10%,#e9c979 46%,#fff0ba 57%,#b38a46 88%) border-box;
  box-shadow:0 0 13px rgba(191,159,91,.26),inset 0 0 11px rgba(191,159,91,.14);
}
.filter[data-filter="ai"].active::before{
  content:"";position:absolute;z-index:2;pointer-events:none;
  top:-5px;bottom:-5px;width:175%;left:-205%;border-radius:0;
  background:linear-gradient(104deg,
    transparent 0%,transparent 24%,
    rgba(255,240,184,.10) 32%,rgba(255,248,222,.86) 36%,rgba(255,239,183,.16) 40%,
    transparent 45%,transparent 58%,
    rgba(255,236,164,.14) 65%,rgba(255,251,229,.96) 70%,rgba(255,242,192,.22) 75%,
    transparent 82%,transparent 100%);
  /* Si anima l'intera striscia, non background-position: niente salti dei riflessi. */
  animation:pbt-ai-sheen 7.2s linear infinite;
  mix-blend-mode:screen;
}
.filter[data-filter="ai"].active::after{content:none}
@keyframes pbt-ai-sheen{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(235%,0,0)}
}
.video-link-pending{font-size:9px;color:#a8a8a8;line-height:1.2;letter-spacing:0}
@media(prefers-reduced-motion:reduce){
  .filter[data-filter="ai"].active::before{animation:none!important;opacity:0}
}

/* v10 — header persistente su tablet e telefoni; più compatto dopo lo scroll. */
@media(max-width:849px){
  .site-header{
    position:sticky;top:0;z-index:45;
    background:rgba(38,38,38,.98);
    padding-bottom:10px;
    border-bottom:1px solid rgba(191,159,91,.13);
    transition:padding .22s ease,gap .22s ease,background-color .22s ease;
  }
  .site-header .brand img{transition:width .22s ease}
  .site-header.is-compact{padding-top:5px;padding-bottom:6px;gap:5px}
  .site-header.is-compact .brand img{width:65px}
  .site-header.is-compact .main-nav{row-gap:4px}
  .site-header.is-compact .language-control select{height:23px}
  .toolbar{scroll-margin-top:130px}
}
@media(max-width:600px){
  .site-header{padding-top:9px}
  .site-header.is-compact{padding-top:4px;padding-bottom:5px;gap:4px}
  .site-header.is-compact .brand img{width:61px}
  .site-header .main-nav{column-gap:clamp(6px,2vw,12px);row-gap:6px}
  .site-header .nav-link{font-size:clamp(8px,2.25vw,9px);letter-spacing:0}
  .site-header.is-compact .main-nav{column-gap:clamp(5px,1.8vw,10px);row-gap:4px}
  .site-header.is-compact .nav-link{font-size:clamp(8px,2.15vw,9px)}
  .site-header.is-compact .language-control select{font-size:9px;height:22px}
}
@media(prefers-reduced-motion:reduce){
  .site-header,.site-header .brand img{transition:none!important}
}


/* v12 — dissolvenza leggera tra sezioni e filtri, senza toccare il logo fisso. */
#main{view-transition-name:pbt-main}
@keyframes pbt-main-fade-out{from{opacity:1}to{opacity:0}}
@keyframes pbt-main-fade-in{from{opacity:0}to{opacity:1}}
@keyframes pbt-main-fallback{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
::view-transition-old(root),::view-transition-new(root){animation:none}
::view-transition-old(pbt-main){animation:pbt-main-fade-out .17s ease-in both}
::view-transition-new(pbt-main){animation:pbt-main-fade-in .32s ease-out both}
#main.pbt-fade-enter{animation:pbt-main-fallback .32s ease-out both}
/* Il passaggio fra la copertina del progetto conserva l'animazione originale. */
::view-transition-old(pbt-cover),::view-transition-new(pbt-cover){animation-duration:.46s;animation-timing-function:cubic-bezier(.22,1,.36,1)}

/* Apertura/chiusura video in fade: player rettangolare come richiesto. */
.modal{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .28s ease,visibility .28s}
.modal.is-visible{opacity:1;visibility:visible;pointer-events:auto}
.modal-dialog{transform:translateY(10px) scale(.987);opacity:0;transition:transform .33s cubic-bezier(.22,1,.36,1),opacity .26s ease}
.modal.is-visible .modal-dialog{transform:translateY(0) scale(1);opacity:1}
.modal-youtube-link{display:block;max-width:100%;padding:10px;text-align:center;color:var(--gold);font-size:11px;text-decoration:underline;text-underline-offset:4px;line-height:1.2}
.modal-youtube-link:hover{color:#f1d79c}
.player-shell.is-local-preview{aspect-ratio:auto;min-height:285px;max-height:min(62dvh,460px);display:flex;align-items:center;justify-content:center;padding:25px;background:#1c1c1c;border:1px solid #494139}
.local-preview-message{text-align:center;max-width:325px}
.local-preview-message h2{font:400 29px/1.1 var(--title-font);color:var(--gold);margin:0 0 17px}
.local-preview-message p{font-size:13px;line-height:1.55;color:#f1f1f1;margin:0 0 13px}
.local-preview-message small{font-size:11px;color:#bbb}
@media(prefers-reduced-motion:reduce){
  #main.pbt-fade-enter{animation:none!important}
  ::view-transition-old(root),::view-transition-new(root),
  ::view-transition-old(pbt-main),::view-transition-new(pbt-main),
  ::view-transition-old(pbt-cover),::view-transition-new(pbt-cover){animation-duration:.01ms!important}
  .modal,.modal-dialog{transition:none!important;transform:none!important}
}

/* v13 — Anteprime vere nell'archivio, YouTube viene caricato solo al click.
   Copertine verticali senza bordi arrotondati per coerenza col player. */
.video-poster{isolation:isolate;background:#292929;border:1px solid #504a3f}
.video-poster-image{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover;object-position:center;display:block;transition:transform .28s cubic-bezier(.2,.8,.2,1);background:#292929}
.video-poster .video-index{z-index:0}
.video-poster .video-play{z-index:2;background:rgba(191,159,91,.94);box-shadow:0 1px 7px rgba(0,0,0,.4);right:3px;bottom:3px}
button.video-tile:is(:hover,:focus-visible) .video-poster-image{transform:scale(1.085)}
@media (prefers-reduced-motion:reduce){.video-poster-image{transition:none!important}}
/* Visibilità del fallback per video con limitazioni di riproduzione esterna. */
.modal-youtube-link{border:1px solid rgba(191,159,91,.55);border-radius:8px;background:#292620;font-weight:700;text-decoration:none;margin-top:9px;padding:12px 10px;transition:background .2s,border-color .2s}
.modal-youtube-link:hover{background:#413525;border-color:var(--gold)}
/* v13 — miniature più leggibili, mantenendo lo scroll interno dell'archivio. */
@media (min-width: 850px) { .video-poster { height: clamp(70px, 9.8dvh, 96px); } }
@media (max-width: 849px) { .video-poster { height: 88px; } }

/* v14 — Logo, menu e filtri non partecipano alle dissolvenze di pagina. */
.site-header{view-transition-name:pbt-header}
.site-footer{view-transition-name:pbt-footer}
::view-transition-old(pbt-header),::view-transition-new(pbt-header),
::view-transition-old(pbt-footer),::view-transition-new(pbt-footer){animation:none!important}
@keyframes pbt-grid-in{from{opacity:.65;transform:translateY(4px)}to{opacity:1;transform:none}}
.pbt-grid-enter{animation:pbt-grid-in .24s ease-out both}
.about-email{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 13px;font-size:12px;margin:12px 0 16px;color:#bcbcbc}
.about-email a{color:var(--gold);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.video-tile.is-external{cursor:pointer}
.video-tile.is-external:hover,.video-tile.is-external:focus-visible{background:#3b352a;border-color:var(--gold)}
.video-tile.is-external .video-link-note{font-size:8px;line-height:1.2}
@media(prefers-reduced-motion:reduce){.pbt-grid-enter{animation:none!important}}

/* v15 — Fade limitato ai contenuti, mai al brand e alla navigazione. */
.site-header { z-index:75; }
.pbt-info-in{animation:pbt-panel-fade-in .28s ease-out both;}
.pbt-info-out{animation:pbt-panel-fade-out .17s ease-in both;pointer-events:none;}
@keyframes pbt-panel-fade-in{from{opacity:0}to{opacity:1}}
@keyframes pbt-panel-fade-out{from{opacity:1}to{opacity:0}}
/* La shell della pagina usa pbt-main, il logo usa pbt-header (non animato). */
::view-transition-old(pbt-header),::view-transition-new(pbt-header),
::view-transition-old(pbt-footer),::view-transition-new(pbt-footer){animation:none!important;}

/* Divisore esattamente a metà della griglia contenuti su desktop. */
@media(min-width:850px){
  .detail-layout{
    position:relative;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,2fr);
  }
  .detail-layout::after{
    content:"";position:absolute;top:0;bottom:0;left:50%;width:1px;
    background:var(--border);pointer-events:none;
  }
  .detail-archive{border-left:0;}
}

/* SAME / EXHB: tutti i teaser dell'archivio e il player sono 16:9. */
.detail-page[data-video-orientation="landscape"] .detail-video-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.detail-page[data-video-orientation="landscape"] .video-poster{
  aspect-ratio:16/9;height:clamp(65px,7.5vw,96px);
}
.modal.is-landscape .modal-dialog{
  width:min(980px,94vw,calc((100dvh - 132px)*1.77778));
}
.modal.is-landscape .player-shell{
  aspect-ratio:16/9;max-height:calc(100dvh - 132px);
}
@media(max-width:600px){
  .detail-page[data-video-orientation="landscape"] .detail-video-list{
    grid-template-columns:1fr;
  }
  .detail-page[data-video-orientation="landscape"] .video-poster{
    aspect-ratio:16/9;height:90px;
  }
}
@media(prefers-reduced-motion:reduce){
  .pbt-info-in,.pbt-info-out{animation:none!important;}
}
/* Correzione ridimensionamento: un video verticale mantiene sempre 9:16
   anche sui laptop con viewport più bassa. */
.modal:not(.is-landscape) .modal-dialog{
  width:min(430px,86vw,calc((100dvh - 146px)*.5625));
}

/* v16 — popover lingua laterale (non menu nativo sopra la selezione). */
.language-control{position:relative;z-index:90}
.language-trigger{
  color:var(--gold);border:1px solid #605641;border-radius:7px;background:#292929;
  height:27px;min-width:56px;padding:0 8px 0 11px;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font:700 10px/1.2 var(--font);letter-spacing:.06em;cursor:pointer;
}
.language-trigger:hover,.language-trigger[aria-expanded="true"]{background:#353029;border-color:var(--gold)}
.language-trigger:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.language-control .language-chevron{position:static;transform:none;flex-shrink:0}
.language-options{
  position:absolute;right:calc(100% + 8px);top:50%;transform:translateY(-50%);
  display:flex;align-items:center;gap:4px;padding:5px;
  border-radius:8px;border:1px solid #605641;background:#303030;
  box-shadow:0 7px 25px rgba(0,0,0,.35);white-space:nowrap;
}
.language-options button{background:transparent;border:0;border-radius:5px;color:#eee;padding:6px 9px;font:700 10px/1 var(--font);cursor:pointer}
.language-options button[aria-checked="true"],.language-options button:hover{color:var(--gold);background:#454034}
@media(max-width:600px){.language-trigger{height:24px;min-width:54px;font-size:9px}.language-options{right:calc(100% + 5px);padding:4px;gap:2px}.language-options button{font-size:9px;padding:5px 7px}}
@media(max-width:849px){.site-header.is-compact .language-trigger{height:23px}}

/* v16 — pannelli indipendenti dal main: lo sfondo resta la pagina corrente. */
#info-panels{position:fixed;inset:0;z-index:60;pointer-events:none}
#info-panels .info-panel{pointer-events:auto}
.contact-methods{display:flex;flex-direction:column;align-items:flex-start;gap:17px;margin-top:19px}
.contact-methods .contact-link,.contact-methods .contact-instagram{
 display:inline-flex;align-items:center;gap:11px;color:var(--gold);font-size:13px;
 margin:0;padding:0;border:0;line-height:1.3;min-width:0;
}
.contact-methods svg{flex:none;width:19px;height:19px}
.contact-methods a span{color:#fff;overflow-wrap:anywhere}
.contact-methods a:hover span{color:#f1d79c}

/* v16 — riflesso singolo e più largo, con uscita completa prima del loop. */
.filter[data-filter="ai"].active::before{
  top:-10px;bottom:-10px;left:-82%;width:68%;
  background:linear-gradient(105deg,transparent 0%,rgba(255,240,184,.04) 13%,rgba(255,241,190,.23) 28%,rgba(255,248,219,.82) 49%,rgba(255,237,171,.27) 72%,rgba(255,236,184,.04) 88%,transparent 100%);
  animation:pbt-ai-single-sheen 8.6s linear infinite;
}
@keyframes pbt-ai-single-sheen{from{transform:translate3d(0,0,0)}to{transform:translate3d(290%,0,0)}}
@media(prefers-reduced-motion:reduce){.filter[data-filter="ai"].active::before{animation:none;opacity:0}}


/* v17 — Dimmer persistente: lo sfondo rimane scuro durante il cambio
   Tools & Skills / About / Contact. Viene animata soltanto la scheda. */
#info-panels::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
}
body.info-open #info-panels::before { opacity: 1; visibility: visible; }
#info-panels .info-panel { z-index: 1; }
#info-panels .info-backdrop { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* v17 — Menu lingua sempre a destra del pulsante EN/IT. */
.language-options { left: calc(100% + 8px); right: auto; }
@media (max-width: 600px) {
  .language-options { left: calc(100% + 5px); right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #info-panels::before { transition: none; }
}

/* Piccoli schermi: si riserva spazio a destra per EN/IT senza coprire Contact. */
@media (min-width:361px) and (max-width:430px) {
  .main-nav .language-control { margin-right:25px; }
}
@media (max-width:360px) {
  .main-nav { display:grid;grid-template-columns:repeat(4,max-content);justify-content:center;column-gap:9px;row-gap:3px; }
  .main-nav .language-control { grid-column:1 / -1;justify-self:center;flex:none;width:max-content;margin-top:1px; }
}


/* v19 — Il file caricato come GIF contiene in realtà un singolo PNG statico.
   Manteniamo il marchio originale, con luce animata via CSS e nessun JS aggiuntivo. */
.brand{position:relative;isolation:isolate}
.brand img{aspect-ratio:auto}
.brand::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(108deg,transparent 37%,rgba(255,231,161,0) 44%,rgba(255,238,186,.88) 50%,rgba(255,248,213,.27) 55%,transparent 64%);
  background-size:300% 100%;background-position:115% 50%;
  -webkit-mask:url('assets/pbt-logo-shimmer.webp') center/100% 100% no-repeat;
  mask:url('assets/pbt-logo-shimmer.webp') center/100% 100% no-repeat;
  animation:pbt-brand-shimmer 7s linear infinite;
}
@keyframes pbt-brand-shimmer{
  0%,15%{background-position:115% 50%}
  53%,100%{background-position:-115% 50%}
}
@media(prefers-reduced-motion:reduce){.brand::after{animation:none;opacity:0}}

/* Keep the SAME corner radius throughout shared cover transitions. The
   source card already clips its image, but browser-generated snapshots do not
   always inherit that parent clipping, producing a temporary square edge. */
.cover .cover-primary{border-radius:var(--radius)}
::view-transition-group(pbt-cover),
::view-transition-image-pair(pbt-cover),
::view-transition-old(pbt-cover),
::view-transition-new(pbt-cover){border-radius:var(--radius);overflow:hidden}
::view-transition-image-pair(pbt-cover),
::view-transition-old(pbt-cover),
::view-transition-new(pbt-cover){clip-path:inset(0 round var(--radius))}


/* v20 — Copertine + testo restano affiancati, ma i filtri con meno schede
   non occupano tutta la larghezza desktop: insieme rimangono centrati. */
@media (min-width:850px) {
  .work-grid[data-count="4"], .work-grid[data-count="6"] {
    align-self:center;
    margin-inline:auto;
    margin-block:auto;
    max-height:620px;
    align-content:center;
  }
  .work-grid[data-count="4"] { width:min(100%, 980px); }
  .work-grid[data-count="6"] { width:min(100%, 1140px); }
  .work-grid[data-count="4"] .work-card .cover,
  .work-grid[data-count="6"] .work-card .cover {
    width:clamp(70px,36%,155px);
  }
}

/* v20 — Logo: due passaggi lenti e completi, meno frequenti.
   Ogni passaggio arriva oltre il bordo opposto prima di scomparire;
   la posizione torna all'inizio soltanto a riflesso invisibile. */
.brand::after {
  background:linear-gradient(108deg,
    transparent 0%, transparent 39%,
    rgba(255,231,161,0) 44%,
    rgba(255,238,186,.82) 50%,
    rgba(255,248,213,.23) 55%,
    transparent 63%,transparent 100%);
  background-size:300% 100%;
  background-position:-35% 50%;
  animation:pbt-brand-shimmer-v20 16s linear infinite;
}
@keyframes pbt-brand-shimmer-v20 {
  0%, 7%   { background-position:-35% 50%; opacity:0; }
  11%      { opacity:.85; }
  35%      { background-position:135% 50%; opacity:.85; }
  41%, 52% { background-position:135% 50%; opacity:0; }
  52.01%   { background-position:-35% 50%; opacity:0; }
  57%      { opacity:.85; }
  82%      { background-position:135% 50%; opacity:.85; }
  89%,100% { background-position:135% 50%; opacity:0; }
}

/* v20 — Il riflesso AI percorre la chip più velocemente, ma riparte
   esattamente ogni 8.6 secondi, come nella versione precedente. */
.filter[data-filter="ai"].active::before {
  animation:pbt-ai-single-sheen-v20 8.6s linear infinite;
}
@keyframes pbt-ai-single-sheen-v20 {
  0%,3% { transform:translate3d(0,0,0); }
  85%,100% { transform:translate3d(290%,0,0); }
}
@media (prefers-reduced-motion:reduce) {
  .brand::after,
  .filter[data-filter="ai"].active::before {animation:none!important;opacity:0!important}
}


/* v21 — Allineamento: la copertina parte dalla stessa coordinata orizzontale
   del pulsante ALL e del copyright nel footer. I player restano invariati. */
@media (min-width:850px) {
  .detail-cover { justify-content:flex-start; }
  .detail-cover img { margin-inline:0 auto; }
}

/* v21 — Luccichio logo e AI sincronizzati: due passaggi della STESSA striscia
   da sinistra a destra ogni 14 s, con ritorno invisibile tra i passaggi.
   Lo sfondo si sposta da prima del bordo sinistro a dopo il bordo destro. */
:root { --pbt-sheen-cycle:14s; }
.brand::after,
.filter[data-filter="ai"].active::before {
  background-image:linear-gradient(108deg,
    transparent 0%,
    rgba(255,236,178,.02) 23%,
    rgba(255,232,170,.27) 40%,
    rgba(255,250,221,.88) 50%,
    rgba(255,232,171,.22) 60%,
    rgba(255,234,179,.02) 77%,
    transparent 100%);
  background-size:58% 100%;
  background-repeat:no-repeat;
  background-position:-300% 50%;
  animation:pbt-sheen-ltr-v21 var(--pbt-sheen-cycle) linear infinite;
  opacity:0;
}
.filter[data-filter="ai"].active::before {
  top:0;bottom:0;left:0;width:100%;
  border-radius:inherit;
  mix-blend-mode:screen;
}
@keyframes pbt-sheen-ltr-v21 {
  0%,5% {background-position:-300% 50%;opacity:0}
  9% {opacity:.90}
  31% {background-position:350% 50%;opacity:.90}
  37%,48% {background-position:350% 50%;opacity:0}
  48.01% {background-position:-300% 50%;opacity:0}
  53% {opacity:.90}
  76% {background-position:350% 50%;opacity:.90}
  83%,100% {background-position:350% 50%;opacity:0}
}
@media(prefers-reduced-motion:reduce) {
  .brand::after, .filter[data-filter="ai"].active::before {
    animation:none!important;
    opacity:0!important;
  }
}


/* v22 — bordi arrotondati sulle piccole miniature, non sul player YouTube. */
.video-poster,
.detail-page[data-video-orientation="landscape"] .video-poster {
  border-radius:clamp(8px, .8vw, 12px);
  overflow:hidden;
}
.video-poster-image {border-radius:inherit}

/* v22 — titolo/descrizione in alto, sei preview quadrate subito sotto. */
.detail-info {justify-content:flex-start;align-content:start;gap:0;padding-top:6px;padding-bottom:8px;}
.detail-info h1 {margin-top:8px;margin-bottom:9px}
.detail-summary {margin-bottom:10px}
.photo-gallery-preview {
  display:block;width:100%;min-width:0;flex:0 0 auto;text-align:left;
  padding:10px;border:1px solid #504b40;border-radius:var(--radius);
  background:#303030;color:var(--white);margin:0 0 14px;
  transition:border-color .18s ease,background .18s ease;
}
.photo-gallery-preview:focus-visible {border-color:var(--gold);background:#38352f}
/* Touch must not retain a hover highlight when the project replaces its card. */
@media(min-width:601px) and (hover:hover) and (pointer:fine){
  .photo-gallery-preview:hover {border-color:var(--gold);background:#38352f}
}
.photo-gallery-preview-title {display:flex;justify-content:space-between;align-items:center;gap:7px;margin-bottom:8px;
  font:400 clamp(17px,1.6vw,23px)/1.1 var(--title-font);color:var(--gold);text-transform:lowercase;}
.photo-gallery-arrow {font:400 15px/1 var(--font)}
.photo-gallery-preview-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.photo-preview-square {display:block;position:relative;aspect-ratio:1/1;overflow:hidden;border:1px solid #514d46;border-radius:9px;background:#393939;min-width:0;}
.photo-preview-square>img,.gallery-full-tile>img {display:block;width:100%;height:100%;object-fit:cover;}
.photo-placeholder {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:100%;background:linear-gradient(140deg,#41403c,#343434);color:#918875;}
.photo-placeholder-mark {font-size:clamp(11px,1.5vw,19px);line-height:1;opacity:.65}
.photo-placeholder-num {font:600 9px/1.3 var(--font);letter-spacing:.1em}
.detail-info .detail-facts {margin-top:0}
@media(min-width:850px) and (max-height:750px){
  .detail-info h1{font-size:clamp(31px,3vw,48px)}
  .photo-gallery-preview {padding:7px;margin-bottom:9px}
  .photo-gallery-preview-title {font-size:17px;margin-bottom:5px}
  .photo-gallery-preview-grid {gap:4px}
  .detail-summary {margin-bottom:8px}
  .detail-notes {margin-top:9px}
}
@media(max-width:600px){
  .photo-gallery-preview {padding:8px;margin-bottom:12px}
  .photo-gallery-preview-title {font-size:clamp(16px,4vw,20px)}
  .photo-gallery-preview-grid{gap:5px}
  .photo-placeholder-num{font-size:8px}
}

/* v22 — galleria immersiva a tutto schermo. Anteprime quadrate;
   immagini aperte con object-fit:contain per conservare le proporzioni reali. */
body.gallery-open {overflow:hidden!important;}
.gallery-modal {position:fixed;inset:0;z-index:140;background:#222120;color:#fff;opacity:0;transition:opacity .28s ease;}
.gallery-modal.is-visible {opacity:1}
.gallery-shell {width:100%;height:100dvh;display:flex;flex-direction:column;min-height:0;padding:clamp(15px,2.4vw,38px);}
.gallery-header {display:flex;justify-content:space-between;align-items:center;gap:16px;flex-shrink:0;padding-bottom:14px;border-bottom:1px solid #49453e;}
.gallery-heading{min-width:0}
.gallery-project-name {color:#c6bba2;font:700 9px/1.2 var(--font);text-transform:uppercase;letter-spacing:.14em;margin:0 0 5px;}
.gallery-heading h2 {color:var(--gold);font:400 clamp(26px,3.2vw,46px)/1.08 var(--title-font);margin:0;text-transform:lowercase;}
.gallery-actions {display:flex;align-items:center;gap:clamp(9px,1.4vw,19px);flex-shrink:0;}
.gallery-back {color:var(--gold);background:none;border:0;font-size:11px;letter-spacing:.02em;padding:8px 0;}
.gallery-back:hover{color:#fff}
.gallery-count {color:#b9b0a1;font-size:10px;font-variant-numeric:tabular-nums;}
.gallery-close {border:1px solid #595143;border-radius:50%;width:38px;height:38px;display:grid;place-items:center;color:var(--gold);background:#2e2c28;font-size:25px;line-height:1;}
.gallery-close:hover{border-color:var(--gold)}
.gallery-content {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;align-items:center;justify-content:center;padding:16px 0;}
.gallery-full-grid{width:min(100%,960px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(9px,1.8vw,22px);margin:auto;}
.gallery-full-tile {position:relative;aspect-ratio:1/1;border:1px solid #565044;border-radius:var(--radius);padding:0;min-width:0;overflow:hidden;background:#343230;color:#fff;transition:transform .2s ease,border-color .2s ease;}
.gallery-full-tile:hover{transform:translateY(-2px);border-color:var(--gold)}
.gallery-full-tile .photo-placeholder-mark{font-size:clamp(20px,4vw,39px)}
.gallery-full-tile .photo-placeholder-num{font-size:12px}
.gallery-tile-num{position:absolute;bottom:10px;left:12px;color:#ebd19a;text-shadow:0 2px 6px #000;font:600 10px/1 var(--font);}
.gallery-single {width:100%;height:100%;display:grid;grid-template-columns:minmax(30px,54px) minmax(0,1fr) minmax(30px,54px);gap:clamp(5px,1.7vw,22px);align-items:center;}
.gallery-photo-frame{width:100%;height:100%;min-height:0;display:flex;justify-content:center;align-items:center;overflow:hidden;}
.gallery-photo-frame>img {display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:0;}
.gallery-photo-arrow{border:1px solid #554a35;border-radius:50%;height:40px;width:40px;background:#32302b;color:var(--gold);font-size:19px;justify-self:center;}
.gallery-photo-arrow:disabled{opacity:.2;cursor:default}
.gallery-detail-empty{width:min(54dvh,450px,100%);aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:15px;color:#aaa;}
.gallery-detail-empty .photo-placeholder{border:1px solid #605848;border-radius:var(--radius)}
.gallery-detail-empty>span{font-size:12px;color:#b5afa3}
@media(max-width:600px){
  .gallery-shell{padding:13px 12px}
  .gallery-header{gap:7px;align-items:flex-start}
  .gallery-heading h2{font-size:clamp(23px,7vw,33px)}
  .gallery-actions{gap:6px}
  .gallery-back{font-size:9px;max-width:100px;line-height:1.2}
  .gallery-close{width:30px;height:30px;font-size:22px}
  .gallery-full-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .gallery-single{grid-template-columns:28px minmax(0,1fr) 28px;gap:3px}
  .gallery-photo-arrow{width:28px;height:28px;font-size:15px}
  .gallery-content{padding:10px 0}
}
@media(prefers-reduced-motion:reduce){
  .gallery-modal,.gallery-full-tile{transition:none!important;}
}


/* v23 — centered editorial flow in all project information panels. */
@media (min-width:850px){
  .detail-info{
    width:min(100%,340px);
    justify-self:center;
    align-items:center;
    text-align:center;
    padding:clamp(6px,1.5vh,16px) clamp(8px,1vw,18px);
    gap:0;
  }
  .detail-info > .eyebrow, .detail-info > h1, .detail-info > .detail-summary {width:100%;}
  .detail-info h1{margin:8px 0 8px;}
  .detail-info .detail-summary{margin:0 0 clamp(12px,1.5vh,18px);}
}
.detail-role-block{
  width:calc(100% - 24px);
  max-width:300px;
  min-width:0;
  border-top:1px solid var(--border);
  padding:clamp(12px,1.45vh,17px) 0 0;
  margin:0 auto clamp(13px,1.5vh,20px);
}
.detail-role-heading{color:var(--gold);font:700 10px/1.4 var(--font);letter-spacing:.11em;text-transform:uppercase;margin:0 0 8px;}
.detail-role-lead{color:#fff;font:500 clamp(10px,.85vw,12px)/1.45 var(--font);margin:0 0 8px;}
.detail-role-block .detail-notes{margin:0;color:#cacaca;font:400 clamp(10px,.8vw,11px)/1.5 var(--font);}
.detail-info .photo-gallery-preview{width:100%;max-width:285px;margin:0 auto 7px;}
.detail-info .photo-gallery-preview-title{justify-content:center;position:relative;}
.detail-info .photo-gallery-arrow{position:absolute;right:0;top:0;}
@media(min-width:850px) and (max-height:760px){
  .detail-info{padding-block:2px;}
  .detail-info h1{font-size:clamp(30px,2.7vw,44px);}
  .detail-info .detail-summary{font-size:11px;margin-bottom:8px;line-height:1.4;}
  .detail-role-block{padding-top:8px;margin-bottom:8px;}
  .detail-role-heading{margin-bottom:4px;}
  .detail-role-lead{margin-bottom:5px;line-height:1.3;}
  .detail-role-block .detail-notes{line-height:1.3;}
  .detail-info .photo-gallery-preview{padding:7px;}
}
@media(max-width:849px){
  .detail-role-block{width:calc(100% - 14px);padding-top:10px;margin-bottom:12px;}
  .detail-role-heading{margin-bottom:5px;}
  .detail-role-lead{font-size:10px;}
  .detail-role-block .detail-notes{font-size:10px;}
}
/* Six columns across desktop, three on phone. 24 editable square slots. */
.gallery-full-grid{width:min(100%,1160px);grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(7px,.9vw,13px);}
@media(min-width:601px) and (max-width:849px){.gallery-full-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:600px){.gallery-full-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}}
/* Corners stay rounded through all entry and exit fades (including image steps). */
.gallery-photo-frame>img {border-radius:var(--radius);overflow:hidden;}
.gallery-detail-empty {border-radius:var(--radius);overflow:hidden;}
.gallery-full-tile>img{border-radius:inherit;}
@media(prefers-reduced-motion:reduce){.gallery-full-grid,.gallery-single{animation:none!important;}}
/* All filtered overview thumbnails have the same width at a given viewport size. */
@media(min-width:850px){
  .work-card .cover,
  .work-grid[data-count="4"] .work-card .cover,
  .work-grid[data-count="6"] .work-card .cover{
    width:clamp(69px,7.5vw,145px);
    max-width:none;
    height:auto;
    aspect-ratio:9/16;
    align-self:center;
  }
}
/* Fit all four desktop gallery rows within typical viewport heights where possible. */
@media(min-width:850px){
  .gallery-full-grid{
    width:min(100%,1080px,max(540px,calc((100dvh - 180px) * 1.5 - 30px)));
  }
}

/* v24 — screenshot revisions: typography/layout, no new media dependencies. */

/* Center the filter group visually between primary nav and first row of covers. */
@media (min-width:850px) and (min-height:701px){
  .home .toolbar {position:relative;top:clamp(10px,1.8dvh,18px);z-index:1;}
}

/* Keep visual hierarchy and equal side margins inside the middle project column.
   The archive divider remains anchored to the midpoint of the page. */
@media (min-width:850px){
  .detail-info {
    width:100%;max-width:none;min-width:0;
    justify-self:stretch;align-items:stretch;text-align:left;
    padding:clamp(4px,1.3vh,14px) clamp(17px,1.55vw,28px);
  }
  .detail-info > .eyebrow,
  .detail-info > h1,
  .detail-info > .detail-summary {width:100%;text-align:left;}
  .detail-info h1 {
    font-size:clamp(31px,2.65vw,49px);
    overflow-wrap:normal;word-break:normal;
    hyphens:none;
    margin:7px 0 10px;
  }
  .detail-role-block {
    width:100%;max-width:none;margin:0 0 clamp(10px,1.55vh,17px);
    padding-top:clamp(11px,1.35vh,16px);
  }
  .detail-info .photo-gallery-preview {
    width:100%;max-width:none;
    margin:0;
    padding:clamp(9px,.9vw,14px);
  }
  .detail-info .photo-gallery-preview-title {
    justify-content:flex-start;text-align:left;
    font-size:clamp(19px,1.6vw,25px);
  }
  .photo-gallery-preview-grid{gap:clamp(5px,.5vw,8px);}
}
@media (min-width:850px) and (max-height:760px){
  .detail-info {padding-block:2px;}
  .detail-info h1{font-size:clamp(29px,2.45vw,42px);}
  .detail-info .photo-gallery-preview{padding:8px;}
  .detail-info .detail-summary{font-size:11px;margin-bottom:8px;}
}

/* On the photo gallery, the X is a centered vector, not a font glyph. */
.gallery-close{display:grid;place-items:center;padding:0;line-height:1;}
.gallery-close svg{display:block;flex:none;width:18px;height:18px;}
.gallery-back,.gallery-count{display:none!important;}
.gallery-tile-num,.photo-placeholder-num{display:none!important;}
.gallery-heading h2::after{content:none;}
@media(max-width:600px){
  .gallery-close svg{width:15px;height:15px;}
}


/* v25 — Fine alignment across the three desktop column junctions.
   Match cover -> editorial copy, editorial copy -> centre divider,
   and centre divider -> video archive without shifting the divider. */
@media (min-width:850px){
  .detail-info{padding-right:clamp(34px,3vw,56px);}
  /* Give the gallery caption equal breathing room above and below. */
  .detail-info .photo-gallery-preview-title{
    margin-top:-4px;
    margin-bottom:12px;
  }
}

/* On phones, the gallery belongs BELOW the cover/editorial row,
   spanning the same full usable width as the video archive. */
.detail-mobile-gallery{display:none;}
@media (max-width:600px){
  .detail-info > .photo-gallery-preview{display:none;}
  .detail-mobile-gallery{
    display:block;
    grid-column:1 / -1;
    width:100%;
    min-width:0;
    margin-top:14px;
  }
  .detail-mobile-gallery .photo-gallery-preview{
    display:block;
    width:100%;
    max-width:none;
    margin:0;
    padding:clamp(11px,3vw,15px);
  }
  .detail-mobile-gallery .photo-gallery-preview-title{
    justify-content:flex-start;
    text-align:left;
    margin:0 0 12px;
    font-size:clamp(22px,6vw,28px);
  }
  .detail-mobile-gallery .photo-gallery-preview-grid{gap:clamp(6px,2vw,10px);}
  .detail-archive{margin-top:17px;}
}

/* Restore the previously approved 14-second two-pass brand shimmer.
   Both passes travel left-to-right and leave the full logo before resetting.
   This is an overlay on the existing logo — not an animated replacement. */
.brand{position:relative;isolation:isolate;overflow:visible;}
.brand::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  display:block;
  pointer-events:none;
  border-radius:0;
  background-image:linear-gradient(108deg,
    transparent 0%,rgba(255,236,178,.02) 23%,
    rgba(255,232,170,.27) 40%,
    rgba(255,250,221,.94) 50%,
    rgba(255,232,171,.22) 60%,
    rgba(255,234,179,.02) 77%,transparent 100%);
  background-size:58% 100%;
  background-repeat:no-repeat;
  background-position:-300% 50%;
  -webkit-mask-image:url('assets/pbt-logo-shimmer.webp');
  mask-image:url('assets/pbt-logo-shimmer.webp');
  -webkit-mask-size:100% 100%;
  mask-size:100% 100%;
  -webkit-mask-position:center;
  mask-position:center;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  animation:pbt-sheen-ltr-v21 14s linear infinite;
  opacity:0;
}
@media(prefers-reduced-motion:reduce){
  .brand::after{animation:none!important;opacity:0!important;}
}


/* v26 — Balanced desktop typography and gallery: the content area is centered
   between the right edge of the cover and the central archive divider. */
@media (min-width:850px){
  .detail-info {
    padding-left:clamp(27px,2.25vw,40px);
    padding-right:clamp(27px,2.25vw,40px);
  }
}

/* v26 — On tablet and phone the photo preview is a full-width panel below
   the cover/info row rather than squeezed into the narrow text column. */
@media (max-width:849px){
  .detail-info > .photo-gallery-preview{display:none;}
  .detail-mobile-gallery{
    display:block;
    grid-column:1 / -1;
    min-width:0;
    width:100%;
    margin-top:clamp(13px,2vw,20px);
  }
  .detail-mobile-gallery .photo-gallery-preview{
    display:block;
    width:100%;
    max-width:none;
    margin:0;
    padding:clamp(11px,1.9vw,17px);
    text-align:left;
  }
  .detail-mobile-gallery .photo-gallery-preview-title{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    text-align:left;
    margin:0 0 12px;
    font-size:clamp(22px,3.4vw,29px);
  }
  .detail-mobile-gallery .photo-gallery-preview-grid{
    gap:clamp(7px,1.1vw,11px);
  }
  .detail-archive{margin-top:clamp(0px,1vw,8px);}
}
@media (min-width:601px) and (max-width:849px){
  .detail-mobile-gallery .photo-gallery-preview-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }
}
@media (max-width:600px){
  .detail-mobile-gallery .photo-gallery-preview-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  /* Center the close button against the complete heading, not its first line. */
  .gallery-header{align-items:center;}
  .gallery-actions{align-self:center;}
}


/* v27 — Exact visual centering, measured from the rendered cover edge to
   the middle divider. The viewport, image crop and cover size can change,
   so a small calculated offset keeps the two visible gaps equal. */
@media (min-width:850px){
  .detail-info{ transform:translateX(var(--project-center-offset, 0px)); }
}
/* Match every line of mobile editorial text with the My Role block, rather
   than leaving the first lines 7px further left. */
@media (max-width:849px){
  .detail-info .detail-role-block{width:calc(100% - 14px);max-width:none;}
  .detail-info > .eyebrow,
  .detail-info > h1,
  .detail-info > .detail-summary{
    width:calc(100% - 14px);
    margin-left:auto;
    margin-right:auto;
  }
}

/* v28 — The transition snapshot is the same rounded container that the user sees
   on hover, avoiding the v27 double-image flash when opening a project. */
::view-transition-old(pbt-cover),
::view-transition-new(pbt-cover){border-radius:var(--radius);object-fit:cover}
/* v28 — fade out the old content first, then fade in the new content.
   In v27 both full-page snapshots briefly overlapped (the recorded glitch).
   The shared rounded cover continues its zoom independently. */
::view-transition-old(pbt-main){animation:pbt-main-fade-out .15s ease-in both}
::view-transition-new(pbt-main){animation:pbt-main-fade-in .30s .15s ease-out both}

/* v29: nessun badge play sopra alle miniature; foto animate, frecce ferme. */
.video-poster .video-play {display:none !important}
.gallery-photo-arrow {position:relative;z-index:2;flex:none}
.gallery-photo-arrow:disabled {opacity:.42}
@media (prefers-reduced-motion:reduce){.gallery-photo-frame img{transition:none!important}}

/* v32 — same 18px corners on portrait/landscape YouTube iframes. */
.player-shell,
.player-shell iframe { border-radius:var(--radius); }
.player-shell { clip-path:inset(0 round var(--radius)); isolation:isolate; }

/* Same hover swap in project detail as on homepage; one 9:16 clipping frame. */
.detail-cover-stack {
  position:relative;display:block;flex:0 1 auto;
  width:min(100%,calc((100dvh - 175px) * 9 / 16));
  max-height:100%;aspect-ratio:9 / 16;
  overflow:hidden;border-radius:var(--radius);isolation:isolate;
}
.detail-cover-stack .detail-cover-primary {
  display:block;width:100%;height:100%;max-height:none;
  object-fit:cover;aspect-ratio:9 / 16;border-radius:0;
}
.detail-cover-stack .detail-cover-secondary {
  position:absolute;inset:0;display:block;width:100%;height:100%;
  max-height:none;object-fit:cover;aspect-ratio:9 / 16;
  border-radius:0;opacity:0;pointer-events:none;
  transition:opacity .35s ease;
}
@media (hover:hover) and (pointer:fine){
  .detail-cover-stack.has-detail-hover:hover .detail-cover-secondary {opacity:1;}
}
@media (hover:none){.detail-cover-stack .detail-cover-secondary{display:none}}
@media (max-width:849px){
 .detail-cover-stack{width:100%;max-height:440px;}
}
@media (max-width:600px){
 .detail-cover-stack{max-height:290px;}
}

/* Five clients / five collections — center the same-sized cards in one row on
   wide screens, preserving the two-row All overview. */
.work-grid .work-card.is-filter-hidden {display:none!important}
@media (min-width:1300px){
  .work-grid[data-count="5"]{
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-template-rows:minmax(0,1fr);
    flex:0 1 auto;height:44%;margin:auto 0;
  }
}
@media (min-width:850px) and (max-width:1299px){
  .work-grid[data-count="5"]{
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:849px){
  .work-grid[data-count="5"]{height:auto;}
}


/* v33 — TABLET: cards fill available width, without cramped four-column rows.
   Between 700 and 1099px the complete overview uses three readable columns,
   and five-item filters have a symmetrically centered second row. */
@media (min-width:700px) and (max-width:1099px){
  .home-view #main { min-width:0; }
  .home { padding-inline:clamp(17px,2.6vw,30px); }
  .work-grid {
    width:100%;
    height:auto;
    flex:0 0 auto;
    min-height:0;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:none;
    grid-auto-rows:minmax(156px,auto);
    gap:clamp(10px,1.6vw,18px);
    align-content:center;
    padding-block:5px 22px;
  }
  .work-grid .work-card {min-height:155px;max-width:none;gap:clamp(8px,1vw,13px);}
  .work-grid .work-card .cover {
    width:clamp(67px,10.5vw,114px);
    max-width:none;max-height:none;height:auto;
    aspect-ratio:9/16;
    align-self:center;
  }
  .work-grid .work-name {font-size:clamp(17px,2.15vw,23px);line-height:1.08;}
  .work-grid .work-desc {font-size:clamp(10px,1.13vw,12px);line-height:1.35;-webkit-line-clamp:4;line-clamp:4;}
  .work-grid .work-category {font-size:8px;margin-bottom:5px;}
  .work-grid[data-count="5"]{
    width:100%;height:auto;max-width:none;margin-inline:0;
    grid-template-columns:repeat(6,minmax(0,1fr));
    grid-template-rows:none;grid-auto-rows:minmax(156px,auto);
    align-self:stretch;
  }
  .work-grid[data-count="5"] .work-card:not(.is-filter-hidden){grid-column:span 2;}
  .work-grid[data-count="5"] .work-card[data-filter-position="4"]{grid-column:2 / span 2;}
  .work-grid[data-count="5"] .work-card[data-filter-position="5"]{grid-column:4 / span 2;}
}
@media (min-width:700px) and (max-width:849px){
  .work-grid .work-card {min-height:168px;}
  .work-grid .work-card .cover{width:clamp(70px,11.2vw,99px);}
  .site-footer{padding-inline:clamp(17px,2.6vw,30px);}
}
@media (min-width:850px) and (max-width:1099px){
  /* A narrow tablet screen shouldn't squeeze the video archive into 1/3.
     Keep cover and description side by side, then full-width gallery / videos. */
  body.project-view{display:block;height:auto;min-height:100dvh;overflow-y:auto;}
  .project-view #main{display:block;min-height:auto;}
  .detail-page{display:block;height:auto;min-height:0;padding-bottom:28px;}
  .detail-layout{display:grid;grid-template-columns:minmax(220px,.64fr) minmax(0,1fr);gap:18px;min-height:0;}
  .detail-cover {max-height:440px;align-items:flex-start;justify-content:flex-start;}
  .detail-cover-stack {width:min(100%,248px);max-height:440px;}
  .detail-info{padding:4px 0;transform:none!important;overflow:visible;}
  .detail-info > .photo-gallery-preview{display:none;}
  .detail-mobile-gallery{display:block;grid-column:1 / -1;min-width:0;width:100%;margin-top:12px;}
  .detail-mobile-gallery .photo-gallery-preview{display:block;width:100%;max-width:none;margin:0;padding:14px;}
  .detail-mobile-gallery .photo-gallery-preview-title{justify-content:flex-start;text-align:left;margin:0 0 12px;}
  .detail-mobile-gallery .photo-gallery-preview-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;}
  .detail-archive{grid-column:1 / -1;border-left:0;border-top:1px solid var(--border);padding:18px 0 0;min-width:0;}
  .detail-video-list{overflow:visible;grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (min-width:601px) and (max-width:699px){
  .work-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 12px;}
  .work-card .cover{width:clamp(82px,13vw,112px);}
  .work-card {min-height:160px;}
  .work-grid[data-count="5"] .work-card[data-filter-position="5"] {
    grid-column:1 / -1;justify-self:center;width:calc(50% - 6px);
  }
}
/* Tall tablet portrait: distribute rows across the available viewport instead
   of leaving a large unused area below the footer. Landscape retains scroll. */
@media (min-width:700px) and (max-width:1099px) and (min-height:900px){
  body.home-view{height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
  .home-view #main{display:flex;flex:1;min-height:0;}
  .home-view .home{display:flex;flex:1;min-height:0;flex-direction:column;}
  .home-view .work-grid{
    display:grid;flex:1;min-height:0;
    grid-auto-rows:minmax(0,1fr);
    align-content:stretch;
    padding-block:9px 15px;
  }
  .home-view .work-grid[data-count="5"]{
    flex:1;height:auto;align-self:stretch;
    grid-auto-rows:minmax(0,1fr);
    margin-block:0;
  }
}

/* v34 — Editorial profile, selected case studies and generative AI showcase. */
.about-paragraphs{display:grid;gap:13px;margin-top:16px}
.about-paragraphs .lower-copy{margin:0;max-width:760px}
.about-profile-data{display:grid;grid-template-columns:1.05fr .95fr;gap:22px;margin:26px 0 0;padding:22px 0;border-block:1px solid var(--border)}
.about-profile-data h3{margin:0 0 9px;font:700 10px/1.3 var(--font);letter-spacing:.13em;color:var(--gold);text-transform:uppercase}
.about-profile-data p{margin:0;line-height:1.55;color:#eee;font-size:12px;max-width:330px}
.language-item{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:5px 12px;border-bottom:1px solid #484848;padding:6px 0;font-size:11px}
.language-item:first-of-type{padding-top:0}.language-item:last-child{border:0}
.language-item span:last-child{color:var(--gold);font-size:10px}
.about-experience{padding:0 0 20px;border-bottom:1px solid var(--border)}
.about-experience .collaborations-heading{margin-bottom:10px}
.about-meta-key{color:var(--gold);font-size:10px;letter-spacing:.06em;text-transform:uppercase}
.about-experience-role{font-weight:600;color:#f8f8f8;margin:6px 0 8px;font-size:13px}
.about-small-copy{color:#ccc;font-size:11px;line-height:1.65;margin:6px 0 0}
.agency-descriptions{display:grid;gap:9px;margin:12px 0 0}
.agency-description{display:grid;gap:2px;color:#c8c8c8;font-size:10px;line-height:1.55}
.agency-description strong{color:#e8e8e8;font-weight:600}
.collaborations{border-top:0;margin-top:20px;padding-top:0}
.info-card.tools-card{width:min(920px,100%)}
.info-card.tools-card .tools-grid{gap:13px}
.tool-group{padding:18px;min-height:170px}
.tool-group h3{font-size:22px;margin-bottom:14px}
.tool-items{display:grid;gap:1px;list-style:none;margin:0;padding:0}
.tool-items li{background:transparent;border-radius:0;border-bottom:1px solid #505050;padding:8px 0;color:#fff;font-size:11px}
.tool-items li:last-child{border-bottom:0;padding-bottom:0}
.tool-item-detail{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 12px}
.tool-item-name{font-size:11px;font-weight:500}
.tool-item-level{color:#a9a9a9;font-size:10px;line-height:1.45;text-transform:lowercase}
.tool-item-detail.is-featured .tool-item-name{color:var(--gold)}

/* AI section replaces the former empty state, without changing other grids. */
.ai-showcase{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(275px,.84fr);gap:clamp(25px,4vw,72px);align-items:center;overflow-y:auto;overscroll-behavior:contain;padding:clamp(13px,2vh,26px) clamp(8px,2vw,36px) clamp(22px,3vh,45px);scrollbar-width:thin;scrollbar-color:#685b42 transparent}
.ai-intro{max-width:840px}
.ai-intro h1{font:400 clamp(37px,4.5vw,76px)/.98 var(--title-font);color:var(--gold);letter-spacing:-.04em;text-transform:lowercase;margin:13px 0 20px;max-width:900px}
.ai-body{display:grid;gap:10px;max-width:735px}
.ai-body p{font-size:clamp(11px,.9vw,13px);color:#d7d7d7;line-height:1.65;margin:0}
.ai-body p:first-child{color:#fff;font-size:clamp(13px,1vw,15px)}
.ai-workflow{margin-top:24px;padding-top:16px;border-top:1px solid var(--border)}
.ai-workflow h2{margin:0 0 12px;color:var(--gold);font:400 27px/1.05 var(--title-font);text-transform:lowercase}
.ai-workflow ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;margin:0;padding:0}
.ai-workflow li{display:flex;gap:8px;align-items:baseline;min-width:0;padding-top:6px;border-top:1px solid #484848}
.ai-workflow li span{color:var(--gold);font-size:10px;font-variant-numeric:tabular-nums}
.ai-workflow li strong{color:#e7e7e7;font-size:10px;font-weight:500;line-height:1.45}
.ai-featured{display:flex;flex-direction:column;min-width:0;max-height:100%;align-items:stretch;justify-content:center;gap:12px;border:1px solid #4f4736;background:#302f2b;padding:clamp(13px,1.5vw,24px);border-radius:var(--radius);transition:border-color .2s,background .2s}
.ai-featured:is(:hover,:focus-visible){background:#3a352b;border-color:var(--gold)}
.ai-featured-cover{height:clamp(180px,36vh,390px);max-width:100%;overflow:hidden;border-radius:12px;background:#272522}
.ai-featured-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.ai-featured:hover img{transform:scale(1.025)}
.ai-featured-copy{display:grid;gap:6px}
.ai-featured h2{font:400 clamp(29px,3.3vw,43px)/1.05 var(--title-font);letter-spacing:-.025em;color:var(--gold);text-transform:lowercase;margin:0}
.ai-featured-copy p{font-size:11px;color:#e4e4e4;line-height:1.55;margin:0}
.ai-featured-link{margin-top:5px;font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--gold)}
.ai-featured-link span{margin-left:7px}

/* Case studies live within existing detail views; archived videos remain intact. */
.case-study{min-width:0;max-width:100%}
.case-study h2{font:400 clamp(24px,2vw,30px)/1.07 var(--title-font);color:var(--gold);text-transform:lowercase;margin:0 0 14px;letter-spacing:-.02em}
.case-study-list{display:grid;gap:14px}
.case-study-item{display:grid;grid-template-columns:23px minmax(0,1fr);gap:9px;padding-top:12px;border-top:1px solid var(--border)}
.case-step{color:var(--gold);font-size:10px;line-height:1.5;font-variant-numeric:tabular-nums}
.case-study-item h3{font:700 10px/1.35 var(--font);text-transform:uppercase;letter-spacing:.08em;color:#eee;margin:0 0 5px}
.case-study-item p{font:400 11px/1.6 var(--font);color:#c9c9c9;margin:0}
.detail-info > .case-study{margin:1px 0 23px;padding:0 clamp(6px,.5vw,12px)}
.detail-info > .case-study h2{font-size:25px}
.detail-archive.is-case-only{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#67604e transparent}
.detail-archive.is-case-only .case-study{padding:0 2px 20px}
.detail-page[data-project-id="wedding-ai"] .detail-info{justify-content:flex-start;justify-content:safe center;overflow-anchor:none}
@media(max-width:1099px){
  .ai-showcase{grid-template-columns:minmax(0,1.25fr) minmax(215px,.85fr);gap:22px}
  .ai-intro h1{font-size:clamp(37px,4.6vw,58px)}
  .ai-featured-cover{height:clamp(190px,29vh,300px)}
}
@media(max-width:849px){
  .ai-showcase{display:grid;grid-template-columns:1fr;gap:25px;overflow:visible;padding:15px 3px 35px}
  .ai-featured{max-width:620px;display:grid;grid-template-columns:minmax(110px,.42fr) minmax(0,1fr);align-items:center;gap:18px}
  .ai-featured-cover{height:auto;aspect-ratio:9/12}
  .detail-archive.is-case-only{overflow:visible}
}
@media(max-width:600px){
  .about-profile-data{grid-template-columns:1fr;gap:17px;padding-block:18px}
  .about-paragraphs{gap:11px}
  .about-paragraphs .lower-copy{font-size:12px;line-height:1.7}
  .tools-grid{grid-template-columns:1fr}
  .info-card.tools-card .tools-grid{grid-template-columns:1fr}
  .ai-intro h1{font-size:clamp(38px,10.7vw,59px)}
  .ai-workflow ol{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-featured{padding:12px;gap:12px;grid-template-columns:110px minmax(0,1fr)}
  .ai-featured h2{font-size:clamp(25px,7vw,35px)}
  .ai-featured-cover{aspect-ratio:9/13}
  .ai-featured-copy p{font-size:10px}
  .detail-info>.case-study{padding:0 6px}
}
@media(prefers-reduced-motion:reduce){.ai-featured-cover img{transition:none}}

/* Keep the information panel clear of the persistent top navigation. */
.info-panel{padding-top:103px;padding-bottom:15px}
.info-card{max-height:min(86dvh,calc(100dvh - 120px))}
@media(max-width:600px){.info-panel{padding:107px 12px 12px}.info-card{max-height:calc(100dvh - 120px)}}

/* v35 — Matched archive controls, responsive cards, portrait and brandmarks. */
:root { --pbt-header-bottom:120px; --info-offset:max(146px,calc(var(--pbt-header-bottom) + 22px)); }
.info-panel {place-items:start center;align-content:start;padding:var(--info-offset) clamp(12px,2.4vw,32px) 18px;}
.info-card {max-height:calc(100dvh - var(--info-offset) - 18px);overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#6c6251 transparent;}
.info-card.about-card{width:min(980px,100%);}
.info-card.tools-card{width:min(1050px,100%);}
.about-hero {display:grid;grid-template-columns:minmax(0,1fr) 154px;align-items:start;gap:20px;}
.about-hero-copy{min-width:0;}
.about-hero .lower-heading{font-size:clamp(36px,3.5vw,54px);line-height:1.06;letter-spacing:-.035em;margin:13px 0 0;max-width:100%;overflow-wrap:normal;}
.about-title-last{display:block;}
.about-portrait{aspect-ratio:1/1;max-width:154px;width:100%;align-self:start;margin-top:13px;display:grid;place-items:center;border:1px solid #675a3f;border-radius:16px;overflow:hidden;background:linear-gradient(140deg,#34312d,#272625);}
.about-portrait img{display:block;width:100%;height:100%;object-fit:cover;grid-area:1/1;}
.about-portrait-placeholder{grid-area:1/1;font:400 54px/1 var(--title-font);color:#a78c57;opacity:.58;}
.about-portrait.has-portrait .about-portrait-placeholder{display:none;}
.about-paragraphs{margin-top:21px;gap:14px;}
.about-paragraphs .lower-copy{max-width:none;}
.about-profile-data{gap:24px;margin:24px 0 0;padding-block:24px;}
.about-experience{padding:24px 0;border-bottom:1px solid var(--border);}
.about-experience .collaborations-heading{margin-top:0;}
.collaborations{border-top:0;margin-top:0;padding:24px 0 0;}
.collaborations-heading{margin:0 0 14px;}
.about-card .about-meta-key{letter-spacing:.06em;}
.logo-cell.is-agency-logo{background:#fff;border-color:#f0f0f0;min-height:85px;padding:10px 16px;}
.logo-cell.is-agency-logo img{max-height:64px;max-width:100%;object-fit:contain;}
.logo-cell.is-agency-logo .logo-placeholder{color:#262626;}
.tools-hero{display:grid;grid-template-columns:minmax(0,1fr) 174px;gap:26px;align-items:center;}
.tools-hero-copy{min-width:0;}
.tools-hero .lower-copy{max-width:670px;}
.tools-brand-strip{display:grid;grid-template-columns:repeat(3,44px);justify-content:end;gap:10px;align-content:center;}
.tools-brand-strip img{display:block;width:44px;height:44px;border-radius:10px;object-fit:cover;}
.info-card.tools-card .tools-grid{margin-top:28px;gap:15px;}
.tool-group{padding:20px;min-height:0;}
.tool-group h3{margin-bottom:15px;}
.tool-item-detail{gap:8px 15px;}
.tool-name-group{display:inline-flex;align-items:center;min-width:0;gap:9px;flex:0 1 auto;}
.tool-brandmark{display:block;width:25px;height:25px;border-radius:6px;flex:0 0 auto;}
.tool-item-name{color:#fff!important;}
.tool-item-detail.is-featured .tool-item-name{color:#fff!important;}
.tool-item-level{flex:0 1 auto;text-align:right;}
.video-duration{display:block;margin-top:0;}
.video-duration-pending{color:#909090;letter-spacing:.07em;font-variant-numeric:tabular-nums;}
/* Match photo buttons exactly and place them immediately beside each displayed image. */
.gallery-single {position:relative;display:flex;align-items:center;justify-content:center;gap:0;}
.gallery-photo-frame {flex:1;width:100%;height:100%;}
.gallery-single .gallery-photo-arrow{position:absolute;z-index:3;top:50%;transform:translateY(-50%);opacity:1;visibility:visible;transition:opacity .23s ease,visibility 0s linear 0s,background .2s,border-color .2s;}
.gallery-single .gallery-photo-arrow:hover:not(:disabled),.video-nav:hover:not(:disabled){background:#403a2d;border-color:var(--gold);}
.gallery-single .gallery-photo-arrow:disabled,
.modal-dialog .video-nav:disabled{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .23s ease,visibility 0s linear .23s;}
.modal-close.gallery-close{position:absolute;right:0;top:-52px;width:38px;height:38px;border:1px solid #595143;border-radius:50%;display:grid;place-items:center;color:var(--gold);background:#2e2c28;padding:0;font-size:inherit;}
.modal-close.gallery-close svg{display:block;width:18px;height:18px;}
.video-nav{position:absolute;z-index:4;top:calc((100% - 48px) / 2);transform:translateY(-50%);opacity:1;visibility:visible;transition:opacity .23s ease,visibility 0s linear 0s,background .2s,border-color .2s;}
.video-nav-prev{left:-61px;}.video-nav-next{right:-61px;}
@media(max-width:849px){
  .video-nav{width:32px;height:32px;font-size:16px;}
  .video-nav-prev{left:-39px;}.video-nav-next{right:-39px;}
  .about-hero{grid-template-columns:minmax(0,1fr) 125px;}
  .about-portrait{max-width:125px;}
  .tools-brand-strip{grid-template-columns:repeat(3,38px);gap:8px;}
  .tools-brand-strip img{width:38px;height:38px;}
}
@media(max-width:600px){
  :root{--info-offset:max(135px,calc(var(--pbt-header-bottom) + 18px));}
  .info-panel{padding-inline:12px;padding-bottom:12px;}
  .info-card{max-height:calc(100dvh - var(--info-offset) - 12px);}
  .about-hero{grid-template-columns:1fr;gap:10px;}
  .about-hero-copy{grid-row:2;}
  .about-portrait{grid-row:1;justify-self:end;max-width:90px;margin-top:0;aspect-ratio:1/1;}
  .about-portrait-placeholder{font-size:35px;}
  .about-hero .lower-heading{font-size:clamp(35px,8.8vw,47px);margin-top:10px;}
  .about-paragraphs{margin-top:16px;}
  .about-profile-data{margin-top:22px;padding-block:20px;}
  .about-experience{padding:21px 0;}
  .collaborations{padding-top:21px;}
  .collab-groups{grid-template-columns:1fr;gap:20px;}
  .tools-hero{grid-template-columns:1fr;gap:16px;}
  .tools-brand-strip{display:flex;justify-content:flex-start;gap:8px;flex-wrap:wrap;}
  .tools-brand-strip img{width:36px;height:36px;}
  .info-card.tools-card .tools-grid{margin-top:22px;}
  .tool-group{padding:17px;}
  .tool-name-group{gap:7px;}
  .tool-brandmark{width:22px;height:22px;}
  .tool-item-detail{align-items:center;}
  .tool-item-level{max-width:140px;}
  .gallery-single .gallery-photo-arrow{width:28px;height:28px;font-size:15px;}
  .modal-close.gallery-close{top:-40px;width:30px;height:30px;}
  .modal-close.gallery-close svg{width:15px;height:15px;}
  .video-nav{width:28px;height:28px;font-size:15px;top:calc((100% - 50px) / 2);}
  .video-nav-prev{left:-28px;}.video-nav-next{right:-28px;}
}
@media(prefers-reduced-motion:reduce){.gallery-single .gallery-photo-arrow,.video-nav{transition:none!important;}}
/* Keep landscape arrows inside the viewport on narrow tablet screens. */
@media(max-width:1100px){
  .modal.is-landscape .video-nav-prev{left:7px;}
  .modal.is-landscape .video-nav-next{right:7px;}
}
@media(max-width:600px){
  .modal:not(.is-landscape) .video-nav-prev{left:-20px;}
  .modal:not(.is-landscape) .video-nav-next{right:-20px;}
}

/* v36 — Polish from approved screenshots. */
/* Remove visible rails; scrolling by wheel, trackpad, touch and keyboard remains active. */
html, body, body *, body *::before, body *::after{scrollbar-width:none!important;-ms-overflow-style:none!important}
html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}
/* Fit the supplied portrait and avoid breaking 'generative ai specialist' across two rows. */
.about-hero{grid-template-columns:minmax(0,1fr) 154px;align-items:start;gap:22px;}
.about-title-last{display:inline-block;white-space:nowrap;}
.about-hero .lower-heading{font-size:clamp(33px,3.3vw,50px);line-height:1.10;max-width:100%;overflow-wrap:normal;}
.about-portrait{margin-top:0;border-color:#766347;box-shadow:0 4px 18px rgba(0,0,0,.13)}
.about-portrait img{object-position:50% 50%}
/* Place availability/languages last, after professional experience and partners. */
.about-profile-data{margin:25px 0 0;padding:21px 0 0;border-top:1px solid var(--border);border-bottom:0;}
.about-card .collaborations{border-bottom:0;padding-bottom:0;}
.about-card .about-experience{padding-top:24px;}
/* Tools: one well-spaced brand overview, compact text-only skills cards. */
.tools-hero{grid-template-columns:minmax(0,1fr) 218px;align-items:center;gap:20px;}
.tools-hero-copy .lower-copy{max-width:630px;}
.tools-brand-strip{display:grid;grid-template-columns:repeat(4,45px);gap:9px;justify-content:end;align-content:center;}
.tools-brand-logo{width:45px;height:45px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.055);border-radius:11px;background:#292929;overflow:hidden;}
.tools-brand-logo img{width:33px;height:33px;object-fit:contain;border-radius:0;display:block;}
.tools-grid .tool-name-group{gap:0}
.tools-grid .tool-brandmark{display:none!important}
.info-card.tools-card .tools-grid{margin-top:23px;gap:13px}
.tool-group{padding:17px 19px;}
.tool-group h3{margin-bottom:12px}
.tool-items li{padding:7px 0}
.tool-item-detail{align-items:center;gap:7px 10px}
.tool-item-name,.tool-item-level{line-height:1.35}
/* WhatsApp uses the same gold icon treatment as other contact methods. */
.contact-methods .contact-whatsapp{display:inline-flex;align-items:center;gap:10px;line-height:1.15;border-bottom:0;padding-bottom:0;margin:0;color:var(--gold);}
.contact-methods .contact-whatsapp span{color:#fff}
.contact-methods .contact-whatsapp:hover span{color:#f1d79c}
/* Keep modal's close button visible at every desktop/tablet viewport height.
   Player width is also constrained by height to reserve room for X and external link. */
.modal:not(.is-landscape) .modal-dialog{width:min(430px,84vw,calc((100dvh - 155px)*9/16));}
.modal:not(.is-landscape) .player-shell{max-height:calc(100dvh - 155px);}
.modal-close.gallery-close{top:-48px;right:0;z-index:7;}
.modal.is-landscape .modal-close.gallery-close{top:-46px;right:0;}
@media(max-width:849px){
  .tools-hero{grid-template-columns:minmax(0,1fr) 190px;}
  .tools-brand-strip{grid-template-columns:repeat(4,39px);gap:7px;}
  .tools-brand-logo{width:39px;height:39px;border-radius:10px;}
  .tools-brand-logo img{width:30px;height:30px;}
  .about-hero{grid-template-columns:minmax(0,1fr) 125px;}
  .about-hero .lower-heading{font-size:clamp(30px,4.1vw,42px);}
}
@media(max-width:600px){
  .about-hero{grid-template-columns:1fr;gap:12px}
  .about-portrait{grid-row:1;justify-self:end;max-width:112px;}
  .about-hero-copy{grid-row:2}
  .about-hero .lower-heading{font-size:clamp(26px,6.4vw,39px);line-height:1.12;}
  .about-title-last{white-space:nowrap;letter-spacing:-.048em}
  .tools-hero{grid-template-columns:1fr;gap:16px;}
  .tools-brand-strip{grid-template-columns:repeat(4,39px);justify-content:start;gap:8px;}
  .tools-brand-logo{width:39px;height:39px;}
  .tools-brand-logo img{width:29px;height:29px;}
  .info-card.tools-card .tools-grid{margin-top:20px;}
  .tool-group{padding:16px}
  .modal:not(.is-landscape) .modal-dialog{width:min(430px,84vw,calc((100dvh - 125px)*9/16));}
  .modal:not(.is-landscape) .player-shell{max-height:calc(100dvh - 125px);}
  .modal-close.gallery-close{top:-38px;}
}
/* No whole-screen View Transition on language change. Prevent a hidden-panel flash. */
body.language-updating .info-panel:not([hidden]){visibility:visible;opacity:1!important;animation:none!important}


/* v37 — Owner review: mobile balance, stable gallery arrows and coherent app icons. */
.tools-hero{
  display:grid;grid-template-columns:minmax(0,1fr) 218px;
  grid-template-rows:auto auto;gap:0 22px;align-items:center;
}
.tools-hero-head{grid-column:1;grid-row:1;min-width:0;}
.tools-hero-description{grid-column:1;grid-row:2;max-width:630px;margin:9px 0 0;}
.tools-brand-strip{grid-column:2;grid-row:1 / 3;display:grid;grid-template-columns:repeat(4,46px);gap:8px;justify-content:end;align-self:center;}
.tools-brand-logo{width:46px;height:46px;border:1px solid rgba(255,255,255,.095);border-radius:12px;background:#282828;overflow:hidden;display:grid;place-items:center;}
.tools-brand-logo img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block;}
/* No more photo-width-dependent left offsets: anchors stay in one place for every frame. */
.gallery-single{width:min(100%,1050px);margin-inline:auto;}
.gallery-single .gallery-photo-arrow[data-gallery-step="-1"]{left:clamp(0px,1vw,16px)!important;right:auto!important;}
.gallery-single .gallery-photo-arrow[data-gallery-step="1"]{right:clamp(0px,1vw,16px)!important;left:auto!important;}
.gallery-single .gallery-photo-arrow{top:50%!important;}
/* Shorter About while keeping all approved professional copy intact. */
.info-card.about-card{padding:clamp(21px,2.65vw,34px) clamp(22px,3vw,38px);}
.about-card .about-hero{align-items:center;gap:20px;}
.about-card .about-hero .lower-heading{font-size:clamp(29px,3.05vw,43px);line-height:1.07;margin:6px 0 0;}
.about-card .about-portrait{max-width:139px;}
.about-card .about-paragraphs{margin-top:13px;gap:9px;}
.about-card .about-paragraphs .lower-copy{font-size:clamp(11px,.92vw,12px);line-height:1.52;}
.about-card .about-experience{padding:16px 0 14px;}
.about-card .about-experience .collaborations-heading{font-size:clamp(22px,2.5vw,28px);margin-bottom:8px;}
.about-card .about-small-copy{font-size:11px;line-height:1.46;margin-top:5px;}
.about-card .collaborations{margin-top:16px;padding-top:15px;}
.about-card .collaborations-heading{font-size:clamp(22px,2.6vw,29px);margin-bottom:10px;}
.about-card .collab-groups{gap:12px;}
.about-card .agency-descriptions{gap:7px;}
.about-card .about-profile-data{margin-top:16px;padding-top:14px;gap:20px;}
.about-card .logo-cell{min-height:50px;padding:7px;}
.about-card .logo-cell img{max-height:39px;}
/* A small bilingual cross-fade; no position or route changes. */
#main,.info-panel:not([hidden]) .info-card,.main-nav .nav-link,.main-nav .language-trigger{
  transition:opacity .18s ease;
}
body.language-fade-out #main,body.language-fade-out .info-panel:not([hidden]) .info-card,
body.language-fade-out .main-nav .nav-link{opacity:.10;}
@media(max-width:849px){
  .tools-hero{grid-template-columns:minmax(0,1fr) 190px;gap:0 15px;}
  .tools-brand-strip{grid-template-columns:repeat(4,39px);gap:6px;}
  .tools-brand-logo{width:39px;height:39px;border-radius:10px;}
  .about-card .about-hero{grid-template-columns:minmax(0,1fr) 119px;}
}
@media(max-width:600px){
  .info-card.about-card{padding:20px 16px 22px;}
  .about-card .about-hero{display:grid;grid-template-columns:minmax(0,1fr) 88px;grid-template-rows:auto;gap:9px;align-items:center;padding-right:1px;}
  .about-card .about-hero-copy{grid-column:1;grid-row:1;min-width:0;}
  .about-card .about-portrait{grid-column:2;grid-row:1;max-width:88px;margin:20px 0 0;justify-self:end;align-self:center;}
  .about-card .about-hero .lower-heading{font-size:clamp(21px,5.5vw,27px);line-height:1.08;letter-spacing:-.045em;margin-top:7px;}
  .about-card .about-title-last{display:inline;white-space:normal;letter-spacing:-.04em;}
  .about-card .info-close{z-index:6;top:5px;right:7px;}
  .about-card .about-paragraphs{margin-top:12px;gap:10px;}
  .about-card .about-paragraphs .lower-copy{font-size:12px;line-height:1.53;}
  .about-card .about-profile-data{grid-template-columns:1fr;gap:12px;}
  .tools-hero{display:grid;grid-template-columns:minmax(0,1fr) 137px;grid-template-rows:auto auto;gap:10px 10px;align-items:start;}
  .tools-hero-head{grid-column:1/-1;grid-row:1;}
  .tools-hero .lower-heading{font-size:clamp(28px,7vw,39px);}
  .tools-hero-description{grid-column:1;grid-row:2;font-size:11px;line-height:1.48;margin:0;align-self:center;}
  .tools-brand-strip{grid-column:2;grid-row:2;grid-template-columns:repeat(4,31px);gap:4px;justify-self:end;justify-content:end;margin:0;}
  .tools-brand-logo{width:31px;height:31px;border-radius:8px;}
  .info-card.tools-card .tools-grid{margin-top:17px;}
  .gallery-single{width:100%;}
  .gallery-single .gallery-photo-arrow[data-gallery-step="-1"]{left:0!important;}
  .gallery-single .gallery-photo-arrow[data-gallery-step="1"]{right:0!important;}
}
@media(prefers-reduced-motion:reduce){
  #main,.info-panel:not([hidden]) .info-card,.main-nav .nav-link{transition:none!important;}
}
/* v37 final polish — keep About close control clear of portrait on narrower screens. */
@media(min-width:601px) and (max-width:849px){
  .about-card .about-hero{padding-right:30px;}
}
@media(max-width:600px){
  .about-card .about-hero{padding-right:1px;}
  .about-card .info-close{top:3px;right:7px;width:29px;height:29px;padding:0;display:grid;place-items:center;font-size:16px;}
}
/* A single-row Italian navigation on regular phone widths; language menu opens inward. */
@media(min-width:361px) and (max-width:430px){
  .main-nav .language-control{margin-right:0;}
  .site-header .main-nav{column-gap:clamp(5px,1.8vw,8px);}
}
@media(max-width:600px){
  .language-options{left:auto;right:calc(100% + 6px);}
}

/* v38 — User-approved branding, mobile composition, and restrained spacing. */
/* All application marks use the same radius and outer silhouette. */
.tools-brand-logo{border-radius:12px;overflow:hidden;}
.tools-brand-logo img{border-radius:inherit;object-fit:cover;}
/* In About, remove the accumulated gap between the experience divider and collaborations. */
.about-card .about-experience{padding-bottom:10px;}
.about-card .collaborations{margin-top:0!important;padding-top:11px!important;}
.about-card .collaborations-heading{margin-bottom:8px;}
.about-card .collab-groups{grid-template-columns:minmax(0,1fr);gap:14px;}
.about-card .collab-group h3{margin-bottom:7px;}
.about-card .collab-group.is-clients .logo-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;}
.about-card .collab-group.is-agencies .logo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.about-card .logo-cell.is-client-logo{height:79px;min-height:0;padding:8px;border-radius:13px;overflow:hidden;}
.about-card .logo-cell.is-client-logo img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;}
.about-card .logo-cell.client-logo-light{background:#fafafa;border-color:#eee;}
.about-card .logo-cell.client-logo-dark{background:#101010;border-color:#484848;}
.about-card .logo-cell.client-logo-accent{background:#a65349;border-color:#ae6c60;}
/* Ensure the original logos use an appropriate backing without recoloring or redrawing them. */
.about-card .agency-descriptions{margin-top:9px;}
@media(max-width:849px){
  .about-card .collab-group.is-clients .logo-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .about-card .logo-cell.is-client-logo{height:72px;}
}
@media(max-width:600px){
  /* The header and icon cluster share the same top row: no unnecessary empty area. */
  .tools-hero{display:grid;grid-template-columns:minmax(0,1fr) 132px;grid-template-rows:auto auto;gap:7px 8px;align-items:start;}
  .tools-hero-head{grid-column:1;grid-row:1;align-self:center;min-width:0;}
  .tools-hero .lower-heading{font-size:clamp(24px,6.65vw,33px);line-height:1.06;margin-top:8px;}
  .tools-brand-strip{grid-column:2;grid-row:1;align-self:center;justify-self:end;display:grid;grid-template-columns:repeat(4,30px);gap:4px;}
  .tools-brand-logo{width:30px;height:30px;border-radius:8px;}
  .tools-hero-description{grid-column:1/-1;grid-row:2;margin:0;align-self:start;font-size:12px;line-height:1.46;max-width:100%;}
  .info-card.tools-card .tools-grid{margin-top:12px;}
  /* Five supplied client marks in compact but legible two-row composition. */
  .about-card .collab-group.is-clients .logo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
  .about-card .collab-group.is-agencies .logo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  .about-card .logo-cell.is-client-logo{height:65px;padding:6px;}
  /* Keep close icons at exactly the same coordinates for all three panels. */
  .info-card > .info-close{position:absolute;top:3px;right:7px;width:29px;height:29px;display:grid;place-items:center;padding:0;font-size:16px;z-index:8;}
  /* Force 'generative ai specialist' to begin together on the next line. */
  .about-card .about-title-last{display:block;white-space:nowrap;letter-spacing:-.055em;font-size:.80em;}
}
@media(max-width:360px){
  .tools-hero{grid-template-columns:minmax(0,1fr) 120px;column-gap:6px;}
  .tools-brand-strip{grid-template-columns:repeat(4,27px);gap:4px;}
  .tools-brand-logo{width:27px;height:27px;border-radius:7px;}
  .tools-hero .lower-heading{font-size:24px;}
  .about-card .about-hero{grid-template-columns:minmax(0,1fr) 75px;gap:5px;}
  .about-card .about-portrait{max-width:75px;}
  .about-card .about-hero .lower-heading{font-size:19px;}
  .about-card .about-title-last{font-size:.80em;}
}
@media(prefers-reduced-motion:reduce){
  .tools-brand-logo,.logo-cell{transition:none!important;}
}


/* About collaboration logos. */
.about-card .logo-cell.is-agency-logo.agency-logo-dark{
  background:#292929;
  border-color:#484848;
}
.about-card .is-client-logo[title="Gelato Gallonetto"] img{transform:scale(1.24);}
.about-card .logo-cell.is-agency-logo.agency-logo-dark img{
  width:auto;max-width:100%;height:auto;max-height:64px;object-fit:contain;
}

/* v39 — Stesso corpo tipografico per entrambe le righe del titolo About.
   Non diminuiamo la seconda riga: su schermi stretti riduciamo il titolo
   completo, mantenendo l'identico font-size per tutte le parole. */
@media(max-width:600px){
  .about-card .about-title-last{font-size:1em;letter-spacing:-.07em;}
  .about-card .about-hero .lower-heading{font-size:clamp(17px,5.1vw,27px);letter-spacing:-.055em;}
}
@media(max-width:360px){
  .about-card .about-title-last{font-size:1em;letter-spacing:-.075em;}
  .about-card .about-hero .lower-heading{font-size:clamp(15px,5vw,19px);}
}

.detail-role-block .detail-notes.has-paragraphs{white-space:pre-line;}

@media (min-width:601px) and (max-width:1099px){
  .detail-page:not([data-project-id="wedding-ai"]) .detail-layout{
    grid-template-columns:clamp(145px,23vw,205px) minmax(0,1fr);
    gap:clamp(16px,2.6vw,28px);
    align-items:start;
  }
  .detail-page:not([data-project-id="wedding-ai"]) .detail-layout::after{content:none;}
  .detail-page:not([data-project-id="wedding-ai"]) .detail-cover-stack{width:100%;}
  .detail-page:not([data-project-id="wedding-ai"]) .detail-info{
    padding:4px 0 0;
    transform:none;
  }
  .detail-page:not([data-project-id="wedding-ai"]) .detail-info > :is(.eyebrow,h1,.detail-summary,.detail-role-block){
    width:100%;
    margin-inline:0;
  }
  .detail-page:not([data-project-id="wedding-ai"]) .detail-mobile-gallery{margin-top:0;}
  .detail-page:not([data-project-id="wedding-ai"]) .detail-archive{margin-top:0;}
}

/* v42 — Wedding artwork and case study only; no changes to other project layouts. */
.ai-featured[data-ai-project="wedding-ai"] .ai-featured-cover{width:100%;height:auto;aspect-ratio:2048 / 888;flex:none;}
.ai-featured[data-ai-project="wedding-ai"] .ai-featured-cover img{object-fit:contain;transform:none;transition:none;}
.detail-page[data-project-id="wedding-ai"] .detail-cover-stack{aspect-ratio:9 / 16;}
.detail-page[data-project-id="wedding-ai"] .detail-cover-primary{object-fit:cover;object-position:49% center;}
.detail-page[data-project-id="wedding-ai"] .archive-heading h2{color:var(--gold);font:700 10px/1.4 var(--font);letter-spacing:.13em;text-transform:uppercase;}
.detail-page[data-project-id="wedding-ai"] .case-video{flex:none;min-width:0;width:100%;padding:0 2px 12px;}
.case-video-frame{position:relative;width:100%;aspect-ratio:2048 / 888;overflow:hidden;background:#171717;border-radius:12px;}
.case-video-frame iframe,.case-video-local{display:block;width:100%;height:100%;border:0;}
.case-video-local{position:relative;}
.case-video-local img{width:100%;height:100%;object-fit:contain;display:block;}
.case-video-local span{position:absolute;inset:auto 0 8px;text-align:center;color:white;text-shadow:0 1px 5px #000;}
.case-video-link{display:inline-block;color:var(--gold);font-size:10px;margin-top:8px;}
@media(max-width:849px){
  .ai-featured[data-ai-project="wedding-ai"]{display:flex;flex-direction:column;align-items:stretch;max-width:620px;}
}
@media (min-width:850px) and (max-width:1099px){
  .detail-page[data-project-id="wedding-ai"] .detail-layout::after{content:none;}
}
/* The vertical detail frame must not be shortened by the mobile max-height cap. */
@media(max-width:849px){
  .detail-page[data-project-id="wedding-ai"] .detail-cover-stack{width:min(100%,247.5px);}
}
@media(max-width:600px){
  .detail-page[data-project-id="wedding-ai"] .detail-cover-stack{width:min(100%,163.125px);}
}

/* v43 — AI gallery: shared photo gallery styling, dedicated tiles and player. */
.ai-showcase{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(15px,2.25vw,40px);align-content:safe center;}
.ai-gallery-preview{--ai-card-padding:clamp(10px,1vw,17px);margin:0;padding:0 var(--ai-card-padding) var(--ai-card-padding);}
.ai-showcase-media{display:grid;grid-column:span 2;grid-template-columns:repeat(2,minmax(0,1fr));gap:inherit;min-width:0;}
.ai-gallery-preview .photo-gallery-preview-title{
  justify-content:flex-start;
  align-items:center;
  min-height:calc(1.1em + var(--ai-card-padding) + 8px);
  margin:0;
  text-align:left;
}
.ai-gallery-preview .photo-gallery-preview-title > span{transform:translateY(-.06em);}
@media(min-width:850px){
  .ai-showcase-media .ai-featured{
    contain:size;
    height:100%;
    max-height:none;
    padding:clamp(10px,1vw,17px);
  }
  .ai-showcase-media .ai-featured[data-ai-project="wedding-ai"] .ai-featured-cover{flex:0 1 auto;min-height:0;}
}
.ai-gallery-preview .photo-gallery-preview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(5px,.65vw,10px);}
.ai-gallery-tile{position:relative;isolation:isolate;}
.ai-gallery-tile img{position:relative;z-index:1;object-fit:cover;}
.ai-gallery-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#9a907d;font:600 12px/1 var(--font);}
.ai-gallery-duration{position:absolute;z-index:2;left:5px;bottom:5px;padding:3px 5px;background:rgba(23,23,23,.82);color:#fff;border-radius:4px;font:500 9px/1 var(--font);font-variant-numeric:tabular-nums;white-space:nowrap;}
.modal.over-ai-gallery{z-index:150;}
.case-video-poster{position:relative;display:block;width:100%;height:100%;padding:0;border:0;background:#171717;cursor:pointer;}
.case-video-poster img{display:block;width:100%;height:100%;object-fit:contain;}
.case-video-poster .case-video-play-icon{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:46px;height:46px;border-radius:50%;border:1px solid var(--gold);background:rgba(36,36,36,.85);color:var(--gold);font-size:17px;text-shadow:none;}
.case-video-poster:is(:hover,:focus-visible) .case-video-play-icon{background:#403a2d;}
.detail-page[data-project-id="wedding-ai"] .detail-archive{overflow-anchor:none;}
@media(min-width:850px) and (max-width:1199px){
  .ai-showcase{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;align-content:start;}
  .ai-showcase .ai-intro{grid-column:1/-1;max-width:none;}
}
@media(max-width:849px){
  .ai-showcase{grid-template-columns:1fr;align-content:start;gap:22px;}
  .ai-showcase-media{grid-column:auto;grid-template-columns:1fr;}
  .ai-gallery-preview{max-width:620px;}
}
@media(max-width:600px){.ai-gallery-preview .photo-gallery-preview-grid{gap:5px;}.ai-gallery-duration{font-size:8px;left:4px;bottom:4px;padding:3px 4px;}}

/* Translation retains the current viewport rather than anchoring a replaced card. */
body.language-updating {overflow-anchor:none;}
body.project-view #intro-replay {display:none!important;}


/* Keep the approved chip styling; only relocate its existing menu. */
.language-control .language-options {top:calc(100% + 8px);right:auto;left:50%;transform:translateX(-50%);}
#main:focus {outline:none;}

/* A single composited cover replaces expensive full-document snapshots. */
.pbt-cover-flight {position:fixed;left:0;top:0;z-index:56;margin:0;overflow:hidden;pointer-events:none;background:#353535;transform-origin:0 0;will-change:transform,opacity;isolation:isolate;contain:layout paint;}
.pbt-header-setting {overflow-anchor:none;}
.pbt-header-setting .site-header,.pbt-header-setting .site-header .brand img {transition:none!important;}

/* Phone only: the cover and text share one fixed-height opening row. */
@media(max-width:600px){
  .detail-layout{
    --phone-cover-width:clamp(100px,calc((100vw - 2 * var(--gutter) - 12px) * .375),163.125px);
    --phone-cover-height:calc(var(--phone-cover-width) * 16 / 9);
    grid-template-columns:var(--phone-cover-width) minmax(0,1fr);
    grid-template-rows:var(--phone-cover-height);
    grid-auto-rows:max-content;
    align-items:start;
    column-gap:12px;row-gap:16px;
  }
  .detail-topline{padding:2px 0 16px;}
  .detail-cover{height:var(--phone-cover-height);max-height:none;align-items:flex-start;}
  .detail-cover-stack{height:100%;max-height:none;}
  .detail-info{
    height:var(--phone-cover-height);max-height:var(--phone-cover-height);
    align-self:start;justify-content:flex-start;padding:0;margin:0;
    overflow-x:hidden;overflow-y:auto;scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .detail-info > *{flex-shrink:0;}
  .detail-page[data-project-id="wedding-ai"] .detail-info{justify-content:flex-start;}
  .detail-info::-webkit-scrollbar{display:none;width:0;height:0;}
  .detail-info:focus-visible{outline:1px solid var(--gold);outline-offset:4px;}
  .detail-mobile-gallery,.detail-archive{margin-top:0;}
}

/* Keep project copy exactly the size of its existing introductory summary. */
.detail-page{
  --pbt-project-copy-size:clamp(12px,1vw,15px);
}
@media(max-width:600px){.detail-page{--pbt-project-copy-size:11px;}}
@media(min-width:850px) and (max-height:760px){.detail-page{--pbt-project-copy-size:11px;}}
.detail-page .detail-summary,
.detail-page .detail-role-lead,
.detail-page .detail-role-block .detail-notes,
.detail-page .case-study-item p{
  font-size:var(--pbt-project-copy-size);
}
.detail-page .detail-role-lead{line-height:1.5;}
.detail-page .detail-role-block .detail-notes,
.detail-page .case-study-item p{line-height:1.6;}
/* Slightly larger phone navigation, with its existing row structure. */
@media(max-width:600px){
  .site-header .main-nav{width:100%;column-gap:clamp(4px,1.1vw,6px);}
  .site-header .nav-link,
  .site-header.is-compact .nav-link{font-size:clamp(9.5px,2.75vw,11.5px);}
  .site-header .nav-link:not(.is-current):not(:hover){color:#f5f5f5;}
  .site-header .language-trigger{font-size:clamp(10px,2.75vw,11.5px);height:26px;min-width:56px;padding-inline:9px;}
  .site-header.is-compact .language-trigger{height:25px;}
  .language-options button{font-size:clamp(10px,2.75vw,11.5px);}
  .gallery-photo-frame{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;}
  .gallery-photo-frame img{-webkit-user-drag:none;}
}
@media(min-width:361px) and (max-width:600px){
  .site-header .main-nav{justify-content:space-between;flex-wrap:nowrap;}
}

/* Phone annotations: home card text +2 px, project description text +1 px. */
@media(max-width:600px){
  .work-grid .work-category{font-size:11px;}
  .work-grid .work-name{font-size:24px;}
  .work-grid .work-desc{font-size:13px;}
  .detail-page{--pbt-project-copy-size:12px;}
}

/* v62 — Neutral project panels enclose each home cover and its description. */
.home .toolbar{top:0;}
.work-grid .work-card{
  padding:clamp(8px,.7vw,12px);
  border:1px solid #4b4b4b;
  border-radius:var(--radius);
  background:var(--panel);
  transition:background-color .18s ease,border-color .18s ease;
}
@media(hover:hover) and (pointer:fine){
  .work-grid .work-card:hover{background:#353535;border-color:#626262;}
  .home .ai-featured:hover{background:#353535;border-color:#626262;}
}
.work-grid .work-card:focus-visible{outline-color:var(--muted);}
.home .ai-featured{background:var(--panel);border-color:#4b4b4b;}
.home .ai-featured:focus-visible{border-color:#626262;outline-color:var(--muted);}

/* v65 — The panel material appears gently; covers keep their own motion. */
.work-grid .work-card,.home .ai-featured{
  animation:pbt-project-panel-in 480ms ease-out;
}
@keyframes pbt-project-panel-in{
  from{background-color:transparent;border-color:transparent;}
  to{background-color:var(--panel);border-color:#4b4b4b;}
}
@media(prefers-reduced-motion:reduce){
  .work-grid .work-card,.home .ai-featured{animation:none;}
}

/* Keep the AI introduction close to the filters, also in a tall viewport. */
.ai-showcase{align-content:start;align-items:start;padding-top:6px;}
.ai-intro h1{margin-top:0;}

/* v63 — Desktop panels follow their contents rather than stretching to fill
   the viewport. Keep the existing cover sizes and mobile/tablet composition. */
@media(min-width:1100px){
  .home .work-grid{
    --pbt-overview-cover-limit:calc((100dvh - 320px) * .28125);
    --pbt-overview-rows:2;
    --pbt-overview-row-gap:clamp(10px,1.4vh,17px);
    --pbt-overview-card-padding:clamp(8px,.7vw,12px);
    row-gap:var(--pbt-overview-row-gap);
    overflow-y:auto;
    grid-template-rows:none;
    grid-auto-rows:max-content;
    align-content:center;
    align-content:safe center;
  }
  .home .work-grid .work-card{
    height:auto;
    min-height:0;
    align-self:start;
    padding:var(--pbt-overview-card-padding);
  }
  .home .work-grid .work-card .cover{
    max-width:var(--pbt-overview-cover-limit);
  }
  .home .work-grid[data-count="5"]{
    --pbt-overview-rows:1;
    flex:1;
    height:auto;
    margin-block:0;
    grid-template-rows:none;
  }
}
@media(min-width:1100px) and (max-width:1299px){
  .home .work-grid{
    --pbt-overview-cover-limit:calc((100dvh - 320px) * .1875);
    --pbt-overview-rows:3;
    --pbt-overview-row-gap:8px;
  }
  .home .work-grid[data-count="5"]{
    --pbt-overview-cover-limit:calc((100dvh - 320px) * .28125);
    --pbt-overview-rows:2;
  }
}
/* v64 — Size the covers from the grid's actual available height, including
   every panel's padding/border and the gaps between its rows. */
@supports(height:1cqh){
  @media(min-width:1100px){
    .home .work-grid{container-type:size;}
    .home .work-grid .work-card .cover{
      max-width:max(36px,calc(((100cqh - (var(--pbt-overview-rows) - 1) * var(--pbt-overview-row-gap)) / var(--pbt-overview-rows) - 2 * var(--pbt-overview-card-padding) - 2px) * .5625));
    }
  }
}
/* Center the complete AI composition in the desktop content area. If its
   contents need scrolling, safe alignment keeps the beginning accessible. */
@media(min-width:1100px){
  .home .ai-showcase{
    align-content:center;
    align-content:safe center;
    align-items:center;
    padding-block:clamp(12px,2dvh,28px);
  }
}
