/* ============================================================
   KM2S — Landing page
   Tema escuro com acento amarelo, espelhando a estética da máscara.
   Autocontido: sem fontes/CDN externos.
   ============================================================ */

:root {
  --bg: #0e0e10;
  --bg-alt: #131316;
  --surface: #17171b;
  --surface-2: #1e1e24;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ececee;
  --text-muted: #a0a0aa;
  --accent: #ffd400;
  --accent-ink: #1a1a05;
  --mask-bg: rgba(0, 0, 0, 0.78);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

.accent { color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 0.875rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 22px rgba(255, 212, 0, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 212, 0, 0.32); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  background: url("assets/icons/icon.svg") center / contain no-repeat;
}
.brand-name { font-size: 1.15rem; letter-spacing: 0.02em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 16, 0.72);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--text-muted); font-size: 0.925rem; font-weight: 500; transition: color .15s ease; }
.nav a:hover { color: var(--text); }
.header-inner .btn-primary { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 90px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 12%, rgba(255, 212, 0, 0.12), transparent 60%),
    radial-gradient(45% 45% at 8% 90%, rgba(255, 212, 0, 0.06), transparent 60%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 5px 12px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: rgba(255, 212, 0, 0.1);
  border: 1px solid rgba(255, 212, 0, 0.25); border-radius: 999px;
}
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; }
.lead { margin: 22px 0 30px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-muted); max-width: 34ch; }
.lead strong { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 22px; color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.avail { margin: 16px 0 0; color: var(--text-muted); font-size: 0.86rem; min-height: 1.2em; }
.avail:empty { margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.16); }

/* ---------- Hero window mock ---------- */
.window {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,.02);
}
.window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 14px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border);
}
.window-dot { width: 11px; height: 11px; border-radius: 50%; background: #3a3a42; }
.window-dot:nth-child(1) { background: #ff5f57; }
.window-dot:nth-child(2) { background: #febc2e; }
.window-dot:nth-child(3) { background: #28c840; }
.window-url {
  margin-left: 12px; font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono);
  background: rgba(0,0,0,.25); padding: 4px 12px; border-radius: 999px;
}
.window-body { padding: 26px 24px 30px; }
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, #ffd400, #7a6200, #ffd400);
}
.profile-name { font-weight: 700; font-size: 1.05rem; }
.profile-mail { color: var(--text-muted); font-size: 0.95rem; }
.fields { display: grid; gap: 14px; margin: 0; }
.fields > div {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.fields dt { color: var(--text-muted); font-size: 0.9rem; }
.fields dd { margin: 0; font-family: var(--mono); font-size: 0.9rem; }
.hero-hint, .demo-legend { margin: 20px 0 0; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ---------- Trust strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 30px 0; }
.strip-item { text-align: center; }
.strip-item strong { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.strip-item span { display: block; margin-top: 6px; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
.section-head p { margin: 14px 0 0; color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Feature grid ---------- */
.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 16px;
  background: rgba(255, 212, 0, 0.12); border: 1px solid rgba(255, 212, 0, 0.25);
}
.card-icon svg { width: 22px; height: 22px; fill: var(--accent); }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card strong { color: var(--text); }

/* ---------- DOM privacy highlight ---------- */
.highlight {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.highlight-copy .eyebrow { margin-bottom: 16px; }
.highlight-copy h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.highlight-copy p { margin: 16px 0 0; color: var(--text-muted); font-size: 1.02rem; }
.highlight-copy strong { color: var(--text); }
.highlight-copy em { font-style: italic; color: var(--text); }
.highlight-note { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }

.code-compare { display: grid; gap: 12px; justify-items: stretch; }
.code-block {
  position: relative; background: #0b0b0d; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 34px 18px 16px; overflow-x: auto;
}
.code-after { border-color: rgba(255, 212, 0, 0.4); box-shadow: 0 0 0 1px rgba(255, 212, 0, 0.12); }
.code-tag {
  position: absolute; top: 10px; left: 16px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted);
}
.code-after .code-tag { color: var(--accent); }
.code-block pre { margin: 0; }
.code-block code {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; color: #cfd0d6; white-space: pre;
}
.tok-secret { color: #ff6b6b; text-decoration: line-through; text-decoration-color: rgba(255,107,107,.6); }
.tok-attr { color: var(--accent); }
.code-arrow { text-align: center; color: var(--accent); font-size: 1.3rem; line-height: 1; }

/* ---------- Steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step;
}
.step { position: relative; padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 16px;
  font-weight: 800; font-size: 1.05rem; color: var(--accent-ink); background: var(--accent);
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Demo ---------- */
.demo-card {
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
}
.demo-doc { padding: 30px 32px; }
.demo-doc p { margin: 0 0 14px; }
.demo-doc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.demo-doc li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.92rem; }
.demo-doc li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.demo-doc em { font-style: normal; color: var(--text-muted); font-family: var(--font); }
.demo-legend { text-align: left; margin-top: 22px; }
.legend-chip {
  display: inline-block; width: 34px; height: 12px; vertical-align: middle;
  background: var(--mask-bg); border: 1px solid var(--accent); border-radius: 2px; margin-right: 4px;
}

/* ---------- CTA ---------- */
.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.cta p { margin: 16px 0 28px; color: var(--text-muted); font-size: 1.08rem; }
.cta .hero-cta { justify-content: center; }
.cta .hero-note { justify-content: center; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; }
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 20px; transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; font-weight: 400;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-muted); }

/* ---------- Legal / privacy page ---------- */
.legal { max-width: 720px; margin: 0 auto; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 6px 0 0; }
.legal h2 { font-size: 1.25rem; font-weight: 700; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--text-muted); font-size: 1.02rem; }
.legal p { margin: 14px 0; }
.legal strong { color: var(--text); }
.legal ul { margin: 14px 0; padding-left: 1.2rem; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent); }
.legal code {
  font-family: var(--mono); font-size: 0.88em; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.1em 0.4em; border-radius: 5px;
}
.legal-updated { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 32px; background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-tag { margin: 0; color: var(--text-muted); font-size: 0.92rem; flex: 1 1 260px; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { color: var(--text-muted); font-size: 0.9rem; transition: color .15s ease; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { margin: 26px 0 0; color: #6d6d78; font-size: 0.82rem; }

/* ============================================================
   Máscara interativa (espelha o comportamento da extensão)
   ============================================================ */
.km2s-mask {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  background-color: var(--mask-bg);
  border: 1px solid var(--accent);
  color: #fff; line-height: 1; text-align: center; white-space: nowrap;
  cursor: pointer; z-index: 5;
}
.km2s-mask-value { display: inline; font-size: 75%; opacity: 0; transition: opacity .18s ease; }
.km2s-mask-value-shown { opacity: 1; }
.km2s-mask-pinned { border-style: dashed; }

.km2s-dropdown {
  display: flex; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  z-index: 2147483647; flex-direction: row; align-items: center; gap: 6px;
  padding-left: 6px; background: transparent; cursor: default;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.km2s-dropdown-open { opacity: 1; pointer-events: auto; }
.km2s-dropdown-item {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 18px; height: 18px; margin: 0; padding: 0;
  background-color: var(--mask-bg); border: 1px solid var(--accent);
  color: #fff; line-height: 0; cursor: pointer;
  transform: translateX(-6px); transition: transform .18s ease, color .18s ease;
}
.km2s-dropdown-open .km2s-dropdown-item { transform: translateX(0); }
.km2s-dropdown-item svg { width: 12px; height: 12px; display: block; fill: currentColor; }
.km2s-dropdown-item:hover { color: var(--accent); }
.km2s-dropdown-item-active { color: var(--accent); }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .lead { max-width: none; }
  .feature-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .highlight { grid-template-columns: 1fr; gap: 32px; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .feature-grid, .steps, .strip-inner { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .header-inner .btn-primary { display: none; }
  .demo-doc { padding: 24px 20px; }
  .fields > div { flex-direction: column; align-items: flex-start; gap: 4px; }
}
