@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivo-black-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}

/* _StackMedia: shared identity for every application surface. */
:root {
  color-scheme: light;
  --ink: #151515;
  --paper: #f3ede8;
  --surface: #fcf8f4;
  --white: #ffffff;
  --muted: #625d58;
  --red: #e21a59;
  --orange: #e25d1f;
  --red-text: #9e153d;
  --orange-text: #973d18;
  --gray: #575757;
  --line: rgba(21, 21, 21, 0.14);
  --shadow: 0 28px 80px rgba(21, 21, 21, 0.16);

  /* Apresentação/login: acento, realce e preenchimento neutro. */
  --accent: #bd1245;
  --accent-hover: #c9134b;
  --tint: #f9dce4;
  --soft: #eae2db;
  --header: rgba(243, 237, 232, 0.96);
  --shadow-card: 0 16px 40px #20101905;
  --font-body: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Archivo Black", "Space Grotesk", system-ui, sans-serif;
  --page-scale: 0.9;
  --page-scale-reverse: 1.111111;

  /* Compatibility aliases used by the existing editor controls. */
  --vermelho: var(--red);
  --azul: var(--ink);
  --brand-blue-dark: var(--gray);
  --brand-red-dark: var(--red-text);
  --color-ink: var(--ink);
  --color-muted: var(--muted);
  --color-line: var(--line);
  --color-panel: var(--white);
  --color-page: var(--paper);
  --color-surface: var(--surface);
  --color-blue-soft: #f6e4d8;
  --color-red-soft: #fce3eb;
  --color-blue: var(--ink);
  --color-red: var(--red);
  --glass-surface: var(--surface);
  --glass-surface-strong: var(--white);
  --glass-line: var(--line);
  --glass-shadow: 0 8px 24px rgba(21, 21, 21, .06);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .7);
  --glass-selected: #f6e4d8;
  --glass-selected-line: #d6a58b;
  --glass-blur: blur(20px);
  --glass-page-background: var(--paper);
  --shadow-soft: var(--glass-shadow);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-field: 12px;
  --radius-pill: 999px;
  --control-height: 50px;
  font-family: var(--font-body);
  font-synthesis: none;
}

body { font-family: var(--font-body); line-height: 1.5; }
.brand-wordmark { white-space: nowrap; text-transform: none; letter-spacing: normal; }
.brand-wordmark > .brand-media { color: var(--red, #e21a59); }
/* Títulos seguem a apresentação: Space Grotesk 500 com tracking negativo. */
h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
  text-wrap: balance;
}
h1 { letter-spacing: -0.055em; }
/* Escape explícito para onde o display ainda é desejado. */
.font-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.045em; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; }
::selection { color: var(--red-text); background: var(--color-red-soft); }

.site-header {
  background: var(--glass-surface);
  color: var(--azul);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: var(--glass-highlight), 0 4px 18px rgba(21, 21, 21, .04);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.site-header-inner {
  display: flex;
  width: min(1440px, 90%);
  min-height: 72px;
  margin: 0 auto;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.site-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--azul);
  text-decoration: none;
}
.site-brand-logo {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.site-brand strong { display: block; font-size: 17px; line-height: 1.2; }
.site-brand small { display: block; margin-top: 3px; color: var(--color-muted); font-size: 11px; }
.site-nav { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 12px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.site-nav a:hover { color: var(--accent); background: var(--glass-surface-strong); }
.site-nav a[aria-current="page"] { color: var(--accent); border-color: var(--line); background: var(--tint); box-shadow: none; }

/* Primitivos compartilhados, na linguagem de /apresentacao e /login. */
.ui-pill,
.pwa-retry-button,
.login-google,
.login-signup-button {
  display: inline-flex;
  min-height: var(--control-height);
  padding: 12px 22px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.ui-pill:hover,
.pwa-retry-button:hover,
.login-google:hover,
.login-signup-button:hover { background: var(--soft); }
.ui-pill-primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.ui-pill-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ui-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.ui-chip {
  display: inline-flex;
  padding: 4px 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.ui-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass-surface: var(--surface);
    --glass-surface-strong: #fff;
    --glass-selected: #f6e4d8;
    --glass-blur: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-surface: var(--surface);
    --glass-surface-strong: #fff;
    --glass-selected: #f6e4d8;
    --glass-blur: none;
  }
}

@media (max-width: 640px) {
  .site-header-inner { width: calc(100% - 32px); padding: 14px 0; gap: 12px; flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav a { justify-content: center; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Global themes / "Meus temas" switch used wherever a theme is chosen. */
.theme-scope-host:empty { display: none; }
.theme-scope-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); }
.theme-scope-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 34px; padding: 6px 10px; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; border: 0; border-radius: var(--radius-pill); background: transparent; }
.theme-scope-tab:hover { color: var(--ink); }
.theme-scope-tab[aria-selected="true"] { color: var(--accent); background: var(--tint); }
.theme-scope-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-scope-count { min-width: 20px; padding: 1px 6px; font-size: 11px; line-height: 16px; text-align: center; border-radius: var(--radius-pill); background: var(--line); }
