/* ============================================
   CodeRevive — Landing page
   Tema: escuro + destaque teal/cyan
   ============================================ */

:root {
  --bg: #0c0e12;
  --bg-card: #13161d;
  --bg-elevated: #1a1e28;
  --text: #e6e8ed;
  --text-muted: #848a9a;
  --accent: #0d9488;
  --accent-hover: #14b8a6;
  --accent-soft: rgba(13, 148, 136, 0.14);
  --accent-secondary: #0891b2;
  --accent-soft-secondary: rgba(8, 145, 178, 0.12);
  --green: #10b981;
  --green-whatsapp: #25d366;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 10px;
  --radius-lg: 16px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Syne', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.4s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration) var(--ease-out), background 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-text {
  display: none;
}

@media (min-width: 480px) {
  .logo-text {
    display: inline;
  }
}

.nav {
  display: none;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1.5rem;
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--text);
}

.btn-header {
  display: none;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    margin-left: 0;
    padding: 0.75rem;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
  }

  .btn-header {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #0ea5e9);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.25);
}

.btn-whatsapp {
  background: var(--green-whatsapp);
  color: white;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 148, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: glow-pulse 8s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.5; }
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  bottom: 20%;
  left: -80px;
}

.code-float {
  position: absolute;
  bottom: 15%;
  right: 5%;
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
  opacity: 0.5;
  animation: float 6s ease-in-out infinite;
}

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

.hero-inner {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  --hero-delay: 0.1s;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 100px;
  margin-bottom: 1rem;
  animation: hero-in 0.6s var(--ease-out) 0.1s both;
}

.hero-title {
  animation: hero-in 0.6s var(--ease-out) 0.2s both;
}

.hero-sub {
  animation: hero-in 0.6s var(--ease-out) 0.35s both;
}

.hero-cta {
  animation: hero-in 0.6s var(--ease-out) 0.5s both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 1.75rem;
}

.hero-cta .btn-primary {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.hero-urgency {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: hero-in 0.7s var(--ease-out) 0.4s both;
}

.code-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 380px;
  width: 100%;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.code-window:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.code-window-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.6;
}

.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #eab308; }
.dot:nth-child(3) { background: #22c55e; }

.filename {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-preview {
  padding: 1.25rem;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 1.7;
  overflow-x: auto;
}

.code-preview .comment { color: #6b7280; }
.code-preview .keyword { color: #2dd4bf; }
.code-preview .fn { color: #22d3ee; }
.code-preview .prop { color: #fbbf24; }

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .hero-visual {
    justify-content: flex-end;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Dor */
.section-dor {
  background: var(--bg-card);
}

.pain-list {
  list-style: none;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.pain-list li:last-child {
  border-bottom: none;
}

.pain-icon {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.5rem;
}

.pain-list p {
  color: var(--text);
}

.pain-list strong {
  color: var(--text);
}

.dor-cta {
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

/* Solução */
.solution-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.solution-card:hover {
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(13, 148, 136, 0.1);
  transform: translateY(-4px);
}

.solution-icon {
  margin-bottom: 0.75rem;
}

.solution-icon-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.solution-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.solution-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (min-width: 600px) {
  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .solution-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Steps */
.steps-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.steps-list li {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.steps-list li:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
}

.steps-list h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.steps-list p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Prova */
.section-proof {
  background: var(--bg-card);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.proof-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.proof-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.proof-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tech-stack {
  text-align: center;
}

.tech-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
}

.tech-tags li {
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  border-radius: 100px;
}

@media (min-width: 600px) {
  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Diferenciais */
.diff-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
}

.diff-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--text-muted);
}

.diff-list .check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* CTA */
.section-cta {
  padding: 4rem 0 5rem;
}

.cta-box {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.cta-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-sub {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-buttons .btn {
  width: 100%;
  max-width: 280px;
  padding: 1rem 1.5rem;
}

.cta-or {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cta-trust {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Lead form */
.lead-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.lead-form.hidden,
.cta-box.hidden {
  display: none !important;
}

.lead-form h3 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.lead-form label {
  display: block;
  margin-bottom: 1rem;
}

.lead-form label span {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.lead-form input::placeholder,
.lead-form textarea::placeholder {
  color: var(--text-muted);
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.lead-form button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
}

/* FAQ */
.section-faq {
  background: var(--bg-card);
}

.faq-list {
  max-width: 640px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  padding: 1.25rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary {
  transition: color 0.2s ease;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  animation: faq-open 0.25s ease;
}

@keyframes faq-open {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  vertical-align: middle;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========== Scroll reveal (leve, GPU-friendly) ========== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.15s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.25s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(8) { transition-delay: 0.35s; }
.reveal-stagger > *:nth-child(9) { transition-delay: 0.4s; }
.reveal-stagger > *:nth-child(10) { transition-delay: 0.45s; }
.reveal-stagger > *:nth-child(11) { transition-delay: 0.5s; }
.reveal-stagger > *:nth-child(12) { transition-delay: 0.55s; }

/* Proof cards hover */
.proof-card {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.2s ease;
}

.proof-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  border-color: rgba(13, 148, 136, 0.25);
}

/* CTA box hover */
.cta-box {
  transition: box-shadow 0.35s ease, transform 0.35s var(--ease-out);
}

.cta-box:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(13, 148, 136, 0.12);
}

/* Pain list item hover */
.pain-list li {
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.pain-list li:hover {
  background: rgba(13, 148, 136, 0.06);
  padding-left: 0.5rem;
}
