@font-face {
  font-family: "Sora";
  src: url("../fonts/Sora-Variable.ebe022f74bf5.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --night: #0c1b2e;
  --surface: #16293f;
  --line: #2f4763;
  --lime: #a9d65a;
  --lime-ink: #10210a;
  --mist: #eaf0f5;
  --muted: #a3b4c6;
  --alert: #ff9d8f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--mist);
  font: 400 1rem/1.6 "Sora", system-ui, sans-serif;
}

a { color: inherit; }
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted { color: var(--muted); font-size: .9rem; }
.lede { max-width: 62ch; margin-top: 1rem; color: var(--muted); }
.empty { margin-top: 2rem; max-width: 50ch; color: var(--muted); }

/* Estrutura */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  text-decoration: none;
}
.topbar-logo img { width: 88px; }
.topbar form { display: flex; align-items: center; gap: 1rem; }
.topbar-user { color: var(--muted); font-size: .875rem; }

.page {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem;
}
.page.narrow { max-width: 680px; }
.page.narrow .button { margin-top: 1.5rem; }
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}

/* Botões */
.button {
  display: inline-block;
  padding: .8rem 1.4rem;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-ink);
  font: 600 .95rem/1.2 "Sora", system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #bce374; border-color: #bce374; }
.button-quiet { background: transparent; border-color: var(--line); color: var(--mist); }
.button-quiet:hover { background: var(--surface); border-color: var(--muted); }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mist);
  font: inherit;
  font-size: .875rem;
  text-decoration: underline;
  cursor: pointer;
}

/* Entrada */
.login {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: 2rem clamp(1rem, 9vw, 9rem);
}
.pitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--line);
}
.login-panel {
  position: relative;
  width: min(100%, 25rem);
  padding: 2rem;
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.login-logo { width: 130px; }
.login-panel h1 { margin-top: .25rem; font-size: 2.25rem; font-weight: 600; letter-spacing: -.02em; }
.login-note { margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.form { display: grid; gap: .4rem; margin-top: 1.5rem; }
.form label { margin-top: .6rem; font-size: .875rem; font-weight: 600; }
.form input {
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--mist);
  font: inherit;
}
.form .button { margin-top: 1.2rem; }
.form-error { color: var(--alert); font-size: .9rem; }

/* Início */
.course-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1.75rem 0;
  border-block: 1px solid var(--line);
}
.course-row > div { flex: 1 1 18rem; }
.course-row h2 { font-size: 1.4rem; font-weight: 600; }
.course-row h2 a { text-decoration: none; }
.course-row h2 a:hover { text-decoration: underline; }
.meter { height: 4px; max-width: 28rem; margin-top: .75rem; background: var(--line); }
.meter span { display: block; height: 100%; background: var(--lime); }

/* Curso */
.course-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}
.module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1rem 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.module-head { position: sticky; top: 1.5rem; align-self: start; }
.module-number {
  display: block;
  color: var(--lime);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
}
.module-head h2 { margin-top: .75rem; font-size: 1.3rem; font-weight: 600; line-height: 1.3; }

/* Trilha: a linha fica verde conforme as aulas são concluídas */
.track { margin: 0; padding: 0; list-style: none; }
.track-item { position: relative; padding-left: 1.75rem; }
.track-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}
.track-item:first-child::before { top: 1.3rem; }
.track-item:last-child::before { bottom: calc(100% - 1.3rem); }
.track-item::after {
  content: "";
  position: absolute;
  top: calc(1.3rem - 7px);
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--night);
}
.track-item.is-done::before { background: var(--lime); }
.track-item.is-done::after { border-color: var(--lime); background: var(--lime); }
.track-item.is-started::after {
  border-color: var(--lime);
  background: linear-gradient(90deg, var(--lime) 50%, var(--night) 50%);
}
.track-item a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .75rem;
  padding: .6rem .75rem;
  border-radius: 4px;
  text-decoration: none;
}
.track-item a:hover { background: var(--surface); }
.track-item.is-current a { background: var(--surface); font-weight: 600; }
.track-code { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.track-title { flex: 1 1 12rem; }
.track-tag { color: var(--lime); font-size: .78rem; }

/* Aula */
.back { display: inline-block; margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 2.5rem;
  align-items: start;
}
.player {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.player video { display: block; width: 100%; height: 100%; }
.player-empty {
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}
.player-status { min-height: 1.6em; margin-top: .5rem; color: var(--lime); font-size: .875rem; }
.lesson-title {
  margin-top: .25rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.lesson-title span { color: var(--lime); }
.lesson-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.lesson-side { font-size: .9rem; }
.side-module { margin: 1.5rem 0 .4rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.side-module:first-child { margin-top: 0; }

@media (max-width: 900px) {
  .lesson-layout, .module { grid-template-columns: minmax(0, 1fr); }
  .module-head { position: static; }
  .module-number { font-size: 3rem; }
}

@media (max-width: 480px) {
  .topbar-user { display: none; }
  .course-row .button, .course-head .button { width: 100%; }
}
