/* Responsive refinements loaded after the original styles. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body,
main,
section,
header,
footer,
nav,
div,
article,
figure {
  min-width: 0;
}

img,
iframe {
  max-width: 100%;
}

p,
h1,
h2,
h3,
dd,
li,
address,
a {
  overflow-wrap: break-word;
}

.link-indicator {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.65rem;
  color: currentColor;
  vertical-align: middle;
}

.link-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.78rem;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}

.link-indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.05rem;
  width: 0.32rem;
  height: 0.32rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.publication-list .link-indicator {
  margin-top: 0.22rem;
}

.instagram-link .link-indicator {
  margin-left: 0.3rem;
}

.intro-copy h2 {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.contact h2 span {
  display: block;
}

.footer-details > .instagram-link {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
}

.instagram-footer-link {
  gap: 0.45rem;
  white-space: nowrap;
}

.instagram-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--brown);
}

.whatsapp-button {
  border-radius: 999px;
  background: #25d366;
  color: #fff;
}

.whatsapp-button:hover {
  background: #1fbd5a;
  color: #fff;
}

.whatsapp-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-caret {
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #dacbb9;
}

.footer-nav a {
  color: var(--brown);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--gold);
}

.cookie-banner {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  width: min(44rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 1.1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #dacbb9;
  box-shadow: 0 12px 36px rgba(48, 32, 25, 0.2);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.cookie-banner button {
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  flex: 0 0 auto;
  color: #fff;
  font: 600 0.7rem "Ramalho Text", Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--brown);
  border: 0;
  cursor: pointer;
}

.cookie-banner button:hover {
  background: var(--gold);
}

.hero h1,
.hero h1 em,
.contact h2 {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.practice {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.practice > :not(.practice-watermark) {
  position: relative;
  z-index: 1;
}

.practice-watermark {
  position: absolute;
  z-index: 0;
  bottom: -5rem;
  left: -4vw;
  width: clamp(24rem, 36vw, 42rem);
  height: clamp(24rem, 36vw, 42rem);
  object-fit: contain;
  object-position: center;
  opacity: 0.12;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  animation: brand-float 10s ease-in-out infinite alternate;
}

.hero-content > * {
  animation: hero-entry 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-content > :nth-child(2) {
  animation-delay: 0.08s;
}

.hero-content > :nth-child(3) {
  animation-delay: 0.16s;
}

.hero-content > :nth-child(4) {
  animation-delay: 0.24s;
}

.hero-lines {
  animation: line-drift 16s ease-in-out infinite alternate;
}

.motion-ready .motion-reveal {
  opacity: 0;
  transform: translate3d(0, 1.5rem, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--motion-delay, 0ms);
  will-change: opacity, transform;
}

.motion-ready .motion-reveal.motion-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.office-image img,
.building-image img,
.profile-image {
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.office-image:hover img,
.building-image:hover img,
.profile-image-wrap:hover .profile-image {
  transform: scale(1.025);
}

@keyframes hero-entry {
  from {
    opacity: 0;
    transform: translate3d(0, 1.5rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes line-drift {
  from {
    transform: rotate(-16deg) scale(1.2) translate3d(-1%, 0, 0);
  }

  to {
    transform: rotate(-14deg) scale(1.24) translate3d(1%, -1%, 0);
  }
}

@keyframes brand-float {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(1.2rem, -0.65rem, 0);
  }
}

@media (min-width: 1101px) {
  nav {
    align-items: center;
  }

  .nav-dropdown {
    display: flex;
    height: 100%;
    align-items: center;
  }

  .nav-submenu {
    position: absolute;
    z-index: 5;
    top: 100%;
    left: -1rem;
    display: none;
    min-width: 11rem;
    padding: 0.55rem 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid #dacbb9;
    box-shadow: 0 12px 24px rgba(48, 32, 25, 0.12);
  }

  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: flex;
  }

  .nav-dropdown:hover .nav-caret,
  .nav-dropdown:focus-within .nav-caret {
    transform: rotate(225deg);
  }

  nav .nav-submenu a {
    width: 100%;
    padding: 0.55rem 1rem;
    white-space: nowrap;
  }

  .intro-copy h2 {
    font-size: clamp(2.65rem, 3.8vw, 4.2rem);
  }

  .hero-content {
    max-width: 62rem;
  }

  .hero h1 em {
    white-space: nowrap;
  }

  .contact-inner {
    max-width: 52rem;
  }

  .contact h2 {
    white-space: nowrap;
  }

  .office-image img,
  .building-image img {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
  }
}

@media (max-width: 1100px) {
  .topbar {
    height: 72px;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
  }

  .logo {
    width: clamp(165px, 24vw, 210px);
  }

  .menu-toggle {
    display: block;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
  }

  nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.4rem;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #dacbb9;
    box-shadow: 0 12px 24px rgba(48, 32, 25, 0.08);
  }

  nav.open {
    display: flex;
  }

  nav a {
    width: 100%;
    padding: 0.75rem 0;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-trigger {
    justify-content: space-between;
  }

  .nav-submenu {
    display: none;
    width: 100%;
    padding: 0.1rem 0 0.6rem 1rem;
    background: #f8f5f0;
    border-left: 1px solid #dacbb9;
  }

  .nav-dropdown.open .nav-submenu {
    display: flex;
    flex-direction: column;
  }

  .nav-dropdown.open .nav-caret {
    transform: rotate(225deg);
  }

  nav .nav-submenu a {
    padding: 0.65rem 0.85rem;
    font-size: 0.68rem;
  }

  .practice-watermark {
    display: none;
  }

  .intro,
  .locations,
  .practice,
  .awards,
  .publications,
  .news {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .office-image {
    width: 100%;
    max-width: none;
    margin: 1rem 0 0;
  }

  .office-image img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .building-image,
  .map-wrap,
  .practice-grid,
  .award-list {
    grid-column: auto;
  }

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

  .publications-content,
  .locations-copy,
  .practice-heading,
  .awards-heading {
    width: 100%;
  }

  footer {
    grid-template-columns: minmax(170px, auto) minmax(0, 1fr);
  }

  footer > p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: calc(100svh - 72px);
    padding: 6rem clamp(1.2rem, 6vw, 3rem);
  }

  .profile {
    grid-template-columns: 1fr;
    padding: 0 0 4.7rem;
    gap: 3rem;
  }

  .profile-image-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .profile-image {
    height: 100%;
    min-height: 0;
    object-position: 50% 32%;
  }

  .profile-content {
    padding: 0 clamp(1.4rem, 8vw, 4rem);
  }

  .publication-list a {
    grid-template-columns: 1fr auto;
  }

  .publication-list span {
    grid-column: 1 / -1;
  }

  footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 1rem;
  }

  .logo {
    width: min(165px, 58vw);
  }

  .hero {
    min-height: auto;
    padding: 5.5rem 1.2rem;
  }

  .hero::after {
    inset: 0.55rem;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13vw, 4.15rem);
    line-height: 0.94;
    letter-spacing: -0.025em;
  }

  .hero-copy {
    margin: 1.8rem 0;
    font-size: 0.95rem;
  }

  .section {
    padding: 4rem 1.15rem;
  }

  .intro-copy h2,
  .practice h2,
  .profile h2,
  .contact h2,
  .locations h2,
  .awards h2 {
    font-size: clamp(2.3rem, 11vw, 3.35rem);
    line-height: 1;
  }

  .office-image {
    width: calc(100% - 0.8rem);
    margin-left: 0.8rem;
  }

  .office-image img,
  .building-image img {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .city-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .city-list span {
    text-align: center;
  }

  .map-wrap,
  .map-wrap iframe {
    width: 100%;
    min-height: 280px;
  }

  .practice-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .practice-grid article:nth-child(odd),
  .practice-grid article:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-right: 0;
  }

  .profile-image-wrap {
    aspect-ratio: 1 / 1;
  }

  .profile-content {
    padding: 0 1.15rem;
  }

  .award-list li {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .publication-list strong {
    font-size: 1.15rem;
    line-height: 1.25;
  }

  .contact {
    padding: 4.5rem 1.15rem;
  }

  .contact h2 {
    max-width: 100%;
    font-size: clamp(2.15rem, 10vw, 3rem);
    line-height: 1.05;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-wrap: balance;
  }

  .button {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  footer {
    padding: 2.2rem 1.15rem;
  }

  .footer-details,
  footer address,
  footer a,
  footer p {
    max-width: 100%;
  }

  .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .cookie-banner {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: calc(100% - 1.5rem);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner button {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .motion-ready .motion-reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3rem);
  }

  .city-list {
    grid-template-columns: 1fr;
  }

  .award-list li {
    grid-template-columns: 1fr;
  }

  .award-list time {
    margin-bottom: 0.25rem;
  }

  .publication-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
  }
}
