:root {
  --ink: #252324;
  --muted: #686263;
  --line: #ded8d2;
  --paper: #f8f6f2;
  --soft: #eee8df;
  --green: #3f6f5d;
  --green-dark: #244b3d;
  --stone: #5f5a5a;
  --gold: #b58a52;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(38, 34, 30, .12);
  font-family: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

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

a {
  color: inherit;
}

p,
li,
dd,
address {
  text-align: justify;
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 86px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(37, 35, 36, .08);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.site-header::before {
  position: absolute;
  inset: -46px auto -46px clamp(8px, 2vw, 26px);
  width: clamp(340px, 38vw, 620px);
  content: "";
  background: url("assets/logo-pvmlegal.png") left center / contain no-repeat;
  filter: grayscale(1) contrast(.55) blur(.35px);
  mix-blend-mode: multiply;
  opacity: .045;
  pointer-events: none;
}

.brand img {
  position: relative;
  z-index: 1;
  width: 156px;
  height: auto;
}

.main-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  color: var(--stone);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  position: relative;
  z-index: 1;
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 132px clamp(20px, 6vw, 84px) 76px;
  color: var(--white);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(20, 26, 25, .82), rgba(28, 29, 28, .42) 48%, rgba(28, 29, 28, .16)),
    linear-gradient(0deg, rgba(20, 19, 18, .66), transparent 52%);
}

.hero-content {
  position: relative;
  width: min(720px, 100%);
}

.kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  color: #d9c095;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
}

h1 {
  max-width: 690px;
  font-size: clamp(46px, 7vw, 82px);
}

h2 {
  max-width: 820px;
  font-size: clamp(30px, 4vw, 52px);
}

h3 {
  font-size: 23px;
}

.hero p:not(.kicker) {
  max-width: 600px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  color: var(--white);
  background: var(--green);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, .55);
}

section {
  scroll-margin-top: 92px;
  padding: clamp(68px, 9vw, 124px) clamp(20px, 6vw, 84px);
}

.section-heading {
  margin: 0 auto 42px;
  width: min(1120px, 100%);
}

.intro-grid,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .92fr);
  gap: clamp(28px, 5vw, 72px);
  width: min(1120px, 100%);
  margin: 0 auto;
}

.intro-copy {
  color: var(--muted);
  font-size: 18px;
}

.intro-copy p:first-child {
  margin-top: 0;
}

.quote-panel {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quote-panel img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: #c98446;
}

.quote-panel p {
  margin: 0;
  padding: 26px;
  color: var(--stone);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.35;
}

.band {
  background: var(--soft);
}

.team-browser,
.areas-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.team-browser,
.areas-grid {
  display: grid;
  gap: 18px;
}

.team-showcase {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(6, 31, 34, .94), rgba(8, 46, 55, .82)),
    url("assets/palacio-justica-lisboa.jpg") center / cover;
}

.team-showcase::before {
  position: absolute;
  inset: 12px clamp(20px, 6vw, 84px) auto;
  height: 12px;
  content: "";
  border-top: 1px solid rgba(217, 192, 149, .78);
  border-right: 1px solid rgba(217, 192, 149, .78);
  border-left: 1px solid rgba(217, 192, 149, .78);
  pointer-events: none;
}

.team-showcase .section-heading {
  position: relative;
}

.team-showcase .kicker {
  color: #d9c095;
}

.team-browser {
  position: relative;
}

.team-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}

.team-thumb {
  display: grid;
  gap: 10px;
  padding: 0;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .72);
  cursor: pointer;
  text-align: left;
}

.team-thumb img,
.team-thumb .initials {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  background: rgba(255, 255, 255, .95);
  opacity: .62;
  transition: opacity .2s ease, transform .2s ease;
}

.team-thumb span:not(.initials) {
  min-height: 36px;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.team-thumb .initials,
.team-profile-initials {
  display: grid;
  place-items: center;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 700;
}

.team-thumb.is-active,
.team-thumb:hover {
  color: var(--white);
  border-bottom-color: #d9c095;
}

.team-thumb.is-active img,
.team-thumb.is-active .initials,
.team-thumb:hover img,
.team-thumb:hover .initials {
  opacity: 1;
  transform: translateY(-2px);
}

.team-profile {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.team-profile[hidden] {
  display: none;
}

.team-profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .76);
}

.team-profile-copy {
  max-width: 780px;
  padding-top: 4px;
}

.team-role {
  margin: 0 0 8px;
  color: #d9c095;
  font-size: 22px;
  font-weight: 700;
}

.team-profile h3 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
}

.team-profile p:not(.team-role) {
  max-width: 760px;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  line-height: 1.5;
}

.team-profile a {
  color: #d9c095;
  font-weight: 800;
  text-decoration: none;
}

.areas-grid article {
  min-height: 220px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.areas-grid p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.areas-grid ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.areas-grid li + li {
  margin-top: 6px;
}

.areas-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.areas-grid article {
  min-height: 190px;
  border-top: 4px solid var(--green);
}

.contact-details {
  color: var(--muted);
  font-size: 18px;
}

.contact-details p {
  margin-top: 0;
}

dl {
  display: grid;
  gap: 16px;
  margin: 30px 0 0;
}

dt {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
}

dd a {
  color: var(--green-dark);
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 15px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--stone);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbc4bd;
  border-radius: 4px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font: 16px Arial, Helvetica, sans-serif;
}

textarea {
  resize: vertical;
}

.legal {
  background: var(--green-dark);
  color: var(--white);
}

.legal .kicker {
  color: #d9c095;
}

.legal-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  gap: 22px;
}

.legal-card {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}

.legal-card h3 {
  margin-bottom: 20px;
  color: var(--white);
}

.legal-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .84);
  font-size: 15px;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-page {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 7vw, 96px);
  background: var(--green-dark);
  color: var(--white);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(217, 192, 149, .62);
  border-radius: 4px;
  margin-bottom: 34px;
  color: #d9c095;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.legal-page-content {
  width: min(920px, 100%);
  padding: 0;
}

.legal-page-content h1 {
  margin-bottom: 28px;
  font-size: clamp(36px, 6vw, 64px);
}

.legal-page-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
}

.legal-return {
  margin-top: 34px;
  text-align: left;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(150px, .75fr) minmax(190px, .9fr) minmax(150px, .7fr) minmax(230px, 1fr);
  align-items: start;
  gap: 28px;
  padding: 36px clamp(20px, 6vw, 84px);
  color: var(--stone);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

.site-footer img {
  width: 156px;
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.footer-brand p {
  max-width: 310px;
  color: var(--ink);
  font-weight: 700;
}

.site-footer address {
  font-style: normal;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.footer-contact,
.footer-legal {
  display: grid;
  gap: 6px;
}

.footer-legal a {
  white-space: nowrap;
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px;
  }

  .main-nav a::after {
    display: none;
  }

  .intro-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .team-thumbs,
  .areas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-profile {
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-legal a {
    white-space: normal;
  }

  .legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 76px;
    padding: 12px 16px;
  }

  .brand img {
    width: 156px;
  }

  .hero {
    min-height: 88vh;
    padding: 110px 20px 52px;
  }

  .hero p:not(.kicker),
  .intro-copy,
  .contact-details {
    font-size: 16px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .team-thumbs,
  .areas-grid {
    grid-template-columns: 1fr;
  }

  .team-profile {
    grid-template-columns: 1fr;
  }

  .team-thumb {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: end;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
  }

  .team-thumb img,
  .team-thumb .initials {
    width: 72px;
  }

  .team-thumb span:not(.initials) {
    min-height: auto;
  }

  .team-profile-photo {
    max-width: 320px;
  }

  .areas-grid article {
    min-height: auto;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}
