/* CSS compartilhado entre a landing (/) e a página de convite (/invite/{code}).
   Paleta igual à do frontend (ver frontend/src/styles/tokens.css). */
:root {
  --bg-tertiary: #1e1f22;
  --bg-primary: #313338;
  --bg-card: #2b2d31;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --header-primary: #f2f3f5;
  --brand: #5865f2;
  --brand-hover: #4752c4;
  --green: #23a559;
  --green-hover: #1a7f45;
  --gradient: linear-gradient(135deg, #2f5bff, #a020ff);
  --gradient-hover: linear-gradient(135deg, #2748d6, #8419d6);
  --radius-md: 8px;
  --font: "gg sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-normal);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; }

a { color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  background: var(--bg-tertiary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--header-primary);
  text-decoration: none;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-hover); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-gradient { background: var(--gradient); color: #fff; box-shadow: 0 8px 24px rgba(160, 32, 255, 0.28); }
.btn-gradient:hover { background: var(--gradient-hover); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero { position: relative; padding: 96px 0 64px; text-align: center; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  width: 720px;
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47, 91, 255, 0.22), rgba(160, 32, 255, 0.14) 60%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: 0.5px;
}
.hero p.sub {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero .version-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero .portable-note {
  margin-top: 8px;
  font-size: 13px;
}
.hero .portable-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 32px 0 80px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
}
.card h3 {
  color: var(--header-primary);
  margin: 0 0 8px;
  font-size: 17px;
}
.card p { color: var(--text-muted); margin: 0; font-size: 14px; }

/* Seção convite */
.invite-cta {
  background: var(--bg-tertiary);
  padding: 56px 0;
  text-align: center;
}
.invite-cta h2 { color: var(--header-primary); margin: 0 0 20px; }
.invite-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
.invite-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-primary);
  color: var(--text-normal);
  font-size: 15px;
}
.invite-form input::placeholder { color: var(--text-muted); }

/* Rodapé */
.footer {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

/* Página de convite */
.invite-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.invite-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.invite-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(160, 32, 255, 0.28);
}
.invite-icon img { width: 100%; height: 100%; object-fit: cover; }
.invite-card h1 {
  color: var(--header-primary);
  font-size: 22px;
  margin: 0 0 6px;
}
.invite-card .meta { color: var(--text-muted); font-size: 14px; margin: 0 0 4px; }
.invite-card .inviter { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }
.invite-card .btn { width: 100%; margin-bottom: 12px; }
.invite-card .download-hint { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }
.invite-card .code-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 10px;
  margin: 0 0 16px;
}
.invite-card .code-hint b { color: var(--header-primary); letter-spacing: 1px; }
.invite-card .web-link { font-size: 13px; color: var(--text-muted); text-decoration: underline; }

@media (max-width: 640px) {
  .nav .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 30px; }
  .cards { grid-template-columns: 1fr; padding: 24px 0 56px; }
  .invite-form { flex-direction: column; }
}
