/* Complementos ao CSS original (styles.css): substituem o que o framer-motion e o Radix faziam via JS. */

/* Animação de entrada (equivalente ao componente Reveal: opacity 0 → 1, y 28 → 0, 0.7s, ease [.22,1,.36,1]) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Popover do select "Tipo de evento" (estilo do shadcn/Radix Select) */
.la-select-popover {
  position: fixed;
  z-index: 50;
}
.la-select-popover [role="option"]:focus {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* ---------- Ajustes de conteúdo (dez/2026) ---------- */

/* Título da hero um pouco menor */
h1[data-testid="text-hero-title"] {
  font-size: 1.875rem;
  line-height: 1.05;
}
@media (min-width: 640px) {
  h1[data-testid="text-hero-title"] { font-size: 3rem; }
}
@media (min-width: 1024px) {
  h1[data-testid="text-hero-title"] { font-size: 3.75rem; }
}

/* Marca em texto (no lugar do logo da Octagon), no mesmo cinza dos logos */
.brand-text {
  display: block;
  color: rgb(81 80 81);
  opacity: 0.8;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: center;
  transition: opacity 0.15s;
}
.brand-text:hover { opacity: 1; }
@media (min-width: 640px) {
  .brand-text { font-size: 1.2rem; }
}

/* ---------- Galeria (seção Mídias) ---------- */
.la-gallery { overflow: hidden; }
.la-gallery__viewport { position: relative; margin-top: 2.5rem; }
/* Setas sobre as fotos, uma de cada lado */
.la-gallery__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--foreground) / 0.12);
  background: hsl(var(--card) / 0.92);
  color: hsl(var(--foreground));
  box-shadow: 0 10px 30px -10px hsl(var(--primary) / 0.55);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s, opacity 0.25s, transform 0.2s;
}
.la-gallery__btn--prev { left: max(0.75rem, calc((100vw - 72rem) / 2 - 1.5rem)); }
.la-gallery__btn--next { right: max(0.75rem, calc((100vw - 72rem) / 2 - 1.5rem)); }
.la-gallery__btn:hover { background: hsl(var(--card)); transform: translateY(-50%) scale(1.06); }
.la-gallery__btn:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.la-gallery__btn:disabled { opacity: 0; pointer-events: none; }
.la-gallery__btn svg { width: 1.375rem; height: 1.375rem; }
@media (max-width: 639px) {
  .la-gallery__btn { width: 2.75rem; height: 2.75rem; }
  .la-gallery__btn svg { width: 1.125rem; height: 1.125rem; }
}
.la-gallery__track {
  --gutter: max(1.25rem, calc((100vw - 72rem) / 2 + 1.25rem));
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0.25rem var(--gutter) 0.5rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  cursor: grab;
  outline: none;
}
.la-gallery__track::-webkit-scrollbar { display: none; }
.la-gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.la-gallery__track:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 4px; }
@media (min-width: 640px) {
  .la-gallery__track { --gutter: max(2rem, calc((100vw - 72rem) / 2 + 2rem)); }
}
.la-gallery__item {
  flex: none;
  height: clamp(320px, 50vw, 480px);
  scroll-snap-align: start;
}
.la-gallery__open {
  display: block;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  background: hsl(var(--muted));
  cursor: inherit;
  box-shadow: 0 0 0 1px hsl(var(--border)), 0 24px 48px -28px hsl(var(--primary) / 0.45);
}
.la-gallery__open:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }
.la-gallery__open img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.la-gallery__open:hover img { transform: scale(1.04); }
.la-gallery__progress {
  position: relative;
  height: 2px;
  margin-top: 2rem;
  border-radius: 9999px;
  background: hsl(var(--border));
  overflow: hidden;
}
.la-gallery__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  border-radius: inherit;
  background: hsl(var(--accent));
  will-change: transform;
}

/* Lightbox */
.la-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1rem;
  background: hsl(var(--primary) / 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s;
}
.la-lightbox.is-open { opacity: 1; }
.la-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);
  user-select: none;
}
.la-lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid hsl(0 0% 100% / 0.35);
  background: hsl(0 0% 100% / 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}
.la-lightbox__btn:hover { background: hsl(0 0% 100% / 0.2); }
.la-lightbox__btn:focus-visible { outline: 2px solid hsl(var(--secondary)); outline-offset: 2px; }
.la-lightbox__btn svg { width: 1.25rem; height: 1.25rem; }
.la-lightbox__close { top: 1rem; right: 1rem; }
.la-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.la-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.la-lightbox__count {
  position: absolute;
  top: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.85;
}
@media (max-width: 639px) {
  .la-lightbox__prev, .la-lightbox__next { top: auto; bottom: 1rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .la-gallery__open img, .la-lightbox { transition: none; }
}

/* ---------- Linha do tempo: cards com a foto inteira ----------
   Nos cards marcados com .history-card--fit a foto aparece completa num painel,
   e a mesma foto (desfocada) vira o fundo do card. */
.history-card--fit .history-card__bg {
  filter: blur(22px) saturate(1.15);
  transform: scale(1.2);
  object-position: center !important;
}
.history-card__photo {
  margin: 0;
  display: flex;
  justify-content: center;
}
.history-card__photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 18rem;
  border-radius: 1rem;
  box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.18), 0 20px 40px -18px rgb(0 0 0 / 0.65);
}
@media (min-width: 768px) {
  .history-card--fit {
    grid-template-columns: minmax(0, 3.7fr) minmax(0, 4.9fr) minmax(0, 3.4fr);
  }
  .history-card--fit > * { grid-column: auto; }
  .history-card__photo { justify-content: flex-end; }
  .history-card__photo img { max-height: 16.5rem; }
}
@media (min-width: 1024px) {
  /* ano em uma linha só nos cards com foto */
  .history-card--fit > div:first-of-type p { font-size: 3.25rem; white-space: nowrap; }
}
