/* ═══════════════════════════════════════════════════════════
   PPE — Planeamento e Projectos de Engenharia
   Design: Clean Architectural — crisp white + crimson + steel
   ═══════════════════════════════════════════════════════════ */

/* ── Image Protection ────────────────────────────────────────── */
img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Palette — extracted from PPE logo */
  --red:         #C02929;
  --red-light:   #D94040;
  --red-pale:    #F9ECEC;
  --gray-900:    #1C2128;
  --gray-700:    #3A4553;
  --gray-600:    #5B6B7A;
  --gray-500:    #7A8C9A;
  --gray-300:    #C4CBD2;
  --gray-100:    #F2F4F5;
  --gray-50:     #F8FAFB;
  --white:       #FFFFFF;

  /* Semantic */
  --bg:          var(--white);
  --bg-alt:      var(--gray-50);
  --text:        var(--gray-700);
  --text-muted:  var(--gray-500);
  --border:      var(--gray-300);
  --accent:      var(--red);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Barlow', 'Barlow Condensed', system-ui, sans-serif;
  --font-label:   'Barlow Condensed', 'Barlow', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(5rem, 10vw, 8rem);
  --wrap:        1140px;
  --wrap-pad:    clamp(1.25rem, 5vw, 3rem);

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  /* Navbar height */
  --nav-h: 72px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
textarea { resize: vertical; }

/* ── Utility ────────────────────────────────────────────────── */
.section-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}
.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(calc(2.2rem * var(--fs-title, 1)), 5vw, calc(3.4rem * var(--fs-title, 1)));
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section-subtitle {
  max-width: 520px;
  margin: 1rem auto 0;
  color: var(--text-muted);
  font-size: calc(1.05rem * var(--fs-body, 1));
  line-height: 1.7;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 3px;
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.25s var(--ease-out);
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(192, 41, 41, 0.25);
}
.btn-primary:hover {
  background: var(--red-light);
  box-shadow: 0 8px 32px rgba(192, 41, 41, 0.38);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}
.btn-submit {
  position: relative;
  overflow: hidden;
}
.btn-spinner {
  display: none;
  animation: spin 0.8s linear infinite;
}
.btn-submit.loading .btn-label,
.btn-submit.loading .btn-arrow { opacity: 0; }
.btn-submit.loading .btn-spinner { display: block; position: absolute; }

/* ── Scroll-reveal animation ────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  animation: revealUp 0.8s var(--ease-out) forwards;
  animation-delay: var(--delay, 0ms);
}
[data-reveal] {
  opacity: 0;
  transform: translateY(32px) translateZ(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--card-delay, 0ms);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
  will-change: auto;
}

/* ── Navigation ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  transform: translateZ(0);
  will-change: background, box-shadow;
  contain: layout style;
}
#navbar.scrolled {
  /* Gradient masks the mosaic strip; pill handles its own frosted glass */
  background: linear-gradient(to bottom, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ── Dynamic Island — floating pill ─────────────── */
.nav-island {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 100px;
  position: relative;
  transition: gap 0.45s cubic-bezier(0.4,0,0.2,1),
              padding 0.45s cubic-bezier(0.4,0,0.2,1),
              background 0.4s ease,
              box-shadow 0.4s ease,
              opacity 0.35s ease,
              border-color 0.4s ease,
              backdrop-filter 0.35s ease,
              -webkit-backdrop-filter 0.35s ease,
              transform 0.35s cubic-bezier(0.4,0,0.2,1);
  cursor: default;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  border: 1px solid transparent;
}
/* When scrolled: Liquid Glass pill */
#navbar.scrolled .nav-island {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);

  /* ── Liquid Glass ─────────────────────────────────────────── */
  background:
    /* Top specular — sharp bright rim at very top */
    linear-gradient(to bottom,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.0)  30%),
    /* Bottom caustic — refracted light glow */
    radial-gradient(ellipse 70% 50% at 50% 105%,
      rgba(255,255,255,0.25) 0%,
      rgba(255,255,255,0.0)  60%),
    /* Base: nearly invisible */
    rgba(255,255,255,0.02);

  /* Minimal blur = maximum transparency; contrast boost = glass "amplifier" */
  backdrop-filter: blur(2px) brightness(0.93) saturate(180%) contrast(1.08);
  -webkit-backdrop-filter: blur(2px) brightness(0.93) saturate(180%) contrast(1.08);

  /* Outer border: thin glass rim */
  border: 1px solid rgba(255,255,255,0.35);

  /* Shadow + inner specular rims */
  box-shadow:
    0 6px 28px rgba(0,0,0,0.14),
    0 1px  4px rgba(0,0,0,0.08),
    /* Outer dark rim — glass edge catching shadow */
    0 0    0 1px rgba(0,0,0,0.06),
    /* Inner bright wall */
    inset 0  0   0 1px rgba(255,255,255,0.50),
    /* Top rim — sharp specular highlight */
    inset 0  1.5px 0   rgba(255,255,255,0.90),
    /* Bottom caustic inner glow */
    inset 0 -3px 10px  rgba(255,255,255,0.18);
}

/* Expanded state (hover or is-open after 3s) */
#navbar.scrolled .nav-island:hover,
#navbar.scrolled .nav-island.is-open {
  gap: 0.1rem;
  padding: 8px 18px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}
.nav-logo-img {
  height: 30px;
  width: auto;
  transition: opacity 0.3s, filter 0.45s cubic-bezier(0.4,0,0.2,1);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.18))
          drop-shadow(0 1px 3px rgba(0,0,0,0.1));
}

/* Logo shadow stays the same when expanded */

/* Links container — collapsed by default */
.nav-island-links {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.45s cubic-bezier(0.4,0,0.2,1),
              opacity 0.35s cubic-bezier(0.4,0,0.2,1) 0.05s,
              gap 0.45s cubic-bezier(0.4,0,0.2,1);
}

/* Expand on hover */
#navbar.scrolled .nav-island:hover .nav-island-links,
#navbar.scrolled .nav-island.is-open .nav-island-links {
  max-width: 600px;
  opacity: 1;
  gap: 1.2rem;
  margin-left: 1.1rem;
}

.nav-link {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  text-shadow: none;
  transition: color 0.25s var(--ease-out), text-shadow 0.25s var(--ease-out);
  line-height: 1;
  white-space: nowrap;
}
.nav-link:hover { color: var(--gray-800); }
.nav-link.active {
  color: var(--red);
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(180,40,40,0.3), 0 0 3px rgba(180,40,40,0.15);
}

/* Mobile nav button */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  position: absolute;
  right: var(--wrap-pad);
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-600);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  padding: 1.5rem var(--wrap-pad) 2rem;
  border-top: 1px solid var(--gray-100);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  font-family: var(--font-label);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-700);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.nav-mobile-link:last-child { border-bottom: none; }

/* ── Language Selector — Flags ──────────────────────────────── */
.lang-selector {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 10001;
  display: flex;
  gap: 8px;
  align-items: center;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  line-height: 0;
  transition: filter 0.3s ease, transform 0.2s ease;
}
.lang-flag {
  width: 22px;
  height: auto;
  border-radius: 2px;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
/* Inactive: desaturated + dimmed */
.lang-btn .lang-flag {
  filter: grayscale(100%) opacity(0.45) drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}
/* Active: full color + stronger shadow */
.lang-btn.active .lang-flag {
  filter: grayscale(0%) opacity(1) drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
/* Hover: brighten inactive */
.lang-btn:not(.active):hover .lang-flag {
  filter: grayscale(30%) opacity(0.75) drop-shadow(0 1px 4px rgba(0,0,0,0.3));
  transform: scale(1.08);
}

/* ── Hero Section ───────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  overflow: hidden;
}

/* Mosaic background — auto-scrolling horizontal rows */
.hero-mosaic-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 0;
}
.hero-mosaic-row {
  flex: 1;
  overflow: clip;
  position: relative;
}
.hero-mosaic-row:hover {
  overflow: visible;
  z-index: 2;
}
.hero-mosaic-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: heroScroll 100s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.hero-mosaic-row:hover .hero-mosaic-track {
  animation-play-state: paused;
}
.hero-mosaic-row { cursor: grab; }
.hero-mosaic-row.mosaic-dragging,
.hero-mosaic-row.mosaic-dragging * { cursor: grabbing !important; }
.hero-mosaic-row.mosaic-dragging .mosaic-bg-tile { pointer-events: none; }
.mosaic-bg-tile {
  flex-shrink: 0;
  height: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  contain: layout style paint;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateZ(0);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.mosaic-bg-tile:hover {
  z-index: 10;
  overflow: visible;
  transform: scale(1.2) translateZ(0);
  contain: style;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
}
/* Top row: expand down + sides only */
.hero-mosaic-row:first-child .mosaic-bg-tile {
  transform-origin: top center;
}
/* Bottom row: expand up + sides only */
.hero-mosaic-row:last-child .mosaic-bg-tile {
  transform-origin: bottom center;
}
.mosaic-bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: grayscale(100%) brightness(1.35);
  transition: opacity 0.6s ease, filter 0.45s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.mosaic-bg-photo.loaded {
  opacity: 0.22;
}
.mosaic-bg-tile:hover .mosaic-bg-photo.loaded {
  opacity: 1;
  filter: grayscale(0%) brightness(0.92);
  cursor: pointer;
}
.mosaic-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.28) 45%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 8px 10px;
  z-index: 1;
  pointer-events: none;
  transform: translateZ(0);
}
.mosaic-bg-tile:hover .mosaic-bg-overlay { opacity: 1; }

/* When modal is open, disable all tile interaction — kills sticky hover on mobile */
body.modal-open .mosaic-bg-tile {
  pointer-events: none !important;
}
body.modal-open .mosaic-bg-tile .mosaic-bg-photo.loaded {
  filter: grayscale(100%) brightness(1.35) !important;
  opacity: 0.22 !important;
}
body.modal-open .mosaic-bg-tile .mosaic-bg-overlay {
  opacity: 0 !important;
}
body.modal-open .mosaic-bg-tile {
  transform: none !important;
  box-shadow: none !important;
}

/* White radial vignette — logo legibility */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 72% 62% at 50% 50%,
    rgba(255,255,255,0.92) 0%,
    rgba(255,255,255,0.56) 38%,
    rgba(255,255,255,0.1) 62%,
    transparent 78%
  );
  pointer-events: none;
  transform: translateZ(0);
}

/* Hero content — logo only */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  animation: revealUp 1.2s var(--ease-out) 0.3s both,
             float 7s ease-in-out 1.5s infinite alternate;
}
.hero-logo {
  width: clamp(300px, 48vw, 520px);
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.22))
          drop-shadow(0 1px 4px rgba(0,0,0,0.12));
  user-select: none;
  pointer-events: auto;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: #4A5568;
  opacity: 0.85;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
  animation: heroScrollBounce 2.2s ease-in-out 2.5s infinite;
  transition: opacity 0.3s;
  z-index: 2;
}
.hero-scroll-hint:hover { opacity: 1; }
@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ── Section blend edges ──────────────────────────────────── */
/* Soft white fade at bottom of empresa into oportunidades */
#empresa::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--white));
  z-index: 2;
  pointer-events: none;
}
/* Soft white fade at top of oportunidades from empresa */
#oportunidades::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, transparent, var(--white));
  z-index: 2;
  pointer-events: none;
}

/* ── A Empresa Section ──────────────────────────────────────── */
/* ── Empresa: Immersive Section ───────────────────────────── */
#empresa {
  position: relative;
  background: var(--white);
  padding-block: var(--section-pad);
  overflow: clip;
}

/* Office background — faded */
.empresa-watermark {
  position: absolute;
  inset: 0;
  background: url('/images/ppe1.jpg') center center / cover no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
/* Soft gradient overlay for depth */
.empresa-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 100%, rgba(192,41,41,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 0%, rgba(0,0,0,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.empresa-content {
  position: relative;
  z-index: 1;
}

/* ── Interactive toggle: A EMPRESA ←——●——→ SERVIÇOS ───────── */
.emp-toggle {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  user-select: none;
}
.emp-toggle-label {
  font-family: var(--font-label);
  font-size: 1.81rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.4s ease, opacity 0.4s ease;
  cursor: pointer;
}
.emp-toggle-label--left {
  color: var(--red);
  opacity: 1;
}
.emp-toggle-label--right {
  color: var(--gray-400, #a0aab4);
  opacity: 0.6;
}
.emp-toggle-label--left.is-active {
  color: var(--red);
  opacity: 1;
}
.emp-toggle-label--right.is-active {
  color: var(--red);
  opacity: 1;
}
.emp-toggle-label--left:not(.is-active) {
  color: var(--gray-500, #6c757d);
  opacity: 0.8;
}
.emp-toggle-label--right:not(.is-active) {
  color: var(--gray-500, #6c757d);
  opacity: 0.8;
}

/* Track */
.emp-toggle-track {
  flex: 1;
  height: 2px;
  background: var(--gray-300);
  position: relative;
  cursor: pointer;
  border-radius: 1px;
}
.emp-toggle-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 1px;
  transition: width 0.4s var(--ease-out);
}
/* Handle */
.emp-toggle-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--red);
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: left 0.4s var(--ease-out), box-shadow 0.2s ease;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.emp-toggle-handle:active {
  cursor: grabbing;
  box-shadow: 0 2px 8px rgba(192,41,41,0.3);
}
.emp-toggle-handle:hover {
  box-shadow: 0 2px 10px rgba(192,41,41,0.25);
}

/* ── Ghost handle hint — slides along track, repeats for ~15s ── */
@keyframes ghostSlide {
  0%   { left: 0%;   opacity: 0; }
  10%  { left: 0%;   opacity: 0.45; }
  88%  { left: 100%; opacity: 0.45; }
  100% { left: 100%; opacity: 0; }
}
.emp-track-hint {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #999;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 5px rgba(0,0,0,0.15);
  z-index: 1;
  animation: ghostSlide 3s ease-in-out 5 both;
  animation-delay: 0.5s;
}
.emp-track-hint.hint-hidden { display: none; }

/* ── Content panels — stacked, crossfade ─────────────────── */
.emp-panels {
  position: relative;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  /* Height set by JS to max of both panels — prevents layout shift */
}
.emp-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.emp-panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Text area — Manrope, override CMS inline styles */
.empresa-text-area {}
#empresaText {
  font-family: 'Manrope', system-ui, sans-serif !important;
  font-size: calc(1.05rem * var(--fs-body, 1)) !important;
  line-height: 1.82 !important;
  color: var(--gray-700);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  letter-spacing: -0.015em;
}
#empresaText *,
.empresa-text-col p,
.empresa-text-col div,
.empresa-text-col span,
.empresa-text-col strong,
.empresa-text-col em,
.empresa-text-col b,
.empresa-text-col i {
  font-family: 'Manrope', system-ui, sans-serif !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: -0.015em;
}
.empresa-text-col p,
.empresa-text-col div {
  font-size: 1.05em !important;
  line-height: 1.82 !important;
  color: var(--gray-700);
  margin-bottom: 1.15rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.empresa-text-col p:last-child,
.empresa-text-col div:last-child { margin-bottom: 0; }
.empresa-text-col ul, .empresa-text-col ol {
  padding-left: 1.4rem;
  margin-bottom: 1.15rem;
}
.empresa-text-col ul { list-style: disc; }
.empresa-text-col ol { list-style: decimal; }
.empresa-text-col li {
  font-family: 'Manrope', system-ui, sans-serif !important;
  font-size: 1.05em !important;
  line-height: 1.82 !important;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}
.empresa-text-col strong,
.empresa-text-col b {
  color: var(--gray-900);
  font-weight: 600 !important;
}
.empresa-text-col span,
.empresa-text-col em,
.empresa-text-col i {
  color: inherit;
}

/* ── Services list ────────────────────────────────────────── */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.services-grid .service-item {
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: padding-left 0.3s var(--ease-out), background 0.3s ease;
}
.services-grid .service-item:first-child {
  padding-top: 0;
}
.services-grid .service-item::before {
  content: '';
  width: 0;
  height: 1px;
  background: var(--red);
  flex-shrink: 0;
  transition: width 0.3s var(--ease-out);
}
.services-grid .service-item:hover::before {
  width: 18px;
}
.services-grid .service-item:hover {
  padding-left: 0.25rem;
}
.service-item-title {
  font-family: 'Manrope', system-ui, sans-serif !important;
  font-size: calc(1.05rem * var(--fs-body, 1)) !important;
  font-weight: 400;
  color: #2D3748;
  line-height: 1.5;
  letter-spacing: -0.015em;
  transition: color 0.3s ease;
}
.service-item:hover .service-item-title {
  color: var(--gray-900);
}

/* ── Metrics strip — above toggle, centered ─────────────── */
.empresa-metrics {
  display: flex;
  justify-content: center;
  gap: clamp(3rem, 6vw, 5rem);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}
.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.metric-number {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  letter-spacing: -0.02em;
}
.metric-suffix {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 300;
  color: var(--red);
  line-height: 1;
}
.metric-label {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* Responsive */
@media (max-width: 900px) {
  .empresa-main-layout { grid-template-columns: 1fr; }
  .services-grid { column-count: 1; }
  .empresa-metrics { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .empresa-metrics { flex-direction: column; gap: 1.5rem; }
}


.socios-heading {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
}
#sociosList {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.socio-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.socio-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: none;
}
.socio-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}
.socio-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
  padding: 0.85rem 0.5rem 0;
}
.socio-name {
  display: block;
  font-family: var(--font-display);
  font-size: calc(0.82rem * var(--fs-title, 1));
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.socio-credential {
  display: block;
  font-size: calc(0.78rem * var(--fs-body, 1));
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* ── Services Section (kept for compatibility) ──────────────── */
#servicos {
  background: var(--bg);
  padding-block: var(--section-pad);
}
/* (old service-card styles removed — now in empresa section above) */

/* ── Mosaic tile info text ───────────────────────────────────── */
.mosaic-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mosaic-title {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: clamp(0.65rem, 1.15vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.2;
  text-transform: none;
}
.mosaic-location {
  font-family: var(--font-label);
  font-size: clamp(0.5rem, 0.82vw, 0.65rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
}
.mosaic-date {
  font-family: var(--font-label);
  font-size: clamp(0.5rem, 0.78vw, 0.62rem);
  font-weight: 400;
  color: var(--red-light);
  letter-spacing: 0.05em;
}

/* ── Contact Section — Premium Redesign ─────────────────────── */
#contacto {
  background: var(--gray-900);
  padding: 0;
  display: block;
  min-height: 0;
}

/* Base form utilities (used by both dark + light areas) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0;
}
.form-group:only-child,
.form-group.full { grid-column: 1 / -1; }
.required { color: var(--red); }


/* ── Dark Contact Area ───────────────────────────────────────── */
/* (Contact form removed — contact info moved to footer) */

/* ── Careers / Opportunities Area ────────────────────────────── */
#oportunidades {
  /* JS sets min-height to fill viewport above footer.
     Flex centering keeps content vertically balanced. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: var(--white);
  overflow: clip;
}
#oportunidades::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/Panf.png') center center / cover no-repeat;
  opacity: 0.04;
  pointer-events: none;
}
.careers-section {
  position: relative;
  padding: clamp(1.25rem, 2.5vw, 2rem) 0 clamp(0.75rem, 1.5vw, 1.25rem);
}
.careers-header {
  text-align: center;
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}
.careers-eyebrow {
  display: block;
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.careers-display-title {
  font-family: 'Bebas Neue', var(--font-label);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-900);
  margin-bottom: 0.6rem;
}
.careers-accent-line {
  width: 50px;
  height: 2px;
  background: var(--red);
  margin: 0 auto;
}
.careers-empty:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--gray-500);
  text-align: center;
}
.careers-empty svg { opacity: 0.4; }
.careers-empty p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Job Cards */
.jobs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0;
}
.jobs-grid .job-card {
  flex: 0 1 calc(33.333% - 0.57rem);
  min-width: 260px;
  max-width: 400px;
}
/* Single card: 50% wider, centred, fully visible */
.jobs-grid .job-card:only-child {
  flex: 0 1 600px;
  max-width: 600px;
}
.job-card-single {
  cursor: default;
}
.job-card-single .job-card-title {
  color: var(--red);
  margin-bottom: 1.25rem;
}
.job-card-single .job-card-description {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.job-card-single .card-apply-form {
  display: block;
  max-height: none;
  overflow: visible;
}
.job-card {
  border: 1px solid rgba(58, 69, 83, 0.1);
  padding: 1rem 1.25rem;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--red);
  transition: height 0.35s var(--ease-out);
}
.job-card:hover::before,
.job-card.open::before {
  height: 100%;
}
.job-card:hover {
  border-color: rgba(58, 69, 83, 0.18);
  box-shadow: 0 8px 32px rgba(28, 33, 40, 0.06);
}
.job-card-header {
  cursor: pointer;
}
.job-card-title {
  display: block;
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-900);
  margin-bottom: 0.85rem;
  transition: color 0.25s;
}
.job-card:hover .job-card-title,
.job-card.open .job-card-title {
  color: var(--red);
}
.job-card-excerpt {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  transition: gap 0.3s;
}
.job-card:hover .job-card-cta {
  gap: 0.65rem;
}
.job-card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}
.job-card.open .job-card-cta svg {
  transform: rotate(90deg);
}

/* Card body — expandable */
.job-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.job-card-body-inner {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(58, 69, 83, 0.08);
  margin-top: 1.5rem;
}
.job-card-description {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.job-card-description ul {
  padding-left: 1.1em;
  margin: 0.5em 0;
  list-style: disc;
}
.job-card-description li {
  margin-bottom: 0.25em;
}
.job-card-description strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Apply button inside card */
.btn-apply-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(192, 41, 41, 0.25);
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-apply-card:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-apply-card svg {
  width: 14px;
  height: 14px;
}

/* Inline apply form inside card */
.card-apply-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-apply-form.open {
  max-height: 400px;
}
.card-apply-form .apply-form-inner,
.spontaneous-form-wrap .apply-form-inner {
  padding: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.card-apply-form .apply-form-inner input[type="text"],
.card-apply-form .apply-form-inner input[type="email"],
.spontaneous-form-wrap .apply-form-inner input[type="text"],
.spontaneous-form-wrap .apply-form-inner input[type="email"] {
  width: 100%;
  padding: 0.4rem 0 0.6rem;
  border: none;
  border-bottom: 1px solid rgba(58, 69, 83, 0.18);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--gray-700);
  transition: border-color 0.25s;
  outline: none;
  box-shadow: none;
}
.card-apply-form .apply-form-inner input::placeholder,
.spontaneous-form-wrap .apply-form-inner input::placeholder {
  color: rgba(58, 69, 83, 0.35);
}
.card-apply-form .apply-form-inner input:focus,
.spontaneous-form-wrap .apply-form-inner input:focus {
  border-bottom-color: var(--red);
  box-shadow: none;
  transform: none;
}

/* Shared: file upload */
.file-upload-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px dashed rgba(58, 69, 83, 0.2);
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.file-upload-label:hover {
  border-color: var(--red);
  color: var(--red);
}
.file-upload-label svg {
  width: 13px;
  height: 13px;
}
.file-upload-label input[type="file"] {
  display: none;
}
.file-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--gray-500);
}

/* Shared: submit apply button */
.btn-submit-apply {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  background: var(--red);
  color: var(--white);
  border: none;
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s;
}
.btn-submit-apply:hover {
  background: var(--red-light);
}
.btn-submit-apply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.apply-status {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  padding: 0.5rem 0;
}
.apply-status.success { color: #2e7d32; }
.apply-status.error   { color: var(--red); }

/* ── Spontaneous Application ─────────────────────────────────── */
.spontaneous-section {
  border-top: 1px solid rgba(58, 69, 83, 0.1);
  padding-top: 2.5rem;
  margin-top: 0.5rem;
}
.spontaneous-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.spontaneous-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  color: var(--gray-900);
  margin-bottom: 0.35rem;
}
.spontaneous-desc {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--gray-600);
  max-width: 450px;
}
.btn-spontaneous {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--gray-900);
  border: 1px solid rgba(58, 69, 83, 0.2);
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-spontaneous:hover {
  border-color: var(--red);
  color: var(--red);
}
.btn-spontaneous svg {
  transition: transform 0.25s;
}
.btn-spontaneous.active {
  border-color: var(--red);
  color: var(--red);
}
.btn-spontaneous.active svg {
  transform: rotate(90deg);
}
.spontaneous-form-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.spontaneous-form-wrap.open {
  max-height: 400px;
}
.spontaneous-form-wrap .apply-form-inner {
  padding: 1.5rem 0 0;
  max-width: 480px;
}

/* ── Project Modal ───────────────────────────────────────────── */
.proj-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.05);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.proj-modal[hidden] { display: none; }
.proj-modal-inner {
  position: relative;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.25);
  width: 70vw;
  height: 82vh;
  overflow: hidden;
  padding: 1.25rem 1.5rem 0.75rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.proj-modal-close {
  position: absolute; top: 0.75rem; right: 1rem;
  background: rgba(255,255,255,0.15); border: none; font-size: 1.3rem;
  color: rgba(255,255,255,0.8); cursor: pointer; line-height: 1;
  transition: color .2s, background .2s; padding: 0.3rem 0.5rem;
  z-index: 1; border-radius: 50%;
}
.proj-modal-close:hover { color: #fff; background: rgba(255,255,255,0.25); }
.proj-modal-photos {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
  /* Default fallback: 2 columns */
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
}
/* 1 photo — full width */
.proj-modal-photos.proj-photos-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
/* 2 photos — side by side */
.proj-modal-photos.proj-photos-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}
/* 3 photos — 3 side by side */
.proj-modal-photos.proj-photos-3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
}
/* 4 photos — 2×2 grid */
.proj-modal-photos.proj-photos-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
/* 5 photos — 3 top, 2 bottom centred */
.proj-modal-photos.proj-photos-5 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.proj-photos-5 .proj-photo-cell:nth-child(1) { grid-column: 1 / 3; }
.proj-photos-5 .proj-photo-cell:nth-child(2) { grid-column: 3 / 5; }
.proj-photos-5 .proj-photo-cell:nth-child(3) { grid-column: 5 / 7; }
.proj-photos-5 .proj-photo-cell:nth-child(4) { grid-column: 1 / 4; }
.proj-photos-5 .proj-photo-cell:nth-child(5) { grid-column: 4 / 7; }
/* 6 photos — 3×2 mosaic */
.proj-modal-photos.proj-photos-6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.proj-photo-cell {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.25);
}
.proj-photo-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: filter 0.25s, transform 0.35s, box-shadow 0.35s;
}
.proj-photo-cell:hover img {
  transform: scale(1.04);
}
.proj-photo-cell:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
  z-index: 2;
}
/* Hide card's X button while a photo is expanded */
.proj-modal-inner:has(.proj-modal-photos.has-expanded) .proj-modal-close {
  opacity: 0;
  pointer-events: none;
}

/* Click-to-expand: lightbox overlay — same frosted glass as proj-modal-inner */
.proj-photos-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 24px 80px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 12px;
}
.proj-photos-overlay.is-open { display: flex; }
.proj-photos-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
}
.proj-photos-overlay-close {
  position: absolute;
  top: 0.75rem; right: 1rem;
  background: rgba(255,255,255,0.15); border: none;
  font-size: 1.3rem; line-height: 1;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: color .2s, background .2s;
  padding: 0.3rem 0.5rem;
  z-index: 21;
  border-radius: 50%;
}
.proj-photos-overlay-close:hover { color: #fff; background: rgba(255,255,255,0.25); }
/* Navigation arrows */
.proj-photos-overlay-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  z-index: 22;
  transition: background 0.2s, color 0.2s;
}
.proj-photos-overlay-arrow:hover { background: rgba(255,255,255,0.28); color: #fff; }
.proj-arrow-left { left: 1rem; }
.proj-arrow-right { right: 1rem; }
/* Blur the grid photos when overlay is open */
.proj-modal-photos.has-expanded .proj-photo-cell img {
  filter: blur(6px) brightness(0.6);
  pointer-events: none;
}
.proj-photo-empty {
  background: rgba(255,255,255,0.05);
}
.proj-modal-info {
  flex-shrink: 0;
  text-align: center;
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.6rem 1rem 0.25rem;
  background: none;
  margin: 0;
}
.proj-modal-name {
  display: block;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  text-shadow: none;
}
.proj-modal-loc {
  display: block;
  font-family: var(--font-label);
  font-size: clamp(0.65rem, 0.9vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(30,30,40,0.75);
  text-shadow: none;
}
.proj-modal-date {
  display: block;
  font-family: var(--font-label);
  font-size: clamp(0.6rem, 0.85vw, 0.72rem);
  color: var(--red);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ── Footer ────────────────────────────────────────────────── */
/* ── Footer — Light Institutional ────────────────────────── */
#footer {
  background: #ffffff;
  border-top: 1px solid rgba(58, 69, 83, 0.08);
}
.footer-main {
  padding: 1.3rem 0 0.65rem;
}
.footer-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.78rem;
}

/* Logo — same as original */
.footer-brand {
  display: flex;
  align-items: center;
}
.footer-logo {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.18))
          drop-shadow(0 1px 4px rgba(0,0,0,0.1));
}

/* Contact strip — horizontal compact row */
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.footer-eyebrow {
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
}
.footer-address {
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-style: normal;
  line-height: 1.4;
  color: var(--gray-500);
  text-align: center;
  white-space: pre-line;
}
.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-size: 1.01rem;
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-link:hover {
  color: var(--red);
}
.footer-link svg {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.25s;
}
.footer-link:hover svg {
  opacity: 0.8;
}
.footer-sep {
  color: rgba(58, 69, 83, 0.18);
  font-size: 0.75rem;
  user-select: none;
}
.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}
.footer-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Barlow Condensed', var(--font-label);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-action-link:hover {
  color: var(--red);
}
.footer-action-link svg {
  flex-shrink: 0;
}

/* PME Líder badge — inline with actions */
.footer-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-pme {
  height: 60px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.footer-pme:hover {
  opacity: 1;
}

/* Bottom copyright */
.footer-bottom {
  border-top: 1px solid rgba(58, 69, 83, 0.06);
  padding: 0.65rem 0;
  text-align: center;
}
.footer-copy {
  font-size: 0.6rem;
  color: var(--gray-400);
  font-family: 'Barlow Condensed', var(--font-label);
  letter-spacing: 0.06em;
  text-align: center;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 0.4; }
}
@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
@keyframes scrollPulse {
  0%   { transform: scaleY(1); opacity: 1; }
  50%  { transform: scaleY(1.6); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}
@keyframes heroScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px) & Phone (≤ 480px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav: hide burger, island links toggle on logo click */
  .nav-burger { display: none !important; }
  .nav-mobile { display: none !important; }
  .nav-island-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 0.6rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
  }
  .nav-island-links .nav-link {
    padding: 0.65rem 1.4rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray-600);
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }
  .nav-island-links .nav-link:last-child { border-bottom: none; }
  .nav-island-links .nav-link.active { color: var(--red); }
  /* Kill desktop hover expand — only open via .menu-open click */
  #navbar.scrolled .nav-island:hover .nav-island-links,
  #navbar.scrolled .nav-island.is-open .nav-island-links {
    max-width: 0 !important;
    opacity: 0 !important;
    gap: 0 !important;
    margin-left: 0 !important;
    display: none !important;
  }
  /* Menu-open overrides everything — high specificity to beat the above */
  #navbar .nav-island.menu-open .nav-island-links,
  #navbar.scrolled .nav-island.menu-open .nav-island-links {
    display: flex !important;
    max-width: none !important;
    opacity: 1 !important;
    gap: 0 !important;
    margin-left: 0 !important;
  }
  /* Island always visible on mobile */
  #navbar .nav-island {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  /* Hide logo on home (top) — only show when scrolled */
  #navbar:not(.scrolled) .nav-logo-img {
    display: none;
  }
  #navbar.scrolled .nav-island { opacity: 1; pointer-events: auto; }
  .nav-island { cursor: pointer; }

  /* Hero */
  #hero { height: 75vh; }
  .hero-logo { width: clamp(200px, 50vw, 320px); }
  .hero-vignette {
    background: radial-gradient(
      ellipse 80% 65% at 50% 50%,
      rgba(255,255,255,0.95) 0%,
      rgba(255,255,255,0.6) 35%,
      rgba(255,255,255,0.15) 58%,
      transparent 75%
    );
  }

  /* Mosaic: disable hover effects (no hover on touch) */
  .mosaic-bg-tile:hover {
    transform: none; box-shadow: none;
    overflow: hidden; z-index: auto; contain: layout style paint;
  }
  .hero-mosaic-row:hover { overflow: clip; z-index: auto; }
  .hero-mosaic-row { cursor: default; }

  /* Empresa toggle */
  .emp-toggle-label { font-size: 1.3rem; }

  /* Project modal: wider */
  .proj-modal-inner { width: 92vw; height: 85vh; }

  /* Job cards: 2 columns */
  .jobs-grid .job-card {
    flex: 0 1 calc(50% - 0.43rem);
    min-width: 220px;
  }

  /* Section padding tighter */
  :root { --section-pad: clamp(3rem, 8vw, 5rem); }
}

/* ── Phone ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
    --section-pad: clamp(2.5rem, 8vw, 4rem);
    --wrap-pad: clamp(1rem, 4vw, 1.5rem);
  }

  /* Hero: full screen on phone */
  #hero { height: 100svh; }
  .hero-logo { width: clamp(160px, 50vw, 240px); }
  .hero-vignette {
    background: radial-gradient(
      ellipse 80% 55% at 50% 50%,
      rgba(255,255,255,0.95) 0%,
      rgba(255,255,255,0.55) 40%,
      transparent 70%
    );
  }
  .hero-scroll-hint { bottom: 0.75rem; }

  /* Mosaic: stop auto-scroll, kill GPU layers that cause flickering */
  .hero-mosaic-track {
    animation: none !important;
    overflow: visible !important;
    will-change: auto !important;
    transform: none !important;
    backface-visibility: visible !important;
  }
  .mosaic-bg-photo {
    will-change: auto !important;
    transform: none !important;
    backface-visibility: visible !important;
  }
  .mosaic-bg-tile {
    will-change: auto !important;
    transform: none !important;
  }
  .mosaic-bg-overlay {
    will-change: auto !important;
    transform: none !important;
  }
  /* Also kill reveal animations that cause repaints */
  [data-reveal] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-mosaic-row {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    cursor: default;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .hero-mosaic-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .hero-mosaic-row:hover {
    overflow-x: scroll !important;
    overflow-y: hidden !important;
  }
  .mosaic-bg-tile {
    scroll-snap-align: start;
  }

  /* Hide all scrollbars on mobile */
  .proj-modal-inner,
  .proj-modal-inner * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .proj-modal-inner::-webkit-scrollbar,
  .proj-modal-inner *::-webkit-scrollbar { display: none; }

  /* Project modal: glass card — matching desktop style */
  .proj-modal-inner {
    width: 92vw;
    height: 88dvh;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.22);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.25);
    overflow: hidden;
  }
  .proj-modal-close {
    top: 0.6rem; right: 0.6rem;
    font-size: 1.4rem; padding: 0;
    z-index: 20;
    color: #fff;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
  }
  /* Info bar: matching desktop style */
  .proj-modal-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    padding: 0.6rem 1rem 0.7rem;
    border-radius: 0 0 12px 12px;
  }
  .proj-modal-name {
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    text-shadow: none;
  }
  .proj-modal-loc {
    font-family: var(--font-label);
    font-weight: 500;
    color: var(--gray-600);
    letter-spacing: 0.12em;
  }
  .proj-modal-date { color: var(--red); }
  /* ── Photo Gallery on mobile — respects glass card radius ── */
  .proj-modal-photos,
  .proj-modal-photos.proj-photos-2,
  .proj-modal-photos.proj-photos-3,
  .proj-modal-photos.proj-photos-4,
  .proj-modal-photos.proj-photos-5,
  .proj-modal-photos.proj-photos-6 {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 12px;
  }
  .proj-photos-5 .proj-photo-cell { grid-column: auto !important; }

  /* Hide blurred background — just show translucent card behind photo */
  .photo-bg-blur {
    display: none !important;
  }

  /* Each photo — stacked, horizontal slide transitions */
  .proj-photo-cell {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateX(40px);
    pointer-events: none;
  }
  .proj-photo-cell.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 2;
  }
  .proj-photo-cell.prev {
    opacity: 0;
    transform: translateX(-40px);
  }
  .proj-photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    display: block;
  }

  /* Dots indicator — top center, gray */
  .carousel-dots {
    position: absolute;
    top: 10px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 12;
  }
  .carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(150,150,150,0.5);
    border: none;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .carousel-dot.active {
    background: rgba(80,80,80,0.85);
    transform: scale(1.35);
  }

  /* Counter — top left pill */
  .photo-counter {
    position: absolute;
    top: 10px; left: 12px;
    z-index: 12;
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-body);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
  }

  /* Swipe hint — arrow slides left to right, fades in then out */
  .swipe-hint {
    position: absolute;
    top: 50%;
    right: 12%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
    animation: swipeHintSlide 2.8s ease-in-out infinite;
  }
  .swipe-hint svg {
    width: 34px; height: 34px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  }
  .swipe-hint.hidden {
    animation: swipeHintFadeOut 0.4s ease forwards;
  }
  @keyframes swipeHintSlide {
    0%   { opacity: 0; transform: translateY(-50%) translateX(30px); }
    20%  { opacity: 1; transform: translateY(-50%) translateX(0); }
    50%  { opacity: 1; transform: translateY(-50%) translateX(-40px); }
    70%  { opacity: 0; transform: translateY(-50%) translateX(-60px); }
    100% { opacity: 0; transform: translateY(-50%) translateX(30px); }
  }
  @keyframes swipeHintFadeOut {
    to { opacity: 0; visibility: hidden; }
  }

  /* Hide desktop photo overlay click-to-expand on mobile */
  .proj-photos-overlay { display: none !important; }

  /* Photo overlay on mobile (disabled) */
  .proj-photos-overlay-arrow { width: 36px; height: 36px; }
  .proj-arrow-left { left: 0.5rem; }
  .proj-arrow-right { right: 0.5rem; }

  /* Empresa section */
  .empresa-main-layout { grid-template-columns: 1fr; }
  .services-grid { column-count: 1; }
  .empresa-metrics { flex-direction: column; gap: 1.5rem; }
  .emp-toggle-label { font-size: 1rem; }
  .emp-toggle { gap: 0.6rem; }

  /* Job cards: single column */
  .jobs-grid .job-card {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  .jobs-grid .job-card:only-child {
    flex: 1 1 100%;
    max-width: none;
  }

  /* Footer */
  .footer-contact-row { flex-direction: column; gap: 0.5rem; }
  .footer-sep { display: none; }
  .footer-actions { flex-direction: column; gap: 0.5rem; }
  .footer-copy { font-size: 0.55rem; }

  /* Spontaneous application */
  .spontaneous-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Sócios grid: 2 cols on phone */
  #sociosList { grid-template-columns: repeat(2, 1fr); }
}
