/* Fontes vendorizadas localmente (origem: Google Fonts)
   Archivo variável (wght 100-900; eixo wdth removido — o CSS não o usa) + Space Mono 400/700
   Subsets: latin-ext e latin */

/* Archivo — latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/archivo-wght-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Archivo — latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/archivo-wght-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Mono 400 — latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/space-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Mono 400 — latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/space-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Mono 700 — latin-ext */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/space-mono-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Mono 700 — latin */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/space-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   SERRALHARIA VIDAL — Design limpo & minimalista
   Sem 3D. Tipografia forte, muito espaço, fotos em destaque.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* transição suave index ↔ obra (a foto do cartão "voa" para o hero) */
@view-transition { navigation: auto; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #eeece4;
  --ink: #14171f;
  --muted: #5c616d;
  --line: #e3e0d6;
  --brand: #0a2f7a;      /* azul Vidal */
  --accent: #e2231a;     /* vermelho Vidal */
  --wa: #25d366;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,23,31,.04), 0 12px 32px -18px rgba(20,23,31,.28);
  --shadow-lg: 0 30px 60px -30px rgba(20,23,31,.4);
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --sp: clamp(64px, 9vw, 128px);
  --fs-display: clamp(2.2rem, 6.4vw, 5.1rem);
  --fs-h2: clamp(1.9rem, 4.6vw, 3.4rem);
  --fs-h3: clamp(1.35rem, 2.6vw, 1.9rem);
  --lh-display: 1.06;   /* nunca <1.05 com maiúsculas acentuadas (Í, Ç) */
  --mono: "Space Mono", ui-monospace, monospace;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); }
em { font-style: normal; color: var(--accent); }

/* largura total com margens --pad (títulos e grelhas alinham com o logótipo) */
.container { width: 100%; max-width: none; margin-inline: auto; padding-inline: var(--pad); }
section { scroll-margin-top: 80px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top .2s;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- Botões ---------- */
.btn {
  --btnbg: var(--accent); --btnfg: #fff;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--btnbg); color: var(--btnfg);
  border: 1px solid var(--btnbg); cursor: pointer;
  padding: 14px 24px; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 700; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  min-height: 48px;
}
.btn i { font-style: normal; transition: transform .2s ease; }
.btn:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btnbg: transparent; --btnfg: var(--ink); border-color: #82878f; }
.btn--ghost:hover { --btnbg: var(--surface); border-color: var(--ink); filter: none; }
.btn--wa { --btnbg: var(--wa); --btnfg: #06381b; }
.btn--wa svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: 0 6px 24px -20px rgba(20,23,31,.6);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__logo { width: 40px; height: 40px; }
.brand__text { font-weight: 800; font-size: 19px; letter-spacing: .01em; color: var(--brand); white-space: nowrap; }
.brand__text em { color: var(--accent); }
.header__nav { display: flex; gap: 30px; }
.header__nav a {
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); padding: 6px 0; position: relative;
}
.header__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.header__nav a:hover { color: var(--ink); }
.header__nav a:hover::after { width: 100%; }
.header__actions { display: flex; align-items: center; gap: 14px; }
.header__cta { padding: 11px 20px; min-height: 42px; }

/* Botão menu (mobile) */
.menu-btn {
  display: none; align-items: center; gap: 10px; background: none; border: 0;
  cursor: pointer; padding: 8px; color: var(--ink);
}
.menu-btn__label { font-size: 12px; letter-spacing: .1em; }
.menu-btn__lines { display: inline-block; width: 24px; }
.menu-btn__lines i { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.menu-open .menu-btn__lines i:first-child { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn__lines i:last-child { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Menu overlay (mobile) ---------- */
.menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad); opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.menu__bg { position: absolute; inset: 0; background: var(--bg); z-index: -1; }
.menu.is-open { opacity: 1; visibility: visible; }
.menu__list { display: flex; flex-direction: column; gap: 6px; }
.menu__list a {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(30px, 9vw, 52px); font-weight: 800; letter-spacing: -.02em;
  padding: 8px 0; color: var(--ink);
}
.menu__list a span { font-family: var(--mono); font-size: 14px; color: var(--brand); font-weight: 400; }
.menu__cta { align-self: flex-start; margin-top: 28px; }
.menu__foot { margin-top: 32px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }
.menu__foot a { color: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 var(--sp); }
.kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 22px; font-weight: 700;
}
.hero__title {
  font-size: var(--fs-display);
  font-weight: 900; line-height: var(--lh-display); letter-spacing: -.025em;
  text-transform: uppercase; margin-bottom: 26px;
}
.hero__sub { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 46ch; margin-bottom: 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 3/2; background: var(--surface-2);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute; left: 16px; bottom: 16px;
  background: color-mix(in srgb, var(--ink) 78%, transparent); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  padding: 8px 14px; border-radius: 999px;
}
/* faixa de canto informativa "Nova sede · 2027" (hero, cartão e página de obra) */
.frame-ribbon {
  /* largura fixa + texto centrado: as pontas saem sempre pelos bordos do
     canto e o recorte fica limpo em qualquer tamanho de contentor */
  position: absolute; top: 40px; right: -100px; z-index: 4;
  width: 380px; text-align: center;
  transform: rotate(45deg); pointer-events: none;
  background: var(--brand); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  padding: 8px 0;
}

/* ---------- Hero em banner (imagem grande no topo, texto por baixo) ---------- */
.hero--banner { padding: 0 0 clamp(40px, 6vw, 72px); }
/* altura proporcional para a banda do edifício (letreiro→estacionamento,
   ~22%..88% da imagem) caber sempre: 37vw cobre qualquer largura; 66vh
   garante o mesmo em ecrãs 16:9/16:10 */
.hero__media--banner {
  width: 100%; border-radius: 0; box-shadow: none;
  aspect-ratio: auto; height: min(max(360px, 62vh, 34.1vw), 48vw);
}
.hero__media--banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; }
.project__frame .frame-ribbon { font-size: 10px; padding: 6px 0; width: 300px; top: 28px; right: -84px; }
.hero--banner .hero__text {
  padding-top: clamp(28px, 5vw, 56px);
  /* texto alinhado à margem esquerda do site (como o logótipo) e a usar
     a largura toda, em vez de ficar confinado à coluna central */
  max-width: none;
  margin-inline: 0;
}
.hero--banner .hero__sub { max-width: 68ch; }
@media (max-width: 980px) {
  /* 55.8vw = proporção natural da imagem -> mostra o render completo, sem corte */
  .hero__media--banner { order: 0; aspect-ratio: auto; height: 55.8vw; }
}

/* ---------- Section head ---------- */
.section-head { max-width: none; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head__num { display: block; color: var(--brand); font-size: 13px; letter-spacing: .12em; margin-bottom: 14px; }
.section-head__title {
  font-size: var(--fs-h2); font-weight: 900; line-height: var(--lh-display);
  letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 20px;
}
.section-head__text { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); max-width: 62ch; }

/* ---------- Blocos de secção ---------- */
.block { padding-block: var(--sp); }
.block--alt { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 30px; margin-left: 8px; padding-left: 34px; }
.timeline__rail { position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; }
.timeline__item::before {
  content: ""; position: absolute; left: -34px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--brand);
}
.timeline__item--now::before { border-color: var(--accent); background: var(--accent); }
.timeline__year { display: inline-block; color: var(--brand); font-size: 14px; letter-spacing: .06em; margin-bottom: 4px; }
.timeline__item--now .timeline__year { color: var(--brand); }
.timeline__soon {
  display: inline-block; margin-left: 10px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); border: 1px solid currentColor;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.timeline__item h3 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.timeline__item p { color: var(--muted); max-width: 60ch; }
/* em ecrãs largos a cronologia é horizontal: 5 marcos lado a lado sob uma linha */
@media (min-width: 1200px) {
  .timeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 44px); margin-left: 0; padding-left: 0; padding-top: 36px; }
  .timeline__rail { left: 8px; right: 8px; top: 8px; bottom: auto; width: auto; height: 2px; }
  .timeline__item::before { left: 2px; top: -37px; }
  .timeline__item p { max-width: none; font-size: 15px; }
}

/* ---------- Stats ---------- */
/* números compactos numa faixa horizontal: valor + legenda lado a lado */
.stats {
  display: flex; flex-wrap: wrap; gap: 16px clamp(18px, 2.6vw, 48px);
  margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.stat { display: flex; align-items: center; gap: 10px; text-align: left; }
.stat + .stat { padding-left: clamp(18px, 2.6vw, 48px); border-left: 1px solid var(--line); }
.stat__num { font-family: var(--mono); font-size: clamp(30px, 2.6vw, 44px); font-weight: 700; line-height: 1; color: var(--ink); }
.stat__plus { font-family: var(--mono); font-size: clamp(18px, 1.6vw, 26px); color: var(--accent); }
.stat__label { color: var(--muted); font-size: 13px; line-height: 1.35; max-width: 13ch; }

/* ---------- Serviços ---------- */
/* cartões largos que preenchem sempre a largura toda (a última fila estica) */
.services { display: flex; flex-wrap: wrap; gap: 20px; }
.service { flex: 1 1 320px; }
.service {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.block--alt .service { background: var(--surface); }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service__num { display: block; color: var(--brand); font-size: 12px; letter-spacing: .1em; margin-bottom: 18px; }
.service__icon { width: 56px; height: 42px; stroke: var(--brand); stroke-width: 2.4; fill: none; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 18px; }
.service h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 15.5px; }

/* ---------- Clientes (prova social) ---------- */
.clients { padding: clamp(28px, 4vw, 44px) 0; border-block: 1px solid var(--line); background: var(--surface); }
.clients__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(22px, 3vw, 52px); }
.clients__label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.clients__logo { height: 36px; width: auto; filter: grayscale(1); opacity: .72; transition: filter .25s, opacity .25s; }
.clients__logo:hover { filter: grayscale(0); opacity: 1; }
.clients__logo[alt="Enapor"] { height: 42px; }
.clients__logo[alt="Enacol"] { height: 30px; }
.clients__logo[alt="Importex"], .clients__logo[alt="Grupo Khym Negoce"] { height: 44px; }
.clients__logo[alt="Grupo Vilacelos"] { height: 30px; }
.clients__logo[alt="Morabeza Fresh"] { height: 40px; }

/* ---------- Filtro (separadores de texto) ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-bottom: clamp(28px, 4vw, 44px); }
.filter__chip {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 6px 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  position: relative; transition: color .2s ease; min-height: 40px;
}
.filter__chip::after { content: ""; position: absolute; left: 0; bottom: 6px; height: 2px; width: 0; background: var(--accent); transition: width .25s ease; }
.filter__chip:hover { color: var(--ink); }
.filter__chip.is-active { color: var(--ink); }
.filter__chip.is-active::after { width: 100%; }

/* filtro por ilha, contagens e "mostrar mais" */
.filter--ilhas { margin-top: -10px; }
.filter__count { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 6px; }
.filter__chip.is-active .filter__count { color: var(--brand); }
.projects__more { display: flex; width: fit-content; margin: 32px auto 0; }
.projects__empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Portfólio (estilo galeria, título sobre a imagem) ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.project { position: relative; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.project__frame { position: relative; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gallery { position: relative; aspect-ratio: 4/3; overflow: hidden; touch-action: pan-y; }
.gallery__slides { display: flex; height: 100%; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.gallery__slides > picture { flex: 0 0 100%; width: 100%; height: 100%; display: block; }
.project__photo { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project__frame:hover .project__photo { transform: scale(1.05); }

.project__overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: 44px 22px 15px;
  background: linear-gradient(to top, rgba(10,12,18,.92) 0%, rgba(10,12,18,.55) 48%, rgba(10,12,18,0) 100%);
  opacity: 1; transform: translateY(0);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.project__overlay h3 {
  color: #fff; font-family: var(--sans);
  font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; line-height: 1.3;
  letter-spacing: .01em;
  text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
/* localização + "Ver obra" partilham uma linha rente ao fundo */
.project__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-top: 7px;
}
.project__loc {
  font-family: var(--mono);
  color: rgba(255,255,255,.78);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
/* título/local sempre visíveis; o hover/foco reforça com "Ver obra →" */
.project__overlay-link { pointer-events: auto; display: inline-block; color: inherit; }
.project__overlay-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px; }
.project__cta {
  margin-left: auto; white-space: nowrap; color: #fff;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 2px solid var(--accent); padding-bottom: 2px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.project__frame:hover .project__cta,
.project__frame:focus-within .project__cta { opacity: 1; transform: translateY(0); }

.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s ease, background .2s;
}
.project__frame:hover .gallery__nav { opacity: 1; }
.gallery__nav:hover { background: #fff; }
.gallery__nav:focus-visible { opacity: 1; }
/* em ecrãs táteis (sem hover) as setas ficam sempre visíveis, discretas */
@media (hover: none) {
  .gallery__nav { opacity: .85; }
  .project__cta { opacity: 1; transform: none; }
}
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__dots { position: absolute; top: 4px; right: 4px; z-index: 3; display: flex; }
.gallery__dot { width: 24px; height: 24px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.gallery__dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.25); transition: background .2s, transform .2s; }
.gallery__dot.is-active::before { background: #fff; transform: scale(1.3); }
.gallery__dot:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 50%; }

/* fallback sem JS: mostra a informação por baixo (a sobreposição é criada por JS) */

/* ---------- Notícias ---------- */
.news {
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.news + .news { margin-top: clamp(20px, 3vw, 32px); }
.news__media { position: relative; min-height: 340px; }
.news__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news__body {
  padding: clamp(28px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.news__date { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.news__body h3 { font-size: var(--fs-h3); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.news__body p { color: var(--muted); }
.news__foot { color: var(--accent); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 900px) {
  .news { grid-template-columns: 1fr; }
  .news__media { min-height: 0; aspect-ratio: 16/9; }
}

/* ---------- Página de obra: anterior/seguinte e relacionadas ---------- */
.obra__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.obra__nav-link { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.obra__nav-link:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.obra__nav-link--next { text-align: right; align-items: flex-end; }
.obra__nav-link span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.obra__nav-link strong { font-weight: 700; line-height: 1.3; }
.obra__related { margin-top: clamp(32px, 5vw, 56px); }
.obra__related h2 { font-size: var(--fs-h3); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 18px; }
.obra__related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.obra__mini { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s, box-shadow .25s; }
.obra__mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.obra__mini img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.obra__mini-body { display: block; padding: 12px 14px 14px; }
.obra__mini-body strong { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
.obra__mini-body span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 680px) {
  .obra__related-grid { grid-template-columns: 1fr 1fr; }
  .obra__nav { grid-template-columns: 1fr; }
  .obra__nav-link--next { text-align: left; align-items: flex-start; }
}

/* ---------- Páginas legais ---------- */
.legal { max-width: 860px; margin-inline: auto; padding-bottom: clamp(48px, 6vw, 80px); }
.legal__lead { font-size: 18px; color: var(--muted); margin: 8px 0 28px; }
.legal h2 { font-size: 20px; font-weight: 800; margin: 32px 0 10px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--ink); }
.legal ul { display: grid; gap: 10px; padding-left: 0; }
.legal li { position: relative; padding-left: 22px; }
.legal li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.legal__id div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.legal__id dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: center; }
.legal__id dd { margin: 0; }
@media (max-width: 680px) { .legal__id div { grid-template-columns: 1fr; gap: 2px; } }
.footer__base a { color: var(--muted); } .footer__base a:hover { color: var(--brand); }

/* ---------- FAQ (Contactos) ---------- */
.faq { margin-top: clamp(36px, 5vw, 56px); max-width: 860px; }
.faq__title { font-size: var(--fs-h3); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--mono); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin-top: 10px; max-width: 70ch; }

/* ---------- Redes sociais (dentro de Notícias) ---------- */
.social { margin-top: clamp(28px, 4vw, 44px); }
.social__lead { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.social__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 24px); }
.social__card {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px) clamp(20px, 2.6vw, 30px);
  transition: border-color .2s, box-shadow .25s, transform .2s;
}
.social__card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.social__icon { width: 40px; height: 40px; flex: 0 0 40px; color: var(--brand); fill: none; stroke: currentColor; stroke-width: 1.8; }
.social__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.social__name { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.social__handle { font-size: 13px; color: var(--muted); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social__cta { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 700; white-space: nowrap; }
.social__cta i { font-style: normal; display: inline-block; transition: transform .2s; }
.social__card:hover .social__cta i { transform: translateX(4px); }
.footer__social { display: inline-flex; gap: 14px; align-items: center; }
.footer__social a { color: var(--muted); display: inline-flex; transition: color .2s; }
.footer__social a:hover { color: var(--brand); }
.footer__ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 680px) {
  .social__grid { grid-template-columns: 1fr; }
}

/* ---------- Contactos ---------- */
.contact__title { font-size: var(--fs-h2); font-weight: 900; line-height: var(--lh-display); letter-spacing: -.02em; text-transform: uppercase; margin: 10px 0 18px; }
.contact__mail { display: inline-block; color: var(--brand); font-size: clamp(16px, 1.6vw, 19px); font-weight: 700; border-bottom: 2px solid var(--line); padding-bottom: 3px; margin-bottom: clamp(32px, 4vw, 48px); transition: border-color .2s; }
.contact__mail:hover { border-color: var(--brand); }
.contact__primary { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; margin-bottom: clamp(48px, 6vw, 80px); max-width: 1200px; }
.contact__primary-info h3 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.contact__primary-note { color: var(--muted); margin: 14px 0 20px; max-width: 40ch; }
.contact__primary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.contact__form { display: grid; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.block--alt .contact__form { background: var(--surface); }
.field { display: grid; gap: 6px; }
.field__label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field__label b { color: var(--accent); font-weight: 700; }
.contact__required { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-top: -4px; }
.contact__privacy { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.contact__form input, .contact__form textarea, .contact__form select {
  width: 100%; background: var(--surface); border: 1px solid #8a8f99; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 16px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.contact__form textarea { resize: vertical; min-height: 110px; }
.contact__form input:focus, .contact__form textarea:focus, .contact__form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 45%, transparent); }
.contact__form input::placeholder, .contact__form textarea::placeholder { color: #8a8f99; }
.contact__form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
/* estados do formulário: campo inválido + mensagem de confirmação/fallback */
.contact__form input:user-invalid, .contact__form textarea:user-invalid, .contact__form select:user-invalid {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.contact__form-status {
  display: none; margin-top: 10px; padding: 12px 14px;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--ink);
}
.contact__form-status.is-visible { display: block; }
.contact__form-status a { color: var(--brand); font-weight: 700; }

/* equipa organizada por função, largura limitada (não estica em ecrãs grandes) */
.team {
  display: grid; grid-template-columns: 2.1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px); max-width: 1400px;
  padding-top: clamp(36px, 4vw, 52px); border-top: 1px solid var(--line);
}
/* Engenharia à esquerda -> Direção fica na coluna central */
.team__group--eng { order: -1; }
.team__group-title {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.team__members { display: grid; gap: 18px; }
.team__group--eng .team__members { grid-template-columns: 1fr 1fr; gap: 18px 22px; }
@media (max-width: 1100px) {
  .team { grid-template-columns: 1fr; }
  .team__group--eng { order: 0; } /* empilhado: Direção volta a ser a primeira */
}
@media (max-width: 560px) {
  .team__group--eng .team__members { grid-template-columns: 1fr; }
}
.team__member h4 { font-size: 17px; font-weight: 800; }
.team__area { display: block; color: var(--brand); font-size: 12px; letter-spacing: .04em; margin: 2px 0 8px; }
.team__link { display: block; color: var(--muted); font-size: 13px; line-height: 1.7; transition: color .2s; display: block; padding: 3px 0; }
.team__link[href^="mailto:"] { font-family: var(--sans); }
.contact__meta, .contact__meta a { font-family: var(--sans); }
.team__link:hover { color: var(--brand); }
.contact__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: clamp(40px, 5vw, 60px); padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.contact__meta a { color: var(--brand); }

/* ---------- Footer ---------- */
.footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px clamp(24px, 4vw, 64px); padding: 36px var(--pad) calc(36px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer h4 { font-family: var(--sans); font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.footer ul { display: grid; gap: 5px; }
.footer a:hover { color: var(--brand); }
.footer__base { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer a { transition: color .2s; }
.footer a:hover { color: var(--ink); }

/* ---------- WhatsApp FAB ---------- */
.wa-fab {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  transition: transform .2s ease;
}
.wa-fab svg { width: 30px; height: 30px; }
.wa-fab:hover { transform: scale(1.08); }

/* ---------- Reveal (progressivo, sem flash) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); }
  .js .reveal.is-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
}

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero__media { aspect-ratio: 16/10; order: -1; }
  .contact__primary { grid-template-columns: 1fr; }
  .stats { gap: 14px 24px; }
  .stat + .stat { border-left: 0; padding-left: 0; }
}
@media (max-width: 960px) {
  .header__nav, .header__cta { display: none; }
  .menu-btn { display: inline-flex; }
  section { scroll-margin-top: 68px; }
}
@media (max-width: 420px) {
  .projects { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* ============================================================
   PÁGINA DE DETALHE DE OBRA (obra.html)
   ============================================================ */
.obra { max-width: min(1240px, 100%); margin-inline: auto; padding: clamp(28px, 5vw, 56px) var(--pad) clamp(60px, 8vw, 100px); }
.obra__back { display: inline-block; color: var(--muted); font-size: 13px; letter-spacing: .04em; margin-bottom: 24px; transition: color .2s; }
.obra__back:hover { color: var(--brand); }
.obra__title { font-size: var(--fs-h2); font-weight: 900; line-height: var(--lh-display); letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 28px; }
/* ---- página de obra: layout editorial (título limpo, hero, specs, fotos empilhadas) ---- */
.obra { max-width: 1040px; margin-inline: auto; }
.obra__title--ed {
  font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 650;
  text-transform: none; letter-spacing: -.015em; line-height: 1.12;
  margin: 4px 0 clamp(20px, 3vw, 30px);
}
.obra__hero { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.obra__hero img { width: 100%; aspect-ratio: 2/1; object-fit: cover; display: block; }
.obra__specs { margin: clamp(28px, 4vw, 44px) 0 0; border-top: 1px solid var(--line); }
.obra__spec { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.obra__spec dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); align-self: center; }
.obra__spec dd { margin: 0; font-size: 16px; color: var(--ink); }
.obra__works { margin-top: clamp(32px, 4vw, 48px); }
.obra__stack { display: grid; gap: clamp(18px, 3vw, 32px); margin: clamp(32px, 5vw, 56px) 0; }
.obra__par { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 32px); }
.obra__foto { margin: 0; }
.obra__foto img { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); display: block; }
.obra__par .obra__foto img { aspect-ratio: 3/4; object-fit: cover; height: 100%; }
@media (max-width: 680px) {
  .obra__hero img { aspect-ratio: 16/10; }
  .obra__spec { grid-template-columns: 120px 1fr; gap: 12px; }
  .obra__spec dd { font-size: 15px; }
}
.obra__works { margin-bottom: clamp(32px, 4vw, 48px); }
.obra__works h2 { font-size: var(--fs-h3); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 20px; }
.obra__list { display: grid; gap: 14px; }
.obra__list li { position: relative; padding-left: 30px; color: var(--ink); font-size: 17px; }
.obra__list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
.obra__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* A37: sem movimento para quem o pediu */
@media (prefers-reduced-motion: reduce) {
  .gallery__slides, .project__photo, .btn, .btn i, .social__card, .social__cta i, .project__cta, .news, .frame-ribbon { transition: none !important; }
  .project__frame:hover .project__photo, .btn:hover, .social__card:hover { transform: none !important; }
}
