/* ==========================================================================
   Garage Forge 3D — Folha de Estilos Principal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variáveis e Reset
   -------------------------------------------------------------------------- */
:root {
  --ink: #16191c;
  --dark: #16181b;
  --panel: #202327;
  --charcoal-bg: #141618;
  --charcoal-surface: #1a1d21;
  --charcoal-elevated: #22262b;
  --charcoal-border: #2c3137;
  --line: #3a3f45;
  --orange: #f15a24;
  --orange-hover: #c84517;
  --orange-accent: #ff855b;
  --paper: #f5f3ee;
  --cream: #f4f2ec;
  --muted: #aeb2b4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 88px;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}

/* --------------------------------------------------------------------------
   2. Tipografia e Elementos Comuns
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: 'Barlow Condensed', sans-serif;
  margin: 0;
  text-transform: uppercase;
  line-height: .92;
}

.eyebrow {
  display: flex;
  gap: .55rem;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .73rem;
  font-weight: 700;
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.button,
.nav-cta {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .8rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  transition: background .2s, transform .2s;
  border: none;
  cursor: pointer;
}

.button:hover,
.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--orange-hover);
  color: #fff;
}

.button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .55);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, .1);
}

.text-link {
  display: inline-flex;
  gap: 1.3rem;
  align-items: center;
  border-bottom: 2px solid var(--orange);
  margin-top: 1rem;
  padding-bottom: .5rem;
  text-decoration: none;
  color: #17191b;
  font-weight: 800;
  font-size: .9rem;
}

.text-link span {
  color: var(--orange);
  font-size: 1.2rem;
  transition: transform .25s;
}

.text-link:hover span {
  transform: translate(3px, -3px);
}

/* --------------------------------------------------------------------------
   3. Cabeçalho e Navegação
   -------------------------------------------------------------------------- */
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  color: #fff;
  transition: all 0.3s ease;
  pointer-events: auto;
}

header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
}

.nav {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  transition: border-color 0.3s ease, min-height 0.3s ease;
}

header.scrolled .nav {
  min-height: 80px;
  border-bottom-color: transparent;
}

.brand {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
  transition: transform 0.28s ease;
  line-height: 0;
  padding: 0;
}

.brand-logo {
  height: 56px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.75));
  transition: height 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.04);
}

header.scrolled .brand {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

header.scrolled .brand-logo {
  height: 50px;
  max-width: 220px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.85));
}

/* ==========================================================================
   Navegação e Drawer Lateral Direito (Off-Canvas)
   ========================================================================== */

/* 1. Backdrop Scrim do Drawer (Sem blur - mantém o ecrã 100% nítido) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 900;
  pointer-events: none;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 2. Botão Hambúrguer Flutuante */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(20, 22, 25, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: white;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}

.menu-toggle:hover {
  background: var(--charcoal-elevated);
  border-color: var(--orange);
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 16px rgba(241, 90, 36, 0.25);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  width: 18px;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 3. Estrutura Base do Drawer (Ativo por padrão e no scroll) */
nav#main-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  height: 100vh;
  height: 100dvh;
  background: #141618;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.6rem 2rem;
  z-index: 100;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}

nav#main-nav.open {
  transform: translateX(0);
  visibility: visible;
}

/* Cabeçalho do Drawer */
.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-drawer-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7b8389;
  font-weight: 700;
  font-family: Inter, sans-serif;
}

.nav-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #c9cfd3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.nav-close-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--orange);
  border-color: var(--orange);
  transform: scale(1.05);
}

/* Links do Drawer */
.nav-links {
  display: flex;
  flex-direction: column;
  margin: 1.25rem 0 auto;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e4e7e9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.25s ease;
}

.nav-links a:last-child {
  border-bottom: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--orange);
  transform: translateX(6px);
}

.nav-num {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555d62;
  margin-right: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.nav-links a:hover .nav-num,
.nav-links a:focus-visible .nav-num {
  color: var(--orange);
}

/* Rodapé do Drawer */
.nav-drawer-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.25rem;
}

.nav-drawer-footer .nav-cta {
  width: 100%;
  min-height: 48px;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--orange);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 18px rgba(241, 90, 36, 0.25);
}

.nav-drawer-footer .nav-cta:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(241, 90, 36, 0.35);
}

.nav-direct-contact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.nav-direct-contact span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5d656a;
  font-weight: 700;
}

.nav-direct-contact a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #b0b6bb;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.nav-direct-contact a:hover {
  color: var(--orange);
}

/* 4. Navegação Horizontal Desktop (Apenas no topo do ecrã) */
.nav-desktop {
  display: none;
}

@media (min-width: 861px) {
  header:not(.scrolled) .nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.8rem;
  }

  .nav-desktop a {
    color: #e7e7e7;
    text-decoration: none;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s ease;
  }

  .nav-desktop a:hover,
  .nav-desktop a:focus-visible {
    color: var(--orange);
  }

  .nav-desktop .nav-cta {
    padding: 0.8rem 1.15rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-left: 0.5rem;
    background: var(--orange);
    color: #fff;
  }

  .nav-desktop .nav-cta:hover {
    background: var(--orange-hover);
  }

  /* Quando o cabeçalho fica 'scrolled', a barra desktop desaparece */
  header.scrolled .nav-desktop {
    display: none;
  }

  /* No desktop no topo, o botão de hambúrguer fica escondido */
  header:not(.scrolled) .menu-toggle {
    display: none;
  }

  /* Ao fazer scroll no desktop, o botão hambúrguer flutuante aparece suavemente */
  header.scrolled .menu-toggle {
    display: flex;
    animation: fadeInScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --------------------------------------------------------------------------
   4. Secção Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 760px;
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  background: var(--charcoal-bg);
  padding: 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -15% 0 -15% 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  z-index: -1;
  background: linear-gradient(90deg, #141618 0%, rgba(20, 22, 24, .98) 27%, rgba(20, 22, 24, .86) 44%, rgba(20, 22, 24, .12) 84%);
}

.hero .hero-content.wrap {
  width: min(1160px, calc(100% - 40px));
  max-width: none;
  align-self: center;
  margin-inline: auto;
  padding: 8rem 0 5rem;
}

.hero-copy {
  width: min(610px, 54%);
}

.hero h1 {
  font-size: clamp(4rem, 5.7vw, 6.4rem);
  line-height: .93;
  max-width: 610px;
  letter-spacing: -.025em;
}

.hero h1 span {
  color: var(--orange);
}

.hero .lead {
  font-size: 1.07rem;
  max-width: 480px;
  line-height: 1.6;
  color: #dedede;
  margin: 1.5rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.hero-actions .button {
  min-height: 54px;
  padding-inline: 1.35rem;
  transition: transform .2s, background .2s;
}

.hero-actions .button:hover {
  transform: translateY(-3px);
}

.hero-index {
  position: absolute;
  bottom: 2rem;
  right: max(36px, calc((100vw - 1380px) / 2));
  color: #e9e9e9;
  font-size: .72rem;
  letter-spacing: .18em;
  font-weight: 800;
}

.hero-index span {
  color: var(--orange);
  padding-inline: .55rem;
}

/* --------------------------------------------------------------------------
   5. Secção Sobre Nós
   -------------------------------------------------------------------------- */
.about {
  padding: 8rem 0;
  background: var(--charcoal-bg);
  color: #ffffff;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6.5rem);
  align-items: center;
}

.about-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--charcoal-surface);
  border-radius: 10px;
  border: 1px solid var(--charcoal-border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.about-visual img {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: 50% 27%;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-visual:hover img {
  transform: scale(1.035);
}

.about-location-tag {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  background: rgba(26, 29, 33, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4e7e8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border-radius: 4px;
}

.about-copy {
  display: flex;
  flex-direction: column;
}

.about-eyebrow {
  color: var(--orange);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.about-copy h2 {
  font-size: clamp(3.2rem, 4.8vw, 5.2rem);
  line-height: 0.92;
  margin: 0 0 1.6rem;
  color: #ffffff;
}

.about-copy h2 span {
  color: var(--orange);
}

.about-copy p {
  font-size: 1.02rem;
  line-height: 1.68;
  color: #9da3a7;
  max-width: 520px;
  margin: 0 0 1rem;
}

.about-action {
  margin-top: 1.6rem;
}

.about-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.45rem;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 6px;
  background: var(--charcoal-surface);
  border: 1px solid var(--charcoal-border);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.25s ease;
}

.about-btn svg {
  color: var(--orange);
  transition: transform 0.25s ease;
}

.about-btn:hover {
  background: var(--charcoal-elevated);
  border-color: rgba(241, 90, 36, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.about-btn:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   6. Secção Processo
   -------------------------------------------------------------------------- */
.process {
  padding: 7.5rem 0;
  background: var(--charcoal-surface);
  color: white;
  border-top: 1px solid var(--charcoal-border);
  border-bottom: 1px solid var(--charcoal-border);
}

.process-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
}

.process-intro h2 {
  font-size: clamp(3.25rem, 4.65vw, 5.15rem);
  margin: 0 0 1.2rem;
  white-space: nowrap;
  letter-spacing: -.025em;
}

.process-intro p {
  max-width: 470px;
  color: #c1c5c6;
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0 0 2rem;
}

.process-intro img {
  display: block;
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  filter: saturate(.85);
  border-radius: 8px;
  border: 1px solid var(--charcoal-border);
}

.process-list {
  border-top: 1px solid var(--charcoal-border);
  margin-top: 1.1rem;
}

.process-list article {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--charcoal-border);
  padding: 1.65rem 3rem 1.65rem 1.25rem;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  border-radius: 4px;
  cursor: pointer;
  isolation: isolate;
  transition: transform .38s cubic-bezier(.16, 1, .3, 1),
              background .38s ease,
              border-color .38s ease,
              box-shadow .38s ease;
}

/* Indicador lateral luminoso (estilo laser de engenharia/precisão) */
.process-list article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--orange);
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1),
              opacity .35s ease,
              box-shadow .35s ease;
}

/* Seta minimalista indicativa de etapa */
.process-list article::after {
  content: "→";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
  opacity: 0;
  transform: translateY(-50%) translateX(-12px);
  transition: opacity .35s cubic-bezier(.16, 1, .3, 1),
              transform .35s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}

.process-list article:hover {
  transform: translateX(10px);
  background: linear-gradient(90deg, rgba(241, 90, 36, 0.1) 0%, rgba(255, 255, 255, 0.035) 45%, transparent 100%);
  border-bottom-color: rgba(241, 90, 36, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.process-list article:hover::before {
  opacity: 1;
  transform: scaleY(1);
  box-shadow: 0 0 14px rgba(241, 90, 36, 0.75), 0 0 4px var(--orange);
}

.process-list article:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.process-no {
  color: var(--orange);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  display: inline-block;
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1),
              text-shadow .35s ease,
              color .35s ease;
}

.process-list article:hover .process-no {
  transform: scale(1.12) translateX(2px);
  color: #ff733d;
  text-shadow: 0 0 16px rgba(241, 90, 36, 0.65);
}

.process-list h3 {
  font-size: 2rem;
  margin: .05rem 0 .55rem;
  color: #fff;
  transition: color .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}

.process-list article:hover h3 {
  color: #ffffff;
  transform: translateX(3px);
}

.process-list p {
  font-size: .93rem;
  line-height: 1.55;
  color: #b9bfc1;
  margin: 0;
  max-width: 440px;
  transition: color .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}

.process-list article:hover p {
  color: #e4e8ea;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   7. Secção Trabalhos / Portefólio
   -------------------------------------------------------------------------- */
.work {
  padding: 7rem 0;
  background: var(--charcoal-bg);
  color: #fff;
  border-bottom: 1px solid var(--charcoal-border);
}

.portfolio-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  margin-bottom: 2.75rem;
}

.portfolio-heading .section-title {
  font-size: clamp(3.4rem, 5.2vw, 5.2rem);
  color: #ffffff;
}

.portfolio-heading p {
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 340px;
  color: #929a9e;
  margin: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
}

.project,
.project:first-child {
  margin: 0;
  min-height: 0;
  aspect-ratio: 1/1;
  border-radius: 8px;
  grid-row: auto;
  position: relative;
  overflow: hidden;
  background: var(--charcoal-surface);
  border: 1px solid var(--charcoal-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  border-color: rgba(241, 90, 36, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.project img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.project:hover img {
  transform: scale(1.06);
  opacity: 0.98;
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 12, 14, 0.25) 40%,
    rgba(10, 12, 14, 0.85) 75%,
    rgba(10, 12, 14, 0.98) 100%
  );
  pointer-events: none;
}

.project figcaption {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.project-cat {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-num {
  font-family: 'Barlow Condensed', sans-serif;
  color: #687074;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.project figcaption h3 {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.05;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.project figcaption p {
  font-size: 0.84rem;
  color: #9ea4a8;
  line-height: 1.45;
  margin: 0.25rem 0 0;
  max-width: 95%;
  opacity: 0.75;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.project:hover figcaption p,
.project:focus-within figcaption p {
  opacity: 1;
  color: #c9cfd2;
}

/* --------------------------------------------------------------------------
   8. Secção Aplicações (Carrossel)
   -------------------------------------------------------------------------- */
.applications {
  padding: 8rem 0;
  background: radial-gradient(circle at 85% 15%, rgba(241, 90, 36, 0.08) 0%, transparent 55%), var(--charcoal-surface);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--charcoal-border);
}

.application-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.75rem;
}

.application-heading .section-title {
  font-size: clamp(3.6rem, 5vw, 5.5rem);
  line-height: 0.9;
}

.app-controls {
  display: flex;
  gap: 0.65rem;
}

.app-controls button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.app-controls button svg {
  transition: transform 0.22s ease;
}

.app-controls button:hover,
.app-controls button:focus-visible {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 24px rgba(241, 90, 36, 0.4);
}

.app-controls button:active {
  transform: translateY(0) scale(0.96);
}

.app-controls .app-prev:hover svg {
  transform: translateX(-3px);
}

.app-controls .app-next:hover svg {
  transform: translateX(3px);
}

.application-grid {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 0.75rem 0.25rem 2rem;
  margin-inline: -0.25rem;
}

.application-grid::-webkit-scrollbar {
  display: none;
}

.application {
  position: relative;
  flex: 0 0 clamp(480px, 58vw, 680px);
  min-height: 480px;
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--charcoal-elevated);
  border: 1px solid var(--charcoal-border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  cursor: grab;
  outline: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
}

.application:active {
  cursor: grabbing;
}

.application:hover,
.application:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(241, 90, 36, 0.5);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.85),
              0 0 32px -6px rgba(241, 90, 36, 0.3);
}

.application-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.application-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(0.95);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s ease,
              opacity 0.4s ease;
}

.application:hover .application-media img,
.application:focus-visible .application-media img {
  transform: scale(1.06);
  opacity: 0.95;
  filter: saturate(1.1) brightness(1.04);
}

.application-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12, 14, 16, 0.2) 0%,
    rgba(12, 14, 16, 0.4) 38%,
    rgba(12, 14, 16, 0.92) 78%,
    #0c0e10 100%
  );
}

.application-info {
  position: relative;
  z-index: 2;
  padding: 2.25rem 2.25rem 2rem;
  transform: translateY(6px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.application-info b {
  color: var(--orange-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.45rem;
}

.application:hover .application-info,
.application:focus-visible .application-info {
  transform: translateY(0);
}

.application-info h3 {
  font-size: clamp(2.3rem, 3.8vw, 3.5rem);
  margin: 0 0 0.65rem;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.application-info p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #c0c6c8;
  margin: 0 0 1.35rem;
  max-width: 520px;
  transition: color 0.3s ease;
}

.application:hover .application-info p,
.application:focus-visible .application-info p {
  color: #e6ebed;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-tag {
  font-size: 0.73rem;
  font-weight: 600;
  color: #d1d6d8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.application:hover .app-tag {
  background: rgba(241, 90, 36, 0.16);
  border-color: rgba(241, 90, 36, 0.45);
  color: #ffffff;
}

.app-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 2.5rem;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.app-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 33.333%;
  background: linear-gradient(90deg, #f15a24, #ff7a45);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(241, 90, 36, 0.75), 0 0 4px #ff7a45;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* --------------------------------------------------------------------------
   9. Secção Contacto e Formulário WhatsApp
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  isolation: isolate;
  padding: 8rem 0;
  background: radial-gradient(circle at 82% 45%, rgba(241, 90, 36, 0.08) 0%, transparent 58%), var(--charcoal-bg);
  color: white;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0 45% 0 0;
  z-index: -2;
  background: url('../images/hero-workshop.png') 52% center/cover no-repeat;
  opacity: 0.35;
  filter: saturate(0.8);
}

.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(20, 22, 24, 0.94) 0%,
    rgba(20, 22, 24, 0.86) 40%,
    var(--charcoal-bg) 65%
  );
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.contact-intro h2 {
  font-size: clamp(3.4rem, 5.2vw, 5.6rem);
  line-height: 0.92;
  margin: 0 0 1.25rem;
}

.contact-intro h2 span {
  color: var(--orange);
}

.contact-intro p {
  color: #9ba1a6;
  font-size: 1.05rem;
  max-width: 440px;
  line-height: 1.6;
  margin: 0 0 2.5rem;
}

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.direct-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #636b70;
  font-weight: 700;
}

.direct-link {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
  width: fit-content;
}

.direct-link:hover {
  color: var(--orange);
}

.contact-form {
  background: var(--charcoal-surface);
  border: 1px solid var(--charcoal-border);
  border-radius: 12px;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.form-header h3 {
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  line-height: 1;
  margin: 0 0 0.5rem;
  color: #ffffff;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c9397;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--charcoal-bg);
  border: 1px solid var(--charcoal-border);
  border-radius: 6px;
  color: #ffffff;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #555d63;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  background: #171a1d;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  padding-right: 2.2rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8388;
  font-size: 0.95rem;
  pointer-events: none;
}

.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.contact-submit-btn {
  min-height: 48px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--orange);
  border: none;
  cursor: pointer;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
  margin-top: 0.2rem;
  width: 100%;
}

.contact-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-submit-btn:active {
  transform: translateY(0);
}

.form-note {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #636b70;
  margin: 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. Rodapé
   -------------------------------------------------------------------------- */
footer {
  background: var(--charcoal-surface);
  border-top: 1px solid var(--charcoal-border);
  color: #aaaeaf;
  padding: 2.2rem 0;
  font-size: .75rem;
}

.footer-grid {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  height: 44px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   11. Responsividade e Consultas de Media (Media Queries)
   -------------------------------------------------------------------------- */
@media (max-width: 950px) {
  .hero::before {
    left: 30%;
  }

  .hero::after {
    background: linear-gradient(90deg, #0b0c0d 0%, rgba(11, 12, 13, .96) 38%, rgba(11, 12, 13, .28) 100%);
  }

  .hero-copy {
    width: min(620px, 73%);
  }

  .about-grid,
  .process-layout {
    gap: 3rem;
  }

  .application {
    flex-basis: 78%;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 68px;
  }

  .wrap {
    width: min(100% - 32px, 1160px);
  }

  .nav {
    min-height: 76px;
  }

  .brand-logo {
    height: 48px;
    max-width: 200px;
  }

  header.scrolled .brand-logo {
    height: 44px;
    max-width: 190px;
  }

  .hero {
    min-height: 690px;
  }

  .hero-bg-img {
    object-position: 62% center;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(20, 22, 24, .97), rgba(20, 22, 24, .82) 60%, rgba(20, 22, 24, .45));
  }

  .hero .hero-content.wrap {
    padding: 7rem 0 4.3rem;
    align-self: end;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(3.35rem, 11vw, 5.8rem);
    max-width: 540px;
  }

  .hero .lead {
    font-size: 1rem;
    max-width: 440px;
  }

  .hero-index {
    display: none;
  }

  .about,
  .process,
  .work,
  .applications,
  .contact {
    padding: 4.5rem 0;
  }

  .about-grid,
  .process-layout,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .about-visual {
    min-height: 0;
  }

  .about-visual img {
    height: auto;
    aspect-ratio: 1.25;
    object-fit: cover;
  }

  .about-copy h2,
  .process-intro h2 {
    font-size: clamp(3.3rem, 11vw, 5.6rem);
  }

  .process-intro h2 {
    white-space: normal;
  }

  .process-intro img {
    display: none;
  }

  .process-list {
    margin-top: 0;
  }

  .process-list article {
    margin-left: -.5rem;
    margin-right: -.5rem;
    padding-left: .75rem;
    padding-right: 2.4rem;
  }

  .portfolio-heading {
    display: block;
  }

  .portfolio-heading p {
    margin-top: 1rem;
  }

  .work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    gap: 0.85rem;
  }

  .project,
  .project:first-child {
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 1;
    border-radius: 6px;
  }

  .project figcaption {
    padding: 1.1rem 1rem 1rem;
  }

  .project figcaption h3 {
    font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  }

  .project figcaption p {
    display: none;
  }

  .application-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
  }

  .application {
    flex: 0 0 85%;
    min-height: 420px;
  }

  .application-info {
    padding: 1.6rem 1.4rem;
  }

  .application-info h3 {
    font-size: 2.3rem;
  }

  .app-progress-track {
    margin-top: 1.75rem;
  }

  .contact::before {
    inset: 0 0 35%;
    background-position: 60% center;
  }

  .contact::after {
    background: linear-gradient(180deg, rgba(20, 22, 24, .82), var(--charcoal-bg) 65%);
  }

  .contact-form {
    padding: 1.6rem 1.25rem;
  }

  .form-group-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 3.05rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .application {
    flex-basis: 90%;
    min-height: 400px;
  }

  .project,
  .project:first-child {
    aspect-ratio: 1;
  }
}

/* --------------------------------------------------------------------------
   12. Animações e Efeitos de Movimento
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html,
  .application-grid {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .72s cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0ms),
                transform .72s cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0ms);
  }

  .motion-ready .reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}
