/* ===== Condsafe — estilos ===== */
:root {
  --azul-escuro: #134371;
  --azul: #2f6c9a;
  --azul-claro: #d8e2eb;
  --preto: #1c1d1e;
  --branco: #fff;
  --header-h: 140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: #000;
  background: var(--branco);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 100px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--branco);
  height: var(--header-h);
}
.header__inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 68px 16px 69px;
  display: flex;
  align-items: center;
  gap: 48px;
}
.header__logo { flex-shrink: 0; }
.header__logo img { width: 167px; height: 75px; max-width: none; object-fit: contain; }
.header__nav { display: flex; gap: 8px; align-items: center; }
.menu-btn--ext { max-width: 300px; padding-left: 30px; padding-right: 30px; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 50px;
  border-radius: 10px;
  background: var(--branco);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.menu-btn:hover, .menu-btn:focus-visible, .menu-btn.active { background: var(--azul); color: var(--branco); }
.header__toggle { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 1148px;
  overflow: hidden;
}
.hero__building {
  position: absolute;
  left: 672px;
  top: 23px;
  width: 768px;
  height: 1248px;
  overflow: hidden;
  pointer-events: none;
}
.hero__building img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}
.hero__fade {
  position: absolute;
  left: 216px;
  top: 669px;
  width: 936px;
  height: 580px;
  opacity: .84;
  background: linear-gradient(182deg, rgba(255,255,255,.24) 2.8%, #fff 89.9%);
}
.hero__content {
  position: relative;
  padding-top: 143px;
  padding-left: 104px;
}
.hero__title {
  font-weight: 600;
  font-size: 128px;
  line-height: 145px;
  max-width: 817px;
}
.hero__subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 32px;
  margin: 45px 0;
}
.budget-btn {
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 10px 122px 10px 25px;
  border-radius: 10px;
  background: var(--azul-escuro);
  color: var(--branco);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  transition: background .2s;
}
.budget-btn:hover { background: var(--azul); }

/* Cartões de números */
.stats {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 184px 0 147px;
  margin-top: 205px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 25px;
  width: 277px;
  height: 96px;
  padding: 9px 18px 8px 9px;
  border-radius: 16px;
  background: var(--azul-claro);
}
.stat__icon {
  flex-shrink: 0;
  width: 82px;
  height: 79px;
  border-radius: 13px;
  background: var(--azul-escuro);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat p { font-weight: 600; font-size: 16px; }

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  height: 252px;
  margin-top: 150px;
  display: flex;
  align-items: center;
}
.marquee__track {
  display: flex;
  gap: 120px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  font-weight: 600;
  font-size: 200px;
  white-space: nowrap;
}
@keyframes marquee {
  to { transform: translateX(calc(-50% - 60px)); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ===== Quem somos ===== */
.about { padding: 195px 0 79px; }
.about__card {
  position: relative;
  height: 741px;
  border-radius: 49px;
  background: var(--azul-claro);
  box-shadow: 11px 7px 8px rgba(0,0,0,.25);
  overflow: hidden;
}
.about__photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 47.8%;
  height: 100%;
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__gradient {
  position: absolute;
  left: 0;
  top: 0;
  width: 67.7%;
  height: 100%;
  opacity: .72;
  background: linear-gradient(269.5deg, rgba(216,226,235,.49) 6.9%, #7a8085 99.7%);
}
.about__text {
  position: relative;
  padding: 76px 0 0 70px;
  max-width: 627px;
}
.about__title {
  font-weight: 500;
  font-size: 128px;
  line-height: 167px;
  max-width: 529px;
}
.about__text p {
  margin: 63px 0 0 6px;
  font-weight: 300;
  font-size: 18px;
  max-width: 551px;
}

/* ===== Área azul ===== */
.blue-area { background: var(--azul-claro); }
.section-title {
  font-weight: 500;
  font-size: 96px;
  line-height: 167px;
}

/* Serviços */
.services { padding: 233px 0 180px; }
.container--services { padding-left: 154px; padding-right: 154px; }
.services__grid {
  list-style: none;
  margin: 43px 0 0 27px;
  padding: 0;
  display: grid;
  grid-template-columns: 652px auto;
  row-gap: 31px;
  justify-content: start;
}
.services__grid li {
  justify-self: start;
  padding: 27px 50px 27px 30px;
  border-radius: 15px;
  background: var(--branco);
  font-weight: 500;
  font-size: 32px;
  line-height: 31px;
  white-space: nowrap;
}

/* ===== Formulário ===== */
.budget { padding: 0 0 0; }
.form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 26px;
  padding: 53px 52px;
  border-radius: 49px;
  background: var(--preto);
  filter: drop-shadow(11px 7px 4px rgba(0,0,0,.25));
  color: var(--azul-claro);
}
.form__title {
  grid-column: 1 / span 3;
  font-weight: 500;
  font-size: 96px;
  line-height: 116px;
  margin-bottom: 40px;
}
.form__group {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 26px;
  line-height: 22px;
  margin-top: 30px;
}
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; }
.field label, .field__label {
  font-size: 24px;
  line-height: 22px;
  min-height: 36px;
  padding-bottom: 8px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field textarea {
  width: 100%;
  height: 47px;
  border: 2px solid transparent;
  border-radius: 2px;
  background: var(--branco);
  font: 400 18px 'Poppins', sans-serif;
  color: var(--preto);
  padding: 8px 12px;
  outline: none;
  transition: border-color .2s;
}
.field textarea { height: 126px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--azul); }
.field input.invalid, .field textarea.invalid { border-color: #e05a5a; }

/* Interruptores (Jardins / Piscina) */
.switch { position: relative; display: inline-block; width: 139px; height: 47px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 47px;
  background: var(--branco);
  transition: background .25s;
}
.switch__slider::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--azul-claro);
  transition: transform .25s, background .25s;
}
.switch input:checked + .switch__slider { background: var(--azul); }
.switch input:checked + .switch__slider::before { transform: translateX(92px); background: var(--branco); }
.switch input:focus-visible + .switch__slider { outline: 2px solid var(--azul-claro); outline-offset: 3px; }

/* Caixas de autorização */
.check {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
}
.check input {
  appearance: none;
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  margin: 0;
  border-radius: 2px;
  background: var(--branco);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.check input:checked { background: var(--azul); }
.check input:checked::after {
  content: "";
  width: 6px;
  height: 12px;
  border: solid var(--branco);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check input.invalid { outline: 2px solid #e05a5a; }

.form-btn {
  height: 45px;
  border: 0;
  border-radius: 10px;
  background: var(--azul);
  color: var(--branco);
  font: 500 16px 'Poppins', sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.form-btn:hover { background: var(--azul-escuro); }
.form-btn:disabled { opacity: .6; cursor: wait; }
.form__status { font-size: 18px; min-height: 22px; }
.form__status.ok { color: #8fd19e; }
.form__status.erro { color: #ff9a9a; }
.hp { position: absolute; left: -9999px; }

/* ===== Contactos ===== */
.contacts { padding: 207px 0 300px; }
.contacts__list { font-style: normal; margin: 36px 0 0 92px; }
.contacts__list p { font-size: 22px; line-height: 22px; color: var(--preto); margin-bottom: 21px; }
.contacts__list a { text-decoration: none; }
.contacts__list a:hover { text-decoration: underline; }

/* ===== Ecrãs mais pequenos ===== */
@media (max-width: 1360px) {
  .header__inner { gap: 24px; justify-content: space-between; padding: 0 32px 16px; }
  .menu-btn, .menu-btn--ext { padding: 10px 16px; font-size: 15px; }
}
@media (max-width: 1280px) {
  .hero__title { font-size: 100px; line-height: 115px; }
  .stats { padding: 0 100px; }
  .services__grid { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .services__grid li { white-space: normal; font-size: 26px; }
}

@media (max-width: 1180px) {
  :root { --header-h: 96px; }
  .container, .container--services { padding: 0 32px; }
  .header__inner { padding: 0 24px; }
  .header__logo img { width: 120px; height: 54px; }
  .header__toggle {
    display: flex; flex-direction: column; gap: 6px;
    margin-left: auto; padding: 10px; border: 0; background: none; cursor: pointer;
  }
  .header__toggle span { width: 28px; height: 3px; border-radius: 2px; background: var(--preto); }
  .header__nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 8px; padding: 16px 24px 24px;
    background: var(--branco); box-shadow: 0 8px 16px rgba(0,0,0,.08);
    display: none;
  }
  .header__nav.open { display: flex; }
  .header__nav .menu-btn { width: 100%; }

  .hero { min-height: 0; padding-bottom: 60px; }
  .hero__building { left: 50%; top: 0; width: 530px; height: 860px; opacity: .55; }
  .hero__fade { left: 0; top: 400px; width: 100%; height: 460px; }
  .hero__content { padding: 80px 32px 0; }
  .hero__title { font-size: 72px; line-height: 82px; }
  .hero__subtitle { font-size: 24px; margin: 28px 0; }
  .budget-btn { padding-right: 60px; }
  .stats { flex-wrap: wrap; gap: 16px; justify-content: flex-start; padding: 0 32px; margin-top: 80px; }

  .marquee { height: 160px; margin-top: 40px; }
  .marquee__track span { font-size: 120px; }

  .about { padding: 100px 0 60px; }
  .about__card { height: auto; padding-bottom: 60px; }
  .about__gradient { width: 100%; }
  .about__title { font-size: 88px; line-height: 110px; }
  .about__text { padding: 50px 40px 0; }
  .about__text p { margin-top: 32px; }

  .services { padding: 100px 0; }
  .section-title { font-size: 64px; line-height: 90px; }
  .services__grid { margin-left: 0; }
  .form__title { font-size: 64px; line-height: 76px; grid-column: 1 / -1; }
  .contacts { padding: 120px 0 160px; }
  .contacts__list { margin-left: 0; }
}

@media (max-width: 640px) {
  .hero__title { font-size: 46px; line-height: 54px; }
  .hero__subtitle { font-size: 20px; }
  .budget-btn { padding: 10px 32px; }
  .stat { width: 100%; }
  .marquee { height: 100px; }
  .marquee__track span { font-size: 64px; }
  .marquee__track { gap: 60px; }
  @keyframes marquee { to { transform: translateX(calc(-50% - 30px)); } }
  .about__card { border-radius: 28px; }
  .about__photo { width: 100%; opacity: .3; }
  .hero__building { display: none; }
  .about__title { font-size: 56px; line-height: 64px; }
  .about__text { padding: 36px 24px 0; }
  .about__text p { margin-left: 0; font-size: 16px; }
  .section-title { font-size: 48px; line-height: 64px; }
  .services__grid { grid-template-columns: 1fr; }
  .services__grid li { font-size: 20px; line-height: 26px; padding: 18px 24px; width: 100%; }
  .form { grid-template-columns: 1fr 1fr; padding: 32px 20px; border-radius: 28px; gap: 20px 14px; }
  .form__title { font-size: 44px; line-height: 52px; margin-bottom: 10px; }
  .form__group { font-size: 20px; margin-top: 16px; }
  .field, .span-2 { grid-column: 1 / -1; }
  .field label, .field__label { font-size: 18px; min-height: 30px; }
  .check { font-size: 14px; line-height: 20px; }
  .contacts__list p { font-size: 17px; line-height: 24px; }
}

/* ===== Rodapé legal ===== */
.footer { background: var(--preto); color: var(--azul-claro); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 32px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer a { color: var(--azul-claro); }
.footer a:hover { color: var(--branco); }
