/* Cai na Real — tema base (site público + app social) */
:root {
  color-scheme: dark;
  --bg: #0a0d18;
  --bg-2: #0f1424;
  --surface: #141a2e;
  --surface-2: #1b2340;
  --surface-3: #232c4d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3efe6;
  --text-2: #b8b3a7;
  --text-3: #8a8679;
  --gold: #d9ad4b;
  --gold-2: #f2cf7a;
  --gold-ink: #1a1405;
  --red: #b8242f;
  --red-2: #d7383f;
  --ok: #3ccf8e;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Audiowide", "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff center / 118% no-repeat;
  background-image: var(--site-logo, url("../logo_cai_na_real.png"));
  flex: none;
  box-shadow: 0 0 0 2px var(--gold);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 14px; letter-spacing: .01em;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--text); outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); }
.feedback { min-height: 20px; font-size: 13px; color: var(--text-2); }
.feedback.is-error { color: var(--danger); }
.feedback.is-ok { color: var(--ok); }

.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-3); color: var(--gold-2);
  font-weight: 800; font-size: calc(var(--size) * .38); text-transform: uppercase;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(4, 6, 12, .72); backdrop-filter: blur(6px); }
.modal.is-open { display: grid; }
.modal-card {
  width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { font-family: var(--font-display); font-size: 22px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-2); font-size: 18px; flex: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.stack { display: grid; gap: 14px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ícone desenhado (SVG da biblioteca usado como máscara, pinta na cor do grupo) */
.icon-mask {
  display: block; width: 58%; height: 58%;
  background: var(--team, var(--gold));
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}

/* Avatar sem foto: logo do Cai na Real */
.avatar-logo { background: #fff center / 118% no-repeat; background-image: var(--site-logo, url("../logo_cai_na_real.png")); }

/* Títulos no estilo das letras do logo (Audiowide só tem um peso: sem negrito falso) */
body { font-synthesis-weight: none; }
/* Títulos em maiúsculas, como no logo */
h1, h2, .brand-name, .auth-brand, .modal-head h2, .page-head h1 { text-transform: uppercase; letter-spacing: .01em; }
