:root {
  --canvas: #171721;
  --card: #1e1e2a;
  --button: #272735;
  --border: #70707d;
  --mist: #e2e3ed;
  --muted: #c3c3cc;
  --text: #ededf3;
  --cobalt: #5266eb;
  --white: #ffffff;
  --max: 1200px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(23, 23, 33, .82);
  border-color: rgba(226,227,237,.10);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.04em;
}
.header-inner nav { justify-self: center; }
.header-inner nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 40px;
  color: var(--text);
  font-size: 14px;
  transition: background .2s ease;
}
.header-inner nav a:hover { background: rgba(255,255,255,.08); }
.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 32px;
  background: var(--cobalt);
  color: var(--white);
  font-size: 14px;
}
.header-cta span { font-size: 16px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(82,102,235,.12), transparent 30%),
    #171721;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(23,23,33,.28) 0%, rgba(23,23,33,.68) 72%, var(--canvas) 100%),
    linear-gradient(90deg, rgba(23,23,33,.88) 0%, rgba(23,23,33,.28) 50%, rgba(23,23,33,.88) 100%),
    url("imagens/hero-atletismo.avif") center/cover;
  filter: saturate(.55) contrast(1.04);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .16;
  background-image:
    linear-gradient(rgba(226,227,237,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226,227,237,.12) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.hero-inner {
  max-width: 780px;
  padding-top: 72px;
  text-align: center;
}
.eyebrow {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
}
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -.055em;
  font-weight: 500;
}
.hero h1 em {
  color: var(--muted);
  font-style: normal;
}
.hero-text {
  max-width: 570px;
  margin: 28px auto 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 32px;
  font-size: 15px;
  transition: transform .2s var(--ease), filter .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  background: var(--cobalt);
  color: var(--white);
}
.button.primary:hover { filter: brightness(1.08); }
.hero-meta {
  position: absolute;
  bottom: 28px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  color: rgba(237,237,243,.48);
  font-size: 9px;
  letter-spacing: .14em;
}

/* Competitions */
.competitions {
  padding: 112px 0 128px;
  background: var(--canvas);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.section-heading .eyebrow { margin-bottom: 12px; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 500;
}
.badge {
  padding: 9px 14px;
  border: 1px solid rgba(226,227,237,.16);
  border-radius: 40px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.event-item {
  background: var(--card);
  border: 1px solid rgba(226,227,237,.08);
  border-radius: 14px;
  overflow: hidden;
  transition: background .25s ease, border-color .25s ease;
  animation: entrar .45s var(--ease) both;
}
.event-item:hover {
  background: #222230;
  border-color: rgba(82,102,235,.28);
}
@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.event-head::-webkit-details-marker,
.event-head::marker { display: none; }
.event-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  overflow-wrap: anywhere;
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  font-size: 13px;
  color: var(--muted);
}
.event-date {
  color: rgba(195,195,204,.72);
  white-space: nowrap;
}
.event-arrow {
  display: inline-block;
  color: var(--cobalt);
  font-size: 12px;
  white-space: nowrap;
  transition: transform .35s var(--ease);
}
.event-details[open] .event-arrow { transform: rotate(180deg); }
.event-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.event-details[open] .event-body { grid-template-rows: 1fr; }
.event-provas {
  overflow: hidden;
  min-height: 0;
  border-top: 1px solid rgba(226,227,237,.10);
  padding: 20px 24px 24px;
  background: rgba(0,0,0,.14);
}
.event-provas ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.event-provas li {
  display: grid;
  gap: 6px;
}
.event-provas .prova-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.event-provas a {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.event-provas a:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-underline-offset: 3px;
}
.event-provas .no-files {
  color: rgba(195,195,204,.6);
  font-size: 12px;
}

/* Busca e filtro por ano */
.event-filtros {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -16px 0 28px;
}
.event-filtros .busca {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(226,227,237,.16);
  border-radius: 10px;
  background: var(--button);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .2s ease;
}
.event-filtros .busca:focus {
  outline: none;
  border-color: var(--cobalt);
}
.event-filtros .busca::placeholder { color: var(--muted); }
.event-filtros .filtro-ano {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(226,227,237,.16);
  border-radius: 10px;
  background: var(--button);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* Empty/loading states */
.empty-state {
  grid-column: 1 / -1;
  padding: 48px 32px;
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

/* Footer */
footer {
  border-top: 1px solid rgba(226,227,237,.10);
  background: #14141d;
}
.footer-inner {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner p { margin: 6px 0 0; color: rgba(195,195,204,.6); }
.footer-inner > span { font-size: 11px; }

/* Responsive */
@media (max-width: 640px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .header-inner { min-height: 70px; grid-template-columns: 1fr auto; }
  .header-inner nav { display: none; }
  .header-cta { min-height: 40px; padding: 0 15px; font-size: 12px; }
  .hero-inner { padding-top: 56px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-text { font-size: 15px; margin-top: 22px; }
  .hero-meta { display: none; }
  .competitions { padding: 80px 0 88px; }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 28px; }
  .event-filtros { flex-direction: column; align-items: stretch; }
  .event-filtros .filtro-ano { flex: none; width: 100%; }
  .event-head {
    padding: 14px 16px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .event-name {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }
  .event-meta {
    gap: 12px;
    font-size: 12px;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .event-provas { padding: 16px 16px 20px; }
  .footer-inner { min-height: 130px; flex-direction: column; align-items: flex-start; justify-content: center; }
}
