/* ============================================================
   Espaço Invisível Copiar e Colar — Design System
   Mobile-first, system fonts, no frameworks
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --text: #17203a;
  --text-muted: #5b6478;
  --primary: #5b5bd6;
  --primary-dark: #4648b8;
  --primary-soft: #eef0fe;
  --border: #e4e7f0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(23, 32, 58, 0.08);
  --shadow-lg: 0 12px 40px rgba(23, 32, 58, 0.12);
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1120px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; color: var(--text); }
h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 0; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.lead { font-size: 1.1rem; color: var(--text-muted); }

/* ---------- Focus (accessibility) ---------- */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-text { font-size: 1.2rem; font-weight: 600; white-space: nowrap; }
.logo-text strong { color: var(--primary); font-weight: 800; }

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--text); font-weight: 500; font-size: 0.95rem;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; text-align: center; }
.hero h1 { max-width: 820px; margin: 0 auto 0.5em; font-size: 2.1rem; }
.hero .lead { max-width: 720px; margin: 0 auto 2em; }

.page-hero { padding: 44px 0 8px; }
.page-hero h1 { max-width: 860px; }
.page-hero .lead { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 22px; min-height: 48px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: background 0.15s, transform 0.05s;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #0f1630; text-decoration: none; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }

/* ---------- Tool card (main generator) ---------- */
.tool-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 28px; margin: 8px auto 0;
  max-width: 860px; text-align: left;
}
.tool-card h2 { font-size: 1.3rem; margin-bottom: 0.4em; }
.tool-card > p { color: var(--text-muted); }

.char-options { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
.char-option { position: relative; }
.char-option input { position: absolute; opacity: 0; pointer-events: none; }
.char-option label {
  display: block; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.char-option label strong { display: block; font-size: 1.02rem; }
.char-option label small { color: var(--text-muted); }
.char-option input:checked + label { border-color: var(--primary); background: var(--primary-soft); }
.char-option input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 16px 0; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field input[type="number"], .field input[type="text"], .field input[type="email"],
.field select, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--font); color: var(--text); background: #fff;
}
.field textarea { min-height: 140px; resize: vertical; }
.qty-wrap { display: flex; align-items: center; gap: 14px; }
.qty-wrap input[type="range"] { flex: 1; accent-color: var(--primary); height: 32px; }
.qty-wrap input[type="number"] { width: 90px; flex: none; }

.preview-box {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--bg-soft); padding: 20px; margin: 16px 0;
  text-align: center; color: var(--text-muted); min-height: 76px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
.preview-box.ready { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.preview-hint { font-size: 0.98rem; }
.char-count { font-size: 0.85rem; color: var(--text-muted); }
.char-info { font-size: 0.92rem; color: var(--text-muted); background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0 0; }

.tool-msg { font-weight: 600; min-height: 1.6em; margin: 10px 0 0; }
.tool-msg.success { color: #1d7a3a; }
.tool-msg.error { color: #b3261e; }

/* ---------- Mini tools & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

.card, .mini-tool {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3, .mini-tool h3 { margin-top: 0; }
.card p:last-child, .mini-tool p:last-child { margin-bottom: 0; }
.card .card-link { font-weight: 600; display: inline-block; margin-top: 8px; }
.platform-emoji { font-size: 1.8rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative;
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* ---------- Callout ---------- */
.callout {
  background: #fff8e6; border: 1px solid #f0d98c; border-left: 4px solid #d9a91e;
  border-radius: var(--radius-sm); padding: 14px 18px; font-size: 0.95rem;
}
.callout strong { color: #8a6d00; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item h3 { margin: 0; font-size: 1.05rem; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: none; padding: 18px 20px; cursor: pointer;
  font-size: 1.05rem; font-weight: 600; font-family: var(--font); color: var(--text); text-align: left;
}
.faq-q:hover { background: var(--bg-soft); }
.faq-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--primary); color: #fff; }
.faq-a { padding: 0 20px 20px; color: var(--text-muted); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 0.9rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--text-muted); }
.breadcrumb [aria-current="page"] { color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: #141b33; color: #c9cede; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px; padding: 48px 20px 32px; grid-template-columns: 1fr; }
.footer-col h2 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #c9cede; font-size: 0.95rem; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: 0.92rem; margin-top: 12px; }
.logo-footer .logo-text { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; font-size: 0.88rem; text-align: center; }
.footer-bottom p { margin: 0; }

/* ---------- Forms ---------- */
.contact-form { max-width: 640px; }
.form-msg { font-weight: 600; margin-top: 12px; }
.form-note { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 3.5rem; color: var(--primary); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 14px 22px; border-radius: 12px;
  font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  z-index: 200; max-width: calc(100vw - 40px); text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #b3261e; }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .char-options { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    display: none; box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px 20px 20px; }
  .main-nav a { padding: 14px 12px; font-size: 1.02rem; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 40px 0 16px; }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .section { padding: 72px 0; }
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 2.5rem; }
  .tool-card { padding: 36px; }
}

@media print {
  .site-header, .site-footer, .btn-row, .nav-toggle { display: none; }
}
