/*
 * Borah public pages — shared V3 stylesheet (BORAH-2174).
 * Used by /suporte, /delete-account, /verify, /download and the static legal
 * pages in public/legal. Served from /assets with cache headers; fonts are
 * self-hosted (/fonts) with font-display: swap, so nothing here blocks on a
 * third-party host.
 *
 * Every value is a token projected BY HAND from apps/mobile/constants/tokens.ts
 * (PaletteV3 / SemanticColorsV3.light / Radius / Spacing) — the public pages
 * are light-only, like the app. Keep the comments' token names in sync.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* PaletteV3 / SemanticColorsV3.light */
  --brand: #f4c416;            /* brandYellow = brand/tint */
  --ink: #17201d;              /* ink = text on brand, borderStrong */
  --bg: #f5f4f4;               /* pageBackground = surface */
  --card: #ffffff;             /* white = background */
  --surface-container: #eceae4;/* mapBackground = surfaceContainer */
  --text: #17201d;             /* ink */
  --muted: #5f655b;            /* mutedInkLight = textMuted (AA >= 4.67:1 on every light surface) */
  --link: #735b05;             /* accentTextLight, brand hue as TEXT (AA 5.07:1+) */
  --border: #e8e6df;           /* borderLight = border/divider */
  --border-input: #d4d0c8;     /* borderInput */
  --danger: #ba1a1a;           /* errorLight */
  --success: #1f7a3d;          /* successLight */

  /* Radius */
  --r-button: 14px;
  --r-card: 20px;              /* cardLarge */
  --r-input: 12px;             /* card / md */
  --r-frame: 24px;             /* appFrame */

  /* Typography.fontFamily — Inter body, Inter Tight display */
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Header: the yellow brand band (Conta screen) ---------- */
.site-header {
  background: var(--brand);
  color: var(--ink);
  border-radius: 0 0 var(--r-frame) var(--r-frame);
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left));
}
.site-header__inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header__logo { display: block; height: 44px; width: auto; }
.site-header__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.site-header__tag { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; }

/* ---------- Page ---------- */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left));
}
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
h2 { font-size: 20px; font-weight: 700; margin: 32px 0 8px; }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 8px; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
mark { background: var(--brand); color: var(--ink); padding: 0 3px; border-radius: 3px; }
.subtitle, .intro { color: var(--muted); margin: 0 0 24px; }
.footer { color: var(--muted); font-size: 14px; text-align: center; }

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

/* ---------- Cards, lists, badges ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
  margin: 0 0 16px;
}
.card > :last-child { margin-bottom: 0; }
.card--center { text-align: center; }
.section-title { margin: 28px 0 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-input); padding: 16px; margin: 0 0 10px; }
.faq-a { color: var(--muted); margin: 0; }
.faq-a a, .contact-link { font-weight: 600; }
.contact-link { display: inline-block; min-height: 44px; line-height: 44px; font-size: 18px; }

.links { display: flex; flex-direction: column; gap: 10px; }
.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.links a:hover { border-color: var(--ink); }
.arrow { color: var(--muted); font-size: 22px; line-height: 1; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 0 12px;
  border-radius: 9999px;
  background: var(--surface-container);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.badge--success { color: var(--success); }
.badge--error { color: var(--danger); }

/* ---------- Forms (delete-account) ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* >= 16px: iOS does not zoom the viewport on focus */
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--border-input);
  border-radius: var(--r-input);
}
.actions { margin-top: 16px; }
.btn, .store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-button);
  background: var(--brand);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: default; }
.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-input);
  border: 1px solid var(--border-input);
  background: var(--surface-container);
}

/* ---------- Download ---------- */
.store-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.store-button { width: 100%; }
.store-button.secondary { background: var(--card); }
.headline-en { color: var(--muted); margin: 0 0 8px; }
.foot { margin: 20px 0 0; color: var(--muted); font-size: 14px; }
@media (min-width: 520px) {
  .store-buttons { flex-direction: row; }
  .store-button { flex: 1; }
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.site-footer__nav a:hover { border-color: var(--ink); }
