/* ==========================================================================
   Agente Daiane · Tokens de design — "Ouro sobre Tinta"
   Fonte de verdade das cores, tipografia, espaçamento, raios, sombras e
   movimento. Valores de cor extraídos do sistema de design real da marca
   (franciscocarlosterapeuta.com.br/mesa.html) e estendidos para uso em painel.

   Tema escuro é o padrão (marca). Tema claro por [data-theme="light"].
   Usa light-dark(): cada token de cor tem o par claro, escuro.
   ========================================================================== */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda-latin-wght-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/sora-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* ---- Superfícies --------------------------------------------------- */
  --bg:          light-dark(#fdfcf9, #08090a);   /* fundo da página              */
  --bg-2:        light-dark(#f4f0e7, #0b0c0d);   /* áreas rebaixadas (conversa)  */
  --surface:     light-dark(#ffffff, #101113);   /* cartões                      */
  --surface-2:   light-dark(#faf7f0, #15161a);   /* cartões elevados / hover     */
  --surface-3:   light-dark(#f3efe6, #1b1c21);   /* campos, chips neutros        */
  --field:       light-dark(#f3efe6, rgba(255, 255, 255, .05));
  --field-edge:  light-dark(#8c8575, #726d62);    /* borda de repouso dos campos: ≥ 3:1 (WCAG 1.4.11) */
  --header:      light-dark(rgba(253, 252, 249, .82), rgba(8, 9, 10, .66));
  --scrim:       light-dark(rgba(21, 17, 10, .38), rgba(0, 0, 0, .62));
  /* Degradês (imagens) NÃO passam por light-dark(): definidos por tema, abaixo. */
  --card-grad:   linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));

  /* ---- Texto --------------------------------------------------------- */
  --text-strong: light-dark(#15110a, #f7f5ef);
  --text:        light-dark(#332f26, #e7e3da);
  --text-muted:  light-dark(#5a5448, #b8b3a8);
  --text-muted-2: light-dark(#6f685b, #a39e93);
  --text-faint:  light-dark(#6a6458, #8c8678);   /* mínimo 4.5:1 em --surface   */

  /* ---- Ouro (identidade) -------------------------------------------- */
  --gold-ink:    light-dark(#826218, #d8b266);   /* ouro para texto/ícone (≥4.9:1 no claro; marca usa #9a771f só em decoração) */
  --gold-ink-2:  light-dark(#6b500f, #f0d79c);   /* ouro forte (ênfase, foco)   */
  --gold-deco:   light-dark(#9a771f, #d8b266);   /* ouro da marca: SOMENTE decoração/linhas, nunca texto pequeno */
  --gold-line:   light-dark(rgba(168, 124, 40, .32), rgba(212, 175, 94, .24));
  --gold-soft:   light-dark(rgba(168, 124, 40, .16), rgba(212, 175, 94, .20));
  --gold-glow:   light-dark(rgba(168, 124, 40, .18), rgba(212, 175, 94, .30));
  --gold-chip:   light-dark(rgba(168, 124, 40, .10), rgba(212, 175, 94, .08));
  --gold-chip-bd: light-dark(rgba(168, 124, 40, .40), rgba(212, 175, 94, .34));
  --gold-grad:   linear-gradient(180deg, #f0d79c, #d4af5e);   /* botão primário  */
  --gold-grad-h: linear-gradient(90deg, #d4af5e, #f0d79c);    /* filetes/barras  */
  --on-gold:     #241a06;                                      /* texto sobre ouro */
  --mark-1:      light-dark(#c99b3a, #f0d79c);                 /* degradê da marca (SVG) */
  --mark-2:      light-dark(#8a6a1c, #d4af5e);

  /* ---- Linhas -------------------------------------------------------- */
  --hair:        light-dark(rgba(30, 24, 14, .09), rgba(255, 255, 255, .07));
  --line:        light-dark(rgba(30, 24, 14, .12), rgba(255, 255, 255, .10));
  --line-2:      light-dark(rgba(30, 24, 14, .08), rgba(255, 255, 255, .06));

  /* ---- Semântica (calma, dessaturada, convive com o ouro) ------------ */
  --ok:          light-dark(#2a7249, #7ccf9d);
  --ok-bg:       light-dark(rgba(42, 114, 73, .10), rgba(124, 207, 157, .10));
  --warn:        light-dark(#a05a10, #f0a94a);   /* "precisa de ação" (âmbar)   */
  --warn-bg:     light-dark(rgba(160, 90, 16, .10), rgba(240, 169, 74, .12));
  --err:         light-dark(#c23b2e, #ff8a7a);
  --err-bg:      light-dark(rgba(194, 59, 46, .09), rgba(255, 138, 122, .11));
  --info:        light-dark(#36607f, #8fb4d8);
  --info-bg:     light-dark(rgba(54, 96, 127, .09), rgba(143, 180, 216, .10));

  /* ---- Foco ---------------------------------------------------------- */
  --focus:       light-dark(#7a5a10, #f0d79c);

  /* ---- Tipografia ---------------------------------------------------- */
  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Playfair Display", Georgia, serif;
  --font-ui:      "Sora", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-eyebrow: .6875rem;   /* 11px, caixa alta, tracking .26em */
  --fs-caption: .75rem;     /* 12px */
  --fs-small:   .8125rem;   /* 13px */
  --fs-body:    .875rem;    /* 14px */
  --fs-message: .9063rem;   /* 14.5px */
  --fs-lead:    1rem;       /* 16px */
  --fs-h3:      1.125rem;   /* 18px */
  --fs-h2:      1.375rem;   /* 22px */
  --fs-h1:      1.75rem;    /* 28px */
  --fs-kpi:     2.5rem;     /* 40px */
  --fs-hero:    clamp(2.5rem, 1.2rem + 4.2vw, 4.75rem);

  /* ---- Espaço (base 4px) -------------------------------------------- */
  --sp-1: .25rem; --sp-2: .5rem;  --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem; --sp-8: 2rem;  --sp-10: 2.5rem; --sp-12: 3rem;

  /* ---- Raios --------------------------------------------------------- */
  --r-sm: .5rem;     /* 8  campos pequenos      */
  --r-md: .75rem;    /* 12 campos, linhas       */
  --r-lg: 1rem;      /* 16 painéis internos     */
  --r-xl: 1.25rem;   /* 20 cartões (como no site) */
  --r-pill: 999px;   /* botões e chips          */

  /* ---- Elevação ------------------------------------------------------ */
  --ring-gold:   0 0 0 1px var(--gold-line);
  --shadow-card: 0 1px 0 light-dark(rgba(255, 255, 255, .8), rgba(255, 255, 255, .04)) inset,
                 0 24px 60px -34px light-dark(rgba(60, 40, 8, .30), rgba(0, 0, 0, .75));
  --shadow-pop:  0 30px 90px -20px light-dark(rgba(40, 28, 6, .35), rgba(0, 0, 0, .70)),
                 0 0 0 1px var(--gold-line);
  --shadow-gold: 0 8px 26px 0 var(--gold-glow), 0 1px 0 0 rgba(255, 255, 255, .5) inset;

  /* ---- Movimento ----------------------------------------------------- */
  --ease:        cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 140ms; --t-base: 220ms; --t-slow: 420ms;

  /* ---- Dimensões de layout ------------------------------------------ */
  --topbar-h: 4rem;
  --queue-w:  clamp(20rem, 26vw, 24.5rem);
  --ops-w:    min(27.5rem, 100vw);
  --tabbar-h: 4.25rem;
  --safe-b:   env(safe-area-inset-bottom, 0px);
}

:root[data-theme="light"] { color-scheme: light; --card-grad: linear-gradient(180deg, #ffffff, #faf6ee); }
:root[data-theme="dark"]  { color-scheme: dark; }
