@import "./resources/variables.css";

@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;700;900&display=swap");

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  background: #e9e4dd;
  color: var(--ink);
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-family-display);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

p {
  color: var(--muted);
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--cream);
}

*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

*::-webkit-scrollbar-track {
  background: var(--cream);
  border-left: 2px solid var(--red);
}

*::-webkit-scrollbar-thumb {
  background: var(--red);
  border: 3px solid var(--cream);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--yellow);
}

/* Hero landing (index.html) */
body.page-hero {
  min-height: 100vh;
  overflow: hidden;
}

.intro-view {
  display: grid;
  min-height: 100vh;
  padding: 54px 118px;
  background: var(--cream);
  position: relative;
  place-items: center;
}

.intro-view .stripes-left,
.intro-view .stripes-right,
.content-stage .stripes-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--stripe-width);
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--red) 0 14px,
    transparent 14px 23px
  );
}

.intro-view .stripes-left,
.stripes-left {
  left: 0;
}

.intro-view .stripes-right,
.content-stage .stripes-right {
  right: 0;
}

.intro-inner {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  min-height: 70vh;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.intro-inner h1 {
  font-size: var(--font-size-title);
  max-width: 760px;
}

.intro-subtitle {
  margin-top: 18px;
  font-size: var(--font-size-hero-subtitle);
  font-weight: 900;
  color: var(--muted);
}

.intro-text {
  max-width: 620px;
  margin-top: 22px;
}

.intro-logo {
  display: block;
  width: 132px;
  flex-shrink: 0;
}

.intro-logo__img,
.intro-logo img {
  display: block;
  width: 132px;
  height: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 14px 20px;
  border: 3px solid var(--red);
  background: var(--red);
  color: var(--cream);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.button:hover {
  background: transparent;
  color: var(--red);
}

.button.secondary {
  background: transparent;
  color: var(--red);
}

.button.secondary:hover {
  background: var(--red);
  color: var(--cream);
}

/* Site shell */
.site-shell {
  display: grid;
  grid-template-columns: var(--side-nav-width) 1fr;
  min-height: 100vh;
  background: var(--cream);
}

body:not(.nav-ready) .site-shell {
  visibility: hidden;
}

body.nav-ready .site-shell {
  visibility: visible;
}

[data-side-nav-mount] {
  display: contents;
}

.side-nav {
  background: var(--red);
  color: var(--cream);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 5;
}

.mini-logo {
  display: block;
  width: 72px;
}

.mini-logo__img {
  display: block;
  width: 72px;
  height: auto;
}

.side-nav-title {
  font-family: var(--font-family-display);
  font-size: 20px;
  line-height: 0.92;
  text-transform: uppercase;
  margin-top: 16px;
}

.side-nav-links {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.side-nav-links a {
  display: block;
  border: 2px solid rgba(244, 227, 203, 0.34);
  padding: 10px 11px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.side-nav-links a:hover,
.side-nav-links a.active {
  background: var(--cream);
  color: var(--red);
  border-color: var(--cream);
  box-shadow: 6px 0 0 var(--yellow);
}

.side-nav-footer {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  opacity: 0.86;
}

.content-stage {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.page-main {
  min-height: 100vh;
  padding: 54px 118px 54px 70px;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
}

.page-main--long {
  justify-content: flex-start;
  padding-top: 46px;
  padding-bottom: 46px;
}

.page-main--gallery {
  justify-content: flex-start;
  padding-top: 46px;
}

.big-word {
  position: absolute;
  right: 84px;
  bottom: 34px;
  z-index: 0;
  font-family: var(--font-family-display);
  font-size: clamp(76px, 12vw, 170px);
  color: rgba(199, 68, 47, 0.055);
  text-transform: uppercase;
  letter-spacing: -0.07em;
  pointer-events: none;
}

.page-header {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.eyebrow,
.card-label {
  margin-bottom: 14px;
  color: var(--red);
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.card-label {
  color: var(--muted);
  letter-spacing: 0.18em;
}

.page-header h2 {
  font-size: var(--font-size-title);
  max-width: 760px;
}

.page-header p {
  max-width: 620px;
  margin-top: 18px;
}

.grid-3 {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: var(--content-max-width);
}

.card,
.subnav-card,
.box {
  border: var(--card-border);
  background: rgba(244, 227, 203, 0.92);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}

.card:hover,
.subnav-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 rgba(199, 68, 47, 0.18);
  background: var(--white);
}

.card h3,
.subnav-card h3,
.box h3 {
  font-size: 26px;
  margin-bottom: 16px;
}

.card p,
.subnav-card p,
.box p {
  font-size: var(--font-size-body);
}

.card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card__icon img {
  width: 56px;
  height: 56px;
}

.card__title {
  font-size: 26px;
  margin: 0;
  color: var(--red);
}

.card__content {
  flex: 1;
}

.card__desc {
  font-size: var(--font-size-body);
  color: var(--muted);
}

.text-link,
.card__link {
  display: inline-flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-card,
.feature-block,
.subnav-panel,
.artist-layout {
  position: relative;
  z-index: 2;
  max-width: var(--content-max-width);
  display: grid;
  gap: 26px;
}

.gallery-card {
  grid-template-columns: 1.25fr 0.75fr;
  border: var(--card-border);
  background: var(--white);
  padding: 24px;
  box-shadow: 10px 10px 0 rgba(199, 68, 47, 0.14);
}

.feature-block {
  grid-template-columns: 1fr 0.9fr;
  border: var(--card-border);
  background: var(--white);
  padding: 34px;
  box-shadow: 10px 10px 0 rgba(199, 68, 47, 0.14);
}

.subnav-panel {
  grid-template-columns: 1fr 1fr;
}

.subnav-panel--3 {
  grid-template-columns: repeat(3, 1fr);
}

.artist-layout {
  grid-template-columns: 0.85fr 1.15fr;
}

.media,
.artist-slider,
.placeholder {
  border: var(--card-border);
  background:
    radial-gradient(circle at 35% 25%, rgba(199, 68, 47, 0.18), transparent 30%),
    repeating-linear-gradient(135deg, rgba(6, 27, 47, 0.1) 0 12px, transparent 12px 24px),
    var(--soft);
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 24px;
  line-height: 1.35;
  min-height: 250px;
  position: relative;
  overflow: hidden;
}

.artist-slider {
  min-height: 410px;
  box-shadow: var(--card-shadow);
}

.media {
  min-height: 330px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: grid;
  place-items: center;
  animation: fade 12s infinite;
  padding: 24px;
}

.slide:nth-child(2) {
  animation-delay: 4s;
}

.slide:nth-child(3) {
  animation-delay: 8s;
}

@keyframes fade {
  0%,
  8% {
    opacity: 0;
  }
  12%,
  31% {
    opacity: 1;
  }
  35%,
  100% {
    opacity: 0;
  }
}

.caption-rotator {
  position: relative;
  min-height: 178px;
}

.caption-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: fade 12s infinite;
}

.caption-slide:nth-child(2) {
  animation-delay: 4s;
}

.caption-slide:nth-child(3) {
  animation-delay: 8s;
}

.artist-copy {
  border: var(--card-border);
  background: var(--white);
  padding: 28px;
  box-shadow: var(--card-shadow);
  display: grid;
  align-content: center;
}

.artist-copy h3 {
  font-size: var(--font-size-title);
  margin-bottom: 18px;
}

.artist__portrait {
  width: 100%;
  max-width: 420px;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}

.artist-hero {
  position: relative;
  margin: 0;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  background: var(--soft);
}

.artist-hero__portrait {
  display: block;
  width: 100%;
  height: auto;
}

.artist-hero__info-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  min-height: 44px;
  padding: 10px 16px;
  border: 3px solid var(--red);
  background: var(--red);
  color: var(--cream);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
  box-shadow: 6px 6px 0 rgba(6, 27, 47, 0.2);
}

.artist-hero__info-btn:hover {
  background: var(--cream);
  color: var(--red);
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.info-modal[aria-hidden="false"] {
  display: block;
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 27, 47, 0.54);
}

.info-modal__panel {
  position: relative;
  margin: 4vh auto;
  width: min(720px, calc(100% - 2.5rem));
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cream);
  border: var(--card-border);
  box-shadow: 16px 16px 0 rgba(6, 27, 47, 0.28);
  padding: 28px 28px 32px;
}

.info-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: var(--card-border);
  background: var(--red);
  color: var(--cream);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.info-modal__panel h3 {
  margin-bottom: 18px;
  padding-right: 48px;
}

.info-modal__bio {
  color: var(--muted);
  font-size: var(--font-size-body);
  line-height: 1.55;
}

.info-modal__bio h4 {
  font-family: var(--font-family-sans-serif);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin: 22px 0 10px;
}

.info-modal__bio p {
  margin-bottom: 14px;
}

.info-modal__bio p:last-child {
  margin-bottom: 0;
}

.artist__bio {
  position: relative;
  z-index: 2;
  max-width: var(--content-max-width);
  white-space: pre-line;
  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--muted);
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  border: 2px solid var(--red);
  color: var(--red);
  padding: 8px 10px;
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pill--link:hover {
  background: var(--red);
  color: var(--cream);
}

.associacao__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  max-width: var(--content-max-width);
  align-items: center;
}

.associacao__text {
  font-size: var(--font-size-body);
  line-height: 1.55;
  white-space: pre-line;
}

.associacao__logo {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  border: var(--card-border);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.card-list,
.contact-list {
  margin: 16px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: var(--font-size-body);
  line-height: 1.5;
}

.card-list li + li,
.contact-list li + li {
  margin-top: 0.35rem;
}

.contact-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 24px;
  max-width: var(--content-max-width);
}

.form-box label {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field {
  width: 100%;
  margin-bottom: 12px;
  border: 2px solid var(--red);
  background: var(--cream);
  padding: 10px;
  color: var(--ink);
}

.field:last-of-type {
  margin-bottom: 16px;
}

.form-box .button {
  margin-top: 4px;
}

/* Espólio gallery filters */
.espolio-section {
  position: relative;
  z-index: 2;
  max-width: var(--content-max-width);
  width: 100%;
  display: grid;
  gap: 22px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-filter {
  border: 2px solid var(--red);
  color: var(--red);
  background: transparent;
  padding: 8px 14px;
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.gallery-filter:hover,
.gallery-filter.is-active {
  background: var(--red);
  color: var(--cream);
  box-shadow: 4px 0 0 var(--yellow);
}

/* Artist gallery grid (polaroid cards — class names kept for JS) */
.artist-gallery-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: var(--content-max-width);
  width: 100%;
}

.polaroid-card {
  border: var(--card-border);
  background: rgba(244, 227, 203, 0.92);
  padding: 14px;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.polaroid-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 rgba(199, 68, 47, 0.18);
  background: var(--white);
}

.polaroid-card__photo-wrap {
  display: block;
  border: 2px solid var(--red);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--soft);
}

.polaroid-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-card__meta {
  display: block;
  margin-top: auto;
  color: var(--muted);
  line-height: 1.2;
}

.polaroid-card__name {
  display: block;
  font-size: 18px;
  font-family: var(--font-family-display);
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.polaroid-card__date {
  display: block;
  font-size: 13px;
}

.artist-gallery__empty {
  font-size: var(--font-size-body);
  color: var(--muted);
}

.artist-gallery-header h2 {
  font-size: clamp(28px, 3vw, 40px);
}

/* Gallery modal (project original — restyled to v2 palette) */
.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.gallery-modal[aria-hidden="false"] {
  display: block;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 27, 47, 0.54);
}

.gallery-modal__panel {
  position: relative;
  margin: 4vh auto;
  width: min(1040px, calc(100% - 4rem));
  max-height: 88vh;
  overflow: auto;
  background: var(--cream);
  border: var(--card-border);
  box-shadow: 16px 16px 0 rgba(6, 27, 47, 0.28);
  padding: 28px;
}

.gallery-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: var(--card-border);
  background: var(--red);
  color: var(--cream);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.gallery-modal__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: stretch;
  padding-right: 48px;
}

.gallery-modal__media {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
}

.gallery-modal__image-wrap {
  position: relative;
  width: 100%;
  background: var(--soft);
  border: var(--card-border);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-modal__image {
  display: block;
  width: 100%;
  max-height: min(55vh, 520px);
  height: auto;
  object-fit: contain;
}

.gallery-modal__title {
  margin: 0 0 var(--spacing-medium);
  color: var(--red);
  font-family: var(--font-family-display);
  font-size: clamp(28px, 3vw, 42px);
  text-transform: uppercase;
}

.gallery-modal__meta {
  width: 100%;
}

.gallery-modal__fields {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.gallery-modal__fields-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}

.gallery-modal__field {
  min-width: 0;
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 10px;
  border: 2px solid rgba(199, 68, 47, 0.45);
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: -2px;
}

.gallery-modal__field-label {
  font-weight: 900;
  color: var(--red);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.gallery-modal__field-value {
  margin: 0;
  word-break: break-word;
  color: var(--muted);
}

.gallery-modal__slider-wrap {
  width: 100%;
  max-width: min(44rem, 98%);
  margin-inline: auto;
  padding: 0.35rem 0 0.45rem;
}

.gallery-modal__rotation-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.7rem;
  border-radius: 9px;
  background: rgba(6, 27, 47, 0.12);
  cursor: pointer;
}

.gallery-modal__rotation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 5rem;
  height: 1.45rem;
  border-radius: 15%;
  border: 2px solid var(--cream);
  background: var(--red);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: grab;
}

.gallery-modal__rotation-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.gallery-modal__rotation-slider::-moz-range-thumb {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  border: 2px solid var(--cream);
  background: var(--red);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: grab;
}

.gallery-modal__rotation-slider::-moz-range-track {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(6, 27, 47, 0.12);
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  min-height: 50px;
  padding: 14px 16px;
  border: var(--card-border);
  background: var(--red);
  color: var(--cream);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal__nav:hover {
  background: transparent;
  color: var(--red);
}

.gallery-modal__nav--prev {
  left: 0.5rem;
}

.gallery-modal__nav--next {
  right: 0.5rem;
}

.is-modal-open {
  overflow: hidden;
}

/* Porta 19 — event legend & calendar */
.event-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: var(--font-size-small);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid transparent;
}

button.event-pill {
  cursor: pointer;
  transition: box-shadow 0.12s ease, opacity 0.12s ease;
}

.event-pill.is-active {
  box-shadow: 5px 5px 0 var(--yellow);
}

.event-pill.is-inactive {
  opacity: 0.4;
}

.event-pill--cursos {
  background: var(--cal-cursos);
  color: var(--ink);
  border-color: var(--cal-cursos);
}

.event-pill--workshops {
  background: var(--cal-workshops);
  color: var(--ink);
  border-color: var(--cal-workshops);
}

.event-pill--exposicoes {
  background: var(--cal-exposicoes);
  color: var(--ink);
  border-color: var(--cal-exposicoes);
}

.page-main--calendar {
  height: 100vh;
  min-height: 0;
  padding-right: 70px;
}

.cal-widget {
  position: relative;
  z-index: 2;
  max-width: none;
  width: 100%;
  background: transparent;
  overflow: visible;
  flex: 1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 0;
}

.cal-month-title {
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink);
  font-family: var(--font-family-display);
  letter-spacing: -0.02em;
  min-width: 210px;
}

.cal-nav-btn {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}

.cal-nav-btn:hover {
  background: var(--ink);
  color: var(--cream);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto;
  grid-auto-rows: 160px;
  flex: 1;
  background: var(--cream);
  border: 3px solid var(--red);
  border-radius: 4px;
  padding: 8px 10px 14px;
}


.cal-day-name {
  padding: 6px 0 14px;
  text-align: left;
  padding-left: 14px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  background: transparent;
  opacity: 0.6;
}

.cal-day {
  padding: 4px;
  background: transparent;
  position: relative;
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}

.cal-day-events {
  overflow: visible;
  pointer-events: none;
  position: relative;
  z-index: 3;
}

.cal-day--other {
  background: transparent;
}

.cal-day--other .cal-day__num {
  opacity: 0.1;
}

.cal-day--today {
  background: transparent;
}

.cal-day__num {
  position: absolute;
  top: 6px;
  left: 9px;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-family-display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0.13;
}

.cal-day--today .cal-day__num {
  opacity: 1;
  color: var(--red);
  background: none;
  width: auto;
  height: auto;
  display: block;
}

/* Events render as extruded "Salto 3D" blocks: a solid category-colour face
   over a stacked box-shadow that fakes an isometric side. Each card bounces in
   with a per-card random delay (--rand, set in porta19-calendar.js). */
@keyframes cal-event-pop {
  0%   { transform: translateY(-14px) scale(0.9); opacity: 0; }
  60%  { transform: translateY(3px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cal-event {
  width: 100%;
  border: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 3px 8px;
  text-align: left;
  pointer-events: auto;
  background: var(--cal-c);
  box-shadow:
    1px 1px 0 color-mix(in srgb, var(--cal-c) 82%, #000),
    2px 2px 0 color-mix(in srgb, var(--cal-c) 70%, #000),
    3px 3px 0 color-mix(in srgb, var(--cal-c) 60%, #000),
    4px 4px 0 color-mix(in srgb, var(--cal-c) 52%, #000),
    5px 5px 0 color-mix(in srgb, var(--cal-c) 46%, #000),
    7px 8px 9px rgba(6, 27, 47, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  animation: cal-event-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--rand, 0) * 0.7s);
}

.cal-event--cursos     { --cal-c: var(--cal-cursos); }
.cal-event--workshops  { --cal-c: var(--cal-workshops); }
.cal-event--exposicoes { --cal-c: var(--cal-exposicoes); }

.cal-event__meta {
  display: block;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.cal-event__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.15;
  text-align: left;
  color: var(--ink);
  pointer-events: none;
  overflow: hidden;
  max-width: 100%;
}

/* Risografia-style hover: slide onto the shadow so the block presses flat. */
.cal-event:hover {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 color-mix(in srgb, var(--cal-c) 50%, var(--ink));
}

@media (prefers-reduced-motion: reduce) {
  .cal-event { animation: none; }
}

.cal-event.is-active {
  filter: brightness(1.2);
}

/* Multi-day events sit directly in the CSS grid, spanning multiple columns.
   CSS grid allows multiple items in the same area, so they overlay day cells. */
.cal-event--multiday {
  flex: none;
  z-index: 4;
}

.cal-event--cancelled { opacity: 0.5; }
.cal-event--cancelled .cal-event__label { text-decoration: line-through; }

.cal-detail {
  border-top: 2px solid var(--red);
  background: var(--cream);
  padding: 22px 26px 26px;
}

.cal-detail__inner {
  max-width: 680px;
}

.cal-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cal-detail__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 2px solid var(--red);
  background: transparent;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-detail__close:hover {
  background: var(--red);
  color: var(--cream);
}

.cal-detail__title {
  font-size: clamp(22px, 2.4vw, 30px);
  margin-bottom: 8px;
}

.cal-detail__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: capitalize;
  margin-bottom: 10px;
}

.cal-detail__desc {
  font-size: var(--font-size-body);
  color: var(--muted);
  line-height: 1.55;
}

.cal-detail .text-link {
  padding-top: 14px;
}

/* Event modal */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.cal-modal[aria-hidden="false"],
.cal-modal.is-closing { display: block; }
.cal-modal.is-closing { pointer-events: none; }

@keyframes cal-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cal-backdrop-out { from { opacity: 1; } to { opacity: 0; } }

.cal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 27, 47, 0.54);
}
.cal-modal[aria-hidden="false"] .cal-modal__backdrop { animation: cal-backdrop-in 0.2s ease both; }
.cal-modal.is-closing .cal-modal__backdrop { animation: cal-backdrop-out 0.22s ease both; }

/* Cartaz: flat poster panel — hard ink border, category-coloured hard shadow
   and a grain overlay; the title overprints in the category colour. */
.cal-modal__panel {
  position: relative;
  margin: 8vh auto;
  width: min(720px, calc(100% - 2.5rem));
  max-height: 82vh;
  overflow-y: auto;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 14px 14px 0 var(--cat-c, var(--red));
  padding: 30px;
}
.cal-modal__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.1;
  mix-blend-mode: multiply;
}
.cal-modal__body { position: relative; z-index: 1; }

/* While the card is morphing, the real panel is hidden and a ghost stands in. */
.cal-modal.is-morphing .cal-modal__panel { visibility: hidden; }
.cal-event.is-morph-source { opacity: 0; }

.cal-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  background: var(--ink);
  color: var(--cream);
  border-radius: 0;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.cal-modal__close:hover {
  background: var(--red);
  color: var(--cream);
}

.cal-modal__body .event-pill {
  margin-bottom: 18px;
  border: none;
}

.status-badge {
  display: inline-block;
  margin: 0 0 18px 8px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: middle;
}
.status-badge--full { background: var(--ink); color: var(--cream); }
.status-badge--waitlist { background: var(--yellow); color: var(--ink); }
.status-badge--cancelled { background: var(--red); color: var(--cream); }

.cal-modal__title {
  color: var(--ink);
  text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 0.96;
  margin-bottom: 12px;
  padding-right: 48px;
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--cat-c, var(--red)) 80%, transparent);
}

.cal-modal__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: capitalize;
  margin-bottom: 14px;
}

.cal-modal__desc {
  font-size: var(--font-size-body);
  color: var(--muted);
  line-height: 1.55;
}

.cal-modal__meta {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 30px;
}

.cal-modal__meta-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  font-size: 13px;
}

@media (max-width: 560px) {
  .cal-modal__meta { grid-template-columns: 1fr; column-gap: 0; }
}

.cal-modal__meta dt {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  align-self: center;
}

.cal-modal__meta dd {
  margin: 0;
  color: var(--muted);
  align-self: center;
}

.cal-modal__body .text-link {
  padding-top: 18px;
}

button.text-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ── Inscrição form (back of the card) ── */
.cal-modal__back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.cal-modal__back:hover { color: var(--red); }

.cal-modal__subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 18px;
}

.cal-form { display: grid; gap: 14px; margin-top: 4px; }

.cal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cal-form__field { display: grid; gap: 6px; }

.cal-form__field > span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.cal-form__field input,
.cal-form__field textarea {
  width: 100%;
  font-family: var(--font-family-sans-serif);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
}

.cal-form__field textarea { resize: vertical; }

.cal-form__field input:focus,
.cal-form__field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-c, var(--red)) 70%, transparent);
}

.cal-form__submit {
  justify-self: start;
  margin-top: 4px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  padding: 12px 22px;
  cursor: pointer;
}
.cal-form__submit:hover { background: var(--red); }
.cal-form__submit:disabled { opacity: 0.6; cursor: default; background: var(--ink); }

.cal-form__error {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.cal-notice {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 3px solid var(--red);
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
}
.cal-notice--cancel { border-color: var(--muted); color: var(--muted); }

@media (max-width: 560px) {
  .cal-form__row { grid-template-columns: 1fr; }
}

/* ── Metamorfose: the clicked card morphs into the modal (and back) ── */
.cal-morph-ghost {
  position: fixed;
  z-index: 1300;
  display: block;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 10px 18px 34px rgba(6, 27, 47, 0.28);
  color: var(--ink);
  padding: 0;
  pointer-events: none;
  transform-origin: center;
}
.cal-morph-ghost__card,
.cal-morph-ghost__surface,
.cal-morph-ghost__detail {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.cal-morph-ghost__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  animation: cal-morph-card-face-out 0.26s ease 0.06s both;
}
.cal-morph-ghost__surface {
  inset: 6px;
  background: var(--morph-bg, var(--cream));
  opacity: 0;
  transform-origin: center;
  animation: cal-morph-surface-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}
.cal-morph-ghost__detail {
  display: block;
  padding: 30px;
  opacity: 0;
  animation: cal-morph-detail-face-in 0.24s ease 0.38s both;
}
.cal-morph-ghost__detail .event-pill { margin-bottom: 18px; }
.cal-morph-ghost__detail .text-link { padding-top: 18px; }
.cal-morph-ghost__detail .cal-modal__title { font-size: clamp(22px, 3vw, 34px); }
.cal-morph-ghost .cal-event__meta,
.cal-morph-ghost .cal-event__label { color: inherit; }
.cal-morph-ghost--modal {
  background: var(--cream);
  border: 3px solid var(--ink);
  padding: 30px;
}

@keyframes cal-morph-card-face-out {
  0%, 28% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96); }
}
@keyframes cal-morph-surface-in {
  0% { opacity: 0; clip-path: circle(0% at 50% 50%); transform: scale(0.94); }
  28% { opacity: 1; }
  100% { opacity: 1; clip-path: circle(72% at 50% 50%); transform: scale(1); }
}
@keyframes cal-morph-detail-face-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cal-modal__backdrop { animation: none !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .site-shell,
  .gallery-card,
  .feature-block,
  .subnav-panel,
  .subnav-panel--3,
  .artist-layout,
  .associacao__content,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    height: auto;
  }

  .side-nav-links {
    display: flex;
    flex-wrap: wrap;
  }

  .artist-gallery-grid,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-main,
  .intro-view {
    padding: 48px 58px;
  }

  .content-stage {
    overflow: visible;
  }

  .cal-day {
    min-height: 64px;
  }

  .intro-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 580px) {
  .artist-gallery-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .page-main,
  .intro-view {
    padding: 42px 34px;
  }

  .button {
    width: 100%;
  }

  .cal-day {
    min-height: 54px;
    padding: 3px;
  }

  .cal-day__num {
    font-size: clamp(16px, 3.5vw, 24px);
    top: 4px;
    left: 5px;
  }

  .cal-event {
    padding: 4px 6px;
  }

  .cal-event {
    font-size: 8px;
    padding: 1px 3px;
  }

  .cal-head {
    padding: 12px 0;
  }

  .intro-view .stripes-left,
  .intro-view .stripes-right,
  .content-stage .stripes-right {
    width: 34px;
  }

  .gallery-modal__body {
    padding-right: 0;
  }

  .gallery-modal__fields {
    grid-template-columns: 1fr;
  }

  .gallery-modal__field {
    grid-template-columns: 1fr;
  }
}
