:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --primary: #8a2be2;
  --primary-dark: #4d1d8b;
  --text: #1f1a2d;
  --muted: #6c6482;
  --border: #eee4ff;
  --shadow: 0 20px 45px rgba(40, 25, 78, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

main img:not(.brand-logo) {
  border-radius: 18px;
  cursor: zoom-in;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-notice {
  background: #2f1b53;
  color: #f8f3ff;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 244, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  width: calc(100% - 2rem);
  max-width: none;
}

.corner-logo {
  position: static;
  width: 128px;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  margin-left: auto;
  z-index: 12;
  pointer-events: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  min-height: 138px;
  gap: 1.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
  font-size: 0.95rem;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(77, 29, 139, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f5ecff 100%);
  box-shadow:
    0 2px 0 rgba(77, 29, 139, 0.28),
    0 8px 16px rgba(31, 26, 45, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.site-nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow:
    0 3px 0 rgba(77, 29, 139, 0.32),
    0 12px 20px rgba(31, 26, 45, 0.13);
}

.site-nav a:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(77, 29, 139, 0.32),
    0 5px 10px rgba(31, 26, 45, 0.1);
}

.site-nav a:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(138, 43, 226, 0.42);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

.hero-section {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #f4eaff;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.7vw, 3rem);
  line-height: 1.15;
}

.hero-copy p,
.section-heading p,
.info-card p,
.highlight-box li,
.contact-meta,
.form-message {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #9f48ff 0%, #7d27d9 100%);
  color: white;
  box-shadow:
    0 3px 0 #5c1f9e,
    0 10px 18px rgba(77, 29, 139, 0.25);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #f6f1ff 100%);
  border-color: rgba(77, 29, 139, 0.18);
  box-shadow:
    0 3px 0 rgba(77, 29, 139, 0.18),
    0 8px 14px rgba(31, 26, 45, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary:hover {
  box-shadow:
    0 4px 0 #54218d,
    0 14px 22px rgba(77, 29, 139, 0.3);
}

.btn-secondary:hover {
  box-shadow:
    0 4px 0 rgba(77, 29, 139, 0.24),
    0 12px 18px rgba(31, 26, 45, 0.13);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.hero-card img {
  border-radius: 16px;
  margin-bottom: 1rem;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-card-body h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(138, 43, 226, 0.04), transparent);
}

.cards-grid,
.gallery-grid {
  display: grid;
  gap: 1.25rem;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.highlight-box,
.table-card,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.highlight-box ul {
  margin: 0;
  padding-left: 1rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.table-card {
  display: grid;
  gap: 0.8rem;
}

.table-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.table-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid img {
  border-radius: 20px;
  border: 1px solid var(--border);
  min-height: 240px;
  object-fit: cover;
}

.press-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.press-article-grid img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(255, 250, 244, 0.95));
  border: 1px solid var(--border);
}

@media (max-width: 720px) {
  .press-article-grid {
    grid-template-columns: 1fr;
  }
}

.press-article-grid-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 320px;
  margin: 0 auto;
}

.access-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.access-media-grid img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(255, 250, 244, 0.95));
  border: 1px solid var(--border);
}

@media (max-width: 560px) {
  .access-media-grid {
    grid-template-columns: 1fr;
  }

  .access-media-grid img {
    height: 180px;
  }
}

.centered-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.single-image-wrap {
  display: flex;
  justify-content: center;
}

.single-image-wrap img {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--border);
}

.single-image-wrap-sm img {
  max-width: 420px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font: inherit;
  background: #fffdf9;
}

.contact-form button {
  width: fit-content;
}

.article-links {
  margin: 0;
  padding-left: 1.2rem;
}

.historical-content {
  display: grid;
  gap: 0.8rem;
  background:
    linear-gradient(rgba(255, 250, 244, 0.92), rgba(255, 250, 244, 0.92)),
    url("media/images/histoir-de-la-capoeira.png") center / cover no-repeat;
  border-radius: 20px;
  padding: 1.6rem;
}

.historical-content p {
  margin: 0;
}

.partner-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.partner-card {
  display: grid;
  gap: 0.9rem;
}

.partner-card img {
  width: 140px;
  height: 100px;
  object-fit: contain;
}

.partner-card p {
  margin: 0;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 420px;
}

.qr-card {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}

.qr-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.qr-card .qr-code-img {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
}

.qr-card .store-badge {
  width: 60px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.qr-card p {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.article-links li {
  margin-bottom: 0.45rem;
}

.article-links a,
.inline-link {
  color: var(--primary-dark);
  text-decoration: underline;
}

.inline-link {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.video-grid video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #000;
}

.site-footer {
  padding: 1.5rem 0 2rem;
}

.spaced-top-sm {
  margin-top: 0.8rem;
}

.spaced-top-md {
  margin-top: 1rem;
}

.spaced-top-lg {
  margin-top: 1.5rem;
}

.spaced-top-2 {
  margin-top: 2rem;
}

.spaced-bottom-md {
  margin-bottom: 1rem;
}

.no-top-margin {
  margin-top: 0;
}

.festival-legacy-section {
  padding-top: 2.8rem;
  padding-bottom: 2.2rem;
  background:
    radial-gradient(1200px 420px at 50% -140px, rgba(226, 156, 43, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

.festival-modern-shell {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.15rem;
  border-radius: 28px;
  border: 1px solid rgba(228, 200, 148, 0.42);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.82));
  box-shadow: 0 26px 44px rgba(78, 58, 25, 0.14);
}

.festival-legacy-column {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 1.05rem;
}

.festival-feature-image {
  width: 100%;
  max-width: 520px;
  justify-self: center;
  border: 1px solid rgba(216, 178, 122, 0.45);
  box-shadow: 0 18px 34px rgba(78, 58, 25, 0.17);
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.festival-feature-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(78, 58, 25, 0.22);
}

.festival-text-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 239, 0.9));
  border: 1px solid rgba(228, 200, 148, 0.5);
  border-radius: 20px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 15px 26px rgba(78, 58, 25, 0.12);
}

.festival-legacy-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3.1vw, 2.6rem);
  line-height: 1.12;
}

.festival-legacy-intro,
.festival-legacy-text {
  margin: 0;
  color: #5e5144;
  max-width: 650px;
}

.festival-old-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.85rem;
}

.festival-old-gallery figure {
  margin: 0;
  opacity: 0;
  animation: festivalReveal 420ms ease forwards;
}

.festival-old-gallery img {
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(216, 178, 122, 0.4);
  box-shadow: 0 12px 24px rgba(78, 58, 25, 0.14);
  transition: transform 220ms ease, box-shadow 220ms ease;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.festival-old-gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted, #6c6482);
  line-height: 1.35;
}

.festival-old-gallery figure:hover img {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 30px rgba(78, 58, 25, 0.2);
}

.festival-old-gallery figure:nth-child(odd) img {
  aspect-ratio: 5 / 4;
}

.festival-old-gallery figure:nth-child(3n) img {
  aspect-ratio: 1 / 1;
}

.festival-old-gallery figure:nth-child(4n + 1) {
  grid-column: span 6;
}

.festival-old-gallery figure:not(:nth-child(4n + 1)) {
  grid-column: span 3;
}

.festival-old-gallery figure.archive-photo-lg {
  grid-column: span 6;
}

.festival-old-gallery figure.archive-photo-sm {
  grid-column: span 3;
}

.festival-old-gallery figure.archive-photo-sm img {
  max-width: 75%;
  margin: 0 auto;
}

.festival-old-gallery figure.archive-photo-md {
  grid-column: span 4;
}

.festival-old-gallery figure.archive-photo-md img {
  max-width: 100%;
  margin: 0 auto;
}

.festival-old-gallery figure:last-child:nth-child(4n + 1) {
  grid-column: 4 / span 6;
}

.festival-old-gallery figure.archive-photo-sm figcaption,
.festival-old-gallery figure.archive-photo-md figcaption {
  text-align: center;
}

.festival-old-gallery figure:nth-child(1) { animation-delay: 20ms; }
.festival-old-gallery figure:nth-child(2) { animation-delay: 60ms; }
.festival-old-gallery figure:nth-child(3) { animation-delay: 100ms; }
.festival-old-gallery figure:nth-child(4) { animation-delay: 140ms; }
.festival-old-gallery figure:nth-child(5) { animation-delay: 180ms; }
.festival-old-gallery figure:nth-child(6) { animation-delay: 220ms; }
.festival-old-gallery figure:nth-child(7) { animation-delay: 260ms; }
.festival-old-gallery figure:nth-child(8) { animation-delay: 300ms; }
.festival-old-gallery figure:nth-child(n + 9) { animation-delay: 340ms; }

@keyframes festivalReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.festival-archive-shell {
  background:
    radial-gradient(1000px 380px at 12% -10%, rgba(138, 43, 226, 0.13), transparent 60%),
    radial-gradient(900px 360px at 100% 105%, rgba(226, 156, 43, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(255, 244, 224, 0.92));
  border: 1px solid rgba(228, 200, 148, 0.5);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: 0 20px 34px rgba(78, 58, 25, 0.12);
}

.festival-heading-center {
  text-align: center;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 10, 22, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 90;
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  width: auto;
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.image-lightbox-close {
  position: fixed;
  top: 0.8rem;
  right: 0.8rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .hero-grid,
  .split-layout,
  .contact-grid,
  .cards-grid,
  .partner-grid,
  .gallery-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 94px;
    right: 1rem;
    flex-direction: column;
    background: white;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .corner-logo {
    width: 96px;
    margin-left: 0.55rem;
  }

  .nav-bar {
    min-height: 112px;
  }

  .brand-logo {
    width: 96px;
    height: 96px;
  }

  .festival-modern-shell,
  .festival-archive-shell {
    padding: 1rem;
  }

  .festival-old-gallery figure {
    grid-column: span 6 !important;
  }
}

@media (max-width: 560px) {
  .qr-grid {
    grid-template-columns: 1fr;
    max-width: none;
    justify-items: center;
  }

  .brand-logo {
    width: 84px;
    height: 84px;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .corner-logo {
    width: 84px;
    margin-left: 0.45rem;
  }

  .hero-section {
    padding-top: 3rem;
  }

  .table-row,
  .footer-content {
    flex-direction: column;
  }

  .festival-old-gallery {
    gap: 0.7rem;
  }

  .festival-old-gallery figure {
    grid-column: span 12 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .festival-old-gallery figure,
  .festival-old-gallery img,
  .festival-feature-image {
    animation: none;
    transition: none;
  }
}
