.top-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
html.header-detached .site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding-block: 6px;
  border-bottom: 1px solid rgb(255 245 247 / .22);
  background: linear-gradient(180deg, rgb(255 255 255 / .1), transparent 65%), linear-gradient(105deg, rgb(92 43 53 / .64), rgb(75 24 31 / .48) 55%, rgb(75 24 31 / .58));
  box-shadow: inset 0 1px rgb(255 255 255 / .16), 0 10px 26px rgb(36 10 16 / .13);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  backdrop-filter: blur(22px) saturate(1.45);
  transform: translateY(calc(-100% - 8px));
  transition: transform 360ms cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
html.header-detached.header-visible .site-header { transform: translateY(0); pointer-events: auto; }
html.header-detached :is(#solucao,#projetos,#sobre,#processo,#faq,#contato,#instagram) { scroll-margin-top: 72px; }
html.header-detached .site-header .brand { font-size: 1.75rem; }
html.header-detached .site-header .main-nav a { min-height: 36px; }
html.header-detached .site-header .main-nav a[aria-current="location"] { padding-inline: 10px; border: 1px solid rgb(255 255 255 / .12); border-radius: 6px; background: rgb(255 255 255 / .09); box-shadow: none; }
@media (max-width: 760px) {
  html.header-detached .site-header { padding-block: 6px; -webkit-backdrop-filter:blur(10px) saturate(1.12); backdrop-filter:blur(10px) saturate(1.12); }
  html.header-detached .site-header .main-nav a { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { html.header-detached .site-header { transition: none; } }
html[data-motion="reduced"].header-detached .site-header { transition: none; }

/* Mobile reading rhythm and touch ergonomics; desktop keeps its composition. */
@media (max-width:760px) {
  :root { --sheet-inset:clamp(16px,4.6vw,22px); }

  .site-header { padding-inline:max(var(--gutter),env(safe-area-inset-left)); }
  .menu-enabled .site-header .main-nav.is-open { padding:10px 18px; max-height:calc(100svh - 92px - env(safe-area-inset-bottom)); }
  .site-header .main-nav a[aria-current="location"] { box-shadow:none; padding-inline:10px; }
  .story-intro .hero-description,
  .story-animated .hero-description { font-size:clamp(12px,3.25vw,14px); line-height:1.55; }
  .story-intro .hero-actions .button { font-size:clamp(11px,3vw,13px); padding-inline:14px; gap:10px; }

  #solucao { gap:28px; padding-top:36px; padding-bottom:32px; }
  #solucao .services-heading { margin-bottom:0; }
  #solucao .services-heading .chapter-label { margin-bottom:14px; }
  #solucao .services-heading > p:last-of-type { margin-top:18px; line-height:1.7; }
  #solucao .service-list { gap:20px; }
  #solucao .service-row { display:flex; flex-direction:column; }
  #solucao .service-body { padding:clamp(18px,5vw,24px); }
  #solucao .service-body h3 { margin-bottom:14px; }
  #solucao .service-description { line-height:1.7; }
  #solucao .service-scope { min-height:0; margin-block:16px; line-height:1.65; }
  #solucao .service-cta { min-height:52px; padding-top:12px; gap:12px; }
  #solucao .service-image,
  #solucao .service-image > img:not(.peek-media) { height:auto; }

  #projetos .orbit-controls { padding-inline:20px; }
  #projetos .orbit-caption { max-width:100%; }
  #projetos .orbit-title { max-width:100%; text-wrap:balance; overflow-wrap:break-word; }

  #sobre { padding:48px calc(var(--sheet-edge) + var(--sheet-inset)); row-gap:28px; }
  #sobre .about-copy > p:not(.chapter-label) { line-height:1.75; margin-top:20px; }
  #sobre .about-visual { width:min(100%,310px); }
  #sobre .personal-notes { padding-top:28px; gap:20px; }
  #sobre .note-card .post-caption { font-size:.75rem; line-height:1.5; }
  #sobre .notes-profile { min-height:48px; margin-top:8px; }

  #processo .process-list { margin-top:28px; gap:12px; }
  #processo li.process-step { padding:22px 18px; grid-template-columns:30px minmax(0,1fr); column-gap:12px; }
  #processo .step-number { font-size:2rem; }
  #processo li p { line-height:1.7; }
  #faq .faq-list summary { gap:12px; padding:18px 8px; line-height:1.5; }
  #faq .faq-answer { padding:0 10px 22px; }
  #faq .faq-answer p { line-height:1.7; }
  #faq .faq-answer .inline-link { min-height:48px; }

  #contato .contact-copy { padding:26px clamp(18px,5vw,26px) 30px; }
  #contato .contact-description { line-height:1.7; }
  #contato .contact-invitation { width:100%; padding-top:24px; }
  #contato .contact-invitation .button { width:100%; min-height:52px; gap:12px; padding-inline:16px; font-size:.8125rem; }
  #contato .contact-email { min-height:48px; margin-top:18px; }
  .context-cta { min-height:52px; }
  .site-footer { padding-bottom:max(24px,env(safe-area-inset-bottom)); }
  .site-footer .footer-social a,.site-footer .footer-bottom a { min-height:48px; }

  .project-case .case-picker select { font-size:16px; }
  .project-case .case-description,.project-case .case-project-text p { font-size:.9375rem; line-height:1.7; }
  .project-case .case-inquiry,.project-case .case-end-contact { min-height:48px; }
  .case-lightbox .case-zoom-tools button,.case-lightbox .case-zoom-close { min-height:44px; }
}

@media (max-width:600px) {
  #sobre .notes-track { grid-auto-columns:min(74vw,296px); gap:14px; scroll-padding-inline:2px; }
}
@media (max-width:420px) {
  #sobre .about-copy > .context-cta,
  #processo .process-action > .context-cta { width:100%; }
  .project-case .case-close span { display:none; }
  .project-case .case-close { width:44px; padding-inline:10px; }
}
