/* Profinition — folha de estilos
   Cores da marca: roxo #3A1E53 e dourado #D3AD37 (do logótipo). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f5f1ea;
  --paper-2: #ebe5da;
  --ink: #1d1426;
  --muted: #5b5263;
  --line: rgba(29, 20, 38, 0.14);
  --purple: #3a1e53;
  --purple-2: #2a1540;
  --gold: #d3ad37;
  --gold-ink: #7a5c0f; /* dourado escuro para texto em fundo claro (contraste AA) */
  --white: #fff;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --space: clamp(64px, 9vw, 128px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; font-stretch: 112%; font-weight: 800; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 14px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.label {
  font-size: 13px;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 14px;
}
.label--light { color: var(--gold); }
.muted { color: var(--muted); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--purple-2); border-color: var(--purple-2); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn--ghost { background: transparent; color: var(--purple); }
.btn--ghost:hover { background: var(--purple); color: var(--white); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #e2bf4f; border-color: #e2bf4f; }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 15px; }

/* ---------- Cabeçalho ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 234, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.top__logo img { width: 190px; height: auto; }
.top__nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
.top__nav a:not(.btn) { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.top__nav a:not(.btn):hover { border-bottom-color: var(--gold); }
.top__menu { display: none; }

@media (max-width: 899px) {
  .top__logo img { width: 150px; }
  .top__menu {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent;
    font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer;
  }
  .top__nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .top__nav.is-open { display: flex; }
  .top__nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .top__nav .btn { margin-top: 16px; min-height: 52px; }
}

/* ---------- Abertura ---------- */
.hero { padding-top: clamp(32px, 6vw, 72px); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); max-width: 15ch; }
.lead { margin-top: 22px; font-size: clamp(1.06rem, 1.5vw, 1.2rem); max-width: 40ch; color: #3b3242; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__photo { margin: 0; position: relative; }
.hero__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.hero__photo figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--paper); padding: 8px 14px 0 0;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
}

.facts {
  list-style: none;
  display: grid;
  gap: 0;
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding-top: 0;
  padding-bottom: 0;
}
.facts li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.facts strong { display: block; color: var(--ink); font-size: 17px; font-stretch: 108%; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .facts li { border-top: 3px solid var(--purple); }
}

/* ---------- Secções ---------- */
.section { padding-block: var(--space); }
.section--tint { background: var(--paper-2); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); max-width: 18ch; }
.section__intro { margin-top: 14px; color: var(--muted); max-width: 52ch; }

/* Serviços: lista numerada, sem cartões */
.services { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; }
.services li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.services li::before {
  content: counter(s, decimal-leading-zero);
  grid-row: span 2;
  font-weight: 700; font-stretch: 75%; font-size: 15px; letter-spacing: 0.06em;
  color: var(--gold-ink); padding-top: 4px;
}
@media (max-width: 599px) { .services li { grid-template-columns: 34px 1fr; } }
.services h3 { font-size: 1.3rem; }
.services p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
@media (min-width: 900px) {
  .services { grid-template-columns: 1fr 1fr; column-gap: 64px; }
}

/* ---------- Obras ---------- */
.job { padding-top: 28px; border-top: 1px solid var(--line); }
.job + .job { margin-top: clamp(48px, 7vw, 80px); }
.job__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 20px; }
.job__head h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.job__meta { color: var(--gold-ink); font-weight: 700; font-stretch: 85%; text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; }
.job__video {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.job__video::before { content: ""; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.job__video:hover { background: var(--ink); color: var(--paper); }

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.gallery a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.gallery img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.4s ease; }
.gallery a:hover img { transform: scale(1.025); }
.gallery a:first-child { grid-column: span 2; }
.gallery a:first-child img { aspect-ratio: 16 / 10; }
.gallery--two a:first-child { grid-column: auto; }
.gallery--two a:first-child img { aspect-ratio: 1 / 1; }
.gallery--compare a:nth-child(2) { grid-column: span 2; }
.gallery--compare a:nth-child(-n+2) img { aspect-ratio: 16 / 9; }

@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .gallery a:first-child { grid-column: span 1; }
  .gallery a:first-child img { aspect-ratio: 1 / 1; }
  .gallery--wide { grid-template-columns: 2fr 1fr 1fr; }
  .gallery--wide a:first-child img { aspect-ratio: auto; height: 100%; }
  .gallery--wide:has(> a:nth-child(4)) { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: clamp(170px, 19vw, 250px); }
  .gallery--wide:has(> a:nth-child(4)) a:first-child { grid-row: span 2; }
  .gallery--wide:has(> a:nth-child(4)) a:nth-child(4) { grid-column: span 2; }
  .gallery--wide:has(> a:nth-child(4)) img { aspect-ratio: auto; height: 100%; }
  .gallery--compare { grid-template-columns: 1fr 1fr 0.7fr; }
  .gallery--compare a:nth-child(2) { grid-column: auto; }
  .gallery--compare img { aspect-ratio: auto !important; height: 100%; }
  .gallery--two { grid-template-columns: 1fr 1fr; }
  .gallery--two a:first-child img, .gallery--two img { aspect-ratio: 4 / 3; }
}
/* Fotos verticais (telemóvel): 2 colunas no telemóvel, 4 no computador */
.gallery--portrait a:first-child { grid-column: auto; }
.gallery--portrait img, .gallery--portrait a:first-child img { aspect-ratio: 3 / 4; }
@media (min-width: 760px) { .gallery--portrait { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery a:hover img { transform: none; } }

.tag {
  position: absolute; z-index: 1; left: 10px; top: 10px;
  padding: 4px 10px; border-radius: 2px;
  background: var(--ink); color: var(--white);
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-stretch: 85%;
}
.tag--gold { background: var(--gold); color: var(--ink); }

/* ---------- Como trabalhamos ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; gap: 0; }
.steps li { counter-increment: p; padding: 24px 0; border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(p);
  display: block;
  font-size: 3rem; line-height: 1; font-weight: 800; font-stretch: 125%;
  color: var(--purple); margin-bottom: 14px;
}
.steps h3 { font-size: 1.25rem; }
.steps p { margin-top: 8px; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); column-gap: 40px; } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps li { border-top: 3px solid var(--purple); } }

.warranty {
  margin-top: 40px; padding: 20px 24px;
  border-left: 4px solid var(--gold);
  background: var(--paper-2);
  max-width: 70ch;
}

/* ---------- Instagram ---------- */
.insta { background: var(--purple); color: var(--white); padding-block: clamp(48px, 7vw, 80px); }
.insta__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.insta h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 20ch; }

/* ---------- Zona ---------- */
.zone { display: grid; gap: 0; }
.zone__body { font-size: 1.1rem; }
.places { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.places li {
  padding: 8px 16px; border: 1.5px solid var(--purple); border-radius: 999px;
  font-weight: 700; font-size: 16px; color: var(--purple);
}
@media (min-width: 900px) { .zone { grid-template-columns: 1fr 1.2fr; column-gap: 64px; align-items: start; } }

/* ---------- Contacto ---------- */
.contact { background: var(--purple-2); color: var(--white); padding-block: var(--space); }
.contact__grid { display: grid; gap: 48px; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.contact__lead { margin: 16px 0 28px; color: rgba(255, 255, 255, 0.78); max-width: 40ch; }
.contact__list { margin: 0; display: grid; gap: 0; }
.contact__list div { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.contact__list dt { font-size: 13px; font-weight: 700; font-stretch: 80%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.contact__list dd { margin: 4px 0 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.contact__list a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.contact__list a:hover { border-bottom-color: var(--gold); }
.contact__phone { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; font-stretch: 110%; border-bottom: 0 !important; }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

/* ---------- Página de obras ---------- */
.more { margin-top: clamp(40px, 6vw, 64px); }
.section--first { padding-top: clamp(32px, 6vw, 64px); }
.page-title { font-size: clamp(2.2rem, 4.8vw, 3.6rem); max-width: 18ch; }
.top__nav a[aria-current="page"] { border-bottom-color: var(--gold); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 0 calc(var(--gutter) * -1) 24px; padding-inline: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--purple); background: transparent; color: var(--purple);
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--purple); color: var(--white); }

/* Mosaico: as fotos mantêm a proporção original (horizontais, quadradas e verticais) */
.wall { display: block; columns: 2; column-gap: 10px; }
.wall .wall__item { display: block; break-inside: avoid; margin-bottom: 10px; }
.wall .wall__item img, .wall .wall__item:first-child img { aspect-ratio: auto; height: auto; }
.wall .wall__item span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(15, 9, 22, 0.75));
  color: var(--white); font-size: 13px; font-weight: 600; line-height: 1.3;
}
.wall .wall__item[hidden] { display: none; }
@media (min-width: 760px) { .wall { columns: 3; column-gap: 12px; } .wall .wall__item { margin-bottom: 12px; } }
@media (min-width: 1100px) { .wall { columns: 4; } }

.vcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vcard {
  position: relative; display: block; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); cursor: pointer; text-align: left; font: inherit;
}
.vcard img { width: 100%; aspect-ratio: 1; object-fit: cover; opacity: 0.8; transition: opacity 0.2s; }
.vcard:hover img { opacity: 1; }
.vcard span { position: absolute; left: 10px; right: 10px; bottom: 10px; color: var(--white); font-weight: 700; font-size: 15px; line-height: 1.25; }
.vcard::before {
  content: ""; position: absolute; z-index: 1; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.92);
}
.vcard::after {
  content: ""; position: absolute; z-index: 2; top: 50%; left: 50%; margin: -10px 0 0 -5px;
  border-left: 18px solid var(--purple); border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
@media (min-width: 760px) { .vcards { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Rodapé ---------- */
.foot { background: var(--ink); color: rgba(255, 255, 255, 0.7); font-size: 14px; padding-block: 28px 32px; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot__row img { width: 48px; height: 48px; }
.foot__row p:last-child { margin-left: auto; }

/* ---------- Barra fixa no telemóvel ---------- */
.dock { display: none; }
@media (max-width: 759px) {
  body { padding-bottom: 72px; }
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 1px solid var(--line);
  }
  .dock a {
    display: flex; align-items: center; justify-content: center; min-height: 48px;
    border-radius: var(--radius); font-weight: 700; text-decoration: none;
  }
  .dock__wa { background: var(--purple); color: var(--white); }
  .dock__call { border: 2px solid var(--purple); color: var(--purple); }
}

/* ---------- Visualizador de fotos e vídeos ---------- */
.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(15, 9, 22, 0.94); color: var(--white);
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: transparent; }
.viewer figure { margin: 0; padding: 56px 16px 24px; max-width: min(1400px, 100%); }
.viewer img, .viewer video { max-height: calc(100vh - 140px); width: auto; max-width: 100%; margin: 0 auto; border-radius: var(--radius); }
/* Os vídeos das obras são verticais (9:16), como no Instagram */
.viewer video { height: calc(100vh - 140px); width: auto; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; }
.viewer figcaption { margin-top: 12px; text-align: center; font-size: 15px; color: rgba(255, 255, 255, 0.8); }
.viewer__close, .viewer__nav {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: var(--white);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.viewer__close:hover, .viewer__nav:hover { background: rgba(255, 255, 255, 0.24); }
.viewer__close { top: 12px; right: 12px; }
.viewer__nav { top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { left: 12px; }
.viewer__nav--next { right: 12px; }
@media (max-width: 759px) { .viewer__nav { top: auto; bottom: 16px; transform: none; } }
