/* Entrada editorial de títulos e encerramento cinematográfico do contato. */
.to-handwrite{will-change:clip-path}
.contact-section{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  --contact-glow:0;
  --contact-line:0;
}
.contact-section::before{
  content:"";
  position:absolute;
  inset:-18% -14%;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(ellipse at 18% 38%,rgba(255,77,0,var(--contact-glow)),transparent 48%);
}
.contact-section::after{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:2px;
  background:#ff4d00;
  transform:scaleX(var(--contact-line));
  transform-origin:left center;
  pointer-events:none;
}
.contact-section .contact-grid,
.contact-section .footer{position:relative;z-index:1}
/* Contato final: limitar o título para manter distância do bloco de contatos. */
.contact-grid{grid-template-columns:minmax(0,1fr) 248px;gap:clamp(30px,3.6vw,48px)}
.contact-grid>div:first-child,.contact-aside{min-width:0}
.contact-grid h2{font-size:clamp(46px,4.7vw,68px);line-height:1.06;max-width:100%;overflow-wrap:normal;letter-spacing:-.025em}
.contact-aside{overflow-wrap:anywhere}
@media(max-width:1100px){
  .contact-grid{grid-template-columns:minmax(0,1fr) 220px;gap:28px}
  .contact-grid h2{font-size:clamp(42px,4.8vw,56px)}
}
@media(max-width:720px){
  .contact-section{padding-top:90px}
  .contact-grid{grid-template-columns:minmax(0,1fr);gap:34px;padding-bottom:44px}
  .contact-grid h2{font-size:clamp(30px,7.8vw,38px);line-height:1.08;margin:24px 0 18px;max-width:100%;letter-spacing:-.02em}
  .contact-aside{font-size:13px;gap:10px;max-width:100%}
  .contact-section .footer{padding:24px 0 110px;row-gap:18px}
}
/* Projeto em destaque: texto no alto e vídeo amplo abaixo. */
#projetos .project-panel-summit .project-panel-inner{width:min(var(--shell),1200px,calc((100dvh - 280px)*1.77778));padding-top:38px;padding-bottom:68px}
#projetos .project-panel-summit .section-kicker{margin-bottom:18px}
#projetos .project-panel-summit .projects-top{grid-template-columns:1fr 1fr;align-items:start;gap:32px;margin-bottom:16px}
#projetos .project-panel-summit .projects-top .display-heading{font-size:clamp(36px,3.5vw,54px);line-height:1.02;margin:0;letter-spacing:-.025em}
#projetos .project-panel-summit .projects-top .case-caption{justify-content:flex-start;gap:8px;padding:0;max-width:none}
#projetos .project-panel-summit .case-caption h3{font-size:clamp(24px,2vw,30px);line-height:1.08;margin:0}
#projetos .project-panel-summit .case-caption p{font-size:13px;line-height:1.45;margin:0;max-width:460px}
#projetos .project-panel-summit .case-caption>span,#projetos .project-panel-summit .case-caption strong{font-size:12px;line-height:1.2}
#projetos .project-panel-summit .case-featured{display:block;width:100%;margin:0}
#projetos .project-panel-summit .case-featured .case-image{width:100%;max-width:none;margin:0}
@media(min-width:900px) and (max-height:740px){
  #projetos .project-panel-summit .project-panel-inner{align-self:flex-start;height:100dvh;width:min(var(--shell),calc((100dvh - 225px)*1.77778));padding-top:24px;padding-bottom:56px}
  #projetos .project-panel-summit .section-kicker{margin-bottom:12px}
  #projetos .project-panel-summit .projects-top{gap:24px;margin-bottom:14px}
  #projetos .project-panel-summit .projects-top .display-heading{font-size:clamp(28px,4.6vh,36px)}
  #projetos .project-panel-summit .projects-top .case-caption{gap:6px}
  #projetos .project-panel-summit .case-caption h3{font-size:22px}
  #projetos .project-panel-summit .case-caption p{font-size:12px;line-height:1.4}
}
@media(max-width:899px){
  .is-gsap-active #projetos .project-panel-summit .project-panel-inner,#projetos .project-panel-summit .project-panel-inner{width:var(--shell);padding-top:60px;padding-bottom:80px}
  #projetos .project-panel-summit .projects-top{grid-template-columns:minmax(0,1fr);gap:12px}
  .is-gsap-active #projetos .project-panel-summit .projects-top .display-heading{font-size:clamp(30px,7.5vw,42px);line-height:1.05}
  #projetos .project-panel-summit .case-caption h3{font-size:25px}
  #projetos .project-panel-summit .case-caption p{font-size:12px}
  #projetos .project-panel-summit .case-featured .case-image{max-width:100%}
  .is-gsap-active #projetos .project-panel-summit .case-featured .case-image video{max-height:none}
}
/* Fullscreen explícito para o Connect, com enquadramento completo e botão de saída. */
.case-image .connect-fullscreen[hidden]{display:none!important}
.case-image .connect-fullscreen{
  position:absolute;top:12px;right:12px;z-index:4;display:inline-flex;align-items:center;gap:8px;
  min-height:40px;padding:8px 12px;border:1px solid rgba(244,244,242,.34);border-radius:999px;
  background:rgba(26,26,26,.82);color:var(--offwhite,#f4f4f2);backdrop-filter:blur(10px);
  font:600 11px/1.2 var(--font-ui,Inter,sans-serif);cursor:pointer;
}
.case-image .connect-fullscreen:hover{background:var(--orange,#ff4d00);color:var(--graphite,#1a1a1a)}
.case-image .connect-fullscreen svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.case-image:fullscreen,.case-image:-webkit-full-screen{
  display:grid;place-items:center;width:100vw;height:100vh;height:100dvh;max-width:none;aspect-ratio:auto;
  overflow:hidden;background:#080808;z-index:10001;
}
.case-image:fullscreen video,.case-image:-webkit-full-screen video{
  width:100%;height:100%;max-height:100dvh;aspect-ratio:auto;object-fit:contain;background:#080808;
}
#projetos .project-panel-summit .case-featured .case-image:fullscreen{width:100vw;max-width:none;margin:0}
#projetos .project-panel-summit .case-featured .case-image:fullscreen video{width:100%;height:100%;max-height:100dvh;aspect-ratio:auto;object-fit:contain}
#projetos .project-panel-summit .case-featured .case-image:-webkit-full-screen{width:100vw;max-width:none;margin:0}
#projetos .project-panel-summit .case-featured .case-image:-webkit-full-screen video{width:100%;height:100%;max-height:100dvh;aspect-ratio:auto;object-fit:contain}
.case-image:fullscreen .connect-fullscreen,.case-image:-webkit-full-screen .connect-fullscreen{top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right))}
.case-image.is-connect-fullscreen-fallback{
  position:relative;display:grid;place-items:center;width:100%;height:100%;max-width:none;aspect-ratio:auto;overflow:hidden;background:#080808;
}
.case-image.is-connect-fullscreen-fallback video{width:100%;height:100%;max-height:100dvh;aspect-ratio:auto;object-fit:contain;background:#080808}
.case-image.is-connect-fullscreen-fallback .connect-fullscreen{top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right))}
html.connect-fallback-active,html.connect-fallback-active body{overflow:hidden}
.to-media-dialog{position:fixed;inset:0;z-index:10001;margin:0;padding:0;border:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;background:#080808;color:#f4f4f2;overflow:hidden}
.to-media-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);place-items:stretch}
.to-media-dialog::backdrop{background:#080808}
.to-media-dialog .connect-fullscreen{z-index:20;min-height:44px;background:#1a1a1a;color:#fff;border:1px solid #fff}
.to-media-dialog .to-pdf-showcase.is-fullscreen-fallback{position:relative!important;inset:auto;width:100%;height:100%;max-height:none}
.to-media-dialog .to-pdf-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.to-media-dialog .to-pdf-showcase.is-fullscreen-fallback .to-pdf-stage canvas{width:100%!important;height:100%!important;min-width:0;min-height:0;object-fit:contain}
@media(max-width:720px){.case-image .connect-fullscreen{top:8px;right:8px;min-height:38px;padding:7px 10px;font-size:10px}}
@media(prefers-reduced-motion:reduce){
  .to-handwrite{clip-path:none!important;will-change:auto}
  .contact-section{--contact-glow:.14;--contact-line:1}
}
