/* O Sarrafo — Carpintaria e Remodelações
   Cores e fontes: identidade/design-guide.md */

:root {
  --brand: #A14C13;
  --brand-dark: #7E3B0E;
  --brand-soft: #F4E7DC;
  --ink: #2B211B;
  --muted: #6E5F55;
  --bg: #FFFFFF;
  --bg-alt: #FAF6F1;
  --line: #E8DDD3;
  --black: #1D1D1B;
  --radius: 10px;
  --wrap: 1160px;
  --font-head: "Dax", "Tw Cen MT Condensed", "Fira Sans Condensed", sans-serif;
  --font-body: "Fira Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--bg); padding: 8px 12px; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: .8em;
}
.eyebrow--light { color: #F2D6C1; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }

/* Botões */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid var(--brand);
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn--light { background: #fff; color: var(--brand); border-color: #fff; }
.btn--light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
.btn--sm { padding: 7px 18px; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* Topo */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-size: 1.4rem; font-weight: 500; letter-spacing: .06em; color: var(--brand); }
.brand__tag { font-family: var(--font-head); font-size: .82rem; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: 56px 0 64px; background: var(--bg-alt); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__photo {
  position: relative; margin: 0;
  aspect-ratio: 4 / 3.6;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 20px 50px -25px rgba(80, 35, 5, .55);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo figcaption {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--font-head); font-size: .95rem; color: #fff;
  background: rgba(30, 15, 5, .6); padding: 5px 12px; border-radius: 999px;
}

/* Factos */
.facts { background: var(--brand); color: #fff; padding: 26px 0; }
.facts__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-family: var(--font-head); font-size: 1.55rem; font-weight: 500; }
.facts span { font-size: .95rem; color: #F6E3D4; }

/* Secções */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 760px; margin-bottom: 44px; }

/* Serviços */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.card p { color: var(--muted); margin: 0; }
.ico { width: 46px; height: 46px; margin-bottom: 18px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Obras */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  font: 500 1rem var(--font-head);
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.filter:hover { border-color: var(--brand); }
.filter.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand-soft); }
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .4s; }
.shot:hover img { transform: scale(1.04); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 10px;
  font-family: var(--font-head); font-size: 1rem; color: #fff;
  background: linear-gradient(transparent, rgba(30,15,5,.7));
}
.shot--empty { display: grid; place-items: center; border: 1px dashed #D9BFA9; }
.shot--empty span { font-family: var(--font-head); font-size: 1.3rem; color: var(--brand); }
.shot--empty figcaption { background: none; color: var(--muted); text-align: center; font-size: .9rem; }
.shot[hidden] { display: none; }
.more { margin-top: 26px; color: var(--muted); }

/* Como trabalhamos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; counter-reset: s; }
.steps li { border-top: 2px solid var(--brand); padding-top: 20px; }
.steps__n { display: block; font-family: var(--font-head); font-size: 2.4rem; line-height: 1; color: var(--brand); margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }

/* Sobre */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about__wood { aspect-ratio: 3 / 4; border-radius: var(--radius); background: url("../img/madeira.jpg") center / cover; display: grid; place-items: center; }
.about__wood img { width: 58%; filter: drop-shadow(0 4px 14px rgba(0,0,0,.25)); }
.about__txt p:not(.eyebrow) { color: var(--muted); }
.about__txt p.about__sign { font-family: var(--font-head); font-size: 1.4rem; color: var(--brand); margin-top: 1.4em; }

/* Profissionais */
.pro { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.pro p:not(.eyebrow) { color: var(--muted); }
.pro__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pro__list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; }
.pro__list strong { font-family: var(--font-head); font-size: 1.25rem; font-weight: 500; color: var(--brand); }
.pro__list span { color: var(--muted); }

/* Contacto */
.contact { background: var(--brand); color: #fff; }
.contact h2 { color: #fff; }
.contact p:not(.eyebrow) { color: #F6E3D4; max-width: 30em; margin-bottom: 26px; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__list svg { flex: none; width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.contact__list small { display: block; font-size: .85rem; color: #F2D6C1; }
.contact__list a { color: #fff; text-decoration: none; font-size: 1.1rem; }
.contact__list a:hover { text-decoration: underline; }

/* Rodapé */
.footer { background: var(--black); color: #BDB3AB; font-size: .92rem; padding: 48px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; }
.footer__brand { display: flex; gap: 16px; align-items: center; }
.footer__brand img { width: 46px; opacity: .9; }
.footer__brand p { margin: 0; }
.footer__links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer a { color: #fff; }
.footer__legal, .footer__copy { grid-column: 1 / -1; margin: 0; font-size: .82rem; }
.footer__legal { border-top: 1px solid #3A3532; padding-top: 22px; }

/* WhatsApp flutuante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(15,10,6,.92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; width: auto; border-radius: 6px; }
.lightbox__close { position: absolute; top: 14px; right: 18px; font-size: 2.4rem; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; }

/* Responsivo */
@media (max-width: 960px) {
  .cards, .gallery { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--brand); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; text-align: center; }

  .hero { padding: 32px 0 44px; }
  .hero__grid, .about, .pro, .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__photo { aspect-ratio: 4 / 3; order: -1; }
  .about__wood { aspect-ratio: 16 / 10; }
  .about__wood img { width: 30%; }
  .section { padding: 64px 0; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .cards, .gallery, .steps { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; text-align: center; }
  .brand__tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
