*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: hsl(30, 15%, 97%);
  --fg: hsl(20, 10%, 10%);
  --card: hsl(30, 20%, 95%);
  --primary: hsl(15, 80%, 45%);
  --primary-fg: hsl(0, 0%, 100%);
  --secondary: hsl(200, 60%, 30%);
  --muted: hsl(30, 10%, 90%);
  --muted-fg: hsl(20, 5%, 45%);
  --accent: hsl(45, 90%, 55%);
  --border: hsl(30, 15%, 85%);
  --destructive: hsl(0, 84%, 60%);
  --success: hsl(145, 60%, 40%);
  --radius: 0.75rem;
  --font-display: 'IBM Plex Serif', serif;
--font-body: 'IBM Plex Sans', sans-serif;

}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

/* === BARRA DE PROGRESSO === */
.donation-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: hsla(20,10%,10%,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
}

.donation-bar-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.donation-bar-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
}

.donation-bar-raised {
  color: #fff;
  font-weight: 600;
}

.donation-bar-raised span {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

.donation-bar-goal {
  color: hsla(0,0%,100%,0.5);
  font-size: 0.75rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: hsla(0,0%,100%,0.15);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, hsl(15, 80%, 45%) 0%, hsl(45, 90%, 55%) 50%, hsl(15, 80%, 45%) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  transition: width 0.7s ease-out;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsla(20,10%,10%,0.7) 0%, hsla(20,10%,10%,0.4) 50%, hsla(20,10%,10%,0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  text-align: center;
  padding: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsla(15,80%,45%,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid hsla(15,80%,45%,0.3);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsla(0,0%,100%,0.9);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--destructive);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, hsl(0,0%,100%) 0%, hsl(45,90%,70%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: hsla(0,0%,100%,0.8);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--bg), transparent);
}

/* === BUTTONS === */
.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px hsla(15,80%,45%,0.4);
  font-family: var(--font-body);
}

.btn-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px hsla(15,80%,45%,0.5);
}

.btn-donate:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-full { width: 100%; justify-content: center; }

.btn-payment-done {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--success);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px hsla(145,60%,40%,0.3);
  font-family: var(--font-body);
  margin-top: 0.75rem;
}

.btn-payment-done:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px hsla(145,60%,40%,0.4);
}

/* === SECTIONS === */
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted-fg);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* === IMPACT === */
.impact { padding: 5rem 1rem; background: var(--card); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, hsla(20,10%,10%,0.8), transparent);
}

.gallery-caption p {
  color: var(--primary-fg);
  font-weight: 600;
  font-size: 1.125rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label { color: var(--muted-fg); font-weight: 500; }

/* === TESTIMONIALS === */
.testimonials { padding: 5rem 1rem; background: var(--bg); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: hsla(30,15%,97%,0.8);
  backdrop-filter: blur(12px);
  border: 1px solid hsla(30,15%,85%,0.5);
  border-radius: 1rem;
  padding: 1.5rem;
}

.quote-icon {
  color: hsla(15,80%,45%,0.3);
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial-author strong { display: block; }
.testimonial-author span { font-size: 0.875rem; color: var(--muted-fg); }

/* === DONATION === */
.donation { padding: 5rem 1rem; background: var(--card); }

.donation-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.donation-icon {
  color: var(--primary);
  margin: 0 auto 1.5rem;
  display: block;
}

.amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.amount-chip {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.amount-chip:hover { border-color: var(--primary); }

.amount-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-fg);
}

.custom-amount { margin-bottom: 2rem; text-align: left; }
.custom-amount label { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.5rem; display: block; }

.input-wrapper { position: relative; }

.input-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  font-weight: 600;
}

.input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.input-wrapper input:focus { border-color: var(--primary); }

.error-msg {
  color: var(--destructive);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.disclaimer {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 1rem;
}

/* === CHECKOUT === */
.checkout { padding: 5rem 1rem; background: var(--card); }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--muted-fg);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--fg); }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading p { color: var(--muted-fg); }

.pix-error { padding: 2rem 0; }
.pix-error p { color: var(--destructive); font-weight: 500; margin-bottom: 1rem; }

.qr-container {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.qr-container img { width: 224px; height: 224px; display: block; }

.copypaste-container { margin-bottom: 1.5rem; text-align: left; }
.copypaste-container label { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.5rem; display: block; }

.textarea-wrapper { position: relative; }

.textarea-wrapper textarea {
  width: 100%;
  height: 96px;
  padding: 1rem;
  padding-right: 3.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-size: 0.75rem;
  font-family: monospace;
  resize: none;
  outline: none;
}

.copy-btn-inline {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.copy-btn-inline:hover { opacity: 0.9; }

/* === AGRADECIMENTO === */
.thank-you {
  min-height: 60vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  background: var(--card);
}

.thank-you-box {
  max-width: 520px;
  text-align: center;
}

.thank-you-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: hsla(145,60%,40%,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.thank-you-icon svg {
  color: var(--success);
}

.thank-you h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.thank-you p {
  color: var(--muted-fg);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* === FOOTER === */
.footer {
  padding: 3rem 1rem;
  background: var(--fg);
  color: var(--bg);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-brand svg { color: var(--primary); }

.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-text {
  color: hsla(30,15%,97%,0.6);
  font-size: 0.875rem;
  max-width: 420px;
  margin: 0 auto;
}

.footer-copy {
  color: hsla(30,15%,97%,0.4);
  font-size: 0.75rem;
  margin-top: 1.5rem;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 40px hsla(0,0%,0%,0.3);
  z-index: 9999;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .amounts-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stats-grid { gap: 0.5rem; }
  .gallery-item img { height: 240px; }
}
