:root {
  --wine-deep: #3b0a1b;
  --wine: #5c0e28;
  --gold: #c9a44c;
  --gold-light: #e8ce8c;
  --parchment: #f5efe6;
  --bg: #47101f;
  --card: rgba(92, 14, 40, 0.55);
  --fg: var(--parchment);
  --muted: #d9cbbd;
  --font-display: "Special Elite", "Courier New", monospace;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: radial-gradient(ellipse at 50% 0%, var(--wine) 0%, var(--bg) 45%, var(--wine-deep) 100%)
    fixed;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 400;
}

.typewriter {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--gold);
}

img {
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------------------------------------------------------------- layout */
.frame {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 40px 24px;
}

.main.wide {
  max-width: none;
}

.footer {
  text-align: center;
  padding: 18px 0 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer .brand {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.gold-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold) 20%,
    var(--gold-light) 50%,
    var(--gold) 80%,
    transparent
  );
}

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid rgba(201, 164, 76, 0.45);
  background: rgba(92, 14, 40, 0.4);
  color: var(--gold);
  font-size: 1.05rem;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

.btn:hover {
  background: rgba(201, 164, 76, 0.14);
  border-color: var(--gold);
}

.btn:active {
  transform: scale(0.96);
}

.btn[disabled] {
  opacity: 0.3;
  cursor: default;
}

.btn-solid {
  background: var(--gold);
  color: var(--wine-deep);
  border-color: var(--gold);
  font-weight: 600;
}

.btn-solid:hover {
  background: var(--gold-light);
  color: var(--wine-deep);
}

.btn-round {
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  padding: 18px 48px;
  box-shadow: 0 0 40px -10px rgba(201, 164, 76, 0.4);
}

.btn-icon {
  min-width: 56px;
  justify-content: center;
  padding: 0;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ------------------------------------------------------------------ capa */
.cover {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px;
  overflow: hidden;
}

.cover-frame {
  position: relative;
  max-height: 70vh;
  display: flex;
}

.cover-frame img {
  max-height: 62vh;
  width: auto;
  object-fit: contain;
  border: 1px solid rgba(201, 164, 76, 0.4);
}

.corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 0 solid var(--gold);
}

.corner.tl {
  top: -10px;
  left: -10px;
  border-top-width: 4px;
  border-left-width: 4px;
}
.corner.tr {
  top: -10px;
  right: -10px;
  border-top-width: 4px;
  border-right-width: 4px;
}
.corner.bl {
  bottom: -10px;
  left: -10px;
  border-bottom-width: 4px;
  border-left-width: 4px;
}
.corner.br {
  bottom: -10px;
  right: -10px;
  border-bottom-width: 4px;
  border-right-width: 4px;
}

/* --------------------------------------------------------------- estações */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1600px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.grid > li { min-height: 150px; }
.grid > li.col-cell { min-height: 0; align-self: start; }
.logo-cell { display: flex; align-items: center; justify-content: center; }
.logo-cell img { height: 190px; width: auto; object-fit: contain; }
.card.col-card { min-height: 90px; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 20px; }
.card.col-card .name { font-size: 1.4rem; }
.card.col-card .subtitle { margin-top: 0; font-size: 0.95rem; }
.jk-quote { margin: 40px auto 0; text-align: center; color: rgba(214,196,160,0.8); }
.jk-quote blockquote { margin: 0 auto; max-width: 56rem; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 2.3rem; line-height: 1.3; }
.jk-quote figcaption { font-family: "Mrs Saint Delafield", cursive; font-size: 3.6rem; line-height: 1; margin-top: 6px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 150px;
  height: 100%;
  padding: 24px;
  border-radius: 12px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 28px 70px -14px rgba(0, 0, 0, 0.35), 0 10px 24px -10px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.3s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--gold-light),
    var(--gold) 25%,
    var(--gold-light) 50%,
    var(--gold) 75%,
    var(--gold-light)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  box-shadow: 0 36px 90px -16px rgba(0, 0, 0, 0.45);
}

.card:active {
  transform: scale(0.985);
}

.card .name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--fg);
  display: block;
}

.card .subtitle {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 1.05rem;
}

.colecoes-cell {
  display: flex;
  gap: 16px;
  align-items: stretch;
  min-height: 150px;
}

.colecoes-cell .card {
  width: 55%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.colecoes-cell img {
  height: 100%;
  max-height: 190px;
  width: auto;
  object-fit: contain;
}

/* ----------------------------------------------------------- fotos/peças */
.thumbs {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 28px;
}

.thumb {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(201, 164, 76, 0.35);
  background: rgba(92, 14, 40, 0.5);
  aspect-ratio: 4 / 3;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.thumb:hover img {
  transform: scale(1.05);
}

.item-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 32px;
}

@media (max-width: 1023px) {
  .item-layout {
    grid-template-columns: 1fr;
  }
}

.item-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(201, 164, 76, 0.35);
  background: rgba(92, 14, 40, 0.5);
}

.item-photo img {
  max-height: 75vh;
  width: 100%;
  object-fit: contain;
}

.item-title {
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0;
}

.item-text {
  margin-top: 24px;
  white-space: pre-line;
  text-align: justify;
  line-height: 1.7;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- modais */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 4, 10, 0.8);
  display: flex;
  z-index: 50;
  animation: fade-in 0.25s ease-out both;
}

.sheet {
  margin: auto;
  width: min(900px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(201, 164, 76, 0.45);
  background: #4b1123;
  overflow: hidden;
}

.sheet.full {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(201, 164, 76, 0.25);
}

.sheet-head h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

.sheet-body {
  flex: 1;
  overflow: auto;
  padding: 24px;
  line-height: 1.7;
  text-align: justify;
  white-space: pre-line;
}

.sheet-body iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 130px);
  border: 1px solid rgba(201, 164, 76, 0.3);
  border-radius: 8px;
  background: #fff;
}

/* -------------------------------------------------------- acessibilidade */
.a11y {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 76, 0.6);
  background: rgba(59, 10, 27, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.a11y img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.a11y[aria-pressed="true"] {
  background: var(--gold);
}

body.a11y-on {
  --fg: #ffffff;
  --muted: #f5efe6;
  --bg: #1a050f;
  --card: #260813;
  font-size: 18px;
}

body.a11y-on .card,
body.a11y-on .sheet {
  background: #260813;
}

/* --------------------------------------------------------- descanso tela */
.screensaver {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, var(--wine) 0%, var(--bg) 45%, var(--wine-deep) 100%);
  animation: fade-in 0.6s ease-out both;
}

.screensaver img {
  height: 220px;
  width: auto;
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.5s ease-out both;
}

.slide-up {
  animation: slide-up 0.5s ease-out both;
}
.jk-quote blockquote, .jk-quote figcaption { color: rgba(214,196,160,0.85) !important; }
