/* Samba public pages: what every page shares (fonts, colors, top bar, buttons, footer).
   The app's "Quintal brasileiro" palette (src/renderer/styles.css, docs/DESIGN.md): night green, terracotta for actions,
   ochre in small doses, Fraunces for titles, Figtree for everything else. Corners stay small (8 px buttons). */

@font-face {
  font-family: 'Figtree Variable';
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces Variable';
  src: url('/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces Variable';
  src: url('/fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0a100d;
  --bg-soft: #0f1713;
  --panel: #121b17;
  --panel-2: #18241e;
  --line: #22322a;
  --line-soft: #1a2620;
  --mata: #123528;
  --text: #dfe7e0;
  --strong: #fff3e0;
  --muted: #9fb2a8;
  --accent: #e0663a;
  --accent-hover: #ec7a50;
  --on-accent: #1c1511;
  --gold: #e3a53c;
  --voice: #5cc796;
  --papel: #f6ecd9;
  --ink: #1c1511;
  --live: #e2483f;
  --link: #ffb894;
  --r-btn: 8px;
  --r-card: 14px;
  --font-ui: 'Figtree Variable', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --side: max(20px, env(safe-area-inset-left));
  --max: 1280px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---- top bar: thin, see-through, a hairline once the page scrolls ---------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  background: #0a100db8;
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.top.scrolled {
  border-bottom-color: var(--line);
  background: #0a100de6;
}

.top-in {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--max);
  height: 64px;
  margin: 0 auto;
  padding: 0 var(--side);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
  font: 800 22px/1 var(--font-display);
  font-stretch: normal;
  letter-spacing: -0.02em;
  text-transform: none;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.top .nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 28px;
}

.top .nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.top .nav a:hover,
.top .nav a[aria-current='page'] {
  color: var(--strong);
}

.top .spacer {
  flex: 1;
}

.top-link {
  display: none;
  padding: 8px 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.top-link:hover {
  color: var(--strong);
}

.top-cta {
  display: none;
}

/* Phone menu: a <details>, so it works without scripts. */
.menu {
  position: relative;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-btn);
  cursor: pointer;
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.burger {
  display: grid;
  gap: 6px;
  width: 20px;
}

.burger i {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--strong);
  transition: transform 0.2s ease;
}

.menu[open] .burger i:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu[open] .burger i:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.menu-panel {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  padding: 12px var(--side) 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.menu-panel a:not(.btn) {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--strong);
  font: 600 18px/1.3 var(--font-ui);
  text-decoration: none;
}

.menu-panel .btn {
  margin-top: 14px;
}

/* ---- buttons: small corners, flat ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font: 700 15px/1 var(--font-ui);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--strong);
}

.btn.ghost:hover {
  border-color: #3a4e44;
  background: #ffffff08;
}

.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.btn:active {
  transform: none;
}

/* ---- footer ----------------------------------------------------------------------------------- */

.foot {
  margin-top: 0;
  padding: 56px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
}

.foot-grid {
  display: grid;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--side);
}

.foot-grid > * {
  display: grid;
  align-content: start;
  gap: 8px;
}

.foot h2 {
  margin: 0 0 6px;
  color: var(--strong);
  font: 700 12px/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.foot a:not(.brand) {
  color: var(--text);
  text-decoration: none;
}

.foot a:not(.brand):hover {
  color: var(--strong);
  text-decoration: underline;
}

.foot-brand p {
  margin: 6px 0 0;
}

.foot-fine {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 20px var(--side) 0;
  border-top: 1px solid var(--line-soft);
  color: #7d9086;
  font-size: 13px;
}

/* ---- wider screens ---------------------------------------------------------------------------- */

@media (min-width: 720px) {
  :root {
    --side: max(32px, env(safe-area-inset-left));
  }

  .foot-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .top .nav,
  .top-link {
    display: flex;
  }

  .top-cta {
    display: inline-flex;
  }

  .menu {
    display: none;
  }
}

@media (min-width: 1200px) {
  :root {
    --side: max(48px, env(safe-area-inset-left));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .top,
  .btn,
  .burger i {
    transition: none;
  }
}
