/* guilhermelimatech.dev — LockedIn page. Light, cool page; the scoreboard is the app's dark screen. */
:root {
  --paper: #f3f4f6;
  --surface: #ffffff;
  --ink: #14171d;
  --ink-soft: #4b5262;
  --line: #dfe2e8;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --screen: #171a21;
  --screen-line: #2a2f3a;
  --screen-text: #f4f5f7;
  --screen-soft: #9aa1ae;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1115;
    --surface: #171a21;
    --ink: #f4f5f7;
    --ink-soft: #a3aab7;
    --line: #262b35;
    --amber-deep: #fbbf24;
    --screen: #1d2129;
    --screen-line: #323846;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

/* Header ---------------------------------------------------------------------------------------- */
.top,
main,
.foot {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__name {
  font: 800 1.3rem/1 var(--heading);
  letter-spacing: -0.035em;
}

.brand__name span {
  color: var(--amber-deep);
}

.langs {
  display: flex;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.langs a,
.langs span {
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
}

.langs span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Hero: the scoreboard is the one bold element ------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(24px, 6vw, 72px) 0 clamp(56px, 8vw, 104px);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

/* One sentence per line: "Rotinas diferentes." / "O mesmo placar." */
.hero h1 span {
  display: block;
}

.lead {
  margin-top: 22px;
  max-width: 34em;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600;
  text-decoration: none;
}

.btn--primary {
  background: var(--amber);
  color: #14171d;
  box-shadow: none;
}

.btn:hover {
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
}

.btn--primary:hover {
  background: #fbbf24;
  box-shadow: none;
}

.note {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.board {
  margin: 0;
  --row-h: 76px;
}

.board__screen {
  padding: 20px 22px 16px;
  border-radius: var(--radius-lg);
  background: var(--screen);
  color: var(--screen-text);
  box-shadow: 0 30px 60px -30px rgba(20, 23, 29, 0.55);
  transition: opacity 0.45s ease;
}

.is-fading .board__screen {
  opacity: 0;
}

.board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  font-size: 0.95rem;
}

.board__head b {
  font-family: var(--heading);
  font-size: 1.05rem;
}

.board__head span {
  color: var(--screen-soft);
}

/* Rows are stacked by transform, so passing someone is a smooth slide. */
.board__rows {
  position: relative;
  height: calc(var(--row-h) * 3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 16px 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  height: var(--row-h);
  box-shadow: inset 0 1px 0 var(--screen-line);
  transform: translateY(calc(var(--pos) * var(--row-h)));
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.row--me {
  z-index: 1;
  background: var(--screen);
}

.row__place {
  font: 800 1rem/1 var(--heading);
  color: var(--screen-soft);
}

.row__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  font: 800 0.9rem/1 var(--heading);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.is-checking .row--me .row__avatar {
  background: var(--amber);
  color: #14171d;
  transform: scale(1.1);
}

.row__who {
  display: grid;
  min-width: 0;
}

.row__who b {
  font-weight: 600;
}

.row--me .row__who b {
  color: var(--amber);
}

.row__who span {
  overflow: hidden;
  font-size: 0.88rem;
  color: var(--screen-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__week {
  display: flex;
  gap: 4px;
}

.row__week i {
  width: 9px;
  height: 22px;
  border-radius: 4px;
  background: var(--screen-line);
  transition: background-color 0.25s ease;
}

.row__week i.on {
  background: var(--amber);
}

.is-animated .row--me .row__week i:nth-child(6).on {
  animation: day-pop 0.45s ease;
}

.row__pts {
  position: relative;
  min-width: 4.4ch;
  font: 800 1.4rem/1 var(--heading);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.row--me .row__pts {
  color: var(--amber);
}

.is-animated:not(.is-lead) .row--me .row__pts {
  color: var(--screen-text);
}

.row__pts small {
  margin-left: 3px;
  font: 500 0.75rem var(--body);
  color: var(--screen-soft);
}

.row__plus {
  position: absolute;
  right: 0;
  bottom: 100%;
  font: 700 0.8rem var(--body);
  font-style: normal;
  color: var(--amber);
  opacity: 0;
}

.is-plus .row--me .row__plus {
  animation: plus-rise 1.1s ease forwards;
}

/* Fixed height, so the card never changes size when the reaction appears. */
.board__foot {
  display: flex;
  align-items: center;
  height: 30px;
  margin-top: 8px;
}

.reaction {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  background: var(--screen-line);
  font-size: 0.82rem;
  font-weight: 600;
}

.is-animated .reaction {
  opacity: 0;
}

.is-animated.is-reacted .reaction {
  opacity: 1;
  animation: reaction-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reaction__avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  font: 800 0.7rem/1 var(--heading);
}

@keyframes day-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes plus-rise {
  0% { opacity: 0; transform: translateY(4px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-12px); }
}

@keyframes reaction-in {
  from { opacity: 0; transform: translateY(6px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* Content blocks --------------------------------------------------------------------------------- */
.block {
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}

.block h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
}

.block__lead {
  margin-top: 12px;
  color: var(--ink-soft);
}

.aside {
  margin-top: 22px;
  color: var(--ink-soft);
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--amber);
  color: #14171d;
  font: 800 1rem/1 var(--heading);
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.steps p {
  color: var(--ink-soft);
}

.modes {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.mode {
  padding: 26px 28px;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.mode--main {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--amber);
}

.mode h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.mode__tag {
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #14171d;
  font: 600 0.75rem/1.4 var(--body);
  letter-spacing: 0;
  vertical-align: middle;
}

.mode p {
  color: var(--ink-soft);
}

.block--split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
}

.features {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid var(--line);
}

.features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--amber);
}

.stack {
  display: grid;
  gap: 44px;
  align-content: start;
}

.stack p {
  margin-top: 14px;
  color: var(--ink-soft);
}

.stack .aside {
  margin-top: 10px;
  font-size: 0.92rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.legal-links a {
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600;
  text-decoration: none;
}

.legal-links a:hover {
  box-shadow: inset 0 0 0 1.5px var(--amber);
}

/* Legal and support pages -------------------------------------------------------------------------- */
.doc {
  max-width: 720px;
  padding: 24px 0 80px;
}

.doc__back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

.doc__updated {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.doc section {
  margin-top: 36px;
}

.doc h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.doc section p + p {
  margin-top: 10px;
}

.doc section p {
  color: var(--ink-soft);
}

/* Footer ------------------------------------------------------------------------------------------- */
.foot {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 16px;
  font-weight: 600;
}

.foot__links a {
  color: var(--ink);
  text-decoration: none;
}

.foot__links a[aria-current='page'] {
  color: var(--amber-deep);
}

.foot__copy {
  margin-top: 6px;
}

/* Small screens ------------------------------------------------------------------------------------ */
@media (max-width: 880px) {
  .hero,
  .block--split,
  .modes {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .board {
    --row-h: 68px;
  }

  .board__screen {
    padding-inline: 16px;
  }

  .row {
    grid-template-columns: 12px 30px minmax(0, 1fr) auto auto;
    gap: 9px;
  }

  .row__avatar {
    width: 30px;
    height: 30px;
  }

  .row__week {
    gap: 3px;
  }

  .row__week i {
    width: 6px;
    height: 18px;
  }

  .row__pts {
    font-size: 1.2rem;
  }

  .row__pts small {
    display: none;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .row,
  .board__screen {
    transition: none;
  }
}

/* Invite page (/join/ABC123) -------------------------------------------------------------------------- */
.join__code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--screen);
  color: var(--screen-text);
}

.join__value {
  flex: 1;
  font: 800 clamp(2.2rem, 9vw, 3.2rem) / 1 var(--heading);
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
}

.join__missing {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1.5px var(--amber);
}

.join__steps {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding-left: 22px;
  font-size: 1.05rem;
}

.join__steps li::marker {
  color: var(--amber-deep);
  font-weight: 800;
}

.join__play {
  display: flex;
  width: fit-content;
  margin-top: 12px;
}

[hidden] {
  display: none !important;
}
