/* =========================================================
   Mestre Ibrahim — Landing Page (HTML estático)
   Paleta e tipografia replicadas do site original
   ========================================================= */

:root {
  --cream: #efeee6;
  --navy: #1a2e4c;
  --gold: #daa520;
  --green: #68cf76;
  --gray: #54595f;
  --text: #333333;
  --white: #ffffff;

  --font-title: "Lora", Georgia, serif;
  --font-body: "Lato", Helvetica, Arial, sans-serif;
  --font-alt: "Noto Sans", Helvetica, Arial, sans-serif;

  --container: 1140px;
  --gutter: 20px;
  --radius: 10px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--gold);
  color: var(--white);
  padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --------------------------- Botões CTA -------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-alt);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.4;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 50px;
  padding: 15px 40px 18px;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn svg { width: 1em; height: 1em; fill: currentColor; flex: none; }

.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--cream); }
.btn--gold:hover,
.btn--gold:focus-visible { background: var(--white); color: var(--gold); }

.btn--green { background: var(--green); border-color: var(--green); color: var(--white); }
.btn--green:hover,
.btn--green:focus-visible { background: var(--white); color: var(--green); }

/* Blocos de chamada (telefone + whatsapp) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 80px;
}
.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.cta-phone {
  font-family: var(--font-body);
  font-size: 21px;
  color: rgba(255, 255, 255, .5);
  margin: 0;
}
.cta-note {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgba(255, 255, 255, .5);
  margin: 0;
}
.cta-row--light .cta-phone,
.cta-row--light .cta-note { color: rgba(0, 0, 0, .5); }

/* ---------------------------- Cabeçalho -------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9999;
  background: transparent;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}
.brand {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--cream);
  text-decoration: none;
  transition: color .3s ease;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--cream);
  text-decoration: none;
  padding: 13px 20px;
  transition: color .3s ease, opacity .3s ease;
}
.main-nav a:hover { opacity: .7; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--cream);
  transition: color .3s ease;
}
.nav-toggle svg { width: 26px; height: 26px; fill: currentColor; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

/* Estado após scroll: fundo branco e texto escuro */
.site-header.is-scrolled { background: var(--white); box-shadow: 0 1px 12px rgba(0, 0, 0, .08); }
.site-header.is-scrolled .brand,
.site-header.is-scrolled .main-nav a,
.site-header.is-scrolled .nav-toggle { color: #10111a; }

/* ------------------------------ Hero ----------------------------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--navy);
  padding: 140px var(--gutter) 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/bg-cosmos.webp") center center / cover no-repeat;
  opacity: .3;
  mix-blend-mode: luminosity;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; width: 100%; max-width: var(--container); }

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2em;
  color: var(--cream);
  margin: 0 0 10px;
}
.hero__divider {
  width: 69%;
  height: 0;
  margin: 2px auto;
  border: 0;
  border-top: 2px solid var(--cream);
}
.hero__title {
  font-size: 48px;
  color: var(--cream);
  margin-top: 24px;
}
.hero__lead {
  max-width: 55%;
  margin: 20px auto 0;
  font-size: 16px;
  color: var(--cream);
}
.hero__kicker {
  font-size: 20px;
  font-weight: 500;
  color: var(--cream);
  margin: 40px 0 20px;
}

/* ------------------------------ Sobre ---------------------------- */
.about {
  background: var(--cream);
  padding-block: 5%;
}
.about__inner {
  display: flex;
  align-items: stretch;
  gap: 30px;
}
.about__media {
  position: relative;
  flex: 1 1 50%;
  min-height: 420px;
  margin-block: 40px;
  overflow: hidden;
}
.about__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/sobre-mestre.webp") center center / cover no-repeat;
  mix-blend-mode: luminosity;
}
.about__content {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 0;
}
.about__title { font-size: 32px; color: var(--navy); }
.about__text {
  font-family: var(--font-alt);
  font-size: 16px;
  font-weight: 300;
}

/* ----------------------------- Serviços -------------------------- */
.services {
  position: relative;
  background-color: var(--navy);
  padding-block: 5%;
  overflow: hidden;
}
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/bg-cosmos.webp") center center / cover no-repeat;
  opacity: .1;
  mix-blend-mode: screen;
  pointer-events: none;
}
.services__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.services__title {
  font-size: 32px;
  color: var(--cream);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
}
.serv-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: 0 0 10px rgba(255, 255, 255, .2);
  transition: box-shadow .3s ease;
}
.serv-item:hover { box-shadow: 0 0 10px rgba(255, 255, 255, 1); }
.serv-item img {
  width: 20%;
  min-width: 56px;
  filter: invert(1);
}
.serv-item h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--cream);
}
.serv-item p {
  font-family: var(--font-alt);
  font-size: 16px;
  font-weight: 300;
  color: var(--cream);
}

/* --------------------------- Testemunhos ------------------------- */
.testimonials { padding-block: 80px; }
.testimonials__title {
  font-size: 32px;
  color: var(--text);
}

.carousel { position: relative; margin-block: 40px; padding-inline: 40px; }
.carousel__track {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-block: 4px;
}
.carousel__track::-webkit-scrollbar { display: none; }

.testimonial {
  flex: 0 0 calc((100% - 80px) / 3);
  scroll-snap-align: start;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.testimonial__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 10px;
  border-bottom: 1px solid var(--text);
}
.testimonial__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.testimonial__cite {
  display: flex;
  flex-direction: column;
  font-style: normal;
  margin-right: auto;
}
.testimonial__name {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: #1c2022;
}
.testimonial__role {
  font-family: var(--font-title);
  font-size: 12px;
  text-transform: uppercase;
  line-height: 1.2em;
  color: #697882;
}
.testimonial__icon { color: #25d366; flex: none; }
.testimonial__icon svg { width: 17px; height: 17px; fill: currentColor; }
.testimonial__text {
  padding: 10px 20px 20px;
  font-family: var(--font-body);
  font-size: 16px;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  color: rgba(0, 0, 0, .25);
  transition: color .3s ease;
}
.carousel__arrow:hover { color: var(--gold); }
.carousel__arrow svg { width: 20px; height: 20px; fill: currentColor; }
.carousel__arrow--prev { left: 0; }
.carousel__arrow--next { right: 0; }

/* Sem nada para deslizar (ecrã largo): esconde setas e pontos */
.carousel.is-static .carousel__arrow,
.carousel.is-static .carousel__dots { display: none; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: background-color .3s ease;
}
.carousel__dot[aria-current="true"] { background: var(--text); }

/* ------------------------------- FAQ ----------------------------- */
.faq { padding-block: 40px 80px; }
.faq__title {
  font-size: 32px;
  color: var(--text);
  margin-bottom: 24px;
}
.faq__item { border-bottom: 1px solid rgba(0, 0, 0, .1); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: color .3s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--gold); }
.faq__item summary svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  flex: none;
  transition: transform .3s ease-in-out;
}
.faq__item[open] summary svg { transform: rotate(180deg); }
.faq__answer {
  padding: 0 10px 20px;
  font-family: var(--font-body);
  font-size: 16px;
}

/* ----------------------------- Rodapé ---------------------------- */
.site-footer {
  background: var(--gray);
  color: var(--cream);
  padding-block: 80px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: center;
}
.site-footer__brand { flex: 1 1 320px; }
.site-footer__brand h2 { font-size: 32px; color: var(--cream); }
.site-footer__brand h2 a { text-decoration: none; }
.site-footer__brand p {
  margin-top: 20px;
  font-size: 16px;
  color: var(--cream);
}
.site-footer__contacts {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.site-footer__contacts h2 {
  font-size: 26px;
  color: var(--cream);
}
.site-footer__cta {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 20px;
}
.site-footer__cta .cta-group { align-items: flex-end; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 60px;
  font-size: 16px;
}
.site-footer__bottom a { color: var(--white); text-decoration: underline; }

/* ------------------------ Banner de cookies ---------------------- */
.cookie-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999999;
  background: var(--white);
  border-top: 1px solid #f4f4f4;
  box-shadow: 0 -1px 10px rgba(172, 171, 171, .3);
  padding: 16.5px 24px;
  color: #212121;
}
.cookie-bar[hidden],
.cookie-modal[hidden],
.cookie-revisit[hidden] { display: none; }
.cookie-bar__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  margin: 0 0 12px;
}
.cookie-bar__group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  max-width: 1400px;
  margin-inline: auto;
}
.cookie-bar__text { font-size: 14px; line-height: 24px; margin: 0; }
.cookie-bar__actions { display: flex; align-items: center; gap: 8px; }

.cky-btn {
  font-family: inherit;
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  padding: 8px 27px;
  border-radius: 2px;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold);
  white-space: nowrap;
  cursor: pointer;
  transition: opacity .3s ease;
}
.cky-btn:hover { opacity: .8; }
.cky-btn--accept { background: var(--gold); color: var(--white); }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.cookie-modal__panel {
  position: relative;
  width: 845px;
  max-width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 32px 68px rgba(0, 0, 0, .3);
  color: #212121;
}
.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #f4f4f4;
}
.cookie-modal__header h2 { font-family: var(--font-body); font-size: 18px; font-weight: 700; text-transform: none; }
.cookie-modal__close {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #212121;
}
.cookie-modal__body {
  padding: 12px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 24px;
}
.cookie-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f4f4f4;
}
.cookie-cat:last-child { border-bottom: 0; }
.cookie-cat__name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.cookie-cat__desc { margin: 0; }
.cookie-cat__always { color: #008000; font-weight: 600; font-size: 14px; white-space: nowrap; }
.cookie-switch { flex: none; }
.cookie-switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 50px;
  background: #d0d5d2;
  cursor: pointer;
  transition: background-color .3s ease;
}
.cookie-switch input:checked { background: var(--gold); }
.cookie-switch input::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .3s ease;
}
.cookie-switch input:checked::before { transform: translateX(20px); }
.cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 24px;
  border-top: 1px solid #f4f4f4;
}
.cookie-modal__footer .cky-btn { flex: 1 1 auto; }

.cookie-revisit {
  position: fixed;
  left: 15px;
  bottom: 15px;
  z-index: 999999;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #0056a7;
  color: var(--white);
  cursor: pointer;
}
.cookie-revisit svg { width: 24px; height: 24px; fill: currentColor; }

/* ------------------------ Página de obrigado ---------------------- */
.thanks {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--navy);
  padding: 120px var(--gutter) 60px;
  overflow: hidden;
}
.thanks::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/bg-cosmos.webp") center center / cover no-repeat;
  opacity: .3;
  mix-blend-mode: luminosity;
  pointer-events: none;
}
.thanks__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.thanks__badge {
  width: 84px;
  height: 84px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}
.thanks__badge svg { width: 38px; height: 38px; fill: currentColor; }
.thanks__title {
  font-size: 40px;
  color: var(--cream);
}
.thanks__divider {
  width: 40%;
  height: 0;
  margin: 24px auto;
  border: 0;
  border-top: 2px solid var(--cream);
}
.thanks__text {
  font-size: 18px;
  color: var(--cream);
  margin-bottom: 40px;
}
.thanks__back {
  display: inline-block;
  margin-top: 40px;
  font-size: 16px;
  color: rgba(255, 255, 255, .6);
}

/* --------------------------- Página legal ------------------------ */
.page-hero {
  background-color: var(--navy);
  position: relative;
  padding: 160px var(--gutter) 60px;
  text-align: center;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/bg-cosmos.webp") center center / cover no-repeat;
  opacity: .3;
  mix-blend-mode: luminosity;
}
.page-hero h1 {
  position: relative;
  z-index: 1;
  font-size: 40px;
  color: var(--cream);
}
.legal { padding-block: 60px 80px; }
.legal h2 {
  font-size: 22px;
  color: var(--navy);
  margin: 36px 0 12px;
}
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--gold); }

/* --------------------------- Responsivo -------------------------- */
@media (max-width: 1024px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a {
    color: var(--cream);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }
  .site-header.is-scrolled .main-nav a { color: var(--cream); }
  .nav-toggle { display: block; }

  .hero { padding: 120px 40px 80px; }
  .hero__lead { max-width: 80%; }

  .about__inner { gap: 20px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .services__inner { gap: 50px; }
  .cta-row { gap: 40px; }
  .testimonial { flex: 0 0 calc((100% - 40px) / 2); }
  .carousel { padding-inline: 28px; }
}

@media (max-width: 767px) {
  .brand { font-size: 14px; }

  .hero {
    padding: 120px 5% 60px;
    min-height: auto;
  }
  .hero__eyebrow { font-size: 12px; }
  .hero__title { font-size: 28px; }
  .hero__lead { max-width: 100%; }
  .hero__kicker { font-size: 28px; }

  /* No original, no telemóvel o WhatsApp aparece primeiro */
  .cta-row { flex-direction: column-reverse; align-items: center; gap: 20px; }

  .about { padding-block: 40px; }
  .about__inner { flex-direction: column; }
  .about__media { min-height: 260px; margin-block: 0 20px; }
  .about__content { padding: 0; }
  .about__title { font-size: 28px; }

  .services { padding-block: 60px; }
  .services__title, .testimonials__title, .faq__title { font-size: 28px; }
  .services__grid { grid-template-columns: 1fr; gap: 30px; }
  .services__inner { gap: 40px; }
  .serv-item img { width: 40%; }

  .testimonials { padding-block: 50px; }
  .testimonial { flex: 0 0 100%; }
  .carousel { padding-inline: 0; }
  .carousel__track { gap: 10px; }
  .carousel__arrow { display: none; }

  .site-footer { padding: 20% 5%; }
  .site-footer__top { flex-direction: column; text-align: center; }
  /* Em coluna, o flex-basis passaria a altura mínima — repõe o tamanho natural */
  .site-footer__brand { flex: 0 0 auto; }
  .site-footer__contacts { align-items: center; width: 100%; }
  .site-footer__cta { align-items: center; }
  .site-footer__cta .cta-group { align-items: center; }
  .site-footer__bottom { justify-content: center; text-align: center; margin-top: 40px; }

  .cookie-bar { padding: 16.5px 20px; }
  .cookie-bar__group { flex-direction: column; align-items: stretch; }
  .cookie-bar__actions { flex-direction: column; margin-top: 12px; }
  .cookie-bar__actions .cky-btn { width: 100%; }
  .cookie-modal__footer { flex-direction: column; }

  .thanks { padding: 110px 5% 50px; }
  .thanks__title { font-size: 28px; }
  .thanks__text { font-size: 16px; }

  .page-hero { padding: 120px 5% 50px; }
  .page-hero h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
