/* Conviva — anti-bullying school app
   ───────────────────────────────────
   Themeable design system. Default = "CEPI Institucional".
   Body classes swap in the 3 alternate palettes. */

:root,
.theme-coral {
  /* paper + ink */
  --paper: #f0f5ff;
  --paper-2: #dce8ff;
  --sand: #b8cef0;
  --card: #FFFFFF;
  --ink: #050f1c;
  --ink-2: #1a2a3a;
  --ink-soft: #4a5a6a;
  --ink-faint: #8090a0;
  --line: rgba(5, 15, 28, 0.12);
  --line-soft: rgba(5, 15, 28, 0.06);

  /* brand institucional CEPI */
  --coral: #0056d6;
  --coral-deep: #003585;
  --coral-soft: #dce8ff;
  --navy: #1a8c4e;
  --navy-2: #22a660;
  --navy-soft: #d4f5e4;
  --mint: #d4f5e4;
  --mint-deep: #003585;
  --butter: #e8f0ff;
  --violet: #6d8fd6;
  --rose: #c8d8ff;

  /* secondary signals */
  --warn: #c97a00;
  --warn-bg: rgba(201, 122, 0, 0.15);
  --warn-fg: #7a4d00;

  /* alert */
  --alert: #C0392B;
  --alert-bg: #fde8e4;

  /* pulse color (for keyframes) */
  --pulse-color: 0, 86, 214;
  --shadow-coral: 0 6px 18px rgba(0, 86, 214, 0.4);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --font-display: "Bricolage Grotesque", "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", "Geist", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
}

/* ─── Option 1 · Acolhimento (warm rose + sage) ─── */
.theme-acolhimento {
  --paper: #F4EAE1;
  --paper-2: #EAD9CA;
  --sand: #DCC8B5;
  --card: #FFFFFF;
  --ink: #4A3E3D;
  --ink-2: #6B5B59;
  --ink-soft: #8E7E7C;
  --ink-faint: #B5A8A6;
  --line: rgba(74, 62, 61, 0.14);
  --line-soft: rgba(74, 62, 61, 0.07);

  --coral: #C97070;           /* deeper rose for CTAs */
  --coral-deep: #A05151;
  --coral-soft: #F3C6C6;
  --navy: #6B5B83;            /* mauve replacing navy */
  --navy-2: #8576A0;
  --navy-soft: #E3DAEC;
  --mint: #E2ECE9;
  --mint-deep: #6E8E81;
  --butter: #E8C895;
  --violet: #9B7AAE;
  --rose: #F3C6C6;

  --warn: #C9924E;
  --warn-bg: rgba(232, 200, 149, 0.35);
  --warn-fg: #8A6A2E;

  --alert: #B5453D;
  --alert-bg: #F8DEDA;

  --pulse-color: 201, 112, 112;
  --shadow-coral: 0 6px 18px rgba(201, 112, 112, 0.4);
}

/* ─── Option 2 · Paz (cool blue) ─── */
.theme-paz {
  --paper: #F0F4F8;
  --paper-2: #DCE5EE;
  --sand: #C5D2DD;
  --card: #FFFFFF;
  --ink: #334E68;
  --ink-2: #506880;
  --ink-soft: #7A8FA5;
  --ink-faint: #A8B6C5;
  --line: rgba(51, 78, 104, 0.16);
  --line-soft: rgba(51, 78, 104, 0.08);

  --coral: #5A7691;           /* oceano sereno */
  --coral-deep: #3D5670;
  --coral-soft: #BCCCDC;
  --navy: #243B5A;
  --navy-2: #3B5577;
  --navy-soft: #BCCCDC;
  --mint: #D6E5DB;
  --mint-deep: #5C8270;
  --butter: #E8D3A8;
  --violet: #7E8AA8;
  --rose: #C9D4E0;

  --warn: #C9924E;
  --warn-bg: rgba(232, 211, 168, 0.35);
  --warn-fg: #7C5A1E;

  --alert: #A04848;
  --alert-bg: #F2DEDE;

  --pulse-color: 90, 118, 145;
  --shadow-coral: 0 6px 18px rgba(90, 118, 145, 0.4);
}

/* ─── Option 3 · Apoio (lilac + sage) ─── */
.theme-apoio {
  --paper: #F7F5FA;
  --paper-2: #E8E2F0;
  --sand: #D5CCE0;
  --card: #FFFFFF;
  --ink: #2C2536;
  --ink-2: #4A4156;
  --ink-soft: #7A7287;
  --ink-faint: #ABA4B5;
  --line: rgba(44, 37, 54, 0.15);
  --line-soft: rgba(44, 37, 54, 0.07);

  --coral: #8B7AB8;           /* deeper lilac for CTAs */
  --coral-deep: #6B5B96;
  --coral-soft: #D1C4E9;
  --navy: #4A3E62;
  --navy-2: #685579;
  --navy-soft: #D1C4E9;
  --mint: #E2EFDA;
  --mint-deep: #6A8B5A;
  --butter: #E8D4B0;
  --violet: #A48BC9;
  --rose: #D1C4E9;

  --warn: #C9924E;
  --warn-bg: rgba(232, 212, 176, 0.35);
  --warn-fg: #7C5A2A;

  --alert: #9C4A5C;
  --alert-bg: #F3D8DE;

  --pulse-color: 139, 122, 184;
  --shadow-coral: 0 6px 18px rgba(139, 122, 184, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea {
  font-family: inherit;
  color: inherit;
}

/* ── Stage ───────────────────────────────────────────── */

.stage {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(var(--pulse-color), 0.10), transparent 60%),
    radial-gradient(800px 500px at 95% 5%, color-mix(in srgb, var(--navy) 12%, transparent), transparent 60%),
    var(--paper);
  padding: 32px 40px 80px;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
  opacity: 0.5;
}

/* ── Top brand bar ───────────────────────────────────── */

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1840px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, var(--coral) 0%, transparent 60%);
  opacity: 0.85;
}

.brand-mark svg { position: relative; z-index: 1; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-tag {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-deep);
}

/* ── Hero header above the frames ────────────────────── */

.intro {
  max-width: 1840px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  position: relative;
  z-index: 2;
}

.intro h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 4.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.intro h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--coral);
}

.intro-meta {
  display: grid;
  gap: 14px;
}

.intro-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  font-size: 14px;
  align-items: baseline;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}

.intro-row b {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Frames layout ───────────────────────────────────── */

.frames {
  max-width: 1840px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.frame-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.frame-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-left: 4px;
}

.frame-label span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.frame-label h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}

.frame-shadow {
  filter: drop-shadow(0 30px 60px rgba(20, 19, 26, 0.15)) drop-shadow(0 8px 20px rgba(20, 19, 26, 0.06));
}

/* ── Footer bracket ──────────────────────────────────── */

.foot {
  max-width: 1840px;
  margin: 56px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

/* ── Utility focus states ────────────────────────────── */

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.tap {
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.tap:active {
  transform: scale(0.97);
}

/* ── Scrollbars in the prototypes ────────────────────── */

.thin-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.thin-scroll::-webkit-scrollbar-thumb { background: rgba(20,19,26,0.15); border-radius: 999px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }

/* ── animations ──────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.35s ease-out both; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(var(--pulse-color), 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(var(--pulse-color), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--pulse-color), 0); }
}
.pulse { animation: pulse-ring 1.8s ease-out infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── App full-screen ─────────────────────────────────── */

/* Garante que o root preencha o viewport sem overflow */
html, body {
  height: 100%;
  overflow: hidden;
}

#root {
  height: 100%;
}


/* ── Área do aluno: grades e layout de computador ─────────────── */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.st-content { margin: 0 auto; width: 100%; box-sizing: border-box; }
.st-c-home, .st-c-conteudos { max-width: 1120px; }
.st-c-comunidade, .st-c-perfil, .st-c-denuncia, .st-c-sos { max-width: 760px; }
.st-c-conversas { max-width: 860px; height: 100%; }
@media (min-width: 1024px) {
  .st-shell .st-appheader { padding: 30px 32px 14px !important; }
  .st-shell .st-pad { padding-left: 32px !important; padding-right: 32px !important; }
  .st-shell .st-hero { padding: 34px 32px 26px !important; border-radius: 0 0 28px 28px; }
  .st-home .st-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding: 12px 32px 48px !important; align-items: start; }
  .st-shell .st-chat { border: 1px solid var(--line-soft); border-radius: 20px; overflow: hidden; margin: 28px 32px; height: calc(100% - 56px) !important; background: var(--card); }
  /* Denúncia (5 passos): a barra Voltar/Continuar acompanha a coluna do formulário, sem cobrir a barra lateral e o SOS */
  .st-shell .st-c-denuncia { min-height: 100%; display: flex; flex-direction: column; }
  .st-shell .st-c-denuncia > div { flex: 1; display: flex; flex-direction: column; }
  .st-shell .st-wizbody { padding-bottom: 28px !important; }
  .st-shell .st-wizbar {
    position: sticky !important; bottom: 0 !important; left: auto !important; right: auto !important;
    margin-top: auto; padding: 14px 18px 20px !important; gap: 12px !important;
    background: var(--paper) !important; border-top: 1px solid var(--line-soft);
  }
}
