/* ===== Tokens ===== */
:root {
  --cream: #e1ddd1;
  --cream-dark: #c9bda9;
  --brown: #484f45;
  --brown-15: rgba(72, 79, 69, 0.15);
  --font-serif: 'Cormorant Upright', serif;
  --font-sans: 'Montserrat', sans-serif;
  --container-max: 1280px;
  --gap-section: 120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: #000000;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-light { background: var(--cream); color: #000000; }
.btn-dark { background: #c9b59b; color: #000000; width: 100%; }

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 32px 0;
  background: transparent;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-scrolled {
  background: var(--brown);
  padding: 12px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.site-header.is-scrolled .logo-img {
  height: 64px;
  filter: none;
}

#topo, #sobre, #servicos, #galeria, #orcamento, #contacto {
  scroll-margin-top: 110px;
}

.nav {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-group {
  display: flex;
  gap: 36px;
}

.nav-link {
  color: var(--cream);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 6px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--cream);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 14px; }
.nav-link.is-current::after { width: 14px; }

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 110px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45));
}

.site-header-solid {
  background: var(--brown);
  padding: 12px 0;
}
.site-header-solid .logo-img { height: 84px; filter: none; }
.site-header-solid.is-scrolled { padding: 12px 0; }
.site-header-solid.is-scrolled .logo-img { height: 64px; }

.page-with-fixed-header { padding-top: 108px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--cream);
  display: block;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--brown);
  padding: 24px 0;
}
.nav-mobile .nav-link { color: var(--cream); }
.nav-mobile.is-open { display: flex; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(15, 10, 8, 0.48), rgba(15, 10, 8, 0.48)),
    radial-gradient(ellipse 70% 55% at 50% 55%, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 70%),
    linear-gradient(rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 240px),
    linear-gradient(rgba(225, 221, 209, 0) 40%, rgba(72, 79, 69, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  max-width: 900px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.hero-content.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.5);
}

/* ===== Sections shared ===== */
section {
  padding: var(--gap-section) 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 400;
  text-align: center;
}
.section-title .thin { font-weight: 300; }

/* ===== About ===== */
.about { background: var(--cream); }

.about-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  margin-bottom: 64px;
}
.about-mark { width: 160px; opacity: 0.9; filter: brightness(0) saturate(0); }
.about-divider {
  width: 1px;
  height: 80px;
  background: var(--brown);
  opacity: 0.4;
}
.about-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.25;
  font-weight: 400;
  max-width: 800px;
}

.about-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 80px;
  font-size: 19px;
  line-height: 1.6;
}

.about-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  flex-wrap: wrap;
}

.about-left, .about-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.about-right { align-items: flex-end; flex: 1; }

.about-photo {
  border: 12px solid #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  width: 320px;
  height: 460px;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo-tall { width: 100%; max-width: 500px; height: 420px; }

.about-for {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
}

.about-signature {
  text-align: right;
}
.about-signature p { font-size: 19px; margin-bottom: 8px; }
.signature-name {
  font-family: var(--font-serif);
  font-size: 28px;
  font-style: italic;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  height: 460px;
  border-radius: 200px 200px 0 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding: 0 28px 28px;
  transition: transform 0.4s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(72,79,69,0) 30%, rgba(72,79,69,0.78) 100%);
}
.service-card:hover { transform: translateY(-8px); }
.service-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  color: var(--cream);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-align: center;
}
.service-desc {
  position: relative;
  z-index: 1;
  color: var(--cream);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0.9;
}

/* ===== Gallery ===== */
.gallery { background: var(--cream); }
.gallery-container {
  display: flex;
  gap: 56px;
  align-items: flex-end;
}
.gallery-left {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 32px;
}
.gallery-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.gallery-top-row {
  display: flex;
  gap: 32px;
  align-items: stretch;
  justify-content: space-between;
}
.gallery-photo-side { align-self: stretch; height: auto; min-height: 280px; }
.gallery-title { flex: 0 0 280px; display: flex; flex-direction: column; gap: 20px; }
.gallery-text { font-size: 16px; line-height: 1.6; opacity: 0.85; }
.gallery-cta { align-self: flex-start; }
.small-caps {
  display: block;
  font-size: 18px;
  margin-bottom: 16px;
}
.gallery-title .section-title { text-align: left; }
.gallery-photo {
  border: 10px solid #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-photo-main { width: 100%; height: 480px; }
.gallery-photo-side { flex: 1; }
.gallery-photo-wide { width: 100%; height: 320px; }
.gallery-name p { font-size: 19px; margin-bottom: 4px; }
.gallery-name span { font-size: 14px; font-weight: 700; }

/* ===== Orçamento personalizado (passo a passo) ===== */
.packages { background: var(--cream); }
.packages-note {
  text-align: center;
  margin: 16px auto 0;
  max-width: 640px;
  opacity: 0.75;
  font-size: 16px;
  line-height: 1.6;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}
.step-card {
  background: #dfd6c7;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  border-top: 3px solid var(--brown);
}
.step-number {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: var(--brown);
  opacity: 0.4;
}
.step-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
}
.step-desc {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
}
.steps-cta {
  text-align: center;
  margin-top: 56px;
}
.steps-cta .btn { width: auto; }

/* ===== Testimonial ===== */
.testimonial-container {
  display: flex;
  gap: 48px;
  align-items: stretch;
}
.testimonial-review {
  flex: 1;
  background: rgba(255,255,255,0.6);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  justify-content: space-between;
}
.testimonial-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.quote-mark { width: 64px; opacity: 0.5; }
.testimonial-name { text-align: right; }
.testimonial-name p { font-size: 19px; }
.testimonial-name span { font-size: 14px; font-weight: 700; }
.testimonial-review blockquote {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35;
  transition: opacity 0.3s ease;
}
.testimonial-name p, .testimonial-name span { transition: opacity 0.3s ease; }
.testimonial-photo {
  flex: 0 0 42%;
  border: 12px solid #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}
.testimonial-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }

.testimonial-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.testimonial-arrow {
  background: none;
  border: 1px solid var(--brown-15);
  color: var(--brown);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease;
}
.testimonial-arrow:hover { background: var(--brown-15); }
.testimonial-dots {
  display: flex;
  gap: 10px;
}
.testimonial-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown-15);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}
.testimonial-dots .dot.is-active {
  background: var(--brown);
  transform: scale(1.2);
}

/* ===== Modal: pedido de orçamento ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 24, 19, 0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--cream);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px 36px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--brown);
  cursor: pointer;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
}
.modal-subtitle { font-size: 15px; opacity: 0.8; margin-bottom: 24px; line-height: 1.5; }
.quote-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quote-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}
.quote-form input,
.quote-form textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  color: #000000;
  border: 1px solid var(--brown-15);
  background: transparent;
  padding: 12px 14px;
  font-weight: 400;
  resize: vertical;
}
.quote-form .btn { margin-top: 8px; }
.quote-success {
  text-align: center;
  padding: 40px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quote-success p:first-child {
  font-family: var(--font-serif);
  font-size: 26px;
}
.quote-success p { font-size: 15px; opacity: 0.8; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  background: #a89478;
  color: var(--cream);
  padding: 20px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  max-width: 900px;
  margin: 0 auto;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { font-size: 14px; line-height: 1.5; max-width: 640px; }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn { width: auto; flex-shrink: 0; padding: 10px 24px; font-size: 13px; }
.cookie-banner #cookie-accept { background: var(--cream); color: var(--brown); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(225,221,209,0.5);
}
.btn-outline:hover { background: rgba(225,221,209,0.1); }

/* ===== Legal page ===== */
.legal-page { padding-top: 56px; }
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}
.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin: 40px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: 16px; line-height: 1.7; opacity: 0.9; }

/* ===== Footer ===== */
.footer {
  background: var(--brown);
  color: var(--cream);
  padding: 80px 0 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 64px;
}
.footer-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  max-width: 600px;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}
.footer-contact a {
  font-size: 15px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding-bottom: 48px;
  border-top: 1px solid rgba(225,221,209,0.15);
  padding-top: 48px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col h5 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.footer-col a, .footer-col p { font-size: 15px; opacity: 0.85; }
.footer-col a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(225,221,209,0.15);
  padding-top: 24px;
  font-size: 14px;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { text-decoration: underline; opacity: 1; }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ===== Gallery page ===== */
.gallery-hero {
  background: var(--cream);
  text-align: center;
  padding-bottom: 64px;
}
.gallery-hero .small-caps { font-size: 16px; opacity: 0.7; }
.gallery-hero-text {
  max-width: 600px;
  margin: 16px auto 0;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.85;
}

.gallery-page { padding-top: 56px; }
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 16px;
}
.gallery-page-grid .tile {
  position: relative;
  height: 260px;
  overflow: hidden;
  cursor: pointer;
  background: var(--cream-dark);
}
.gallery-page-grid .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.gallery-page-grid .tile:hover img { transform: scale(1.06); }
.gallery-page-grid .tile.wide { grid-column: span 2; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(34, 24, 19, 0.94);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
}
.lightbox-close {
  top: 24px;
  right: 32px;
  font-size: 40px;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
  line-height: 1;
  padding: 12px 18px;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-close:hover, .lightbox-nav:hover { opacity: 0.7; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-group { display: none; }
  .nav-toggle { display: flex; }
  .logo-img { height: 56px; }
  .site-header.is-scrolled .logo-img,
  .site-header-solid .logo-img,
  .site-header-solid.is-scrolled .logo-img { height: 48px; }
  .page-with-fixed-header { padding-top: 72px; }
  section { padding: 48px 0; }
  .about-text { grid-template-columns: 1fr; }
  .about-bottom { flex-direction: column; align-items: center; gap: 32px; }
  .about-right { align-items: center; }
  .about-signature { text-align: center; }
  .about-for { order: -1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
  .gallery-container { flex-direction: column; gap: 24px; }
  .gallery-left, .gallery-right { width: 100%; align-items: stretch; }
  .gallery-top-row { flex-direction: column; }
  .gallery-photo-side { flex: none; height: 420px; min-height: 420px; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
  .steps-cta { margin-top: 24px; }
  .testimonial-container { flex-direction: column; }
  .testimonial-photo { flex: none; height: 320px; }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-contact { align-items: flex-start; }
}

@media (max-width: 1100px) {
  .footer-columns { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 540px) {
  .services-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-contact { align-items: flex-start; width: 100%; }
  .footer-contact a { font-size: 13px; text-align: left; }
  .gallery-page-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-page-grid .tile { height: 180px; }
  .lightbox-nav { font-size: 36px; padding: 8px 12px; }
  .cookie-banner { flex-direction: column; align-items: flex-start; left: 12px; right: 12px; bottom: 12px; padding: 16px 18px; }
  .cookie-actions { width: 100%; gap: 8px; }
  .cookie-actions .btn { flex: 1; padding: 10px 16px; font-size: 12px; }
  section { padding: 32px 0; }
  .legal-page, .gallery-page { padding-top: 24px; }
  .about-top { margin-bottom: 28px; }
  .about-text { margin-bottom: 32px; }
}

@media (max-width: 900px) {
  .gallery-page-grid { grid-template-columns: repeat(3, 1fr); }
}
