:root {
  --ink: #3d4d59;
  --forest: #6d4e30;
  --green: #97744d;
  --lime: #cfb17b;
  --sand: #f4f0e9;
  --cream: #fffefa;
  --line: #ded5c8;
  --muted: #707b82;
  --orange: #a75f3d;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding-bottom: 78px;
  color: var(--ink);
  background: var(--cream);
  font-family: "Montserrat", Arial, sans-serif;
  transition:
    background 0.25s,
    color 0.25s;
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}
.notice {
  background: var(--forest);
  color: #f9f4ec;
  font-size: 0.8rem;
}
.notice .wrap {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.notice a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
header {
  background: rgba(252, 251, 247, 0.94);
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid rgba(23, 52, 46, 0.1);
  backdrop-filter: blur(10px);
}
.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.brand {
  display: block;
  width: 214px;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.brand span {
  display: none;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand.logo-fallback img {
  display: none;
}
.brand.logo-fallback span {
  display: block;
  color: var(--forest);
  font-size: 1.45rem;
}
.brand small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  margin-top: 1px;
  color: var(--muted);
  font-weight: 600;
}
nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 0.91rem;
  font-weight: 600;
}
nav a:hover {
  color: var(--green);
}
.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  background: var(--forest);
  color: white;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.2s ease;
}
.nav-cta:hover,
.button:hover {
  background: #523820;
  transform: translateY(-1px);
}
.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}
.menu {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}
.hero {
  overflow: hidden;
  position: relative;
  min-height: 625px;
  color: #fff;
  background: #6d4e30;
}
.slides {
  position: absolute;
  inset: 0;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: center/cover no-repeat;
  transition: opacity 1.2s ease;
}
.slide.active {
  opacity: 1;
}
.hero:before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(48, 31, 18, 0.85) 0%,
    rgba(48, 31, 18, 0.62) 43%,
    rgba(48, 31, 18, 0.12) 76%,
    rgba(48, 31, 18, 0.06)
  );
}
.terrain {
  display: none;
}
.hero-grid {
  min-height: 625px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 50px;
}
.hero-mark {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translateY(calc(var(--hero-progress, 0) * -60px));
  opacity: calc(1 - var(--hero-progress, 0) * 1.65);
  transition: opacity 0.08s linear;
}
.hero-mark img {
  width: min(580px, 78vw);
  filter: brightness(0) invert(1);
  mix-blend-mode: screen;
}
.hero-mark span {
  margin-top: 18px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}
.hero-content {
  padding-top: 150px;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.hero-content,
.hero-aside {
  opacity: 0;
  transform: translateY(24px);
}
.hero.scrolled .hero-content,
.hero.scrolled .hero-aside {
  opacity: 1;
  transform: none;
}
.eyebrow {
  color: #f0ddad;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.73rem;
  font-weight: 700;
  margin: 0 0 20px;
}
h1,
h2,
h3 {
  margin: 0;
}
h1 {
  max-width: 650px;
  font:
    600 clamp(2.7rem, 5vw, 5.2rem)/0.98 "Montserrat",
    Arial,
    sans-serif;
  letter-spacing: -0.04em;
}
.lead {
  max-width: 535px;
  margin: 25px 0 30px;
  line-height: 1.65;
  font-size: 1.08rem;
  color: #f7f1e7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}
.button.light {
  background: #d2b17b;
  color: #3d3227;
}
.button.light:hover {
  background: #e2c792;
}
.button.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.button.outline:hover {
  background: rgba(255, 255, 255, 0.14);
}
.slide-dots {
  position: absolute;
  z-index: 3;
  left: max(20px, calc((100% - 1160px) / 2));
  bottom: 34px;
  display: flex;
  gap: 8px;
}
.slide-dot {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.slide-dot.active {
  background: #f0ddad;
}
.hero-aside {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 30px;
  margin-top: 105px;
}
.hero-aside strong {
  display: block;
  font:
    600 2.9rem/1 "Playfair Display",
    serif;
  color: var(--lime);
}
.hero-aside p {
  margin: 8px 0 20px;
  color: #e5eee1;
  max-width: 205px;
  line-height: 1.45;
}
section {
  padding: 88px 0;
}
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 35px;
}
h2 {
  font:
    600 clamp(2rem, 3vw, 3.2rem)/1.05 "Montserrat",
    Arial,
    sans-serif;
  letter-spacing: -0.035em;
}
.section-top p {
  max-width: 410px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.link-arrow {
  color: var(--forest);
  font-weight: 700;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  white-space: nowrap;
}
.quick {
  padding: 0;
  margin-top: -42px;
  position: relative;
  z-index: 2;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  box-shadow: 0 12px 34px rgba(23, 52, 46, 0.13);
}
.quick a {
  padding: 23px 22px;
  border-right: 1px solid var(--line);
  min-height: 103px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 700;
}
.quick a:last-child {
  border: 0;
}
.quick small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  font-weight: 700;
}
.quick span {
  font-size: 1.02rem;
}
.quick b {
  color: var(--orange);
  font-size: 1.2rem;
}
.projects {
  background: var(--sand);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.project {
  background: transparent;
  min-height: 315px;
  padding: 28px 28px 28px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-right: 1px solid var(--line);
  margin-right: 28px;
}
.project:last-child {
  border: 0;
  margin: 0;
}
.project:before,
.project:after {
  display: none;
}
.tag {
  color: var(--green);
  padding: 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  position: absolute;
  top: 28px;
}
.project h3 {
  font:
    600 1.65rem/1.13 "Montserrat",
    Arial,
    sans-serif;
  margin: 0 0 12px;
}
.project p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 19px;
  font-size: 0.91rem;
}
.project a {
  color: var(--forest);
  font-weight: 700;
}
.news-grid {
  display: grid;
  grid-template-columns: 1.23fr 0.77fr;
  gap: 50px;
}
.feature-news {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.feature-news .date,
.news-item .date {
  color: var(--orange);
  letter-spacing: 0.09em;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
}
.feature-news h3 {
  font:
    600 2rem/1.15 "Playfair Display",
    serif;
  max-width: 630px;
  margin: 12px 0;
}
.feature-news p {
  color: var(--muted);
  max-width: 660px;
  line-height: 1.62;
}
.news-list {
  border-top: 2px solid var(--forest);
}
.news-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 78px 65px 1fr;
  align-items: center;
  gap: 13px;
}
.news-thumb {
  width: 65px;
  height: 52px;
  object-fit: cover;
  background: var(--sand);
}
.news-item h3 {
  font-size: 1rem;
  line-height: 1.35;
}
.news-item .date {
  color: var(--muted);
  padding-top: 3px;
}
.qualifica {
  background: var(--forest);
  color: #fff;
  padding: 75px 0;
}
.qual-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
  align-items: center;
}
.qualifica h2 {
  font-size: clamp(2.2rem, 3.5vw, 3.7rem);
}
.qualifica p {
  color: #e6eee0;
  line-height: 1.65;
  max-width: 530px;
}
.qual-details {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding: 14px 0 14px 31px;
}
.qual-details div + div {
  margin-top: 24px;
}
.qual-details strong {
  display: block;
  color: var(--lime);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.qual-details span {
  font:
    500 1.34rem "Playfair Display",
    serif;
}
footer {
  padding: 56px 0 25px;
  background: #433126;
  color: #f1e9dd;
  overflow: hidden;
}
.funding {
  position: fixed;
  z-index: 9;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: #433126;
  box-shadow: 0 -8px 24px rgba(33, 22, 15, 0.18);
  padding: 12px 20px;
  overflow: hidden;
}
.funding-track {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.funding-label {
  color: #d7bd8e;
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}
.funder-link {
  display: block;
}
.funder-logo {
  display: block;
  max-height: 40px;
  max-width: 150px;
  width: auto;
  background: #fff;
  padding: 3px 8px;
  object-fit: contain;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 35px;
  padding-bottom: 45px;
}
.footer-title {
  color: #d7bd8e;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
}
.footer-grid a,
.footer-grid p {
  display: block;
  color: #ddd1c2;
  margin: 0 0 9px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer-brand {
  font:
    600 1.9rem "Playfair Display",
    serif;
  color: #fff;
  margin: 0 0 13px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #c6b8a6;
  font-size: 0.75rem;
}
/* Abertura: fotografia em ecrã inteiro e marca que dá lugar ao cabeçalho. */
.notice {
  display: none;
}
header {
  position: fixed;
  inset: 0 0 auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}
header.is-scrolled {
  background: var(--forest);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
}
.nav {
  height: 84px;
}
.brand {
  width: 178px;
  height: 64px;
  display: flex;
  align-items: center;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.brand img {
  display: block;
  width: 168px;
  max-height: 54px;
  object-fit: contain;
}
.brand span,
.brand:after {
  display: none;
  content: none;
}
header:not(.is-scrolled) .brand,
header:not(.is-scrolled) nav,
header:not(.is-scrolled) .nav-cta,
header:not(.is-scrolled) .theme-toggle,
header:not(.is-scrolled) .menu {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}
.nav-group {
  position: relative;
  padding: 29px 0;
}
.nav-dropdown {
  position: absolute;
  left: -16px;
  top: 72px;
  min-width: 210px;
  padding: 10px 0;
  background: #fffefa;
  border: 1px solid var(--line);
  box-shadow: 0 14px 26px rgba(51, 35, 22, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}
.nav-dropdown a {
  display: block;
  color: #2d241e;
  padding: 9px 16px;
  font-size: 0.84rem;
  white-space: nowrap;
}
.nav-dropdown a:hover {
  color: #fff;
  background: var(--forest);
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.hero {
  min-height: 100svh;
}
.hero-grid,
.slide-dots {
  display: none;
}
.hero-mark {
  transform: none;
  opacity: 1;
  transition:
    transform 0.55s ease,
    opacity 0.35s ease;
}
.hero-mark img {
  display: block;
  width: min(520px, 62vw);
  max-height: 260px;
  object-fit: contain;
}
.hero-mark:before,
.hero-mark span {
  display: none;
  content: none;
}
.hero.scrolled .hero-mark {
  opacity: 0;
  transform: translate(-36vw, -34vh) scale(0.28);
}
.quick {
  margin-top: 0;
}
.news-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-news {
  min-height: 340px;
  padding: 0 0 21px;
  border: 1px solid var(--line);
  background: var(--sand);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.feature-news .news-cover {
  display: block;
  width: 100%;
  height: 155px;
  object-fit: cover;
  margin: 0 0 17px;
}
.feature-news .date,
.feature-news h3,
.feature-news .link-arrow {
  margin-left: 22px;
  margin-right: 22px;
}
.feature-news h3 {
  font-size: 1.15rem;
  line-height: 1.28;
  margin-top: 11px;
  margin-bottom: 16px;
}
.feature-news p {
  display: none;
}
.feature-news .link-arrow {
  margin-top: auto;
  align-self: flex-start;
}
.news-list {
  display: none;
}
body.night {
  --ink: #eee6da;
  --forest: #b0885c;
  --green: #d0ab77;
  --lime: #e3c58f;
  --sand: #211b17;
  --cream: #2a231e;
  --line: #5e4f43;
  --muted: #c8bcae;
  --orange: #e3a07c;
}
body.night header {
  background: rgba(42, 35, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}
body.night .quick-grid {
  background: var(--cream);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}
body.night .projects {
  background: var(--sand);
}
body.night .button.outline {
  color: #fff;
}
body.night .link-arrow {
  color: var(--green);
}
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}
@media (max-width: 820px) {
  nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .hero-grid,
  .qual-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: 650px;
  }
  .hero-grid {
    padding: 85px 0;
  }
  .hero-aside {
    margin: 0;
  }
  .quick-grid,
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-top {
    align-items: start;
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .funding-track {
    gap: 8px;
  }
  .funding-label {
    display: none;
  }
  .funder-logo {
    max-width: 30%;
    max-height: 35px;
    padding: 2px 4px;
  }
}
@media (max-width: 520px) {
  .wrap {
    width: min(100% - 30px, 1160px);
  }
  .notice .wrap {
    justify-content: center;
  }
  .notice span:last-child {
    display: none;
  }
  .nav {
    height: 68px;
  }
  .brand {
    width: 145px;
  }
  .hero {
    min-height: 620px;
  }
  .hero-grid {
    padding: 70px 0;
  }
  h1 {
    font-size: 2.75rem;
  }
  .quick {
    margin-top: -20px;
  }
  .quick-grid,
  .cards {
    grid-template-columns: 1fr;
  }
  .quick a {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .quick a:last-child {
    border-bottom: 0;
  }
  section {
    padding: 65px 0;
  }
  .project {
    min-height: 315px;
  }
  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .hero-aside {
    display: none;
  }
}
header.is-scrolled nav,
header.is-scrolled nav > a,
header.is-scrolled .nav-group > a {
  color: #fff;
}
header.is-scrolled .theme-toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
h1,
h2,
h3,
.footer-brand {
  font-family: "Montserrat", Arial, sans-serif !important;
}
.hero-mark img {
  width: min(720px, 78vw);
  max-height: 330px;
}
header .nav {
  height: 96px;
}
header .brand {
  width: 230px;
  height: 82px;
}
header .brand img {
  width: 220px;
  max-height: 74px;
}
.nav-dropdown {
  top: 84px;
}
/* Ajustes específicos da página inicial */
.homepage-current-projects {
  grid-template-columns: repeat(4, 1fr);
}
.homepage-current-projects .project {
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 28px;
}
.homepage-current-projects .project img {
  display: block;
  max-width: 170px;
  max-height: 76px;
  object-fit: contain;
  margin: 42px 0 30px;
}
.homepage-current-projects .project h3 {
  font-size: 1.22rem;
  margin-bottom: 18px;
}
.homepage-current-projects .project a {
  margin-top: auto;
}
.qual-details span {
  font:
    500 1.22rem/1.35 "Montserrat",
    Arial,
    sans-serif;
  letter-spacing: -0.01em;
}
@media (max-width: 820px) {
  .homepage-current-projects {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .homepage-current-projects {
    grid-template-columns: 1fr;
  }
}
