/* ENARTINHO sobre o sistema Nike (ver DESIGN.md).
   Cromo neutro, títulos em caixa-alta condensada, botões pílula.
   Cor só com função: verde, amarelo e vermelho da bandeira do RS. */
:root {
  --ink: #111111;
  --charcoal: #39393b;
  --mute: #707072;
  --canvas: #ffffff;
  --soft: #f5f5f5;
  --hairline: #cacacb;
  --hairline-soft: #e5e5e5;

  --green: #00703c;
  --yellow: #ffcc00;
  --red: #c8102e;

  --font-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-text: 'Barlow', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --t-body: 1rem;
  --t-small: 0.875rem;
  --t-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --t-h2: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  --t-hero: clamp(3.25rem, 1rem + 8.6vw, 9rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --wrap: 90rem;
  --head: 64px;
  --t-fast: 150ms;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { touch-action: manipulation; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.signup :focus-visible { outline-color: var(--yellow); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--ink); color: #fff; padding: 0.75rem 1rem; }
.skip-link:focus { left: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Tipografia */
.hero-title, .h2, .cat-age, .cat h3, .steps h3, .hero-days {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.h2 { font-size: var(--t-h2); line-height: 0.92; text-wrap: balance; }
.label { font-size: var(--t-small); font-weight: 600; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 30px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}
.btn:hover { background: var(--charcoal); }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding: 0 1.1rem; font-size: var(--t-small); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.btn-ghost:hover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #fff; }

.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 0.25em; }
.link:hover { color: var(--mute); }

/* Cabeçalho: a faixa tricolor é a única marca gráfica do RS fora do conteúdo */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
}
.masthead::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--green) 0 33.33%, var(--red) 33.33% 66.66%, var(--yellow) 66.66%);
}
.masthead-row { display: flex; align-items: center; gap: 2rem; min-height: var(--head); }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { color: var(--mute); }
@media (max-width: 60em) {
  .nav { display: none; }
  .masthead-row { justify-content: space-between; }
}

/* Topo */
.hero { padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 var(--section); }
.hero-grid { display: grid; gap: 2rem; }
.hero-title { font-size: var(--t-hero); line-height: 0.88; max-width: 15ch; }
.hero-text { display: grid; gap: 1.75rem; align-content: start; }
.hero-text p { font-size: var(--t-lead); max-width: 38ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-date {
  display: grid;
  gap: 0.75rem;
  align-content: space-between;
  padding: 1.5rem;
  background: var(--yellow);
  text-decoration: none;
  transition: background-color var(--t-fast) ease;
}
.hero-date:hover { background: #ffd633; }
.hero-days { display: grid; font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4rem); line-height: 0.9; }
.hero-to { font-family: var(--font-text); font-weight: 500; font-size: 1rem; text-transform: none; line-height: 1.6; }
.hero-place { font-weight: 600; font-size: var(--t-lead); line-height: 1.3; }

@media (min-width: 62em) {
  .hero-grid { grid-template-columns: 1fr 1fr 22rem; column-gap: clamp(2rem, 4vw, 4rem); row-gap: 3rem; }
  .hero-title { grid-column: 1 / -1; }
  .hero-text { grid-column: 1 / 3; }
  .hero-date { grid-column: 3; min-height: 15rem; }
}

/* Sobre */
.about { padding: var(--section) 0; border-top: 1px solid var(--hairline-soft); }
.about-grid { display: grid; gap: 1.5rem; }
.quote p { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 500; line-height: 1.25; max-width: 34ch; }
.quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: var(--t-small); color: var(--mute); }
.about-cols { display: grid; gap: 1.25rem; margin-top: 2.5rem; color: var(--charcoal); }
.about-cols p { max-width: 48ch; }
@media (min-width: 52em) {
  .about-grid { grid-template-columns: 14rem 1fr; gap: 2rem; }
  .about-cols { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

/* Seções */
.section { padding: var(--section) 0; }
.section-soft { background: var(--soft); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { max-width: 40ch; color: var(--mute); }
@media (min-width: 52em) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .section-head p { justify-self: end; text-align: right; }
}

/* Categorias: uma cor por idade */
.cats { display: grid; gap: 4px; }
.cat { display: grid; gap: 0.5rem; padding: 1.5rem; min-height: 16rem; align-content: end; }
.cat-green { background: var(--green); color: #fff; }
.cat-yellow { background: var(--yellow); color: var(--ink); }
.cat-red { background: var(--red); color: #fff; }
.cat-age { font-size: clamp(6rem, 4rem + 8vw, 11rem); line-height: 0.8; margin-bottom: 0.75rem; }
.cat-age span { font-size: 0.22em; vertical-align: top; margin-right: 0.1em; }
.cat h3 { font-size: 2rem; line-height: 1; }
.cat p:last-child { max-width: 28ch; }
@media (min-width: 52em) { .cats { grid-template-columns: repeat(3, 1fr); } .cat { min-height: 24rem; } }

/* Modalidades */
.mods { counter-reset: mod; display: grid; column-gap: 3rem; }
.mods li {
  counter-increment: mod;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.1rem 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
}
.mods li::before { content: counter(mod, decimal-leading-zero); grid-row: span 2; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--mute); }
.m-name { font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.m-detail { font-size: var(--t-small); color: var(--mute); }
@media (min-width: 52em) {
  .mods { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(5, auto); }
}

/* Como participar */
.steps { counter-reset: step; display: grid; gap: 2.5rem 2rem; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--ink); }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.steps h3 { font-size: 1.625rem; line-height: 1; margin-bottom: 0.5rem; }
.steps p { color: var(--charcoal); max-width: 34ch; }
@media (min-width: 40em) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 70em) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Data e local */
.place-grid { display: grid; gap: 2.5rem; }
.facts { display: grid; gap: 1.25rem; margin: 2rem 0; }
.facts dt { font-size: var(--t-small); color: var(--mute); }
.facts dd { font-size: var(--t-lead); font-weight: 600; }
.map { position: relative; aspect-ratio: 4 / 3; background: var(--hairline-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 52em) { .place-grid { grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start; } }

/* Inscrição */
.signup { padding: var(--section) 0; background: var(--green); color: #fff; }
.signup-grid { display: grid; gap: 3rem; }
.signup-text { font-size: var(--t-lead); max-width: 38ch; margin: 1.25rem 0 2rem; }
.signup-note { margin-top: 1rem; }
.signup .link:hover { color: rgb(255 255 255 / 0.8); }
.signup .label { margin-bottom: 0.5rem; color: rgb(255 255 255 / 0.8); }
.channels li { border-top: 1px solid rgb(255 255 255 / 0.3); }
.channels a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  align-items: center;
  min-height: 56px;
  padding: 0.75rem 0;
  text-decoration: none;
  font-weight: 600;
}
.channels a span:last-child { font-weight: 400; overflow-wrap: anywhere; }
.channels a:hover span:last-child { text-decoration: underline; text-underline-offset: 0.25em; }
.copy { min-height: 44px; margin-top: 0.5rem; font-size: var(--t-small); font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; }
@media (min-width: 52em) { .signup-grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* Rodapé */
.footer { padding: 2.5rem 0 3rem; background: var(--ink); color: #a7a7a9; font-size: var(--t-small); }
.footer-grid { display: grid; gap: 1rem 3rem; }
.footer strong { display: block; color: #fff; font-weight: 600; }
@media (min-width: 52em) { .footer-grid { grid-template-columns: 1fr 1fr 1.5fr; } }

/* CTA fixo no celular */
.sticky-cta {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  min-height: 52px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 200ms ease, transform 200ms ease;
}
.sticky-cta.is-visible { opacity: 1; pointer-events: auto; transform: none; }
@media (min-width: 52em) { .sticky-cta { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
