/* ═══════════════════════════════════════════════
   TBO — Common Styles
   Shared across all pages
   ═══════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Screen-reader only ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Inline button styled as link ─── */
.link-inline {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: var(--orange); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  display: inline;
}
.link-inline:hover { color: var(--orange-hover); }

/* ─── CSS Variables ─── */
:root {
  /* Accent — refined burnt sienna (was #e85102) */
  --orange: #C45A1A;
  --orange-muted: #9e835f;          /* secondary bronze for hover states */
  --orange-glow: rgba(196, 90, 26, 0.10);
  --orange-dim: rgba(196, 90, 26, 0.05);
  --orange-hover: #aa4d17;
  --orange-light: #d97a45;
  --orange-dark: #9e3e0f;

  /* NOTE: --white/--dark use inverted semantic naming for theme compatibility:
     --white = primary foreground text  (#0f0f0f light / #eaeaea dark)
     --dark  = primary background color (#eaeaea light / #0f0f0f dark) */
  --white: #0f0f0f;
  --off: #202020;
  --dark: #eaeaea;
  --mid: #dfdfdf;
  --surface: #e2e2e2;
  --muted: #606060;
  --border: rgba(15,15,15,0.08);
  --text-ghost: rgba(15,15,15,0.10);
  --card-overlay-start: rgba(234,234,234,0.9);
  --card-overlay-mid: rgba(234,234,234,0.35);
  --nav-bg: rgba(234,234,234,0.9);
  --nav-bg-solid: rgba(234,234,234,0.97);
  --radius: 0;
  --radius-sm: 0;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.6s;
  --font-heading: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;
  --font-body: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;
  --card-overlay: rgba(0,0,0,0.4);
  --card-overlay-strong: rgba(0,0,0,0.65);

  /* Spacing — 8px grid system */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  96px;
  --space-2xl: 160px;

  /* Type scale — fluid clamp() */
  --text-xs:  14px;
  --text-sm:  17px;
  --text-md:  21px;
  --text-lg:  clamp(20px, 2.25vw, 26px);
  --text-xl:  clamp(24px, 2.75vw, 33px);
  --text-2xl: clamp(28px, 3.5vw,  41px);
  --text-3xl: clamp(32px, 4vw,    51px);
  --text-4xl: clamp(40px, 5vw,    64px);

  /* Letter-spacing */
  --ls-label: 0.1em;
  --ls-wide:  0.22em;

  /* Line-height */
  --lh-heading: 1.15;
  --lh-body:    1.6;
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
  --white: #eaeaea;
  --off: #d0d0d0;
  --dark: #0f0f0f;
  --mid: #1a1a1a;
  --surface: #161616;
  --muted: #9f9f9f;
  --border: rgba(234,234,234,0.08);
  --text-ghost: rgba(234,234,234,0.08);
  --card-overlay-start: rgba(15,15,15,0.9);
  --card-overlay-mid: rgba(15,15,15,0.35);
  --nav-bg: rgba(15,15,15,0.9);
  --nav-bg-solid: rgba(15,15,15,0.97);
  --card-overlay: rgba(0,0,0,0.6);
  --card-overlay-strong: rgba(0,0,0,0.78);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* #82: font-size-adjust prevents CLS from font swap */
  font-size-adjust: 0.5;
}

/* ─── #82: CLS Prevention — explicit dimensions ─── */
img {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
}
img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}
video {
  aspect-ratio: 16 / 9;
}

/* Min-height for dynamic content containers to prevent CLS */
.hero { min-height: 100vh; }
.manifesto { min-height: 300px; }
.page-hero { min-height: 60vh; }
section { min-height: 100px; }

/* ─── CWV: content-visibility for below-fold sections ─── */
section:not(:first-of-type),
footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* ─── Smooth theme transition (scoped to avoid paint thrashing on body *) ─── */
body,
.page-hero, .section, .card, .project-card,
h1, h2, h3, h4, h5, h6, p, a, span,
input, textarea, button, select {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, fill 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-style: normal;
}
em, i { font-style: normal; }
strong, b { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Theme Toggle ─── */
.theme-toggle-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  background: transparent;
  border-top: none; border-right: none; border-bottom: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.theme-toggle-nav svg {
  width: 16px; height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s;
}
.theme-toggle-nav:hover svg { stroke: var(--orange); }
.theme-toggle-nav .icon-sun { display: block; }
.theme-toggle-nav .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle-nav .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle-nav .icon-moon { display: block; }

/* ─── Smooth theme transition ─── */
body, nav, .nav-submenu, footer, .theme-toggle-nav {
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}

/* ─── Dark theme nav overrides ─── */
[data-theme="dark"] .footer-col ul a {
  color: rgba(234,234,234,0.3);
}
[data-theme="dark"] nav {
  background: transparent;
}
[data-theme="dark"] .nav-submenu {
  background: var(--nav-bg-solid);
}
[data-theme="dark"] .footer-logo {
  content: url('../assets/logo-light.svg');
}

/* ═══════════════════════════════════════════════
   NAV — Standardized across all pages
   ═══════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 80px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav-logo { text-decoration: none; display: flex; align-items: center; height: 28px; flex-shrink: 0; }
.nav-logo img { height: 100%; width: auto; }
.nav-logo .logo-light { display: none; }
.nav-logo .logo-dark { display: block; }
[data-theme="dark"] .nav-logo .logo-light { display: block; }
[data-theme="dark"] .nav-logo .logo-dark { display: none; }

.nav-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}
.nav-links a {
  display: flex; align-items: center;
  height: 100%;
  padding: 0 28px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.25s, color 0.25s;
  white-space: nowrap;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 28px; right: 28px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(0); }
.nav-links a.active { opacity: 1; color: var(--orange); }
.nav-links a.active::after { transform: scaleX(0); }

/* Nav dropdown */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.nav-dropdown-trigger {
  display: flex; align-items: center;
  height: 100%;
  padding: 0 28px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.25s;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}
.nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  bottom: 0; left: 28px; right: 28px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-dropdown:hover .nav-dropdown-trigger { opacity: 1; }
.nav-dropdown:hover .nav-dropdown-trigger::after { transform: scaleX(1); transform-origin: left; }
.nav-dropdown-trigger.active { opacity: 1; color: var(--orange); }
.nav-dropdown-trigger.active::after { transform: scaleX(1); }
.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--nav-bg-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s var(--ease);
  z-index: 200;
}
.nav-dropdown:hover .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-submenu a {
  display: block;
  padding: 10px 24px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  text-transform: none;
  opacity: 0.6;
  transition: all 0.2s;
  height: auto;
}
.nav-submenu a::after { display: none; }
.nav-submenu a:hover {
  opacity: 1;
  color: var(--orange);
  padding-left: 28px;
}


/* ─── Lang Toggle ─── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  height: 50%;
  margin-left: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.lang-btn:hover { opacity: 0.75; }
.lang-btn.active { opacity: 1; }
.lang-sep {
  color: var(--border);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  opacity: 0.4;
}

/* Nav hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
  z-index: 101;
}
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--white); transition: all 0.3s var(--ease); }
/* Hamburger → X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Nav responsive */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  .nav-links a { padding: 0 16px; font-size: 10px; }
  .nav-dropdown-trigger { padding: 0 16px; }
}

@media (max-width: 768px) {
  nav { height: 56px; padding: 0 16px; }
  .nav-hamburger { display: flex; }
  .nav-wrapper { display: none; }
  .nav-wrapper.open {
    display: flex; flex-direction: column;
    position: fixed; top: 56px; left: 0; right: 0;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    background: var(--dark);
    padding: 24px 20px;
    overflow-y: auto;
    z-index: 99;
    -webkit-overflow-scrolling: touch;
  }
  .nav-wrapper.open .nav-links {
    display: flex; flex-direction: column;
    height: auto; width: 100%;
  }
  .nav-wrapper.open .nav-links a {
    padding: 14px 0; height: auto;
    font-size: 13px;
    min-height: 44px;
    opacity: 0.7;
    color: var(--white);
  }
  .nav-wrapper.open .nav-links a:hover,
  .nav-wrapper.open .nav-links a.active { opacity: 1; }
  .nav-wrapper.open .nav-links a::after { display: none; }
  .nav-wrapper.open .nav-dropdown { flex-direction: column; height: auto; align-items: flex-start; }
  .nav-wrapper.open .nav-dropdown-trigger {
    padding: 14px 0; height: auto; font-size: 13px;
    min-height: 44px;
    opacity: 0.7;
    color: var(--white);
  }
  .nav-wrapper.open .nav-dropdown-trigger::after { display: none; }
  .nav-wrapper.open .nav-submenu {
    position: static; opacity: 1; visibility: visible;
    transform: none; border: none; box-shadow: none;
    background: transparent; padding: 0 0 0 16px;
    min-width: auto;
  }
  .nav-wrapper.open .nav-submenu a {
    padding: 10px 0; font-size: 12px;
    min-height: 44px;
    display: flex; align-items: center;
  }
  .nav-wrapper.open .nav-submenu a:hover { padding-left: 4px; }
  .nav-wrapper.open .lang-toggle {
    border-left: none; margin-left: 0; padding-left: 0;
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border);
    height: auto;
  }
  .nav-wrapper.open .lang-btn {
    height: auto; padding: 8px 10px; font-size: 12px;
  }
}

/* ─── Images — no border-radius on portfolio/project images ─── */
.gallery-item img,
.project-card-bg img,
.portfolio img,
.project-hero img,
.next-card img {
  border-radius: 0 !important;
}

/* ─── Card & hero overlay (uses --card-overlay variable, stronger in dark mode) ─── */
.project-hero-overlay {
  background: linear-gradient(to top, var(--card-overlay) 0%, transparent 50%) !important;
}

/* ─── Fade-in Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: transform, opacity;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
/* 3 stagger tiers — deeper classes flatten to tier 3 */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3,
.stagger-4,
.stagger-5,
.stagger-6 { transition-delay: 0.15s; }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3,
.fade-in-delay-4 { transition-delay: 0.3s; }

/* ─── Scroll Progress Indicator ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--orange);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── CTA Button Micro-interactions ─── */
.cta-btn,
.submit-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
}

.cta-btn:hover,
.submit-btn:hover {
  transform: translateY(-2px);
}

.cta-btn:active,
.submit-btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

/* ─── Back to Top Button com progresso circular ─── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), visibility 0.35s, transform 0.35s var(--ease);
  padding: 0;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top:active { transform: translateY(0) scale(0.95); }

/* Circular progress ring */
.btt-ring {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}
.btt-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}
.btt-ring-fill {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: square;
  transition: stroke-dashoffset 0.1s linear;
}

/* Arrow icon */
.btt-arrow {
  position: relative;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s;
}
.back-to-top:hover .btt-arrow { stroke: var(--orange); }

/* ─── Lightbox ─── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.4s var(--ease);
}
.lightbox-overlay.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.gallery-item { cursor: zoom-in; }

/* ─── Counter Animation ─── */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ─── Editorial Image Captions ─── */
figcaption,
.img-caption {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.4;
}
/* Overlay caption positioned at bottom-right of image container */
.img-caption-overlay {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(234, 234, 234, 0.5);
  pointer-events: none;
  line-height: 1.4;
}

/* ─── BIA Widget Overrides ─── */
#bia-t {
  width: 44px !important;
  height: 44px !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: bia-float-in 0.6s 1s var(--ease) both !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#bia-t:hover {
  transform: translateY(-2px) !important;
  box-shadow: none !important;
}
#bia-t img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}
#bia-t::after {
  display: none;
}
#bia-t.open {
  padding: 0 !important;
  width: 44px !important;
  height: 44px !important;
}
#bia-bd {
  display: none !important;
}
@keyframes bia-float-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Touch Targets — 44px mínimo em mobile (apenas elementos interativos isolados) ─── */
@media (max-width: 768px) {
  button, [role="button"], input, select, textarea,
  .lang-btn, .mobile-toggle, .gallery-item,
  .next-card, .portfolio-card, .service-card,
  .lightbox-nav, .lightbox-close,
  .back-to-top, .theme-toggle-nav, .cta-btn, .submit-btn {
    min-height: 44px;
  }

  /* Lightbox nav: já são grandes por padrão, garantir mínimo */
  .lightbox-nav, .lightbox-close {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ─── Share Bar — Compartilhamento Social ─── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.share-bar-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
  white-space: nowrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.share-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}
.share-btn svg {
  width: 15px; height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .share-bar { flex-wrap: wrap; gap: 8px; }
  .share-btn span { display: none; }
  .share-btn { padding: 10px 14px; }
}

/* ─── Pull-to-Refresh ─── */
.ptr-indicator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease), opacity 0.3s;
  z-index: 9999;
  opacity: 0;
}
.ptr-indicator.ptr-pulling {
  opacity: 1;
  transition: none;
}
.ptr-indicator.ptr-refreshing {
  opacity: 1;
  transform: scaleX(1);
  transition: transform 0.4s var(--ease);
}
.ptr-spinner {
  position: fixed;
  top: 72px; left: 50%;
  transform: translateX(-50%) translateY(-60px);
  width: 36px; height: 36px;
  border-radius: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  opacity: 0;
  z-index: 9999;
}
.ptr-spinner.ptr-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}
.ptr-spinner svg {
  width: 18px; height: 18px;
  stroke: var(--orange);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}
.ptr-spinner.ptr-spin svg {
  animation: ptr-rotate 0.8s linear infinite;
}
@keyframes ptr-rotate {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   PAGE HERO — FoundFormed style
   Used by: portfolio, sobre, serviços, blog, contato
   NOT index.html (home) or sub-pages
   ═══════════════════════════════════════════════ */
.page-hero {
  position: sticky;
  top: 0;
  height: 70vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 56px 48px;
  background: var(--dark);
  z-index: 1;
}

.page-hero + * {
  position: relative;
  z-index: 2;
  background: var(--dark);
  border-radius: 0;
}

.page-hero ~ section,
.page-hero ~ footer {
  position: relative;
  z-index: 2;
  background: var(--dark);
}

/* .page-hero::before decorative glow removed — Phase 7 */

.page-hero-bg {
  position: absolute;
  top: -20%;
  left: 0;
  right: 0;
  bottom: -20%;
  will-change: transform;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.52) 100%);
  z-index: 1;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.page-hero-eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(-350px);
  transition: opacity 1.6s cubic-bezier(0.19, 0, 0, 1),
              transform 1.6s cubic-bezier(0.19, 0, 0, 1);
}

.page-hero-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(36px, 6vw, 90px);
  font-weight: 100;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  display: block;
}

/* Offset: 3rd title line pushed right like FoundFormed */
.page-hero-title:nth-child(3) {
  padding-left: 30%;
}

.page-hero-title-inner {
  display: block;
  opacity: 0;
  transform: translateX(-350px);
  transition: opacity 1.6s cubic-bezier(0.19, 0, 0, 1),
              transform 1.6s cubic-bezier(0.19, 0, 0, 1);
}

.page-hero-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 40px;
  gap: 48px;
}

.page-hero-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  opacity: 0;
  transform: translateX(-350px);
  transition: opacity 1.6s cubic-bezier(0.19, 0, 0, 1),
              transform 1.6s cubic-bezier(0.19, 0, 0, 1);
  flex-shrink: 0;
}

.page-hero-scroll-line {
  display: block;
  width: 48px;
  height: 1px;
  background: rgba(255,255,255,0.2);
}

.page-hero-desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 280px;
  opacity: 0;
  transform: translateX(-350px);
  transition: opacity 1.6s cubic-bezier(0.19, 0, 0, 1),
              transform 1.6s cubic-bezier(0.19, 0, 0, 1);
  text-align: right;
  flex-shrink: 0;
}

/* Animated state — triggered by JS on next frame */
.page-hero.is-ready .page-hero-eyebrow {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0s;
}

/* Single title line */
.page-hero.is-ready .page-hero-title-inner {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

/* Multi-line stagger: each .page-hero-title gets its own delay */
.page-hero.is-ready .page-hero-title:nth-child(1) .page-hero-title-inner { transition-delay: 0.1s; }
.page-hero.is-ready .page-hero-title:nth-child(2) .page-hero-title-inner { transition-delay: 0.35s; }
.page-hero.is-ready .page-hero-title:nth-child(3) .page-hero-title-inner { transition-delay: 0.6s; }
.page-hero.is-ready .page-hero-title:nth-child(4) .page-hero-title-inner { transition-delay: 0.85s; }

.page-hero.is-ready .page-hero-desc {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.9s;
}
.page-hero.is-ready .page-hero-scroll {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 1.1s;
}

@media (max-width: 1024px) {
  .page-hero { padding: 0 40px 64px; }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 0 24px 40px;
    min-height: 420px;
    height: 60vh;
  }
  .page-hero-title { font-size: clamp(28px, 9vw, 56px); }
  .page-hero-title:nth-child(3) { padding-left: 10%; }
  .page-hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 20px;
  }
  .page-hero-desc {
    text-align: left;
    max-width: 100%;
    font-size: 12px;
  }
  .page-hero-scroll { display: none; }
}
@media (max-width: 480px) {
  .page-hero {
    padding: 0 16px 32px;
    min-height: 360px;
    height: 55vh;
  }
  .page-hero-title { font-size: clamp(24px, 8vw, 40px); }
  .page-hero-title:nth-child(3) { padding-left: 5%; }
  .page-hero-eyebrow { font-size: 8px; margin-bottom: 12px; }
}

/* ─── Leia Também — Blog internal linking section ─── */
.leia-tambem {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 48px 0;
  border-top: 1px solid var(--border);
}
.leia-tambem-titulo {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.leia-tambem-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.leia-tambem-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--white);
  transition: color 0.25s;
}
.leia-tambem-item:last-child { border-bottom: none; }
.leia-tambem-item:hover { color: var(--orange); }
.leia-tambem-cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
}
.leia-tambem-link-titulo {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  color: inherit;
}
@media (max-width: 768px) {
  .leia-tambem { padding: 40px 20px 0; }
}

/* ─── Security / Utility ─── */
/* Replaces inline style="display:none;visibility:hidden" on GTM noscript iframe */
.gtm-hidden { display: none !important; visibility: hidden; }
/* Replaces inline style="vertical-align:middle;margin-right:4px" on flag images */
.flag-img { vertical-align: middle; margin-right: 4px; }
/* Replaces inline style="display:flex;align-items:center;gap:20px" on footer bottom right */
.footer-bottom-right { display: flex; align-items: center; gap: 20px; }

/* ═══════════════════════════════════════════════
   FOOTER — Standardized component styles
   ═══════════════════════════════════════════════ */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 64px 48px 40px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-logo {
  height: 32px; width: auto; display: block; margin-bottom: 20px;
}
.footer-tagline {
  font-size: 13px; font-weight: 400;
  color: var(--muted); line-height: 1.8;
  max-width: 280px;
}
.footer-brand-social {
  display: flex; gap: 16px; margin-top: 20px;
}
.footer-brand-social a {
  color: var(--muted); transition: color 0.25s;
}
.footer-brand-social a:hover { color: var(--white); }
.footer-col h4 {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.footer-col ul a {
  font-size: 13px; font-weight: 400;
  color: rgba(15,15,15,0.4); text-decoration: none;
  transition: color 0.25s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy {
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.1em; color: var(--muted);
}
.footer-legal {
  display: flex; gap: 8px; margin-top: 8px;
}
.footer-legal a {
  font-size: 10px; color: var(--muted); text-decoration: none;
  transition: color 0.25s;
}
.footer-legal a:hover { color: var(--white); }
.footer-legal .sep { color: var(--muted); font-size: 10px; }
.footer-security {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--muted); letter-spacing: 0.05em;
}
.footer-security svg {
  width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.5;
}
@media (max-width: 1024px) {
  footer { padding: 60px 32px 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  footer { padding: 48px 20px 32px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .footer-bottom-right { justify-content: center; }
}
@media (max-width: 480px) {
  footer { padding: 40px 16px 24px; }
}
/* Replaces inline style="margin-bottom:24px" on spaced section labels */
.mb-md { margin-bottom: 24px; }
/* Honeypot anti-spam field — hidden from humans, visible to bots */
.honeypot-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; pointer-events: none; }
/* Form inline validation error states */
.form-field-error { border-color: #c0392b !important; }
.form-error-msg { color: #c0392b; font-size: 0.75rem; margin-top: 4px; display: none; }
.form-error-msg.visible { display: block; }

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ─── CONTACT SECTION (padrão index — substitui .cta-section) ─── */
.contact-section {
  padding: 64px 48px;
  background: var(--dark);
  position: relative;
}
.contact-section::before {
  content: '';
  position: absolute;
  top: 0; left: 48px; right: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 80px, transparent 80px);
}
.contact-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px; align-items: start;
}
.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 100;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  margin-bottom: 32px;
  text-transform: uppercase;
}
.contact-quote {
  font-size: 14px; font-weight: 400;
  line-height: 1.8; color: var(--muted);
  max-width: 320px; margin-bottom: 32px;
}
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-info-label {
  display: block;
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.contact-info a {
  font-size: 13px; color: var(--white);
  text-decoration: none; transition: color 0.25s;
}
.contact-info a:hover { color: var(--orange); }
.contact-form { display: flex; flex-direction: column; gap: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.form-group { position: relative; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 20px 0;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 400;
  color: var(--white);
  background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  outline: none; transition: border-color 0.3s;
  letter-spacing: 0.02em;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.1em;
}
.form-group select {
  appearance: none; cursor: pointer;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.1em;
}
.form-group select option {
  background: var(--dark); color: var(--white);
  text-transform: none; font-size: 13px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--white); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row .form-group:first-child input,
.form-row .form-group:first-child select { padding-right: 24px; }
.contact-submit {
  margin-top: 32px; align-self: flex-start;
  padding: 14px 40px;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--white);
  background: var(--dark);
  border: 1px solid var(--white);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.contact-submit:hover { background: var(--white); color: var(--dark); }
.contact-submit:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 1024px) {
  .contact-section { padding: 64px 24px; }
  .contact-section::before { left: 24px; right: 24px; }
}
@media (max-width: 768px) {
  .contact-section { padding: 48px 20px; }
  .contact-section::before { left: 20px; right: 20px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-title { font-size: clamp(28px, 7vw, 48px); }
}
@media (max-width: 480px) {
  .contact-section { padding: 40px 16px; }
  .contact-section::before { left: 16px; right: 16px; }
  .contact-inner { gap: 32px; }
  .contact-title { margin-bottom: 20px; }
  .contact-quote { font-size: 13px; margin-bottom: 24px; }
  .contact-submit { width: 100%; text-align: center; justify-content: center; }
}

/* ─── CONTACT INLINE SECTION (substitui .cta-section) ─── */
.contact-inline-section {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.contact-inline-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-inline-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 40px;
  margin-top: 32px;
}
.contact-inline-title .accent { color: var(--orange); }
.contact-inline-info {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-inline-link {
  font-size: 14px; color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.contact-inline-link:hover { color: var(--orange); }
.contact-inline-city {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.2);
  margin-top: 4px;
}
.contact-inline-form {
  display: flex; flex-direction: column; gap: 20px;
}
.contact-inline-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.contact-inline-form .form-group {
  display: flex; flex-direction: column; gap: 8px;
}
.contact-inline-form label {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.contact-inline-form input,
.contact-inline-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 16px;
  font-size: 13px; font-family: var(--font-body);
  outline: none;
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
  width: 100%;
  box-sizing: border-box;
}
.contact-inline-form input:focus,
.contact-inline-form textarea:focus { border-color: rgba(232,81,2,0.5); }
.contact-inline-form input::placeholder,
.contact-inline-form textarea::placeholder { color: rgba(255,255,255,0.2); }
.contact-inline-form textarea { resize: vertical; min-height: 110px; }
.contact-inline-submit {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--orange); color: var(--dark);
  border: none; padding: 15px 36px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.25s;
  align-self: flex-start;
  font-family: var(--font-body);
}
.contact-inline-submit:hover { opacity: 0.85; }
.contact-inline-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.contact-inline-submit svg { width: 16px; height: 16px; flex-shrink: 0; }
.contact-inline-success {
  font-size: 13px; color: #25D366;
  margin: 0; padding: 0;
}
@media (max-width: 1024px) {
  .contact-inline-inner { gap: 48px; }
}
@media (max-width: 768px) {
  .contact-inline-section { padding: 80px 0; }
  .contact-inline-inner { grid-template-columns: 1fr; gap: 40px; padding: 0 24px; }
  .contact-inline-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .contact-inline-section { padding: 60px 0; }
  .contact-inline-inner { padding: 0 16px; gap: 32px; }
  .contact-inline-title { font-size: clamp(24px, 7vw, 36px); margin-bottom: 24px; margin-top: 0; }
  .contact-inline-submit { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════
   MOBILE GLOBAL FIXES
   ═══════════════════════════════════════════════ */

/* Prevent horizontal overflow on mobile */
body { overflow-x: clip; }

/* WhatsApp + back-to-top: stack vertically on mobile */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .whatsapp-float svg { width: 26px; height: 26px; }
  .back-to-top {
    bottom: 72px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .btt-ring { width: 40px; height: 40px; }
  .btt-arrow { width: 14px; height: 14px; }

  /* Leia também */
  .leia-tambem { padding: 32px 16px 0; }
  .leia-tambem-link-titulo { font-size: 15px; }

  /* Share bar */
  .share-bar { margin-top: 32px; padding-top: 24px; }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 12px;
    right: 12px;
  }
  .back-to-top {
    bottom: 68px;
    right: 12px;
  }
}
