/* ===== Roterix — Loja de templates e planilhas =====
   Site estático, sem backend. Paleta própria (roxo/índigo),
   light-first com suporte a tema escuro do sistema. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f5fb;
  --surface: #ffffff;
  --line: #e7e5f0;
  --ink: #14121f;
  --ink-soft: #5b5670;
  --muted: #8a85a0;
  --brand: #6c4cf1;      /* roxo principal */
  --brand-2: #9b7bff;    /* roxo claro */
  --brand-ink: #ffffff;
  --accent: #16c79a;     /* verde "comprar/pronto" */
  --shadow: 0 10px 30px rgba(28, 20, 60, .08);
  --shadow-lg: 0 24px 60px rgba(28, 20, 60, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0b16;
    --bg-soft: #131022;
    --surface: #17142a;
    --line: #2a2540;
    --ink: #f3f1fb;
    --ink-soft: #c3bddb;
    --muted: #8e88a8;
    --brand: #8f74ff;
    --brand-2: #b7a1ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===== Botões ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  box-shadow: 0 8px 22px rgba(108, 76, 241, .35);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(108, 76, 241, .45); }
.btn-buy {
  background: var(--accent);
  color: #06251c;
  width: 100%;
}
.btn-buy:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
  box-shadow: 0 6px 16px rgba(108, 76, 241, .4);
}
.logo .x { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a.link { color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.nav a.link:hover { color: var(--brand); }
@media (max-width: 720px) { .nav .link { display: none; } }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 64px;
  background:
    radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(900px 400px at 0% 10%, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 55%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust {
  margin-top: 26px;
  display: flex; gap: 22px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* Mockup no hero */
.hero-art {
  position: relative;
  min-height: 320px;
}
.float-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}
.fc-1 { top: 0; left: 6%; width: 62%; transform: rotate(-3deg); }
.fc-2 { bottom: 4%; right: 4%; width: 58%; transform: rotate(4deg); }
.fc-head { display: flex; gap: 6px; margin-bottom: 12px; }
.fc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.fc-row { height: 9px; border-radius: 6px; background: var(--bg-soft); margin: 8px 0; }
.fc-row.short { width: 55%; }
.fc-row.brand { background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 70%; }
.fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 10px; }
.fc-cell { height: 20px; border-radius: 5px; background: var(--bg-soft); }
.fc-cell.on { background: color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 880px) { .hero-art { min-height: 260px; } }

/* ===== Faixa de logos/benefícios ===== */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0;
}
@media (max-width: 720px) { .strip-grid { grid-template-columns: 1fr; gap: 16px; } }
.strip-item { display: flex; gap: 12px; align-items: flex-start; }
.strip-item .ico { font-size: 22px; }
.strip-item b { display: block; font-size: 15px; }
.strip-item small { color: var(--ink-soft); font-size: 13.5px; }

/* ===== Seções ===== */
section.block { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* Filtros */
.filters {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 999px;
  cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Grid de produtos */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  overflow: hidden;
}
.card-preview img { width: 100%; height: 100%; object-fit: cover; }
.preview-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 46px;
  color: #fff;
}
.badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.badge.hot { background: var(--accent); color: #06251c; }

.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.card-desc { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.price { display: flex; flex-direction: column; }
.price .now { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.price .old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card .btn-buy { margin-top: 12px; }

.soon-note {
  text-align: center; color: var(--muted);
  font-size: 14px; margin-top: 10px;
}

/* ===== Como funciona ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step .num {
  width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand); font-weight: 800; font-size: 18px;
  display: grid; place-items: center; margin-bottom: 14px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ===== FAQ ===== */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 12px;
  background: var(--surface);
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 16.5px;
  padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { padding: 0 0 18px; color: var(--ink-soft); }

/* ===== CTA final ===== */
.cta-final {
  text-align: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 28px;
  padding: 56px 28px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-final h2 { font-size: clamp(26px, 3.5vw, 36px); margin-bottom: 12px; letter-spacing: -.02em; }
.cta-final p { opacity: .92; font-size: 17px; margin-bottom: 26px; }
.cta-final .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.cta-final .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--brand); }

/* utilidades */
.center { text-align: center; }
.hidden { display: none !important; }

/* ===== Detalhe do produto (modal) ===== */
.dm-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 8, 22, .6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  animation: dmfade .18s ease;
}
@keyframes dmfade { from { opacity: 0 } to { opacity: 1 } }
.dm-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  width: 100%; max-width: 600px;
  max-height: 92vh; overflow-y: auto;
  display: block;
  box-shadow: var(--shadow-lg);
  animation: dmpop .2s ease;
}
@keyframes dmpop { from { transform: translateY(10px) scale(.99); opacity: .6 } to { transform: none; opacity: 1 } }
@media (max-width: 760px) {
  .dm-panel { grid-template-columns: 1fr; max-height: 94vh; overflow-y: auto; }
}
.dm-media { background: var(--bg-soft); overflow: hidden; border-bottom: 1px solid var(--line); }
.dm-media img { width: 100%; height: auto; display: block; }
.dm-media .preview-fallback { width: 100%; min-height: 240px; font-size: 64px; }
.dm-info { padding: 28px 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.dm-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center;
}
.dm-close:hover { background: rgba(0,0,0,.55); }
.dm-title { font-size: 24px; letter-spacing: -.02em; margin: 4px 0 6px; }
.dm-desc { color: var(--ink-soft); font-size: 15.5px; }
.dm-price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; }
.dm-price .now { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.dm-price .old { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.dm-block { margin-top: 14px; }
.dm-block h4 { font-size: 14px; margin-bottom: 8px; }
.dm-block ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dm-block li {
  position: relative; padding-left: 26px;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.5;
}
.dm-block li b { color: var(--ink); font-weight: 700; }
.dm-block li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.dm-info .dm-buy { margin-top: 20px; font-size: 17px; padding: 16px; }
.dm-fine { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
