/* ============ Tokens ============ */
:root {
  --c-inicio: #513D3D;
  --c-tempo: #FFCC26;
  --c-varal: #FF9933;
  --c-fotos: #FF6633;
  --c-cartazes: #FF334D;

  --bg: #f5efe4;
  --bg-paper: #fdfaf3;
  --ink: #1a1a1a;
  --muted: #5b5b5b;
  --border: #2a2a2a;
  --accent-yellow: #f5e6a8;

  --font-display: "Permanent Marker", "Bradley Hand", "Comic Sans MS", cursive;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  scroll-behavior: smooth;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ Splash / Intro ============ */
#splash, .section {
  position: fixed; inset: 0; z-index: 100;
  background-image: linear-gradient(rgba(20,15,10,0.55), rgba(20,15,10,0.7)), url("assets/hero-collage.jpg");
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#splash.hidden { opacity: 0; visibility: hidden; }

.splash-title-wrap {
  background: rgba(245, 230, 168, 0.85);
  padding: 3rem 10rem;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 90vw;
}
.splash-title {
  font-family: var(--font-display);
  font-size: clamp(1.54rem, 4.9vw, 3.85rem);
  letter-spacing: 0.04em;
  color: #1a1a1a;
  opacity: 0;
  transform: translateX(-40px) skewX(-6deg);
  animation: slideInWord 1.1s 0.3s forwards cubic-bezier(.2,.8,.2,1);
}
.splash-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  margin-top: 0.6rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s forwards;
}
.splash-subtitle:nth-of-type(1) { animation-delay: 1.3s; }
.splash-subtitle:nth-of-type(2) { animation-delay: 1.8s; }
.splash-subtitle:nth-of-type(3) { animation-delay: 2.3s; }

@keyframes slideInWord {
  to { opacity: 1; transform: translateX(0) skewX(-6deg); }
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.btn-comecar {
  margin-top: 3rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  background: var(--accent-yellow);
  color: #1a1a1a;
  padding: 0.9rem 2.4rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.25s, box-shadow 0.25s;
  pointer-events: none;
}
.btn-comecar.show {
  animation: fadeUp 0.6s forwards;
  pointer-events: auto;
}
.btn-comecar:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 36px rgba(0,0,0,0.45); }

.audio-toggle {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: rgba(0,0,0,0.4); color: #fff;
  border-radius: 999px; padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* ============ App shell ============ */
#app { display: none; }
#app.visible { display: block; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-paper);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0.8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem; letter-spacing: 0.02em;
}
.brand small { display: block; font-family: var(--font-body); font-size: 0.7rem; color: var(--muted); font-weight: 400; }

nav.menu {
  display: flex; gap: 0; flex-wrap: wrap;
  border: 1px solid rgba(0,0,0,0.1);
}
nav.menu button {
  flex: 1;
  min-width: 180px;
  height: 38px;
  font-weight: 600; font-size: 0.85rem;
  padding: 0 1rem;
  border-radius: 0;
  color: var(--menu-t, #1a1a1a);
  background: var(--menu-c, #ddd);
  transition: filter 0.2s;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
nav.menu button:hover { filter: brightness(1.05); z-index: 2; }
nav.menu button.active { box-shadow: inset 0 0 0 2px #000000; z-index: 3; }

/* ============ Sections ============ */
main { padding: 0; }
.section {
  display: none;
  position: relative;
  min-height: calc(100vh - 80px);
  border-left: 25px solid var(--accent, #ccc);
  /*background: var(--bg-paper);*/
}
.section.active { display: block; animation: sectionFade 0.5s; }
@keyframes sectionFade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

.section-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 0 6rem;
}

.section-title-bar {
  background: #b8b8b8;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ============ Início ============ */
#sec-inicio { --accent: var(--c-inicio); }
.section.active .sobre-cols p {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeUp 0.8s forwards;
}
.section.active .sobre-cols p:nth-child(1) { animation-delay: 0.2s; }
.section.active .sobre-cols p:nth-child(2) { animation-delay: 0.6s; }
.section.active .sobre-cols p:nth-child(3) { animation-delay: 1.0s; }
.section.active .sobre-cols p:nth-child(4) { animation-delay: 1.4s; }
.section.active .sobre-cols p:nth-child(5) { animation-delay: 1.8s; }
.section.active .sobre-cols p:nth-child(6) { animation-delay: 2.2s; }
.section.active .sobre-cols p:nth-child(7) { animation-delay: 2.6s; }
.section.active .sobre-cols p:nth-child(8) { animation-delay: 3.0s; }

.sobre-cols {
  column-count: 2; column-gap: 2.5rem;
  font-size: 1.02rem; text-align: justify;
  background: var(--bg-paper);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.1);
}
.sobre-cols p { margin-bottom: 1rem; break-inside: avoid; }
.sobre-cols p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3.4rem; float: left; line-height: 0.9;
  padding-right: 0.4rem; padding-top: 0.3rem;
}
@media (max-width: 720px) { .sobre-cols { column-count: 1; } }

/* ============ Linha do tempo ============ */
#sec-linha-do-tempo { --accent: var(--c-tempo); }
.timeline-layout {
  display: grid; grid-template-columns: 140px 1fr 1fr; gap: 2rem;
  align-items: start;
  background: var(--bg-paper);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.1);
}
@media (max-width: 1000px) { 
  .timeline-layout { grid-template-columns: 100px 1fr; }
  .doc-viewer { grid-column: 1 / -1; }
}

.timeline-nav {
  display: flex; flex-direction: column; align-items: center;
  position: relative; padding: 1rem 0;
  height: 600px; /* Altura fixa para o carrossel */
  justify-content: space-between;
}
.timeline-arrow {
  color: #E76C5C; font-size: 1.5rem; margin: 0.2rem 0; cursor: pointer;
  transition: transform 0.2s, color 0.2s;
  user-select: none;
  z-index: 10;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.timeline-arrow:hover { transform: scale(1.2); color: #E91E8C; }
.timeline-arrow.disabled { opacity: 0.3; cursor: default; }

.timeline-container {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.timeline {
  position: relative; padding: 1rem 0;
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  border-left: 2px dashed #1a1a1a;
  transform: translateX(-50%);
}
.tl-year {
  position: relative; margin-bottom: 1.5rem;
  z-index: 2;
}
.tl-year .flag {
  background: linear-gradient(135deg, #E91E8C, #9B59B6);
  color: #fff; font-weight: 700; font-size: 0.9rem;
  padding: 0.5rem 0.8rem;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 15% 100%, 0 50%);
  width: 100px; text-align: center;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.tl-year .flag:hover { transform: scale(1.1); filter: brightness(1.1); }
.tl-year.active .flag {
  background: #1a1a1a;
  transform: scale(1.15);
}

.event-box {
  border: 2px solid #1a1a1a;
  background: #fff;
  padding: 2rem;
  border-radius: 4px;
  min-height: 400px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}
.event-box h4.capitulo { 
  font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; 
  text-decoration: underline; margin-bottom: 1.5rem; text-align: center;
}
.event-box h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1.5rem; text-align: center; line-height: 1.2; }
.event-box p { font-size: 1.05rem; line-height: 1.7; color: #333; margin-bottom: 2rem; }

.event-box .anexos { 
  margin-top: 2rem; padding: 1rem; border: 2px solid #E76C5C; border-radius: 4px; 
}
.event-box .anexos h4 { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.8rem; text-decoration: underline; color: #E76C5C; }
.event-box .anexos ol { padding-left: 1.5rem; }
.event-box .anexos li { margin-bottom: 0.5rem; }
.event-box .anexos a { color: #1565c0; text-decoration: underline; font-weight: 600; cursor: pointer; }
.event-box .anexos a:hover { color: #E91E8C; }

.doc-viewer {
  border: 2px solid #E76C5C;
  background: #f9f9f9;
  border-radius: 4px;
  display: flex; flex-direction: column;
  height: 600px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
}
.doc-viewer .dv-head { 
  padding: 0.8rem 1rem; background: #fff; border-bottom: 1px solid #E76C5C;
  font-weight: 700; font-size: 0.9rem; color: #E76C5C; text-align: center;
}
.doc-viewer .dv-content {
  flex: 1; padding: 1rem; background: #fff; overflow: auto;
  display: flex; align-items: center; justify-content: center;
}
.doc-viewer iframe, .doc-viewer img { width: 100%; height: 100%; object-fit: contain; border: none; }
.doc-viewer.empty .dv-content { color: #999; font-style: italic; text-align: center; padding: 3rem; }

/* ============ Varal das camisetas ============ */
#sec-varal { --accent: var(--c-varal); }
.varal-container {
  background: var(--bg-paper);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.1);
  max-width: 1200px;
  margin: 0 auto;
}
.varal-row {
  position: relative;
  /* margin-bottom: 8rem;
  padding-top: 1rem; */
  width: 100%;
}
.varal-line {
  position: absolute; 
  top: 30px; left: 0; right: 0;
  height: 80px; 
  border-bottom: 2px solid #5d4037;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  pointer-events: none;
  z-index: 1;
}
.shirts {
  display: flex; 
  justify-content: space-around; 
  align-items: flex-start;
  position: relative; z-index: 2;
  padding: 0 2%;
  width: 100%;
}
.shirt {
  width: 130px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: top center;
  /* Curva matemática ajustada para alinhar com a varal-line */
  --progress: calc(var(--idx) / (var(--total) - 1));
  --curve: calc(80px * 4 * var(--progress) * (1 - var(--progress)));
  margin-top: var(--curve);
  transform: rotate(calc((var(--progress) - 0.5) * 12deg));
}
.shirt:hover { 
  transform: scale(1.15) rotate(0deg) !important; 
  z-index: 10;
}
.shirt-img {
  width: 100%; height: auto; 
  aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15));
  padding: 0;
  margin-top: 35px; 
}
.shirt-label {
  margin-top: 8px;
  font-size: 0.7rem; font-weight: 700; color: #333; text-align: center;
  line-height: 1.2;
  padding: 0 5px;
  background: rgba(255,255,255,0.6);
  border-radius: 3px;
}
.shirt-pin {
  position: absolute; 
  top: 25px; /* Ajustado para cruzar com a varal-line */
  left: 50%; transform: translateX(-50%);
  width: 8px; height: 20px;
  background: #a1887f;
  border-radius: 2px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  z-index: 3;
}
.shirt-pin::after {
  content: ""; position: absolute; top: 30%; left: 0; width: 100%; height: 2px;
  background: rgba(255,255,255,0.2);
}

/* ============ Fotos ============ */
#sec-fotos { --accent: var(--c-fotos); }
.gallery-shell { 
  background: var(--bg-paper);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.1); 
  border-radius: 8px; 
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem;
}
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 450px) { .gallery-grid { grid-template-columns: 1fr; } }

.album-item {
  cursor: pointer;
  transition: transform 0.3s;
}
.album-item:hover { transform: translateY(-8px); }

.album-stack {
  position: relative;
  aspect-ratio: 1/1;
  margin-bottom: 1.5rem;
}
.album-layer {
  position: absolute; inset: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 4px;
}
.layer-3 { transform: rotate(-6deg) translate(-5px, -5px); background: #eee; }
.layer-2 { transform: rotate(4deg) translate(5px, -2px); background: #f9f9f9; }

.album-img {
  position: relative; z-index: 5;
  width: 100%; height: 100%; object-fit: cover;
  border: 4px solid #fff;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.album-info { text-align: center; }
.album-title { font-family: var(--font-display); font-size: 1.1rem; color: #1a1a1a; margin-bottom: 0.2rem; line-height: 1.2; }
.album-count { font-size: 0.75rem; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Modal específico para o álbum */
.album-modal-header { margin-bottom: 2rem; border-bottom: 2px solid #D4DC4D; padding-bottom: 1rem; }
.album-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.album-photo-item {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid #eee;
  background: #f0f0f0;
}
.album-photo-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.album-photo-item:hover .album-photo-img { transform: scale(1.1); }

/* Carousel no Modal */
.carousel-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.carousel-nav {
  background: #1a1a1a;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.2s, background 0.2s;
}
.carousel-nav:hover:not(:disabled) {
  transform: scale(1.1);
  background: #E91E8C;
}
.carousel-nav:disabled {
  opacity: 0.2;
  cursor: default;
}
.carousel-info {
  text-align: center;
  margin-bottom: 1rem;
}
.back-to-album {
  display: block;
  margin: 0 auto;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #D4DC4D;
  background: #1a1a1a;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: filter 0.2s;
}
.back-to-album:hover {
  filter: brightness(1.2);
}

/* Ajuste no modal card para carrossel */
.modal-backdrop.open .modal-card { 
  max-width: 1000px;
}
@media (max-width: 600px) {
  .carousel-container { gap: 0.5rem; }
  .carousel-nav { width: 36px; height: 36px; font-size: 1rem; }
}

.pagination {
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  margin-top: 1.5rem;
}
.pagination button {
  background: #1a1a1a; color: #fff; padding: 0.5rem 1.2rem; border-radius: 6px;
  font-size: 0.9rem;
}
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination span { font-weight: 600; }

.gallery-caption {
  margin-top: 1rem; text-align: center; font-weight: 600; font-size: 0.9rem; color: #444;
}

/* ============ Cartazes ============ */
#sec-cartazes { --accent: var(--c-cartazes); }
.cartazes-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  background: var(--bg-paper);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.1);
}
@media (max-width: 800px) { .cartazes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .cartazes-grid { grid-template-columns: 1fr; } }

.cartaz-card {
  cursor: pointer; transition: transform 0.25s;
}
.cartaz-card:hover { transform: translateY(-4px); }
.cartaz-art-wrap {
  aspect-ratio: 3/4;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.1);
}
.cartaz-img {
  width: 100%; height: 100%; object-fit: cover;
}
.cartaz-art-wrap .ano { 
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: #fff;
  padding: 2px 8px; border-radius: 3px; font-size: 0.7rem; 
  z-index: 2;
}
.cartaz-card .legenda { margin-top: 0.6rem; font-size: 0.85rem; font-weight: 600; text-align: center; color: #444; }

/* ============ Footer band ============ */
.footer-band {
  position: relative;
  background-image: url("assets/footer-silhouettes.png");
  background-repeat: repeat-x; background-size: contain; background-position: bottom center;
  height: 120px;
  border-top: 1px solid rgba(0,0,0,0.1);
  bottom: -25px;
}
.footer-quote {
  position: absolute; bottom: 90px; left: 0; right: 0;
  text-align: center; font-weight: 700; font-size: 0.78rem;
  color: #1a1a1a; letter-spacing: 0.03em;
  text-shadow: 0 0 6px rgba(255,255,255,0.7);
  padding: 0 1rem;
}
.next-section {
  display: block; margin: 2rem auto 0;
  font-size: 0.95rem; font-weight: 600;
  background: transparent; color: #1a1a1a;
  color: #fff;
  text-shadow: #000000 1px 1px 2px;
}
.next-section .arrow { display: block; margin: 4px auto 0; font-size: 1.4rem; transition: transform 0.2s; }
.next-section:hover .arrow { transform: translateY(4px); }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  padding: 2rem; opacity: 0; transition: opacity 0.25s;
}
.modal-backdrop.open { display: flex; opacity: 1; }
.modal-card {
  background: #fff; border-radius: 8px; padding: 2rem; max-width: 600px; width: 100%;
  max-height: 90vh; overflow: auto; position: relative;
  transform: scale(0.9); transition: transform 0.25s;
}
.modal-backdrop.open .modal-card { transform: scale(1); }
.modal-close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: #1a1a1a; color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-image {
  width: 100%; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mc1, #ddd), var(--mc2, #aaa));
  color: #fff; font-family: var(--font-display); font-size: 2rem;
  text-align: center; padding: 1rem;
  border-radius: 6px;
  text-shadow: 2px 3px 0 rgba(0,0,0,0.4);
}
.modal-image.tall { aspect-ratio: 3/4; }
.modal-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
.modal-caption { 
  margin-top: 1rem; 
  font-size: 1rem; 
  color: #1a1a1a; 
  line-height: 1.5; 
  text-align: center;
  font-weight: 500;
}
.modal-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.4rem; }
.modal-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }





.shirt[data-id="c30"] {
  margin-top: 80px; /* Ajuste específico para a camisa 30 */
}
.shirt[data-id="c1"], 
.shirt[data-id="c8"], 
.shirt[data-id="c9"], 
.shirt[data-id="c18"], 
.shirt[data-id="c19"],
.shirt[data-id="c29"] {
  top: 40px; /* Ajuste específico para o pino da camisa */
}

.shirt[data-id="c2"], 
.shirt[data-id="c7"], 
.shirt[data-id="c10"], 
.shirt[data-id="c15"], 
.shirt[data-id="c20"] {
  top: 20px; /* Ajuste específico para o pino da camisa */
}

