:root {
  --page: #efe7dd;
  --paper: #fffaf4;
  --paper-soft: rgba(255, 250, 243, 0.92);
  --ink: #241913;
  --muted: #6c5d51;
  --line: rgba(74, 54, 38, 0.16);
  --line-strong: rgba(74, 54, 38, 0.28);
  --brown: #342419;
  --oxide: #9b332b;
  --green: #5e7b42;
  --blue: #2e7484;
  --gold: #b88b2b;
  --shadow: 0 18px 38px rgba(61, 42, 28, 0.16);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(135deg, #efe6db 0%, #e7dccf 45%, #efe7dd 100%);
  font-family: var(--sans);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent, var(--oxide)) 54%, white);
  outline-offset: 2px;
}

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

.shell {
  height: 100%;
  display: grid;
  grid-template-rows: 84px minmax(0, 1fr);
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 255, 255, 0.55), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 35%),
    var(--page);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
  padding: 12px 44px;
  border-bottom: 1px solid rgba(80, 58, 42, 0.12);
  background: rgba(255, 251, 245, 0.9);
  box-shadow: 0 8px 18px rgba(58, 42, 30, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand img {
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: #fffaf2;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.topnav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 44px;
}

.nav-button {
  min-height: 52px;
  padding: 0 4px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 140ms ease, border-color 140ms ease;
}

.nav-button:hover,
.nav-button.active {
  border-color: var(--theme-accent, var(--oxide));
  background: transparent;
  color: color-mix(in srgb, var(--ink) 88%, black);
}

.searchbox {
  justify-self: end;
  width: 100%;
  max-width: 300px;
}

.searchbox input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink);
  font-size: 15px;
}

.home-screen {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(340px, 38vh) 166px minmax(260px, 1fr) 54px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background:
    linear-gradient(96deg, rgba(32, 24, 18, 0.90) 0%, rgba(45, 33, 24, 0.72) 18%, rgba(247, 242, 234, 0.28) 52%, rgba(247, 242, 234, 0.08) 100%),
    var(--hero-image) center/cover no-repeat;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--oxide), var(--gold), var(--blue));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 520px;
  padding: 58px 0 0 60px;
}

.eyebrow,
.kicker,
.note-label {
  margin: 0 0 12px;
  color: var(--theme-accent, var(--oxide));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #fffaf4;
  font-family: var(--serif);
  font-size: 58px;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.title-rule {
  position: relative;
  display: block;
  width: 208px;
  height: 1px;
  margin: 22px 0 18px;
  background: rgba(55, 37, 24, 0.36);
}

.title-rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gold);
}

.hero-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 251, 245, 0.92);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 24px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #342419, #503927);
  color: #fffaf4;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: none;
}

.selector-shell {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  min-height: 0;
  border-bottom: 1px solid rgba(80, 58, 42, 0.12);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(242, 235, 225, 0.92));
}

.selector-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(178px, 1fr);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.selector-rail::-webkit-scrollbar {
  display: none;
}

.rail-arrow {
  align-self: center;
  justify-self: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #342419, #4a3528);
  color: #fff8ee;
  font-size: 28px;
  line-height: 1;
  box-shadow: none;
}

.rail-card {
  position: relative;
  display: grid;
  grid-template-rows: 30px auto auto minmax(64px, 1fr);
  justify-items: center;
  align-items: center;
  min-width: 182px;
  min-height: 166px;
  padding: 0 14px 14px;
  border: 1px solid rgba(80, 58, 42, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(245, 238, 228, 0.96));
  color: var(--ink);
  text-align: center;
  box-shadow: 0 14px 24px rgba(61, 42, 28, 0.1);
}

.rail-card.active {
  border-color: color-mix(in srgb, var(--accent, var(--oxide)) 58%, transparent);
  box-shadow:
    inset 0 0 0 3px color-mix(in srgb, var(--accent, var(--oxide)) 74%, transparent),
    0 14px 24px rgba(61, 42, 28, 0.14);
  z-index: 2;
}

.rail-card.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 14px solid var(--accent, var(--oxide));
}

.rail-card-accent {
  width: calc(100% + 28px);
  height: 4px;
  margin-bottom: 12px;
  border-radius: 18px 18px 0 0;
  background: color-mix(in srgb, var(--accent, var(--oxide)) 84%, white);
}

.rail-card span {
  max-width: 215px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}

.rail-card small {
  max-width: 240px;
  margin-top: 6px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.22;
}

.rail-card img {
  align-self: end;
  width: 94px;
  height: 60px;
  margin-top: 12px;
  border-radius: 4px;
  object-fit: cover;
  object-position: center;
  background: rgba(238, 232, 221, 0.9);
  filter: sepia(0.12) saturate(0.88);
}

.highlights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr) 370px;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(80, 58, 42, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 240, 230, 0.95)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.45), transparent 24%),
    var(--paper);
}

.period-menu,
.feature-panel,
.side-notes {
  min-width: 0;
  min-height: 0;
  padding: 24px 26px;
}

.period-menu,
.side-notes {
  background: transparent;
}

.period-menu {
  border-right: 1px solid var(--line);
}

.section-title {
  margin: 0;
  color: var(--theme-accent, var(--oxide));
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

.period-menu small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.menu-list {
  display: grid;
  gap: 7px;
  margin-top: 26px;
}

.menu-list button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

.menu-list button.active {
  border-color: color-mix(in srgb, var(--theme-accent, var(--oxide)) 28%, transparent);
  background: color-mix(in srgb, var(--theme-accent, var(--oxide)) 10%, white);
  box-shadow: inset 4px 0 0 var(--theme-accent, var(--oxide));
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(420px, 1fr);
  gap: 36px;
  align-items: center;
  border-right: 1px solid var(--line);
}

.feature-patrimonio,
.feature-personagens {
  grid-template-columns: minmax(360px, 0.86fr) minmax(420px, 1fr);
}

.feature-text {
  min-width: 0;
  align-self: center;
}

.feature-text h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.05;
}

.feature-text p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.outline-button,
.note-card button {
  min-height: 46px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--oxide)) 44%, transparent);
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--theme-accent, var(--oxide)) 80%, black);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

figure {
  margin: 0;
}

.feature-panel figure {
  min-width: 0;
  min-height: 0;
  align-self: center;
  overflow: hidden;
}

.feature-panel figure img {
  width: 100%;
  height: clamp(260px, 31vh, 360px);
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  background: transparent;
  box-shadow: none;
}

.feature-figure-grid {
  display: block;
}

.feature-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.feature-gallery-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.feature-gallery-card {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
}

.feature-gallery-card img {
  height: clamp(260px, 31vh, 360px);
}

.feature-caption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.side-notes {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.note-card {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.note-card:first-child {
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.note-media {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.note-media img {
  width: 140px;
  height: 100%;
  min-height: 108px;
  border-radius: 0;
  object-fit: cover;
  background: transparent;
}

.note-card:first-child h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.12;
}

.note-card:first-child p {
  margin: 0;
  color: #38291f;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.35;
}

.note-card-soft {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.note-card-soft p:not(.note-label) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.note-card .note-label {
  margin-bottom: 12px;
  color: #9b332b;
  font-size: 12px;
  letter-spacing: 1.8px;
}

.note-card button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brown);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.note-card button span {
  font-size: 18px;
  line-height: 1;
}

.bottom-timeline {
  display: grid;
  grid-template-columns: 72px 310px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 0 38px;
  background: linear-gradient(135deg, #2f251d, #1f1711);
  color: rgba(255, 248, 238, 0.82);
}

.mini-logo {
  color: rgba(255, 248, 238, 0.52);
  font-family: var(--serif);
  font-size: 18px;
}

.bottom-timeline p {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dotline {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 22px;
}

.dotline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 248, 238, 0.26);
}

.dotline button {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d5c7b4;
}

.dotline button.active {
  width: 21px;
  height: 21px;
  border: 5px solid var(--theme-accent, var(--oxide));
  background: #fff8ee;
}

.detail-page {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: 300px minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.close-button {
  position: fixed;
  right: 28px;
  top: 22px;
  z-index: 45;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--brown);
  color: #fff8ee;
  font-size: 13px;
  font-weight: 900;
}

.detail-hero {
  padding: 76px 80px 40px;
  background:
    linear-gradient(90deg, rgba(247, 242, 232, 0.97), rgba(247, 242, 232, 0.78), rgba(247, 242, 232, 0.16)),
    var(--detail-image) center/cover no-repeat;
}

.detail-hero h2 {
  max-width: 880px;
  margin: 0;
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
}

.detail-hero p:last-child {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.34;
}

.detail-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  min-height: 0;
  padding: 36px 80px 44px;
  overflow: hidden;
}

.detail-body aside {
  position: sticky;
  top: 0;
  align-self: start;
  padding-right: 26px;
  border-right: 1px solid var(--line);
}

.detail-body article {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(380px, 1fr);
  gap: 38px;
  min-height: 0;
  align-items: stretch;
}

.detail-copy {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 18px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.detail-copy::-webkit-scrollbar {
  width: 10px;
}

.detail-copy::-webkit-scrollbar-track {
  background: rgba(116, 95, 76, 0.08);
}

.detail-copy::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--theme-accent, var(--oxide)) 42%, rgba(116, 95, 76, 0.24));
}

.detail-copy::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--theme-accent, var(--oxide)) 58%, rgba(116, 95, 76, 0.24));
}

.detail-intro {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-copy h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.05;
}

.detail-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-section h4 {
  margin: 0 0 10px;
  color: var(--theme-accent, var(--oxide));
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.1;
}

.detail-documents {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.detail-document-card {
  padding: 16px 18px;
  border-left: 3px solid var(--theme-accent, var(--oxide));
  background: rgba(255, 255, 255, 0.42);
}

.detail-document-card strong,
.detail-document-card small {
  display: block;
}

.detail-document-card strong {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-document-card p {
  margin: 0;
}

.detail-document-card small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.detail-copy p,
.detail-copy li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.detail-copy ul {
  margin-top: 22px;
  padding-left: 22px;
}

.detail-events {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.detail-events div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-events strong {
  color: var(--theme-accent, var(--oxide));
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.detail-gallery-item {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.detail-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-gallery-item span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.detail-gallery-item.active {
  border-color: color-mix(in srgb, var(--theme-accent, var(--oxide)) 42%, transparent);
}

.detail-body figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.detail-body figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1280px) {
  body {
    overflow: auto;
  }

  .shell,
  .home-screen {
    height: auto;
  }

  .topbar,
  .highlights,
  .feature-panel,
  .detail-body,
  .detail-body article {
    grid-template-columns: 1fr;
  }

  .home-screen {
    grid-template-rows: 360px auto auto auto;
  }

  .topbar {
    padding: 12px 20px;
  }

  .topnav {
    justify-self: start;
    gap: 20px;
  }

  .searchbox {
    justify-self: stretch;
    max-width: none;
  }

  .hero-copy {
    width: auto;
    padding: 42px 24px 0;
  }

  .hero h1,
  .detail-hero h2 {
    font-size: 44px;
  }

  .period-menu,
  .feature-panel,
  .side-notes,
  .detail-body {
    padding: 24px;
  }

  .detail-hero {
    padding: 72px 24px 34px;
  }

  .detail-body aside {
    position: static;
    padding-right: 0;
    border-right: 0;
  }
}
