/* Tipos de letra alojados no próprio site (sem pedidos à Google). Licença: assets/fonts/OFL-*.txt */
@font-face {
  font-family: "Cinzel";
  src: url("assets/fonts/Cinzel-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* Sobradense: cores medidas no ficheiro do logótipo */
:root {
  --black: #000;
  --ink: #0a0a0a;
  --panel: #131313;
  --line: #2a2a2a;
  --text: #f4f3f1;        /* prata clara do logótipo */
  --muted: #beb3b1;       /* prata escura */
  --gold: #d89437;        /* dourado médio */
  --gold-light: #ffd469;  /* brilho do dourado */
  --gold-dark: #894f0f;   /* sombra do dourado */
  --silver: #dad4d2;      /* prata média */
  --green: #154f39;       /* verde das arestas do "S" */
  --green-deep: #093521;
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-light); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold); color: var(--black); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* Logótipo: recorta a linha do telefone que vem na imagem */
.logo-crop {
  display: block; overflow: hidden;
  aspect-ratio: 2000 / 490;
}
.logo-crop img {
  width: 100%; height: auto;
  mix-blend-mode: lighten; /* o fundo preto da imagem desaparece sobre fundos escuros */
}

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { width: 190px; flex-shrink: 0; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text); text-decoration: none;
  font-size: .9rem; font-weight: 500; letter-spacing: .04em;
}
.nav a:not(.btn):hover { color: var(--gold-light); }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--line); color: var(--text);
  font: 500 .9rem var(--sans); padding: 8px 14px; border-radius: var(--radius);
  cursor: pointer;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius);
  font: 600 .95rem var(--sans); letter-spacing: .04em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--black) !important;
}
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline { border-color: var(--silver); color: var(--silver); }
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }

/* Topo */
.hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(21, 79, 57, .35), transparent 60%),
    var(--black);
  border-bottom: 1px solid var(--line);
}
.hero-inner { text-align: center; padding: 72px 0 80px; }
.logo-hero { width: min(640px, 100%); margin: 0 auto 40px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--text); max-width: 22ch; margin: 0 auto 16px;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 46ch; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Credenciais */
.trust { background: var(--panel); border-bottom: 1px solid var(--line); }
.trust-list {
  list-style: none; margin: 0 auto; padding: 28px 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.trust-list li { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.trust-list strong {
  color: var(--gold); font-weight: 600; font-size: .75rem;
  letter-spacing: .12em; text-transform: uppercase;
}

/* Secções */
.section { padding: 88px 0; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line); }

.eyebrow {
  color: var(--gold); font-size: .78rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px;
}
h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 40px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 70%);
  -webkit-background-clip: text; background-clip: text;
  color: var(--gold); -webkit-text-fill-color: transparent;
}

/* Serviços */
.services {
  list-style: none; counter-reset: svc; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.services li {
  counter-increment: svc; background: var(--panel); padding: 28px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.services li:hover { border-color: var(--gold-dark); }
.services li::before {
  content: counter(svc, decimal-leading-zero);
  display: block; color: var(--gold); font: 600 .8rem var(--sans);
  letter-spacing: .1em; margin-bottom: 14px;
  border-bottom: 1px solid var(--gold-dark); width: 32px; padding-bottom: 6px;
}
.services h3 { font-size: 1.05rem; color: var(--silver); margin-bottom: 8px; }
.services p { margin: 0; color: var(--muted); font-size: .92rem; }
.services-more { margin: 28px 0 0; color: var(--silver); font-size: 1.05rem; }
.contact-list small { color: var(--muted); }

/* Sobre */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.about h2 { margin-bottom: 24px; }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: st; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px;
  background: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--green);
  padding: 18px 20px; border-radius: var(--radius);
}
.steps li::before {
  content: counter(st); grid-row: span 2;
  font: 700 1.6rem/1 var(--serif); color: var(--gold);
}
.steps strong { color: var(--silver); }
.steps span { color: var(--muted); font-size: .92rem; }

/* Trabalhos */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.gallery li { margin: 0; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.gallery img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  transition: transform .4s ease;
}
.gallery a:hover img { transform: scale(1.03); }
.gallery a:hover { border-color: var(--gold-dark); }
.gallery li p { margin: 10px 0 0; color: var(--silver); font-size: .92rem; }
#trabalhos .gallery, .gallery-obra { grid-template-columns: repeat(4, 1fr); }
.gallery li.wide { grid-column: span 2; }
.gallery li.wide img { aspect-ratio: 3 / 2; }
/* Em 4 colunas, a foto larga fica com a mesma altura das vizinhas (legendas alinhadas) */
@media (min-width: 861px) {
  .gallery li.wide { container-type: inline-size; }
  .gallery li.wide img { height: calc((100cqw - 20px) * 2 / 3); }
}

/* Visualizador de fotografias */
html.lb-open { overflow: hidden; }
.lightbox {
  border: 0; padding: 0; margin: 0; background: transparent; color: var(--text);
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .92); }
.lightbox-figure {
  margin: 0; height: 100%; padding: 64px 72px 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.lightbox-figure img {
  max-width: 100%; max-height: calc(100vh - 150px);
  width: auto; height: auto; object-fit: contain; border-radius: var(--radius);
}
.lightbox-figure figcaption { color: var(--silver); text-align: center; font-size: .95rem; }
.lb-count {
  position: absolute; top: 20px; left: 24px; margin: 0;
  color: var(--muted); font-size: .85rem; letter-spacing: .08em;
}
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--gold-dark); background: rgba(10, 10, 10, .75); color: var(--text);
  font: 400 1.6rem/1 var(--sans); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { border-color: var(--gold-light); color: var(--gold-light); }
.lb-close { top: 12px; right: 16px; font-size: 1.2rem; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

.section-lead { color: var(--muted); max-width: 60ch; margin: -20px 0 36px; font-size: 1.05rem; }

/* Contactos */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact h2 { margin-bottom: 16px; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list li {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.contact-list li > span:first-child {
  color: var(--gold); font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; padding-top: 3px;
}
.contact-list a { text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }

.quote-form {
  background: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  padding: 32px; border-radius: var(--radius); display: grid; gap: 18px;
}
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--silver); }
.field input, .field select, .field textarea {
  width: 100%; background: #1b1b1b; color: var(--text);
  border: 1px solid #6e6e6e; border-radius: var(--radius); /* contraste 3:1 com o fundo do campo */
  padding: 12px 14px; font: 400 1rem var(--sans);
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"] { border-color: #e06b5a; }
.form-error { color: #f0978a; margin: 0; font-size: .9rem; }
.form-note { color: var(--muted); font-size: .82rem; margin: 0; }
.noscript-note { color: var(--gold-light); margin: 0; font-size: .9rem; }

.lre-link {
  display: inline-block; margin-bottom: 12px; padding: 8px 14px;
  border: 1px solid var(--gold); border-radius: var(--radius);
  color: var(--gold-light); font-weight: 600; text-decoration: none;
}
.lre-link:hover { background: rgba(216, 148, 55, .12); }

/* Rodapé */
.site-footer { background: var(--black); padding: 48px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-inner p { margin: 0 0 6px; }
.footer-name { color: var(--silver); font-weight: 600; }
.small { font-size: .82rem; }

/* Ecrãs pequenos */
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 12px; border-bottom: 0; }
  .brand { width: 150px; }

  .trust-list { grid-template-columns: 1fr 1fr; }
  .about, .contact, .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .gallery, #trabalhos .gallery, .gallery-obra { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .hero-inner { padding: 48px 0 56px; }
  .quote-form { padding: 22px; }
}

@media (max-width: 600px) {
  /* Serviços no telemóvel: grelha compacta de 2 colunas, só com o título */
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .services li { padding: 14px 12px 16px; }
  .services li::before { margin-bottom: 8px; padding-bottom: 4px; }
  .services h3 { font-size: .86rem; margin: 0; hyphens: auto; overflow-wrap: break-word; }
  .services p { display: none; }

  /* Visualizador: botões em baixo para não taparem a foto */
  .lightbox-figure { padding: 56px 12px 88px; }
  .lightbox-figure img { max-height: calc(100vh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

@media (max-width: 480px) {
  .trust-list { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
  .lb-btn { transition: none; }
  .gallery a:hover img { transform: none; }
}
