:root {
  color-scheme: light;
  --ink: #010101;
  --muted: #333333;
  --paper: #fff7eb;
  --mist: #ffffff;
  --orange: #f08125;
  --orange-dark: #542000;
  --blue: #28b9d8;
  --green: #23ab6d;
  --white: #ffffff;
  --shadow: 12px 12px 0 #010101;
  --line: 4px solid #010101;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height, 100px);
}

body {
  margin: 0;
  background: var(--orange);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--white);
  border: var(--line);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--white);
  border-bottom: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  display: block;
  width: clamp(190px, 20vw, 300px);
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 9px 12px;
  color: var(--ink);
  font-size: 0.91rem;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 0;
}

.nav a:hover,
.nav a.active {
  background: var(--orange);
  border-color: var(--ink);
  color: var(--ink);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--white);
}

.menu-button span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.section {
  position: relative;
  min-height: calc(100svh - 68px);
  padding: clamp(64px, 9vw, 112px) clamp(20px, 6vw, 88px);
  border-bottom: var(--line);
}

.content {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.narrow {
  width: min(760px, 100%);
}

.section-number {
  position: absolute;
  top: clamp(24px, 4vw, 52px);
  left: clamp(20px, 5vw, 72px);
  color: rgba(1, 1, 1, 0.12);
  font-size: clamp(4rem, 13vw, 11rem);
  font-weight: 900;
  line-height: 1;
}

.kicker {
  margin: 0 0 14px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  max-width: 920px;
  margin: 0 0 24px;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.5rem, 12vw, 9.5rem);
}

h2 {
  font-size: clamp(2.3rem, 6vw, 5.8rem);
}

h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  text-transform: uppercase;
}

p {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
}

.script-title {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.lead {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.cover {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100svh - 68px);
  background:
    linear-gradient(90deg, rgba(1, 1, 1, 0.42), rgba(1, 1, 1, 0.08)),
    url("assets/imagens/bg/home-certificados-1920.jpg");
  background-position: center;
  background-size: cover;
}

.cover-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: min(760px, 100%);
  gap: 20px;
  text-align: center;
}

.cover-title-card {
  width: auto;
  background: var(--orange);
  border: var(--line);
  box-shadow: var(--shadow);
}

.cover-logo-card {
  width: min(620px, 100%);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cover-logo-card img {
  display: block;
  width: min(620px, 100%);
  height: auto;
}

.cover-title-card {
  padding: 12px 22px;
  font-size: clamp(1.4rem, 4vw, 3.1rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  min-height: 48px;
  padding: 12px 18px;
  background: var(--white);
  border: var(--line);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-radius: 0;
  box-shadow: 6px 6px 0 var(--ink);
}

.text-section {
  display: grid;
  place-items: center;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: clamp(28px, 6vw, 86px);
}

.statement {
  padding: clamp(24px, 4vw, 40px);
  background: var(--white);
  color: var(--ink);
  border: var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.statement img {
  display: block;
  width: min(210px, 100%);
  margin-bottom: 28px;
}

.statement p {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.22;
}

.guide-section {
  background: var(--white);
}

.route-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.route-list a {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 18px;
  background: var(--white);
  border: var(--line);
  border-radius: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: 7px 7px 0 var(--ink);
  overflow: hidden;
}

.route-list a:hover {
  transform: translateY(-3px);
}

.route-list a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(0.95);
}

.route-list a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(1, 1, 1, 0.54));
}

.route-list span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 10px 12px;
  background: var(--orange);
  border: 3px solid var(--ink);
}

.route-aredes::before { background-image: url("assets/imagens/complexo aredes.jpg"); }
.route-cristo::before { background-image: url("assets/imagens/cristo.jpg"); }
.route-museu::before { background-image: url("assets/imagens/museu do ferro.jpg"); }
.route-mercearia::before { background-image: url("assets/imagens/Mercearia.jpg"); }

.dark-band {
  background: var(--ink);
  color: var(--white);
}

.dark-band .section-number,
.dark-band .kicker {
  color: var(--orange);
}

.points-intro {
  min-height: 48svh;
  display: grid;
  place-items: center;
  background: var(--orange);
}

.place-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100svh - 68px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(100vw, 1920px) auto;
  background-color: var(--ink);
  isolation: isolate;
  overflow: hidden;
}

.place-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(1, 1, 1, 0.42), rgba(1, 1, 1, 0.06));
}

.place-section.reverse {
  justify-content: flex-end;
}

.place-section.reverse::before {
  background: linear-gradient(270deg, rgba(1, 1, 1, 0.42), rgba(1, 1, 1, 0.06));
}

#aredes {
  background-image: url("assets/imagens/bg/aredes-1920.jpg");
}

#cristo {
  background-image: url("assets/imagens/bg/cristo-1920.jpg");
}

#museu {
  background-image: url("assets/imagens/bg/museu-ferro-1920.jpg");
}

#mercearia {
  background-image: url("assets/imagens/bg/mercearia-1920.jpg");
}

.place-copy {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: max(280px, calc(100svh - var(--header-height, 100px) - 64px));
  padding: clamp(18px, 3vw, 30px);
  overflow: auto;
  background: var(--orange);
  border: var(--line);
  box-shadow: var(--shadow);
}

.place-copy h2 {
  font-size: clamp(2rem, 3.7vw, 3.8rem);
}

.image-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  margin-bottom: 24px;
  border: 3px solid var(--ink);
  background: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.image-trigger:hover {
  background: var(--ink);
  color: var(--white);
}

blockquote {
  margin: 32px 0;
  padding: 18px 22px;
  border: var(--line);
  background: var(--orange);
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 900;
  line-height: 1.25;
}

.facts {
  margin-top: 28px;
  padding: 24px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0;
}

.facts p {
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.authors-section {
  min-height: calc(100svh - 68px);
  background:
    linear-gradient(90deg, rgba(1, 1, 1, 0.48), rgba(1, 1, 1, 0.1)),
    url("assets/imagens/bg/home-certificados-1920.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--ink);
}

.authors-section .content {
  width: min(1040px, 100%);
  padding: clamp(18px, 3vw, 30px);
  background: rgba(240, 129, 37, 0.94);
  border: var(--line);
  box-shadow: var(--shadow);
}

.authors-section h2 {
  font-size: clamp(1.9rem, 4vw, 3.8rem);
}

.authors-section p {
  max-width: 900px;
}

.olhares-section {
  background: var(--orange);
}

.olhares-section .section-number {
  position: static;
  width: min(1120px, 100%);
  margin: 0 auto 24px;
  font-size: 3rem;
}

.olhares-layout {
  display: block;
}

.olhares-copy {
  padding: 0;
  margin-bottom: 48px;
}

.olhares-copy h2 {
  max-width: 100%;
  font-size: 3.5rem;
  line-height: 1.12;
  overflow-wrap: normal;
}

.olhares-copy p {
  max-width: 960px;
}

.olhares-section .kicker,
.place-copy .kicker,
.cover-title-card .kicker {
  color: var(--ink);
}

.photo-mosaic {
  columns: 4;
  column-gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.photo-mosaic img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-image,
.photo-mosaic > img {
  display: block;
  break-inside: avoid;
  width: 100%;
  margin: 0 0 16px;
  border: 3px solid var(--ink);
  background: var(--white);
}

.gallery-image {
  padding: 0;
}

.gallery-image:hover {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.authors-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px;
  margin-top: 22px;
}

.authors-list span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.impact-section {
  background: var(--ink);
  color: var(--white);
}

.impact-section .kicker {
  color: var(--orange);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin: 34px 0;
}

.impact-grid div {
  min-height: 150px;
  padding: 20px;
  background: var(--orange);
  border: var(--line);
  border-radius: 0;
  color: var(--ink);
}

.impact-grid strong {
  display: block;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
}

.impact-grid span {
  display: block;
  margin-top: 10px;
  font-weight: 800;
}

.credits-section {
  display: grid;
  place-items: center;
  min-height: 72svh;
  background: var(--orange);
}

.credits-section .content {
  padding: clamp(24px, 5vw, 44px);
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
}

.support-logos {
  margin: 34px 0 0;
  padding: 20px;
  background: var(--white);
  border: 3px solid var(--ink);
}

.support-logos img {
  display: block;
  width: min(300px, 100%);
  height: auto;
  margin: 0 auto;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.4rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

.image-dialog {
  width: min(1180px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: var(--line);
  background: var(--white);
  color: var(--ink);
}

.image-dialog::backdrop {
  background: rgb(0 0 0 / 82%);
}

.image-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}

.image-dialog-header h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

.dialog-close,
.description-audio {
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
}

.dialog-close {
  flex-shrink: 0;
}

.image-dialog-figure {
  margin: 0;
}

.image-dialog-figure > img {
  display: block;
  width: 100%;
  max-height: 62dvh;
  object-fit: contain;
  margin: 0 auto 24px;
}

.image-dialog-figure > img[hidden] {
  display: none;
}

.image-dialog-figure p {
  max-width: none;
  font-size: 1rem;
}

.image-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.original-image-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
}

.description-audio[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.dialog-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .route-list a:hover {
    transform: none;
  }
}

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

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

  .nav.open {
    display: flex;
  }

  .nav a {
    border-radius: 0;
  }

  .split-section,
  .place-section {
    grid-template-columns: 1fr;
  }

  .place-section,
  .place-section.reverse {
    justify-content: center;
    background-size: auto 100%;
  }

  .photo-mosaic {
    columns: 3;
  }

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

@media (max-width: 620px) {
  .section {
    padding: 56px 18px;
  }

  .section-number {
    position: static;
    margin-bottom: 20px;
    font-size: 2.6rem;
  }

  h1 {
    font-size: clamp(3.2rem, 18vw, 5.2rem);
  }

  h2 {
    font-size: clamp(2.2rem, 12vw, 3.7rem);
  }

  .route-list,
  .impact-grid,
  .authors-list {
    grid-template-columns: 1fr;
  }

  .place-copy {
    max-height: none;
  }

  .cover {
    align-items: center;
    padding-bottom: 56px;
    background-position: center;
  }

  .brand img {
    width: clamp(170px, 48vw, 240px);
  }

  .photo-mosaic {
    columns: 2;
    column-gap: 12px;
  }

  .olhares-copy h2 {
    font-size: 2rem;
  }

  .image-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }

  .image-dialog-header h2 {
    font-size: 1.15rem;
  }
}
