/* =========================================================
   Jogu — base.css
   Tokens, reset, tipografia e componentes primitives
   ========================================================= */

:root {
  /* Cores — inspiradas no jogo lumi. (Night / Mint / Gold) */
  --night:      #071b2b;
  --deep:       #0a2938;
  --deep-2:     #061724;
  --surface:    rgba(255, 255, 255, 0.055);
  --surface-2:  rgba(255, 255, 255, 0.09);
  --line:       rgba(255, 255, 255, 0.11);
  --line-strong:rgba(255, 255, 255, 0.20);

  --mint:       #6de3d0;
  --mint-2:     #9df0d8;
  --gold:       #ffd47d;
  --coral:      #ffa6a6;
  --violet:     #b8a6f2;

  --cream:      #fff5e2;
  --text:       #e8f2f4;
  --muted:      #aac2c9;
  --muted-dim:  rgba(170, 194, 201, 0.72);

  /* Gradientes */
  --grad-brand: linear-gradient(135deg, var(--mint), var(--mint-2));
  --grad-gold:  linear-gradient(135deg, #ffd47d, #ffb347);
  --grad-bg:    linear-gradient(180deg, var(--night) 0%, var(--deep) 45%, var(--deep-2) 100%);

  /* Forma */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.48);

  /* Layout */
  --wrap: 1180px;
  --header-h: 66px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 160ms var(--ease);
  --mid:  280ms var(--ease);
}

/* ---------------- Reset ---------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(14px, 0.35vw + 0.55vh, 16px);
  line-height: 1.6;
  color: var(--text);
  background: var(--grad-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Luzes de ambiente do fundo */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
}
body::before {
  top: -34vmax;
  right: -22vmax;
  background: radial-gradient(circle, rgba(109, 227, 208, 0.20), transparent 62%);
  animation: drift 18s var(--ease) infinite alternate;
}
body::after {
  bottom: -38vmax;
  left: -24vmax;
  background: radial-gradient(circle, rgba(83, 102, 170, 0.22), transparent 62%);
  animation: drift 22s var(--ease) infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-4%, 3%, 0); }
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.18; color: var(--cream); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--mint); color: var(--night); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.20);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.36); background-clip: content-box; }

/* ---------------- Tipografia utilitaria ---------------- */

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

.display {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--cream);
}

.h2 { font-size: clamp(22px, 3.2vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

.lead { color: var(--muted); font-size: 16px; max-width: 60ch; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.dim   { color: var(--muted-dim); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.mint  { color: var(--mint); }
.gold  { color: var(--gold); }
.coral { color: var(--coral); }

/* ---------------- Layout ---------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(14px, 3.5vw, 22px);
}
.wrap--narrow { max-width: 760px; }

/* O site inteiro cabe na tela: sem rolagem de pagina.
   As secoes usam flex para dividir a altura disponivel. */
.page {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page > main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-4   { gap: 4px; }  .gap-6 { gap: 6px; }  .gap-8 { gap: 8px; }
.gap-12  { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.gap-24  { gap: 24px; } .gap-32 { gap: 32px; }
.grow    { flex: 1 1 auto; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

.hide { display: none !important; }

.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;
}

/* ---------------- Componentes ---------------- */

/* Painel de vidro */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Botões */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--cream);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 46px;
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--fast), filter var(--fast), background var(--fast), border-color var(--fast);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); filter: brightness(0.96); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5; pointer-events: none; transform: none; filter: none;
}

.btn--primary {
  --btn-fg: var(--night);
  --btn-bd: transparent;
  background: var(--grad-brand);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(109, 227, 208, 0.22);
}
.btn--gold {
  --btn-fg: var(--night);
  --btn-bd: transparent;
  background: var(--grad-gold);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(255, 180, 71, 0.22);
}
.btn--ghost { --btn-bg: transparent; --btn-bd: var(--line-strong); }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 16.5px; border-radius: var(--r-md); }
.btn--block { width: 100%; }

/* Pill / etiqueta */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cream);
  white-space: nowrap;
}
.pill--mint  { background: rgba(109, 227, 208, 0.14); border-color: rgba(109, 227, 208, 0.32); color: var(--mint); }
.pill--gold  { background: rgba(255, 212, 125, 0.14); border-color: rgba(255, 212, 125, 0.32); color: var(--gold); }
.pill--coral { background: rgba(255, 166, 166, 0.14); border-color: rgba(255, 166, 166, 0.34); color: var(--coral); }
.pill--violet{ background: rgba(184, 166, 242, 0.14); border-color: rgba(184, 166, 242, 0.32); color: var(--violet); }

/* Campos de formulário */
.field { display: block; }
.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.field__input {
  width: 100%;
  padding: 13px 15px;
  min-height: 50px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 15px;
  transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}
.field__input::placeholder { color: rgba(170, 194, 201, 0.45); }
.field__input:hover { border-color: var(--line-strong); }
.field__input:focus {
  outline: none;
  border-color: var(--mint);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 4px rgba(109, 227, 208, 0.16);
}
.field__hint { margin-top: 6px; font-size: 12.5px; color: var(--muted-dim); }
.field__error {
  display: none;
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--coral);
}
.field.is-invalid .field__input { border-color: var(--coral); }
.field.is-invalid .field__error { display: block; }
.field.is-valid  .field__input { border-color: rgba(109, 227, 208, 0.5); }

.field__wrap { position: relative; }
.field__wrap .field__input { padding-right: 48px; }
.field__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 16px;
  transition: color var(--fast), background var(--fast);
}
.field__toggle:hover { color: var(--cream); background: var(--surface-2); }

/* Caixa de seleção */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
  user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: background var(--fast), border-color var(--fast);
}
.check__box::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid var(--night);
  border-bottom: 2px solid var(--night);
  transform: rotate(-45deg) scale(0.4);
  opacity: 0;
  transition: transform var(--fast), opacity var(--fast);
}
.check input:checked + .check__box { background: var(--mint); border-color: var(--mint); }
.check input:checked + .check__box::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Divisor */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Aviso / toast */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid;
}
.alert--info   { background: rgba(109, 227, 208, 0.10); border-color: rgba(109, 227, 208, 0.30); color: var(--mint); }
.alert--warn   { background: rgba(255, 212, 125, 0.10); border-color: rgba(255, 212, 125, 0.30); color: var(--gold); }
.alert--error  { background: rgba(255, 166, 166, 0.10); border-color: rgba(255, 166, 166, 0.32); color: var(--coral); }
.alert__icon { flex: 0 0 auto; font-size: 15px; line-height: 1.35; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 13, 21, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--mid), visibility var(--mid);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  width: 100%;
  max-width: 400px;
  padding: 26px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #12364a, #0c2637);
  border: 1px solid rgba(109, 227, 208, 0.26);
  box-shadow: var(--shadow-lg);
  transform: scale(0.94) translateY(10px);
  transition: transform var(--mid);
}
.modal.is-open .modal__box { transform: scale(1) translateY(0); }

/* Animações de entrada */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
