/*
 * Jaime Mirandolino — integração do front end dinâmico com o sistema visual 02.
 * A fundação visual permanece em 02/styles.css; este ficheiro cobre navegação
 * expandida, páginas internas e componentes dinâmicos do site.
 */

body {
  overflow-x: hidden;
}

main {
  display: block;
  min-height: 60vh;
}

/* Progressive enhancement: content remains visible if JavaScript is unavailable. */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

::selection {
  color: var(--ink);
  background: var(--acid);
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}

.main-menu {
  gap: clamp(.72rem, 1.35vw, 1.65rem);
  font-size: clamp(.59rem, .7vw, .69rem);
}

.main-menu > a[aria-current="page"]::after {
  transform: scaleX(1);
}

.main-menu .nav-cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.main-menu > a {
  flex-shrink: 0;
  white-space: nowrap;
}

.breadcrumbs-wrap {
  max-width: 1800px;
  padding: 7.2rem var(--pad) 0;
  margin: 0 auto;
  color: rgba(255,255,255,.54);
  background: var(--ink);
}

.breadcrumbs {
  max-width: var(--max);
  margin: 0 auto;
}

.breadcrumbs ol {
  display: flex;
  padding: .9rem 0;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
  align-items: center;
  gap: .7rem;
  list-style: none;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  overflow: hidden;
}

.breadcrumbs li {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: .7rem;
  white-space: nowrap;
}

.breadcrumbs li:not(:last-child)::after {
  color: var(--acid);
  content: "·";
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--acid);
}

.breadcrumbs li:last-child {
  color: rgba(255,255,255,.82);
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Interior page mastheads */
.inner-hero {
  position: relative;
  max-width: 1800px;
  padding: clamp(4.5rem, 8vw, 8rem) var(--pad) clamp(5.5rem, 10vw, 9rem);
  margin: 0 auto;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}

body:not(.page-home) .inner-hero:first-child {
  padding-top: clamp(10rem, 16vw, 13rem);
}

.breadcrumbs-wrap + .inner-hero {
  padding-top: clamp(3.5rem, 6vw, 6rem);
}

.inner-hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7%;
  width: 1px;
  background: rgba(255,255,255,.07);
  content: "";
}

.inner-hero::after {
  position: absolute;
  right: -9rem;
  bottom: -13rem;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(201,232,109,.13);
  border-radius: 50%;
  content: "";
}

.inner-hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
}

.inner-hero h1 {
  max-width: 1120px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 7.5vw, 8.6rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .92;
}

.inner-hero h1 em {
  color: var(--acid);
  font-weight: 400;
}

.inner-hero__intro {
  max-width: 680px;
  margin: 2rem 0 0;
  color: rgba(255,255,255,.62);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.inner-hero__meta {
  display: flex;
  margin: 0 0 1.8rem;
  color: var(--acid);
  flex-wrap: wrap;
  gap: .55rem 1.5rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.inner-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.inner-hero__meta span:not(:last-child)::after {
  width: 4px;
  height: 4px;
  margin-left: .95rem;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

/* Shared editorial headings and controls */
.listing-heading,
.split-heading {
  display: flex;
  margin-left: clamp(7rem, 13vw, 13rem);
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
}

.listing-heading > div,
.split-heading > div {
  min-width: 0;
}

.listing-heading > p,
.split-heading > p {
  max-width: 390px;
  margin: 0 0 .8rem;
  color: #607169;
}

.listing-heading h2 em,
.split-heading h2 em {
  color: #51705e;
}

.filter-bar {
  display: flex;
  margin: clamp(3rem, 5vw, 5rem) 0 2rem clamp(7rem, 13vw, 13rem);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: .2rem 1.6rem;
}

.filter-button {
  position: relative;
  padding: .85rem 0;
  border: 0;
  color: #607169;
  background: transparent;
  cursor: pointer;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.filter-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transition: transform .25s ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  color: var(--ink);
}

.filter-button.is-active::after {
  transform: scaleX(1);
}

.project[hidden],
[data-filter-item][hidden] {
  display: none !important;
}

.project-archive-grid {
  display: grid;
  margin: 0 0 0 clamp(7rem, 13vw, 13rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-archive-grid .project {
  min-height: clamp(330px, 32vw, 475px);
}

.project-archive-grid .project-overlay h2,
.project-archive-grid .project-overlay h3 {
  margin: .65rem 2.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 2.15rem);
  font-weight: 400;
  line-height: 1.08;
}

.project-category {
  color: var(--acid);
}

/* Insights cards */
.editorial-grid {
  display: grid;
  margin: clamp(4rem, 7vw, 7rem) 0 clamp(3rem, 5vw, 4.5rem) clamp(7rem, 13vw, 13rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
}

.insights .button-outline,
.editorial-grid + .button-outline {
  display: inline-flex;
}

.editorial-card {
  display: flex;
  min-width: 0;
  border-top: 1px solid var(--line);
  flex-direction: column;
}

.editorial-card__image {
  display: block;
  position: relative;
  aspect-ratio: 1.35 / 1;
  margin-top: 1rem;
  background: var(--ink-soft);
  overflow: hidden;
}

.editorial-card__image img {
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.editorial-card:hover .editorial-card__image img {
  filter: saturate(.86);
  transform: scale(1.035);
}

.editorial-card__date {
  display: grid;
  position: absolute;
  right: .8rem;
  bottom: .8rem;
  width: 58px;
  height: 62px;
  color: var(--ink);
  background: var(--acid);
  place-content: center;
  text-align: center;
}

.editorial-card__date strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: .9;
}

.editorial-card__date span {
  margin-top: .25rem;
  font-size: .53rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.editorial-card__body {
  display: flex;
  padding: 1.45rem 0 0;
  flex: 1;
  flex-direction: column;
}

.editorial-card__meta {
  display: flex;
  margin: 0 0 .8rem;
  color: #5f6e67;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.editorial-card h2,
.editorial-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.35vw, 2.5rem);
  font-weight: 400;
  line-height: 1.08;
}

.editorial-card__body > p {
  display: -webkit-box;
  margin: 1rem 0 1.4rem;
  color: #607169;
  font-size: .84rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.editorial-card .inline-link {
  width: fit-content;
  padding-bottom: .3rem;
  margin-top: auto;
  border-bottom: 1px solid var(--ink);
}

.media-placeholder {
  display: grid;
  height: 100%;
  color: var(--acid);
  background: var(--ink-soft);
  place-items: center;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
}

/* Testimonial treatment, retaining the 02 statement composition */
.statement-testimonials blockquote {
  min-width: 0;
}

.testimonial-slide[hidden] {
  display: none;
}

.testimonial-slide p {
  animation: quote-in .55s ease both;
}

@keyframes quote-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.testimonial-author-line {
  display: flex;
  color: var(--acid);
  align-items: center;
  gap: .8rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.testimonial-author-line span {
  color: rgba(255,255,255,.48);
}

.testimonial-controls {
  display: flex;
  position: absolute;
  right: clamp(2rem, 5vw, 5rem);
  bottom: clamp(2rem, 4vw, 4rem);
  align-items: center;
  gap: .7rem;
}

.testimonial-controls button {
  display: grid;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: border-color .2s, color .2s, transform .2s;
}

.testimonial-controls button:hover,
.testimonial-controls button:focus-visible {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateY(-2px);
}

/* Calls to action */
.cta-ribbon {
  display: grid;
  max-width: 1800px;
  padding: clamp(3.5rem, 7vw, 6rem) max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  margin: 0 auto;
  color: var(--ink);
  background: var(--acid);
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3rem;
}

.cta-ribbon h2 {
  max-width: 950px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .95;
}

.cta-ribbon h2 em {
  color: #51705e;
  font-weight: 400;
}

.cta-ribbon p {
  max-width: 610px;
  margin: 1.3rem 0 0;
}

.cta-ribbon .button {
  border-color: var(--ink);
  color: var(--white);
  background: var(--ink);
}

.cta-ribbon .button:hover,
.cta-ribbon .button:focus-visible {
  color: var(--ink);
  background: transparent;
}

/* Contact/API feedback */
.form-message {
  min-height: 1.5rem;
  padding: 0;
  margin: .9rem 0 0;
  color: var(--acid);
  font-size: .78rem;
}

.form-message.is-error,
.form-status.is-error {
  color: #ffaaa3;
}

.form-message.is-success,
.form-status.is-success {
  color: var(--acid);
}

.contact-form button[disabled],
.newsletter-form button[disabled] {
  cursor: wait;
  opacity: .62;
}

/* Detailed services */
.service-detail-stack {
  max-width: 1800px;
  margin: 0 auto;
}

.service-detail {
  padding: clamp(5rem, 9vw, 9rem) var(--pad);
}

.service-detail:nth-child(even) {
  color: var(--white);
  background: var(--ink);
}

.service-detail__inner {
  display: grid;
  max-width: var(--max);
  margin: 0 auto;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.service-detail__content,
.service-copy {
  min-width: 0;
}

.service-detail:nth-child(even) .service-detail__media {
  order: 2;
}

.service-detail__media {
  position: relative;
}

.service-detail__media::after {
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  width: 38%;
  height: 38%;
  border-right: 1px solid var(--acid);
  border-bottom: 1px solid var(--acid);
  content: "";
  pointer-events: none;
}

.service-detail__media img {
  height: clamp(380px, 47vw, 630px);
  object-fit: cover;
}

.service-detail__number {
  display: inline-flex;
  width: 64px;
  height: 64px;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #607169;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.service-detail:nth-child(even) .service-detail__number {
  border-color: rgba(201,232,109,.3);
  color: var(--acid);
}

.service-detail h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: .98;
  overflow-wrap: break-word;
  hyphens: auto;
}

.service-detail__lead {
  margin: 1.8rem 0 1rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.3;
}

.service-detail:nth-child(even) .service-detail__lead {
  color: var(--white);
}

.service-detail__description {
  color: #607169;
}

.service-detail:nth-child(even) .service-detail__description {
  color: rgba(255,255,255,.58);
}

.service-detail:nth-child(even) .eyebrow.dark {
  color: var(--acid);
}

.service-points {
  padding: 0;
  margin: 2rem 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-detail:nth-child(even) .service-points {
  border-color: rgba(255,255,255,.16);
}

.service-points li {
  position: relative;
  padding: .85rem 0 .85rem 1.6rem;
  border-bottom: 1px solid var(--line);
  font-size: .82rem;
}

.service-detail:nth-child(even) .service-points li {
  border-color: rgba(255,255,255,.16);
}

.service-points li::before {
  position: absolute;
  top: 1.2rem;
  left: .1rem;
  width: 6px;
  height: 6px;
  background: #6b9f31;
  border-radius: 50%;
  content: "";
}

.service-detail:nth-child(even) .button-outline {
  margin-left: 0;
  border-color: var(--acid);
  color: var(--ink);
  background: var(--acid);
}

/* Article and project detail */
.detail-section {
  max-width: 1800px;
  padding: clamp(4rem, 8vw, 8rem) var(--pad) clamp(6rem, 10vw, 10rem);
  margin: 0 auto;
}

.detail-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.detail-shell .empty-state {
  margin-left: 0;
}

.detail-figure {
  margin: 0 0 clamp(3rem, 6vw, 6rem);
}

.detail-figure img {
  max-height: 820px;
  object-fit: cover;
}

.detail-figure figcaption {
  margin-top: .8rem;
  color: #5f6e67;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-shell {
  max-width: 820px;
  margin: 0 auto;
}

.article-lead {
  margin: 0 0 2.5rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  line-height: 1.32;
}

.article-prose {
  color: #40534b;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.85;
}

.article-prose > *:first-child {
  margin-top: 0;
}

.article-prose h2,
.article-prose h3,
.article-prose h4 {
  margin: 2.5em 0 .75em;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.12;
}

.article-prose h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); }
.article-prose h3 { font-size: clamp(1.7rem, 3vw, 2.7rem); }
.article-prose a { border-bottom: 1px solid currentColor; color: #315c49; }
.article-prose img { height: auto; margin: 2rem 0; }
.article-prose blockquote {
  padding: 1.2rem 0 1.2rem 2rem;
  margin: 2.5rem 0;
  border-left: 3px solid var(--acid);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  line-height: 1.35;
}
.article-prose ul,
.article-prose ol { padding-left: 1.3rem; }

.detail-summary {
  max-width: 760px;
  margin: 0 auto;
  color: #40534b;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.7vw, 2.45rem);
  line-height: 1.35;
  text-align: center;
}

.detail-actions {
  display: flex;
  padding-top: 2rem;
  margin-top: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-actions .button-outline {
  margin-left: 0;
}

/* Galleries */
.gallery-grid {
  display: grid;
  margin: clamp(4rem, 7vw, 7rem) 0 0 clamp(7rem, 13vw, 13rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  display: block;
  position: relative;
  min-height: 440px;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}

.gallery-card img {
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,27,21,.92), transparent 65%);
  content: "";
}

.gallery-card__copy {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.8rem;
}

.gallery-card__copy span {
  color: var(--acid);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gallery-card__copy h2,
.gallery-card__copy h3 {
  margin: .55rem 2.4rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2.55rem);
  font-weight: 400;
  line-height: 1.08;
}

.gallery-card__copy i {
  position: absolute;
  right: 1.8rem;
  bottom: 1.8rem;
  color: var(--acid);
  font-size: 1.35rem;
  font-style: normal;
  transition: transform .25s ease;
}

.gallery-card:hover img {
  filter: saturate(.84);
  transform: scale(1.04);
}

.gallery-card:hover .gallery-card__copy i {
  transform: translate(4px, -4px);
}

.photo-grid {
  display: grid;
  max-width: var(--max);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(240px, 25vw, 390px);
  gap: 1rem;
}

.photo-tile {
  display: block;
  position: relative;
  background: var(--ink-soft);
  cursor: zoom-in;
  overflow: hidden;
}

.photo-tile:nth-child(7n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease, filter .4s ease;
}

.photo-tile::after {
  display: grid;
  position: absolute;
  inset: 0;
  color: var(--acid);
  background: rgba(16,35,29,.3);
  content: "+";
  opacity: 0;
  place-items: center;
  font-family: var(--serif);
  font-size: 3.5rem;
  transition: opacity .25s ease;
}

.photo-tile:hover img { filter: saturate(.8); transform: scale(1.035); }
.photo-tile:hover::after { opacity: 1; }

/* Pagination and empty states */
.pagination {
  display: flex;
  padding: 0;
  margin: clamp(3rem, 6vw, 6rem) 0 0 clamp(7rem, 13vw, 13rem);
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
}

.pagination a,
.pagination span {
  display: grid;
  min-width: 44px;
  height: 44px;
  padding: 0 .8rem;
  border: 1px solid var(--line);
  place-items: center;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.pagination a:hover,
.pagination a:focus-visible,
.pagination [aria-current="page"] {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.empty-state {
  padding: clamp(3rem, 7vw, 6rem);
  margin: clamp(3rem, 6vw, 6rem) 0 0 clamp(7rem, 13vw, 13rem);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
}

.empty-state p {
  max-width: 520px;
  margin: .8rem auto 0;
  color: #607169;
}

/* Newsletter and expanded footer */
.footer-newsletter {
  display: grid;
  max-width: 1800px;
  padding: clamp(4rem, 8vw, 7.5rem) max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  margin: 0 auto;
  color: var(--ink);
  background: var(--paper-bright);
  grid-template-columns: 1fr .82fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
}

.footer-newsletter h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5.8vw, 6.3rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .96;
}

.footer-newsletter h2 em {
  color: #51705e;
  font-weight: 400;
}

.footer-newsletter__copy > p:last-child {
  max-width: 550px;
  margin: 1.5rem 0 0;
  color: #607169;
}

.newsletter-form label {
  display: block;
  margin-bottom: .7rem;
  color: #607169;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.newsletter-control {
  display: grid;
  border-bottom: 1px solid var(--ink);
  grid-template-columns: 1fr auto;
}

.newsletter-control input {
  min-width: 0;
  padding: 1rem 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.newsletter-control input::placeholder {
  color: #65736d;
}

.filter-empty {
  margin: 2.5rem 0 0 clamp(7rem, 13vw, 13rem);
  color: #5f6e67;
  font-size: .84rem;
}

.statement-image [hidden] {
  display: none;
}

.timeline li:nth-child(n + 5) {
  border-top: 1px solid var(--line);
}

.newsletter-control button {
  padding: 0 0 0 1.4rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.newsletter-control button span {
  margin-left: .65rem;
  color: #51705e;
}

.footer-newsletter .form-status {
  color: #315c49;
}

.footer-newsletter .form-status.is-error {
  color: #9b3f38;
}

.site-footer {
  min-height: 270px;
  grid-template-columns: 1.15fr 1.5fr 1fr;
  grid-template-rows: auto auto;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.footer-brand .brand-mark {
  flex: 0 0 46px;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.footer-brand p {
  margin: 0;
  line-height: 1.45;
  min-width: 0;
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem 1.2rem;
  font-weight: 700;
}

.footer-menu a:hover,
.footer-menu a:focus-visible {
  color: var(--acid);
}

.footer-links {
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.copyright {
  align-self: end;
}

.back-top {
  grid-column: 3;
  align-self: end;
}

/* Dialog lightbox */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  color: var(--white);
  background: rgba(8,20,16,.96);
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.lightbox::backdrop {
  background: rgba(8,20,16,.9);
}

.lightbox figure {
  display: flex;
  min-width: 0;
  height: calc(100vh - 6rem);
  margin: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100% - 2.5rem);
  object-fit: contain;
}

.lightbox figcaption {
  margin-top: .8rem;
  color: rgba(255,255,255,.58);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lightbox button {
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.lightbox-nav {
  display: grid;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  place-items: center;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  border-color: var(--acid);
  color: var(--acid);
}

.site-toast {
  visibility: hidden;
  position: fixed;
  z-index: 9998;
  right: 1rem;
  bottom: 1rem;
  max-width: min(390px, calc(100vw - 2rem));
  padding: 1rem 1.2rem;
  opacity: 0;
  color: var(--white);
  background: var(--ink-soft);
  box-shadow: 0 15px 50px rgba(0,0,0,.22);
  font-size: .82rem;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.site-toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.site-toast.is-error {
  box-shadow: inset 4px 0 #d26b64, 0 15px 50px rgba(0,0,0,.22);
}

.site-toast.is-success {
  box-shadow: inset 4px 0 var(--acid), 0 15px 50px rgba(0,0,0,.22);
}

/* 404 */
.status-hero {
  display: grid;
  min-height: 100svh;
  align-items: center;
}

.status-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: var(--acid);
  place-items: center;
  font-family: var(--serif);
  font-size: 2.4rem;
}

.status-symbol.is-warning {
  color: #e8c96d;
}

.error-hero {
  display: grid;
  min-height: 100svh;
  place-items: center;
}

.error-hero .inner-hero__content {
  width: 100%;
}

.error-code {
  display: block;
  margin-bottom: 1rem;
  color: var(--acid);
  font-family: var(--serif);
  font-size: clamp(5rem, 16vw, 14rem);
  line-height: .7;
}

@media (max-width: 1180px) {
  .main-menu { gap: .8rem; font-size: .58rem; }
  .main-menu .nav-cta { padding: .75rem .9rem; }
  .project-archive-grid,
  .editorial-grid,
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The complete menu needs the mobile treatment slightly earlier than prototype 02. */
@media (max-width: 1080px) {
  .nav-shell { min-height: 78px; }
  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 3;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: inherit;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle > span:not(.sr-only) {
    position: absolute;
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: transform .25s ease;
  }
  .menu-toggle > span:nth-child(2) { transform: translateY(-3px); }
  .menu-toggle > span:nth-child(3) { transform: translateY(3px); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: rotate(-45deg); }
  .main-menu {
    display: flex;
    visibility: hidden;
    position: fixed;
    z-index: 2;
    inset: 0;
    padding: 7rem 2rem 3rem;
    opacity: 0;
    color: var(--white);
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .75rem;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: opacity .25s, visibility .25s;
  }
  .main-menu.open { visibility: visible; opacity: 1; }
  .main-menu > a {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 5.5vw, 3.4rem);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1;
    text-transform: none;
  }
  .main-menu .nav-cta {
    margin-top: .65rem;
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .site-header.menu-active,
  .site-header.menu-active.scrolled {
    color: var(--white);
    background: transparent;
    box-shadow: none;
  }
  .listing-heading,
  .split-heading,
  .filter-bar,
  .project-archive-grid,
  .editorial-grid,
  .gallery-grid,
  .pagination,
  .empty-state,
  .filter-empty,
  .insights .button-outline,
  .work .button-outline { margin-left: 0; }
  .service-detail__inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .footer-newsletter { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-links { justify-content: flex-start; }
  .back-top { grid-column: 2; }
}

@media (max-width: 760px) {
  .breadcrumbs-wrap { padding-top: 5.6rem; }
  .inner-hero,
  body:not(.page-home) .inner-hero:first-child { padding-top: 8rem; }
  .breadcrumbs-wrap + .inner-hero { padding-top: 3.5rem; }
  .inner-hero h1 { font-size: clamp(3.45rem, 15vw, 5.8rem); }
  .inner-hero__meta span:not(:last-child)::after { display: none; }
  .listing-heading,
  .split-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .project-archive-grid,
  .editorial-grid,
  .gallery-grid { grid-template-columns: 1fr; }
  .project-archive-grid .project { min-height: 420px; }
  .editorial-card__image { aspect-ratio: 1.35 / 1; }
  .statement-testimonials blockquote { padding-bottom: 7rem; }
  .testimonial-controls { right: 1.5rem; bottom: 2rem; left: 1.5rem; }
  .cta-ribbon { grid-template-columns: 1fr; align-items: start; }
  .service-detail__inner { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .service-detail__media { order: 0; }
  .service-detail__media img { height: 430px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 270px; }
  .photo-tile:nth-child(7n + 1) { grid-column: span 2; grid-row: span 1; }
  .footer-newsletter h2 { font-size: clamp(3.1rem, 14vw, 5rem); }
  .site-footer { grid-template-columns: 1fr; }
  .footer-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .back-top { grid-column: 1; text-align: left; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox figure { height: calc(100vh - 9rem); }
  .lightbox-nav { position: absolute; z-index: 2; bottom: 1.2rem; }
  .lightbox-prev { left: calc(50% - 58px); }
  .lightbox-next { right: calc(50% - 58px); }
}

@media (max-width: 520px) {
  .inner-hero h1 {
    font-size: clamp(3rem, 13.5vw, 5.8rem);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }
  .filter-bar { gap: .15rem 1rem; }
  .project-archive-grid .project,
  .gallery-card { min-height: 390px; }
  .service-detail__media img { height: 340px; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-actions .button { width: 100%; }
  .photo-grid { grid-template-columns: 1fr; grid-auto-rows: 340px; }
  .photo-tile:nth-child(7n + 1) { grid-column: auto; }
  .newsletter-control { grid-template-columns: 1fr; }
  .newsletter-control button { padding: 1rem 0; border-top: 1px solid var(--line); text-align: left; }
  .footer-menu { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  /* Keep the long Portuguese hero word inside the narrow viewport. */
  .hero h1 {
    font-size: clamp(2.9rem, 15vw, 3.95rem);
  }

  .section h2 {
    font-size: clamp(2.65rem, 13.5vw, 3.35rem);
    hyphens: auto;
  }

  .service-item {
    grid-template-columns: 26px minmax(0, 1fr) 22px;
    gap: .7rem;
  }

  .service-copy h3 {
    font-size: clamp(1.45rem, 7.8vw, 1.8rem);
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .service-detail h2 {
    font-size: clamp(2.05rem, 10.5vw, 2.7rem);
    overflow-wrap: normal;
  }

  .inner-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }
}

@media (max-width: 1080px) and (max-height: 560px) {
  .main-menu {
    padding: 5.6rem 1.5rem 1.5rem;
    justify-content: flex-start;
    gap: .35rem;
  }

  .main-menu > a {
    font-size: clamp(1.4rem, 5vh, 1.85rem);
    line-height: 1.05;
  }

  .main-menu .nav-cta {
    margin-top: .25rem;
    padding: .65rem .9rem;
    font-size: .64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-slide p { animation: none; }
}
