.hero { padding: 64px 0 28px; }
.hero-centered { text-align: center; max-width: 760px; margin-inline: auto; }
.hero-centered .eyebrow { margin-bottom: 18px; }
.hero-copy h1, .hero-centered h1 { font-size: clamp(2.55rem, 7vw, 4.9rem); line-height: 1.02; letter-spacing: -.052em; margin: 0 0 18px; font-weight: 730; }
.hero-copy p, .hero-centered p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); max-width: 650px; }
.hero-centered p { margin-inline: auto; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 25px; }
.hero-centered .hero-actions { justify-content: center; }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.hero-trust span::before { content: "✓"; color: var(--primary); font-weight: 800; margin-right: 6px; }
.hero-demo {
  padding: 22px;
  max-width: 480px;
  margin: 34px auto 0;
  box-shadow: var(--shadow);
}
.demo-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.demo-row { display: flex; gap: 9px; align-items: center; justify-content: space-between; padding: 11px 13px; background: var(--surface-2); border: 1px solid transparent; border-radius: 11px; margin-bottom: 8px; }
.demo-row.good { color: var(--text); }
.demo-row.good span:last-child { color: var(--success); font-weight: 800; }
.demo-row.bad { opacity: .48; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; max-width: 620px; margin: 0 auto; }
.stat-card { padding: 18px 14px; height: 100%; text-align: center; box-shadow: none; }
.stat-number { font-size: 1.65rem; font-weight: 760; letter-spacing: -.03em; }
.feature-card { padding: 22px; height: 100%; box-shadow: none; }
.learn-grid { display: grid; gap: 14px; }
.learn-item { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.article-wrap { width: min(100% - 28px, 860px); margin-inline: auto; }
.article-wrap h2 { margin-top: 34px; color: var(--text); }
.article-wrap h3 { margin-top: 28px; }
.article-wrap p, .article-wrap li { color: #59645d; }
.cheat-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.cheat-table td { padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cheat-table td:first-child { width: 30%; border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; color: var(--primary); font-family: var(--font-mono); font-weight: 760; }
.cheat-table td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; color: var(--muted); }
.playground-output mark { background: #cfead9; color: #173524; border-radius: 4px; padding: 0 2px; }
.home-section-head { max-width: 690px; margin-bottom: 26px; }
.home-section-head p { color: var(--muted); margin-bottom: 0; }
.cta-panel { padding: 34px 22px; text-align: center; }
.cta-panel p { max-width: 650px; margin-inline: auto; }

/* Retention-first home: self-typing product demo + hook question */
.home-retention .retention-hero { padding: 52px 0 30px; overflow: hidden; }
.retention-hero-grid { display: grid; gap: 32px; align-items: center; }
.retention-copy { min-width: 0; }
.retention-copy .eyebrow { margin-bottom: 18px; }
.retention-copy h1 { font-size: clamp(2.55rem, 6.4vw, 4.65rem); line-height: 1.02; letter-spacing: -.052em; margin: 0 0 18px; font-weight: 740; }
.retention-copy > p { color: var(--muted); font-size: clamp(1rem, 1.9vw, 1.12rem); max-width: 610px; margin: 0; }
.retention-copy .hero-actions { justify-content: flex-start; }
.retention-copy .hero-trust { justify-content: flex-start; }
.retention-cta { position: relative; overflow: hidden; isolation: isolate; }
.retention-cta::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.16); transform: translateX(-110%) skewX(-18deg); transition: transform .42s ease; z-index: -1; }
.retention-cta:hover::after, .retention-cta:focus-visible::after { transform: translateX(110%) skewX(-18deg); }
.retention-cta-primary { box-shadow: 0 10px 24px rgba(47,125,91,.18); }
.retention-cta-primary:hover, .retention-cta-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(47,125,91,.24); }

.hook-question { margin-top: 24px; max-width: 610px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 17px 18px; border: 1px solid #c9e2d3; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(240,247,242,.92)); box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.hook-question:hover, .hook-question:focus-visible { transform: translateY(-2px); border-color: #9fc8ad; box-shadow: 0 12px 28px rgba(31,50,38,.10); }
.hook-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 1.45rem; font-weight: 800; }
.hook-copy { display: grid; gap: 2px; min-width: 0; }
.hook-copy strong { font-size: 1rem; line-height: 1.35; }
.hook-copy span { color: var(--muted); font-size: .89rem; line-height: 1.45; }
.hook-arrow { color: var(--primary); font-size: 1.3rem; font-weight: 800; transition: transform .18s ease; }
.hook-question:hover .hook-arrow { transform: translateX(3px); }

.live-demo { padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.live-demo-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.live-label { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 790; font-size: .78rem; letter-spacing: .055em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(47,125,91,.24); animation: demoLivePulse 2s ease-out infinite; }
.live-demo-field { border: 1px solid var(--border); background: var(--surface-2); border-radius: 14px; padding: 14px; }
.live-demo-label { display: block; font-size: .84rem; font-weight: 710; margin-bottom: 8px; }
.demo-regex-box { min-height: 51px; display: flex; align-items: center; overflow-x: auto; white-space: nowrap; padding: 12px 13px; background: var(--code-bg); color: var(--code-text); border: 1px solid #334139; border-radius: 10px; font-family: var(--font-mono); font-size: .79rem; scrollbar-width: thin; }
.demo-regex-box #typingRegex { color: #dff3e7; }
.demo-regex-box .regex-slash { color: #8fb6a0; }
.typing-caret { width: 2px; height: 1.15em; background: #eff8f1; margin: 0 2px; flex: 0 0 auto; animation: demoCaretBlink 1s step-end infinite; }
.typing-status-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .76rem; margin-top: 9px; }
.typing-progress { height: 3px; border-radius: 999px; overflow: hidden; background: #dfe8e1; margin-top: 7px; }
.typing-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .1s linear; }
.demo-test-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 10px; font-size: .87rem; }
.demo-test-head > span { color: var(--muted); font-size: .76rem; }
.live-results { display: grid; gap: 7px; }
.live-result { opacity: .28; transform: translateY(5px) scale(.985); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); transition: opacity .3s ease, transform .3s ease, background .3s ease, border-color .3s ease; }
.live-result code { min-width: 0; overflow-wrap: anywhere; word-break: break-word; color: var(--text); font-size: .78rem; }
.live-result .result-state { flex: 0 0 auto; font-size: .76rem; font-weight: 760; }
.live-result.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.live-result.is-match { background: #eef8f1; border-color: #c7e4d1; }
.live-result.is-match .result-state { color: var(--success); }
.live-result.is-reject { background: #fcf1f0; border-color: #efcfcc; }
.live-result.is-reject .result-state { color: var(--danger); }
.live-demo-footer { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.live-demo-footer > div { display: grid; gap: 1px; }
.live-demo-footer strong { font-size: .82rem; }
.live-demo-footer span { color: var(--muted); font-size: .75rem; }
.demo-replay { min-height: 38px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); padding: 7px 12px; font-size: .78rem; font-weight: 720; transition: background .18s ease, transform .18s ease; }
.demo-replay:hover, .demo-replay:focus-visible { background: var(--surface-3); transform: translateY(-1px); }

.retention-steps { padding: 16px 0 8px; }
.step-strip { display: grid; gap: 10px; }
.step-card { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; padding: 16px; box-shadow: var(--shadow-sm); }
.step-card h3 { font-size: 1rem; margin: 0 0 2px; }
.step-card p { color: var(--muted); font-size: .86rem; line-height: 1.45; margin: 0; }
.step-connector { display: none; color: var(--primary); text-align: center; font-weight: 800; }
.retention-stats { padding-top: 26px; padding-bottom: 34px; }
.retention-final-cta { border-color: #cde2d4; }

@keyframes demoCaretBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes demoLivePulse { 0% { box-shadow: 0 0 0 0 rgba(47,125,91,.30); } 70% { box-shadow: 0 0 0 8px rgba(47,125,91,0); } 100% { box-shadow: 0 0 0 0 rgba(47,125,91,0); } }
@keyframes heroReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes siteSectionReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.hero-reveal { opacity: 0; animation: heroReveal .55s ease forwards; }
.hero-reveal-1 { animation-delay: .06s; }
.hero-reveal-2 { animation-delay: .12s; }
.hero-reveal-3 { animation-delay: .18s; }
.hero-reveal-4 { animation-delay: .25s; }
.hero-reveal-5 { animation-delay: .32s; }
.hero-reveal-6 { animation-delay: .39s; }

/* Small, consistent motion language on the remaining screens without redesigning them. */
body:not(.home-retention) main > section { animation: siteSectionReveal .38s ease both; }
body:not(.home-retention) .btn-game:hover, body:not(.home-retention) .btn-game:focus-visible { box-shadow: 0 9px 22px rgba(47,125,91,.14); }

@media (prefers-reduced-motion: reduce) {
  .hero-reveal, body:not(.home-retention) main > section { opacity: 1; animation: none !important; transform: none !important; }
  .live-dot, .typing-caret { animation: none !important; }
  .retention-cta::after { display: none; }
  .live-result { transition: none; }
}

/* === Voltar hero ao formato centralizado (mantendo as animações) === */
.home-retention .retention-hero-grid {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}
.home-retention .retention-copy {
  text-align: center;
}
.home-retention .retention-copy > p {
  margin-inline: auto;
}
.home-retention .retention-copy .hero-actions,
.home-retention .retention-copy .hero-trust {
  justify-content: center;
}
.home-retention .hook-question {
  margin-inline: auto;
  text-align: left;
}
.home-retention .live-demo {
  max-width: 460px;
  margin: 30px auto 0;
  width: 100%;
}
