/* ==========================================================================
   opcionalidade.com.br — estilos globais
   ========================================================================== */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #14181f;
  --text-muted: #5b6573;
  --accent: #1f6feb;
  --accent-soft: #e6efff;
  --positive: #1a7f37;
  --negative: #cf222e;
  --warning: #9a6700;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --max-width: 1120px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #1f252e;
    --border: #2d333b;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #4c8dff;
    --accent-soft: #15233d;
    --positive: #3fb950;
    --negative: #f85149;
    --warning: #d29922;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f252e;
  --border: #2d333b;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #4c8dff;
  --accent-soft: #15233d;
  --positive: #3fb950;
  --negative: #f85149;
  --warning: #d29922;
  --shadow: none;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

code, .mono { font-family: var(--font-mono); font-size: .92em; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.brand .tld { color: var(--text-muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .95rem;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 48px; }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- Cards / grid ---------- */

.section { padding: 32px 0 56px; }
.section-title { margin-bottom: 20px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }
.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card .card-icon svg { width: 22px; height: 22px; }
.card .card-footer { margin-top: auto; padding-top: 16px; }

.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge.live { color: var(--positive); border-color: currentColor; }
.badge.soon { color: var(--warning); border-color: currentColor; }

/* ---------- Página de ferramenta ---------- */

.page-head { padding: 40px 0 16px; }
.page-head p { color: var(--text-muted); max-width: 720px; }

.breadcrumb { font-size: .9rem; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-muted); }

.placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: .875rem;
  color: var(--text-muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer p { margin: 0; max-width: 680px; }
