/* /live, the event page of IAJUS Brasil: a notebook entry for one date. Tokens and type rules come
   from assets/sala-publica.css (mineral paper and petroleum ink; deep petroleum in dark). The
   sign-up card is the page's single action, so the mast's «Criar conta» steps back here. */
.launch {
  --launch-surface: var(--c-folha);
  --launch-field-bg: var(--c-folha);
  --field-border: var(--c-borda-ctrl);
  --hair: var(--c-fio);
  --ink: var(--c-tinta);
  --ink-soft: var(--c-tinta);
  --text-secondary: var(--c-tinta-2);
  background: var(--c-papel);
  color: var(--c-tinta);
  line-height: 1.5;
}

.launch [hidden] { display: none !important; }
/* Só o conteúdo da página: o cabeçalho e o rodapé são os do site, com as cores deles. */
.launch-main a { color: var(--c-fonte); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.launch :focus-visible,
.launch [tabindex="-1"]:focus {
  outline: 2px solid var(--c-fonte);
  outline-offset: 3px;
}
/* One green action per first screen: the sign-up button. The mast's account link stays, quiet. */
.public-br.launch #topbar .nav-entrar { color: var(--c-tinta); background: transparent; border-color: var(--c-borda-ctrl); }
.public-br.launch #topbar .nav-entrar:hover { color: var(--c-tinta); background: transparent; }

/* A coluna da página é a do .wrap do site (--maxw menos os dois --gutter), para o conteúdo
   começar na mesma coluna da marca do cabeçalho (#14633). */
.launch-wrap { width: min(100% - 2 * var(--gutter), var(--maxw) - 2 * var(--gutter)); margin-inline: auto; }

.launch-skip {
  position: absolute;
  /* Above the sticky site header (z-index 30), or the focused link is painted under it. */
  z-index: 40;
  inset: .75rem auto auto .75rem;
  padding: .75rem;
  background: var(--c-papel);
  transform: translateY(-150%);
}

.launch-skip:focus { transform: none; }

.launch-main { padding-block: clamp(2rem, 6vw, 5rem); }
.launch-grid {
  display: grid;
  grid-template:
    "hero card" auto
    "program card" 1fr
    / minmax(0, 1fr) minmax(0, .86fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.launch-hero { grid-area: hero; }
.launch-card { grid-area: card; }
.launch-program { grid-area: program; }

/* The rubric is a mono label, like the date line of a notebook page. */
.launch-kicker {
  margin: 0 0 .9rem;
  color: var(--c-tinta-2);
  font: 400 .8rem/1.3 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.launch h1,
.launch h2,
.launch-success h3 {
  font-family: var(--t-titulo);
  font-weight: var(--t-peso-titulo);
  letter-spacing: var(--t-h2-track);
  color: var(--c-tinta);
}

.launch h1 {
  margin: 0;
  max-width: 16ch;
  font-size: var(--t-h1);
  letter-spacing: var(--t-h1-track);
  line-height: var(--t-h1-lh);
  text-wrap: balance;
}

/* The one golden highlight: the emphasised words of the title, never a colour of their own. */
.launch h1 em {
  font-style: normal;
  color: inherit;
  background: linear-gradient(transparent 60%, var(--c-grifo) 60%, var(--c-grifo) 90%, transparent 90%);
}
.launch h2 { margin: 0 0 .5rem; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); line-height: 1.15; }
.launch-intro {
  max-width: 44ch;
  margin: 1.1rem 0 1.5rem;
  color: var(--c-tinta-2);
  font-size: clamp(1.05rem, .95rem + .4vw, 1.2rem);
}

/* The date sits on the soft line of the margin, not in a coloured box. */
.launch-event {
  padding: .25rem 0 .25rem 1.1rem;
  border-left: 1px solid var(--c-tinta-2);
}

.launch-event-date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .75rem;
  font-family: var(--t-sans);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: var(--t-numeros);
}

.launch-event-date span,
.launch-event p { color: var(--c-tinta-2); font-size: .9rem; }
.launch-event p { margin: .3rem 0 0; }
.launch-event p:empty { margin: 0; }
.launch-event .launch-countdown { color: var(--c-tinta); font-weight: 700; font-variant-numeric: tabular-nums; }
.launch-event-links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.launch-event-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .4rem;
  font-size: .95rem;
  font-weight: 650;
}

.launch-program-list {
  list-style: none;
  margin: .7rem 0 0;
  padding: 0;
  counter-reset: program;
}

.launch-program-list li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: .65rem;
  padding: .75rem 0;
  border-top: 1px solid var(--c-fio);
  counter-increment: program;
}

.launch-program-list li::before {
  content: counter(program, decimal-leading-zero);
  padding-top: .15rem;
  color: var(--c-fonte);
  font: 600 .82rem/1.4 var(--font-mono);
}

.launch-program-list h3 { margin: 0; font: 600 1rem/1.4 var(--t-sans); color: var(--c-tinta); }
.launch-program-list p { margin: .15rem 0 0; color: var(--c-tinta-2); font-size: .95rem; }

/* The card is a sheet on the paper: one soft rule, no shadow, no coloured frame. */
.launch-card {
  padding: clamp(1.15rem, 3vw, 2rem);
  background: var(--launch-surface);
  border: 1px solid var(--c-fio);
  border-radius: var(--r);
}

.launch-card form { margin-top: 1.15rem; }
.launch-field { margin-bottom: 1rem; }
.launch-field label, .launch-preferences legend {
  display: block;
  margin-bottom: .35rem;
  color: var(--c-tinta);
  font-size: .95rem;
  font-weight: 650;
}

.launch-field input {
  width: 100%;
  min-height: 48px;
  padding: .55rem .75rem;
  border: 1px solid var(--c-borda-ctrl);
  border-radius: var(--r);
  background: var(--launch-field-bg);
  color: var(--c-tinta);
  font: inherit;
}

.launch-field input[aria-invalid="true"] { border-color: var(--err); border-width: 2px; }

.launch-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .6rem;
  min-height: 1.5rem;
  margin: .6rem 0 0;
  font-size: .95rem;
}

.launch-check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: .08rem 0 0;
  padding: 0;
  accent-color: var(--c-tinta);
}

.launch-check input[aria-invalid="true"] { outline: 2px solid var(--err); outline-offset: 2px; }
.launch-check label, label.launch-check { cursor: pointer; }
.launch-check label { margin: 0; font: inherit; }
.launch-check input:disabled + label { cursor: default; }
.launch-field#phone-field { margin: .85rem 0 0; }
.launch-preferences {
  min-width: 0;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.launch-preferences legend { padding: 0; }
.launch-preferences .launch-check { margin-top: .25rem; }
.launch-help, .launch-check-note, .launch-status {
  margin: .3rem 0 0;
  color: var(--c-tinta-2);
  font-size: .86rem;
}

.launch-check-note { font-size: .81rem; }
.launch-card > .launch-status { margin-top: .8rem; }
.launch-status:empty { margin: 0; }
.launch-field-error { margin: .25rem 0 0; color: var(--err); font-size: .9rem; font-weight: 600; }
.launch-error {
  margin: .85rem 0 0;
  padding: .65rem .75rem;
  border-left: 2px solid var(--err);
  background: var(--c-papel);
  color: var(--err);
  font-size: .95rem;
}

/* The sign-up button is the page's one green action; the secondary one stays ink on paper. */
.launch .launch-button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 1.1rem 0 0;
  padding: .65rem .85rem;
  border: 1px solid var(--c-acao-tinta);
  border-radius: var(--r);
  background: var(--c-acao);
  color: var(--c-acao-tinta);
  font: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.launch .launch-button:hover { text-decoration: underline; }
/* Blocked sign-up: muted surface, no green, no hover change (the script sets `disabled`). */
.launch .launch-button:disabled {
  cursor: wait;
  background: var(--c-fio);
  color: var(--c-tinta-2);
  border-color: var(--c-fio);
  text-decoration: none;
}
.launch .launch-secondary { background: transparent; color: var(--c-tinta); border-color: var(--c-borda-ctrl); }
.launch .launch-secondary:hover { background: transparent; }
.launch-success { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid var(--c-fio); }
.launch-success h3 { margin: 0; color: var(--ok); font-size: 1.55rem; }
.launch-success p { margin: .5rem 0 0; }

/* The cookie notice sits in the page flow above the header, as on phones (styles.css, max-width
   880px), and not as the fixed corner card of the other pages: that card covered the right half of
   the consent labels of the form and could not be scrolled away from them. In the flow it takes
   its own row, so the labels and the submit button are never under it; it leaves with the answer.
   `relative` keeps the close button anchored inside the notice, and `inset: auto` drops the
   right/bottom offsets of the fixed card, which would otherwise shift it out of the page.
   `z-index: auto` drops the card's 200 so the focused skip link (.launch-skip, z-index 40, a
   sibling before the notice) paints above it. */
@media (min-width: 881px) {
  .launch .cookie-banner {
    position: relative;
    z-index: auto;
    inset: auto;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }
  .launch .cookie-banner-inner {
    width: min(100% - 3rem, 72rem);
    margin-inline: auto;
    padding: 12px 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 2rem;
  }
  .launch .cookie-banner-text { flex: 1 1 24rem; }
  .launch .cookie-banner-primary { flex: 0 0 15rem; }
  .launch .cookie-banner-details { flex: 1 1 100%; }
}

@media (max-width: 51rem) {
  .launch-wrap { width: min(100% - 2 * var(--gutter), 36rem); }
  .launch-grid {
    grid-template:
      "hero"
      "card"
      "program"
      / minmax(0, 1fr);
    gap: 1.65rem;
  }
}

/* Held event (campaign-registration.js sets data-campaign-held): the card is hidden, so one column
   at a readable measure, left-aligned like the rest of the page. Declared after the media query so
   it also drops the card row there. */
.launch-grid[data-campaign-held] {
  grid-template:
    "hero" auto
    "program" auto
    / minmax(0, 1fr);
  max-inline-size: 52rem;
}

@media (prefers-reduced-motion: reduce) {
  .launch-skip { transition: none; }
}

/* Phone body copy (#15092 P6): running text is never below 16px on a phone. Appended last, same selectors. */
@media (max-width: 699px) {
  .launch-event p, .launch-help, .launch-status { font-size: 1rem; }
}
