/* ==========================================================================
   DomusXP — landing page
   Paleta "Roxo & Menta" e fonte Fredoka, herdadas do app (core/theme.dart).
   ========================================================================== */

:root {
  /* Marca */
  --roxo: #6C5CE7;
  --roxo-2: #5847C9;
  --roxo-hero: #8E7BFF;
  --menta: #2BD9B0;
  --menta-2: #17B597;
  --dourado: #FFB52E;
  --dourado-1: #FFD060;
  --dourado-2: #EE9F12;
  --verde: #46C56B;
  --vermelho: #E8584F;
  --laranja: #F79A37;

  /* Superfícies e texto */
  --fundo: #F5F3FF;
  --card: #FFFFFF;
  --tinta: #2F2A3D;
  --tinta-soft: #6E6890;
  --linha: #ECE8FB;

  /* Gradientes */
  --grad-brand: linear-gradient(135deg, #6C5CE7, #8E7BFF);
  --grad-coin: linear-gradient(135deg, #FFD060, #EE9F12);
  --grad-level: linear-gradient(135deg, #3FE0BE, #17B597);

  /* Sombras (roxo suave) */
  --sh-sm: 0 4px 14px rgba(108, 92, 231, .10);
  --sh-md: 0 14px 34px rgba(108, 92, 231, .16);
  --sh-lg: 0 26px 60px rgba(108, 92, 231, .22);

  /* Raios */
  --r-card: 22px;
  --r-btn: 16px;
  --r-pill: 30px;

  --maxw: 1140px;
  --pad: clamp(18px, 5vw, 28px);
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tinta);
  background: var(--fundo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-name { font-family: var(--font-display); line-height: 1.12; }

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--roxo); color: #fff; padding: 10px 16px; border-radius: 12px;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

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

/* ------------------------------- Botões --------------------------------- */
.btn {
  --_bg: var(--roxo);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; text-decoration: none;
  padding: 13px 22px; border-radius: var(--r-btn); border: 2px solid transparent;
  cursor: pointer; min-height: 46px; line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: .95rem; }
.btn-lg { padding: 16px 28px; min-height: 54px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.btn-gold { background: var(--grad-coin); color: #3d2c00; box-shadow: 0 14px 30px rgba(238,159,18,.34); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(238,159,18,.44); }
.btn-outline { background: transparent; color: var(--roxo); border-color: rgba(108,92,231,.32); }
.btn-outline:hover { background: rgba(108,92,231,.07); border-color: var(--roxo); }
.btn-ghost { background: transparent; color: var(--tinta); }
.btn-ghost:hover { background: rgba(108,92,231,.08); }

/* ------------------------------ Cabeçalho ------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 243, 255, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.site-header[data-elevated="true"] {
  border-bottom-color: var(--linha);
  box-shadow: 0 6px 20px rgba(108,92,231,.08);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--grad-brand);
  display: grid; place-items: center; box-shadow: var(--sh-sm);
}
.brand-name { font-size: 1.35rem; letter-spacing: -.02em; color: var(--tinta); }
.brand-xp { color: var(--roxo); }

.site-nav { display: none; margin-inline: auto; gap: 26px; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--tinta-soft); padding: 6px 2px; position: relative; }
.site-nav a:hover { color: var(--roxo); }

.header-cta { display: none; gap: 10px; margin-left: auto; }

.menu-toggle {
  margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 12px;
  background: rgba(108,92,231,.10); display: grid; place-items: center; gap: 4px; cursor: pointer;
}
.menu-toggle span { display: block; width: 20px; height: 2.4px; background: var(--roxo); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.4px) rotate(-45deg); }

.mobile-menu { border-top: 1px solid var(--linha); background: rgba(245,243,255,.96); padding: 14px var(--pad) 20px; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { text-decoration: none; font-weight: 600; color: var(--tinta); padding: 13px 4px; border-bottom: 1px solid var(--linha); }
.mobile-menu .btn { margin-top: 14px; }

/* --------------------------------- Hero --------------------------------- */
.hero { position: relative; padding: clamp(30px, 6vw, 60px) 0 clamp(40px, 7vw, 74px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 82% 8%, rgba(43,217,176,.16), transparent 60%),
    radial-gradient(50% 40% at 8% 4%, rgba(108,92,231,.14), transparent 60%);
}
.hero-grid { display: grid; gap: clamp(30px, 6vw, 52px); align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--roxo-2); background: rgba(108,92,231,.10); padding: 7px 14px; border-radius: var(--r-pill);
}
.eyebrow.center { display: inline-flex; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--menta); box-shadow: 0 0 0 4px rgba(43,217,176,.25); }

.hero h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 7.4vw, 3.5rem); font-weight: 700; letter-spacing: -.02em; }
.hero h1 .hl {
  color: var(--roxo);
  background: linear-gradient(120deg, rgba(43,217,176,.34), rgba(43,217,176,.34)) no-repeat;
  background-size: 100% .28em; background-position: 0 88%;
}
.lead { margin: 0 0 26px; font-size: clamp(1.05rem, 2.5vw, 1.22rem); color: var(--tinta-soft); max-width: 34ch; }
.lead strong { color: var(--tinta); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 16px 0 0; font-size: .92rem; color: var(--tinta-soft); }

/* Mockup */
.hero-visual { position: relative; display: grid; place-items: center; padding: 10px; }
.phone {
  position: relative; width: min(300px, 82vw); background: #2A2440; border-radius: 40px; padding: 12px;
  box-shadow: var(--sh-lg); border: 1px solid rgba(255,255,255,.06);
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 96px; height: 20px; background: #2A2440; border-radius: 0 0 14px 14px; z-index: 2; }
.phone-screen { background: var(--fundo); border-radius: 30px; padding: 20px 16px 18px; }

.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.app-user { display: flex; gap: 10px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 14px; background: var(--grad-brand); color: #fff; font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; }
.hello { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-weight: 600; font-size: .78rem; padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.pill-level { background: var(--grad-level); color: #06382e; margin-top: 4px; }
.pill-coin { background: var(--grad-coin); color: #3d2c00; }
.pill-coin.sm { font-size: .74rem; padding: 4px 9px; }
.pill-xp { background: rgba(108,92,231,.12); color: var(--roxo-2); }

.xp-block { margin-bottom: 16px; }
.xp-labels { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 600; font-size: .78rem; color: var(--tinta-soft); margin-bottom: 6px; }
.xp-labels b { color: var(--tinta); }
.xp-bar { height: 14px; border-radius: var(--r-pill); background: rgba(108,92,231,.12); overflow: hidden; }
.xp-bar i { display: block; height: 100%; width: var(--to); background: var(--grad-coin); border-radius: var(--r-pill); box-shadow: 0 0 10px rgba(255,181,46,.6); }

.task-list { display: grid; gap: 8px; margin-bottom: 14px; }
.task { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 15px; padding: 10px 12px; box-shadow: var(--sh-sm); }
.task-emoji { font-size: 1.15rem; }
.task-name { font-weight: 600; font-size: .86rem; flex: 1; min-width: 0; }
.task-done { opacity: .62; }
.task-done .task-name { text-decoration: line-through; }

.mission-mini { background: linear-gradient(135deg, rgba(108,92,231,.10), rgba(43,217,176,.12)); border: 1px dashed rgba(108,92,231,.28); border-radius: 16px; padding: 12px; }
.mission-mini-label { font-family: var(--font-display); font-weight: 600; font-size: .72rem; color: var(--roxo-2); letter-spacing: .04em; }
.mission-mini-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin: 3px 0 8px; }
.mission-mini-rewards { display: flex; gap: 6px; }

/* Chips flutuantes */
.orbit { position: absolute; z-index: 3; font-family: var(--font-display); font-weight: 700; box-shadow: var(--sh-md); }
.chip-xp { top: 6%; left: 2%; background: var(--roxo); color: #fff; padding: 8px 14px; border-radius: var(--r-pill); font-size: .9rem; animation: float 5s ease-in-out infinite; }
.chip-trophy { bottom: 12%; right: 0%; background: #fff; color: var(--tinta); padding: 9px 14px; border-radius: var(--r-pill); font-size: .85rem; animation: float 6s ease-in-out infinite .6s; }
.chip-emoji { display: grid; place-items: center; width: 48px; height: 48px; background: #fff; border-radius: 16px; font-size: 1.4rem; }
.chip-emoji.e1 { top: 20%; right: -2%; animation: float 5.5s ease-in-out infinite .3s; }
.chip-emoji.e2 { bottom: 4%; left: 6%; animation: float 6.5s ease-in-out infinite .9s; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }

/* ------------------------------- Seções --------------------------------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-tint { background:
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.7));
  position: relative; }
.section-tint::before { content: ""; position: absolute; inset: 0; background: #fff; opacity: .55; z-index: -1; }

.center { text-align: center; }
.eyebrow.center, .section-title.center, .section-sub.center { margin-inline: auto; }
.section-title { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; margin: 12px 0 0; }
.section-sub { color: var(--tinta-soft); max-width: 52ch; margin: 14px auto 0; font-size: 1.05rem; }
.section > .wrap > .section-title.center + .steps,
.section > .wrap > .section-title.center ~ .grid,
.section > .wrap > .section-sub + .game-grid,
.section > .wrap > .section-title.center + .faq,
.section > .wrap > .section-sub.center ~ .grid { margin-top: clamp(30px, 5vw, 48px); }

/* Passos */
.steps { list-style: none; counter-reset: step; margin: clamp(30px,5vw,48px) 0 0; padding: 0; display: grid; gap: 18px; }
.step { position: relative; background: var(--card); border-radius: var(--r-card); padding: 26px 22px 22px; box-shadow: var(--sh-sm); border: 1px solid var(--linha); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 22px; width: 34px; height: 34px; border-radius: 12px; background: var(--grad-brand); color: #fff; font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; box-shadow: var(--sh-sm); }
.step-icon { font-size: 2rem; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; font-size: 1.12rem; }
.step p { margin: 0; color: var(--tinta-soft); }

/* Grids de cards */
.grid { display: grid; gap: 18px; }
.card { background: var(--card); border-radius: var(--r-card); border: 1px solid var(--linha); box-shadow: var(--sh-sm); padding: 24px; transition: transform .18s ease, box-shadow .22s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }

.benefit-ico, .persona-ico { font-size: 1.9rem; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--fundo); margin-bottom: 14px; }
.benefit h3, .persona h3 { margin: 0 0 6px; font-size: 1.14rem; }
.benefit p, .persona p { margin: 0; color: var(--tinta-soft); }

/* Gamificação */
.game-grid { display: grid; gap: 20px; margin-top: clamp(30px,5vw,48px); }
.game-pills { display: grid; gap: 12px; }
.gpill { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--linha); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh-sm); }
.gpill-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--fundo); }
.gpill b { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.gpill small { color: var(--tinta-soft); }

.game-demo { display: grid; gap: 16px; align-content: start; }
.demo-card { padding: 22px; }
.demo-mission { background: linear-gradient(140deg, #fff, rgba(108,92,231,.06)); }
.demo-reward { background: linear-gradient(140deg, #fff, rgba(255,181,46,.10)); }
.demo-card h3 { margin: 10px 0 14px; font-size: 1.25rem; }
.demo-rewards { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-rewards .pill { font-size: .85rem; padding: 7px 13px; }
.tag { font-family: var(--font-display); font-weight: 600; font-size: .78rem; color: var(--roxo-2); background: rgba(108,92,231,.12); padding: 6px 12px; border-radius: var(--r-pill); display: inline-block; }
.tag-gold { color: var(--dourado-2); background: rgba(255,181,46,.16); }

/* Recursos */
.features { grid-template-columns: 1fr 1fr; gap: 12px; }
.feature { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--linha); border-radius: 16px; padding: 14px 16px; box-shadow: var(--sh-sm); }
.feature span { font-size: 1.4rem; flex: none; }
.feature p { margin: 0; font-weight: 600; font-size: .95rem; }

/* Depoimentos */
.quote { display: flex; flex-direction: column; gap: 16px; }
.quote blockquote { margin: 0; font-size: 1.05rem; }
.quote blockquote::before { content: "“"; font-family: var(--font-display); color: var(--menta-2); font-size: 2.4rem; line-height: 0; vertical-align: -18px; margin-right: 4px; }
.quote figcaption { display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--font-display); color: var(--tinta); margin-top: auto; }
.q-avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad-level); color: #06382e; display: grid; place-items: center; font-weight: 700; }

/* FAQ */
.faq { margin-top: clamp(28px,5vw,44px); display: grid; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--linha); border-radius: 18px; box-shadow: var(--sh-sm); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 20px; font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; color: var(--roxo); transition: transform .25s ease; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 20px 18px; color: var(--tinta-soft); }
.faq-body p { margin: 0; }

/* CTA final */
.final-cta { padding: clamp(20px,5vw,40px) 0 clamp(48px,8vw,80px); }
.final-inner { position: relative; overflow: hidden; text-align: center; background: var(--grad-brand); color: #fff; border-radius: 30px; padding: clamp(38px,7vw,64px) clamp(22px,5vw,48px); box-shadow: var(--sh-lg); }
.final-inner h2 { margin: 0 auto 14px; font-size: clamp(1.5rem,4.5vw,2.3rem); max-width: 18ch; }
.final-inner p { margin: 0 auto; color: rgba(255,255,255,.9); max-width: 46ch; }
.final-inner .btn { margin-top: 26px; }
.final-note { margin-top: 16px !important; font-size: .9rem; color: rgba(255,255,255,.82) !important; }
.final-confetti { position: absolute; inset: 0; pointer-events: none; }

/* Rodapé */
.site-footer { background: #211C33; color: #CFC9E6; padding: clamp(44px,7vw,64px) 0 28px; }
.footer-grid { display: grid; gap: 30px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 14px 0 0; color: #9E97BE; max-width: 40ch; }
.footer-col h4 { font-family: var(--font-display); color: #fff; margin: 0 0 12px; font-size: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #B7B0D4; text-decoration: none; }
.footer-col a:hover { color: var(--menta); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); font-size: .88rem; color: #8F88B0; }
.footer-bottom p { margin: 0; }

/* Páginas legais (privacidade / termos) */
.legal { }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 6px; }
.legal-meta { color: var(--tinta-soft); margin: 0 0 24px; font-size: .95rem; }
.legal h2 { font-size: 1.25rem; margin: 30px 0 8px; color: var(--roxo-2); }
.legal p { margin: 0 0 12px; }
.legal a { color: var(--roxo); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------- Responsivo --------------------------------- */
@media (min-width: 620px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-cta { display: flex; }
  .menu-toggle, .mobile-menu { display: none; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero-copy { text-align: left; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 1100px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------- Movimento reduzido ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
