/* ============================================================
   Substância — Soluções Imobiliárias
   Tema escuro inspirado em inove.com.pt, com a paleta oficial:
   #1A3052 (azul-marinho) · #B9663D (terracota) · #F5F5F5 (claro) · #707C8C (cinza-ardósia)
   ============================================================ */

:root {
  --bg-950: #0a1220;
  --bg-900: #0c1626;
  --bg-800: #111f36;
  --navy-800: #1a3052;
  --navy-700: #253f66;
  --navy-500: #3c5c92;
  --navy-300: #8fa6c6;
  --terra-600: #b9663d;
  --terra-500: #cf7a4e;
  --terra-700: #9c5230;
  --light: #f5f5f5;
  --slate: #707c8c;
  --text: #e8eaee;
  --text-soft: #aeb6c2;
  --line: rgba(245, 245, 245, 0.14);
  --card-bg: rgba(255, 255, 255, 0.03);
  --shadow: 0 22px 50px -25px rgba(0, 0, 0, 0.6);

  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-900);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terra-600);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
.dot { color: var(--terra-600); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra-500);
  margin: 0 0 0.9rem;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(10, 18, 32, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.brand-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--terra-500);
}
.brand-mark { display: block; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color .2s ease;
}
.nav a:hover { color: #fff; }
.nav .nav-cta {
  background: var(--terra-600);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
}
.nav .nav-cta:hover { background: var(--terra-700); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.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); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px clamp(20px, 5vw, 40px) 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-950);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 13px 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-terra { background: var(--terra-600); color: #fff; }
.btn-terra:hover { background: var(--terra-700); }
.btn-outline { background: transparent; border-color: rgba(245,245,245,.35); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-block { width: 100%; }

/* ---------- Painéis a ecrã inteiro ---------- */
.panel {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 120px 0 80px;
}
.panel-center {
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.panel-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-soft);
  max-width: 640px;
  margin: 1.4rem 0 0;
}
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.4rem;
  justify-content: center;
}

.panel-hero {
  background: url("assets/bg-hero.svg") center / cover no-repeat;
}
.panel-sell {
  background: url("assets/bg-sell.svg") center / cover no-repeat;
  min-height: 78vh;
}
@media (min-width: 1024px) {
  .panel-hero, .panel-sell { background-attachment: fixed; }
}
.panel::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg-900));
  pointer-events: none;
}

.hero-mark { margin-bottom: 26px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(245,245,245,.4);
  border-radius: 14px;
  display: grid;
  justify-items: center;
  padding-top: 7px;
  z-index: 2;
}
.scroll-cue span {
  width: 4px; height: 8px;
  background: var(--terra-500);
  border-radius: 2px;
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(10px); opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
}

/* ---------- Secções ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-950); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 60px); }
.section-sub { color: var(--text-soft); font-size: 1.05rem; margin: 1rem 0 0; }

/* ---------- Cartões (contorno, estilo Inove) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(185, 102, 61, 0.55);
  background: rgba(255, 255, 255, 0.05);
}
.card-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 1px solid rgba(185, 102, 61, 0.5);
  border-radius: 12px;
  color: var(--terra-500);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); margin: 0 0 16px; font-size: 0.96rem; }
.card-list { list-style: none; margin: 0; padding: 0; }
.card-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.card-list li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--terra-600);
}

/* ---------- Método (faixa numerada) ---------- */
.method {
  list-style: none;
  margin: clamp(48px, 7vw, 72px) 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.method li {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.method li span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--terra-600);
}

/* ---------- Portfólio ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.filter {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filter:hover { color: #fff; border-color: rgba(245,245,245,.4); }
.filter.is-active {
  color: #fff;
  background: var(--terra-600);
  border-color: var(--terra-600);
}
.portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-card.is-hidden { display: none; }
.project-media {
  position: relative;
  min-height: 175px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-500));
}
.project-media-2 { background: linear-gradient(135deg, var(--terra-700), var(--terra-600)); }
.project-media-3 { background: linear-gradient(135deg, #24344d, #3a4a63); }
.project-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,.10) 46% 54%, transparent 54%),
    linear-gradient(65deg, transparent 0 62%, rgba(255,255,255,.07) 62% 70%, transparent 70%);
}
.badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.badge-progress { background: rgba(255,255,255,.92); color: var(--navy-800); }
.badge-soon { background: var(--terra-600); color: #fff; }
.project-body { padding: 22px 24px 26px; }
.project-body h3 { margin-bottom: 4px; font-size: 1.1rem; }
.project-meta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--terra-500);
  margin: 0 0 10px;
}
.project-body p:last-child { margin-bottom: 0; }
.portfolio-note {
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--slate);
  font-style: italic;
}

/* ---------- Investidores ---------- */
.invest-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.invest-copy > p { color: var(--text-soft); margin: 1.1rem 0 0; }
.invest-points { list-style: none; margin: 1.8rem 0 0; padding: 0; }
.invest-points li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.invest-points strong { color: #fff; }
.invest-points span { color: var(--text-soft); font-size: 0.95rem; }
.invest-copy .panel-actions { justify-content: flex-start; margin-top: 1.8rem; }
.invest-disclaimer {
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 1.6rem;
  max-width: 560px;
}
.invest-panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.invest-panel h3 { color: #fff; margin-bottom: 20px; }
.invest-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.invest-steps li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.invest-steps li span {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--terra-600);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  transform: translateY(4px);
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-help { font-size: 1.35rem; margin-bottom: 8px; }
.contact-list { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
  color: var(--text-soft);
}
.contact-list span {
  min-width: 92px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--terra-500);
}
.contact-list a { color: var(--text); }
.contact-list a:hover { color: #fff; text-decoration: underline; }
.contact-logo {
  margin-top: 30px;
  background: var(--light);
  border-radius: var(--radius);
  padding: 18px 26px;
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  background: rgba(255,255,255,.04);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field select { appearance: none; }
.field select option { background: var(--bg-800); color: var(--text); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terra-600);
  box-shadow: 0 0 0 3px rgba(185, 102, 61, .2);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form-status { font-size: 0.9rem; margin: 12px 0 0; min-height: 1.2em; }
.form-status.ok { color: #7fc79a; }
.form-status.err { color: #e08a80; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-950);
  border-top: 1px solid var(--line);
  padding: 52px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
}
.footer-brand { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.footer-brand > div { display: flex; flex-direction: column; line-height: 1.2; }
.footer-name { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.15rem; }
.footer-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra-500);
}
.footer-contacts { list-style: none; margin: 14px 0 0; padding: 0; grid-column: 1 / -1; }
.footer-contacts li { margin-bottom: 6px; }
.footer-contacts a { color: var(--text-soft); font-size: 0.92rem; }
.footer-contacts a:hover { color: #fff; }
.footer-nav, .footer-areas { display: flex; flex-direction: column; gap: 10px; }
.footer-nav h4, .footer-areas h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra-500);
  margin-bottom: 6px;
}
.footer-nav a, .footer-areas span { font-size: 0.92rem; color: var(--text-soft); }
.footer-nav a:hover { color: #fff; }
.footer-legal {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.footer-legal p { font-size: 0.8rem; color: var(--slate); margin: 0; }

/* ---------- Animação reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 820px) {
  .invest-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .panel { min-height: 88vh; }
}
