:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #11234a;
  --text-soft: #6e7d9e;
  --line: #dbe2ef;
  --green: #1eb14b;
  --green-strong: #16a243;
  --green-soft: #7edb52;
  --heart: #f52f60;
  --shadow: 0 12px 40px rgba(35, 53, 88, 0.14);
  --radius-card: 22px;
  --radius-pill: 999px;
  --max-width: 650px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(30, 177, 75, 0.05), transparent 22%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top-header,
.main {
  width: min(calc(100% - 24px), var(--max-width));
  margin-left: auto;
  margin-right: auto;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 10px;
}

.brand,
.modal__brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 42px;
  color: var(--green-soft);
  font-size: 2.6rem;
  line-height: 1;
  transform: translateY(-1px);
}

.brand__text {
  display: flex;
  flex-direction: column;
  color: #47c95a;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.brand__line {
  display: block;
  font-size: 1.08rem;
}

.header-icons {
  display: flex;
  gap: 10px;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: var(--green);
  background: transparent;
}

.header-icon-btn:hover {
  background: rgba(30, 177, 75, 0.08);
}

.main {
  padding-bottom: 30px;
}

.campaign-card,
.story-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.campaign-card {
  overflow: hidden;
}

.banner__frame {
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.banner__img {
  width: 100%;
  height: auto;
}

.campaign-card__body {
  padding: 18px 20px 24px;
}

.campaign-head {
  margin-bottom: 16px;
}

.campaign-title {
  margin: 0;
  font-size: clamp(1.42rem, 6vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #0f2047;
}

.progress-section__raised {
  margin: 0 0 2px;
  color: #12a84d;
  font-size: clamp(2rem, 8vw, 2.55rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.progress-section__meta,
.progress-section__footer {
  margin: 0;
  color: #93a0ba;
  font-size: 0.88rem;
}

.progress-bar {
  overflow: hidden;
  height: 10px;
  margin: 15px 0 10px;
  border-radius: var(--radius-pill);
  background: #dce3ee;
}

.progress-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #19b44e, #2ebc58);
}

.progress-section__percent {
  color: #17ab49;
  font-weight: 700;
}

.story {
  margin-top: 18px;
}

.story-card {
  padding: 24px 18px 90px;
}

.story__content h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.story__meta {
  margin-bottom: 14px;
}

.story__meta p {
  margin: 0 0 10px;
  color: #5d6f93;
  font-size: 0.96rem;
}

.story__meta span,
.story__meta time {
  color: #14ab47;
  font-weight: 700;
}

.story__article {
  color: #576784;
  font-size: 0.95rem;
  line-height: 1.75;
}

.story__article h3 {
  margin: 0 0 10px;
  color: #0f2047;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.45;
}

.story__article p,
.story__article ul {
  margin: 0 0 18px;
}

.story__article strong {
  color: #3f506f;
}

.story__article hr {
  margin: 14px 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
}

.story__article ul {
  padding-left: 1.4rem;
}

.story__article li + li {
  margin-top: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px 0;
  color: #8997b3;
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.site-footer__brand {
  color: #b24735;
  font-weight: 700;
}

.cta-spacer {
  height: 90px;
}

.cta-fade {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246, 248, 252, 0), rgba(246, 248, 252, 0.9) 60%, rgba(246, 248, 252, 1));
}

.cta-fixed {
  position: fixed;
  right: 0;
  bottom: 10px;
  left: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 12px;
}

.btn-cta {
  width: min(calc(100% - 12px), var(--max-width));
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(30, 177, 75, 0.24);
}

.btn-cta:hover {
  background: var(--green-strong);
}

.modal[hidden],
.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 32, 71, 0.18);
  backdrop-filter: blur(4px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: grid;
  place-items: center;
  padding: 8px;
}

.modal__inner {
  width: min(calc(100% - 10px), 390px);
  border-radius: 22px;
  padding: 48px 22px 18px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(18, 31, 54, 0.18);
  position: relative;
}

.modal__close {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #10224b;
  background: #f1f5fb;
  font-size: 1.6rem;
}

.modal__brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal__mark {
  font-size: 2.2rem;
}

.modal__brand-text .brand__line {
  font-size: 1rem;
}

.modal__brand-lockup {
  justify-content: center;
  margin-bottom: 12px;
}

.modal__title {
  margin: 0;
  color: #1eb14b;
  font-size: 0.94rem;
  line-height: 1.4;
  font-weight: 700;
}

.donation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 10px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.donation-item {
  margin: 0;
}

.donation-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 10px;
  border: 2px solid #9fdfb1;
  border-radius: 14px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  background: #ebf7ee;
}

.donation-btn:hover {
  background: #def3e3;
}

.checkout-preview {
  position: fixed;
  inset: 0;
  z-index: 42;
  background: #f3f5f9;
  overflow: auto;
}

.checkout-preview[hidden] {
  display: none;
}

.checkout-preview__topbar {
  min-height: 46px;
  padding: 12px 18px;
  color: #fff;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  background: #26c35a;
}

.checkout-preview__viewport {
  width: min(calc(100% - 28px), 420px);
  margin: 46px auto 30px;
}

.checkout-preview__card {
  position: relative;
  padding: 18px 28px 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(34, 53, 87, 0.12);
}

.checkout-preview__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: #22334f;
  background: #f2f5fb;
  font-size: 1.55rem;
}

.checkout-preview__hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 18px;
  border-radius: 16px;
  height: 86px;
  background: linear-gradient(135deg, #1fb54d, #8bd94d);
}

.checkout-preview__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.88);
}

.checkout-preview__hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(13, 30, 20, 0.58), rgba(13, 30, 20, 0.18));
}

.checkout-preview__hero-chip {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0e4120;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
}

.checkout-preview__hero-title {
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.checkout-preview__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
}

.checkout-preview__brand-mark {
  width: 46px;
  height: 40px;
  font-size: 2.4rem;
}

.checkout-preview__brand-text .brand__line {
  font-size: 1.18rem;
}

.checkout-preview__title,
.checkout-preview__subtitle,
.checkout-preview__amount,
.checkout-preview__copy,
.checkout-preview__status {
  margin: 0;
  text-align: center;
}

.checkout-preview__title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #111;
}

.checkout-preview__subtitle {
  margin-top: 6px;
  color: #8b96aa;
}

.checkout-preview__amount {
  margin-top: 18px;
  font-size: 1rem;
  color: #2b3548;
}

.checkout-preview__amount strong {
  color: #18a94a;
}

.checkout-preview__status {
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.checkout-preview__status[data-state="loading"] {
  color: #6f7f9c;
}

.checkout-preview__status[data-state="pending"] {
  color: #d08b14;
}

.checkout-preview__status[data-state="success"] {
  color: #18a94a;
}

.checkout-preview__status[data-state="error"] {
  color: #cf334e;
}

.checkout-preview__copy {
  margin-top: 22px;
  color: #33425d;
  line-height: 1.55;
}

.checkout-preview__loading,
.checkout-preview__payment {
  width: 100%;
}

.checkout-preview__loading[hidden],
.checkout-preview__payment[hidden] {
  display: none !important;
}

.checkout-preview__loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-top: 24px;
  color: #6f7f9c;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  animation: checkout-fade 0.22s ease both;
}

.checkout-preview__payment {
  animation: checkout-fade 0.22s ease both;
}

.checkout-preview__loading p {
  margin: 14px 0 0;
}

.checkout-preview__spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #e6edf6;
  border-top-color: #18b94e;
  border-radius: 50%;
  animation: checkout-spin 0.8s linear infinite;
}

@keyframes checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes checkout-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-preview__qr-frame {
  display: grid;
  place-items: center;
  width: 166px;
  height: 166px;
  margin: 20px auto 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e8edf5, 0 8px 18px rgba(32, 49, 82, 0.08);
  overflow: hidden;
}

.checkout-preview__qr-image[hidden] {
  display: none !important;
}

.checkout-preview__qr-image {
  width: 134px;
  height: 134px;
  object-fit: contain;
}

.checkout-preview__or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 16px;
  color: #8a96ab;
  font-size: 0.92rem;
}

.checkout-preview__or::before,
.checkout-preview__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dfe6f1;
}

.checkout-preview__pix-input {
  width: 100%;
  border: 1px solid #e0e6f0;
  border-radius: 12px;
  padding: 15px 12px;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #25324a;
  background: #fff;
  resize: none;
  word-break: break-all;
}

.checkout-preview__pix-button {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  background: #15c957;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkout-preview__pix-button.is-copied {
  background: #11ad4b;
  box-shadow: 0 12px 26px rgba(21, 201, 87, 0.28);
  animation: copy-pulse 0.44s ease both;
}

.checkout-preview__copy-feedback {
  margin: 10px 0 0;
  color: #16a243;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  animation: checkout-fade 0.22s ease both;
}

.checkout-preview__copy-feedback[hidden] {
  display: none !important;
}

@keyframes copy-pulse {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

.checkout-preview__secondary-link {
  display: block;
  margin-top: 12px;
  color: #1aa94a;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.checkout-preview__help {
  margin-top: 28px;
  padding: 18px 16px;
  border-radius: 16px;
  background: #f4f6fa;
}

.checkout-preview__help h3 {
  margin: 0 0 14px;
  color: #111;
  text-align: center;
  font-size: 1rem;
}

.checkout-preview__help-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checkout-preview__help-row + .checkout-preview__help-row {
  margin-top: 12px;
}

.checkout-preview__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 34px;
  color: #4e5a70;
  background: #e4e9f1;
  font-size: 1.4rem;
  line-height: 1;
}

.checkout-preview__help p {
  margin: 0;
  color: #35425c;
  line-height: 1.55;
}

.btn-cta:focus-visible,
.donation-btn:focus-visible,
.header-icon-btn:focus-visible,
.modal__close:focus-visible,
.checkout-preview__close:focus-visible,
.checkout-preview__pix-button:focus-visible,
.checkout-preview__secondary-link:focus-visible {
  outline: 3px solid rgba(30, 177, 75, 0.26);
  outline-offset: 2px;
}

@media (max-width: 460px) {
  .campaign-card__body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .story-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .checkout-preview__viewport {
    width: calc(100% - 20px);
    margin-top: 22px;
  }

  .checkout-preview__card {
    padding-left: 18px;
    padding-right: 18px;
  }

}
