@font-face {
  font-family: "Montserrat";
  src: url("/wesley/fonts/montserrat.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --primary: #224862;
  --primary-dark: #1a3a4d;
  --bg-main: #f6f6f4;
  --bg-card: #fdfdfb;
  --bg-muted: #eef3f6;
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --text-muted: #7c8591;
  --border-color: #dfe5ea;
  --accent: #22c55e;
  --error: #b42318;
  --shadow-soft: 0 10px 30px rgba(20, 35, 45, 0.08);
  --shadow-strong: 0 18px 48px rgba(20, 35, 45, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 72, 98, 0.08), transparent 34%),
    linear-gradient(180deg, #fafaf8 0%, var(--bg-main) 100%);
  color: var(--text-primary);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

strong {
  color: var(--text-primary);
}

.campaign-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(34, 72, 98, 0.08);
  background: rgba(253, 253, 251, 0.94);
  backdrop-filter: blur(16px);
}

.campaign-header__inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-logo {
  width: min(220px, 68vw);
  height: auto;
}

.campaign-shell {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1rem 7.5rem;
}

.campaign-card {
  margin-bottom: 1rem;
  padding: 1.35rem;
  border: 1px solid rgba(34, 72, 98, 0.08);
  border-radius: 1.35rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.campaign-card--hero {
  padding: 1.5rem 1.35rem 1.25rem;
}

.campaign-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.55rem);
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.03em;
}

.campaign-subtitle {
  margin: 1rem auto 0;
  max-width: 32rem;
  font-size: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

.hero-media,
.story-media {
  overflow: hidden;
  border-radius: 1.1rem;
  background: #dfe7ec;
}

.hero-media {
  margin-top: 1.25rem;
  box-shadow: var(--shadow-strong);
}

.hero-media img {
  width: 100%;
  max-height: 23rem;
  object-fit: cover;
  object-position: center top;
}

.progress-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.progress-head__label {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.progress-head__amount {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.05;
}

.progress-head__goal {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebef;
}

.progress-bar__fill {
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #2f6b91 100%);
  transition: transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-bar.animated .progress-bar__fill {
  transform: scaleX(1);
}

.progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-foot strong {
  font-size: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.95rem 1.2rem;
  border: none;
  border-radius: 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 24px rgba(34, 72, 98, 0.2);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.cta-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(34, 72, 98, 0.26);
}

.cta-button--compact {
  min-height: 3.2rem;
  font-size: 0.9rem;
}

.section-title {
  margin: 0 0 0.7rem;
  font-size: 1.3rem;
  line-height: 1.2;
}

.section-subtitle {
  margin: 0 0 1.15rem;
  color: var(--text-secondary);
}

.story-block + .story-block {
  margin-top: 1.6rem;
}

.story-heading {
  margin: 0 0 0.8rem;
  font-size: 1.18rem;
  line-height: 1.25;
}

.story-copy p,
.final-copy p {
  margin: 0 0 0.95rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.story-copy p:last-child,
.final-copy p:last-child {
  margin-bottom: 0;
}

.story-media {
  margin-top: 1rem;
  box-shadow: var(--shadow-soft);
}

.story-media img {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  object-position: center;
}

.story-media--bw img {
  filter: grayscale(1);
}

.story-quote {
  margin-top: 1.4rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 1rem 1rem 0;
  background: var(--bg-muted);
}

.story-quote p {
  margin: 0;
  color: var(--text-secondary);
  font-style: italic;
}

.story-quote cite {
  display: block;
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.9rem;
}

.donation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.donation-button {
  width: 100%;
  padding: 1rem 0.85rem;
  border: 2px solid var(--primary);
  border-radius: 1rem;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.donation-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.most-chosen-wrapper {
  position: relative;
}

.most-chosen-tag {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 8px 14px rgba(34, 197, 94, 0.18);
}

.custom-donation {
  margin-top: 1rem;
}

.custom-donation-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.94rem;
  font-weight: 700;
}

.custom-donation-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.custom-donation-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(34, 72, 98, 0.09);
}

.custom-donation-field.has-error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.custom-donation-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 1rem;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-weight: 700;
}

.custom-donation-input {
  flex: 1;
  min-width: 0;
  height: 3.35rem;
  padding: 0 1rem;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 700;
}

.custom-donation-input::-webkit-outer-spin-button,
.custom-donation-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-donation-hint,
.custom-donation-error,
.donation-feedback {
  min-height: 1.1rem;
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}

.custom-donation-hint {
  color: var(--text-muted);
}

.custom-donation-error,
.donation-feedback.is-error {
  color: var(--error);
}

.donation-feedback.is-success {
  color: var(--primary);
}

.custom-donation-submit {
  margin-top: 0.7rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  display: flex;
  gap: 0.8rem;
}

.comment-avatar {
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 2.8rem;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(20, 35, 45, 0.12);
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
}

.comment-bubble {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--bg-main);
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.35rem;
}

.comment-name {
  font-size: 0.95rem;
  font-weight: 800;
}

.comment-time {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.comment-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0 0.25rem;
}

.comment-actions {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.comment-reactions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.comment-reactions svg {
  width: 0.9rem;
  height: 0.9rem;
  color: #ef4444;
  fill: currentColor;
}

.sticky-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  border-top: 1px solid rgba(34, 72, 98, 0.1);
  background: rgba(253, 253, 251, 0.96);
  box-shadow: 0 -18px 48px rgba(20, 35, 45, 0.12);
  backdrop-filter: blur(20px);
}

.sticky-bar__inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
}

.sticky-progress {
  margin-bottom: 0.7rem;
}

.sticky-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sticky-progress__amount {
  font-weight: 800;
  color: var(--primary);
}

.sticky-progress__bar {
  width: 100%;
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebef;
}

.sticky-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #2f6b91 100%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 20, 0.72);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.4rem;
  border-radius: 1.4rem;
  background: var(--bg-card);
  box-shadow: 0 20px 54px rgba(10, 16, 20, 0.26);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  border-radius: 999px;
  background: #e6ebef;
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
}

.modal-status {
  margin: 0 0 0.3rem;
  padding-right: 2rem;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.modal-status.blink {
  animation: blink 1.6s ease-in-out infinite;
}

.modal-status.is-approved {
  color: #138a36;
}

.modal-status.is-error,
.modal-status.is-expired {
  color: var(--error);
}

.modal-subtitle {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
}

.modal-amount {
  margin: 0.2rem 0 1rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
}

.modal-meta {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  word-break: break-word;
}

.modal-recipient {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.qrcode {
  min-height: 17rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--bg-main);
}

.qrcode img {
  width: min(100%, 17rem);
  height: auto;
}

.pix-text-wrap {
  display: flex;
  gap: 0.6rem;
}

#modal-pix-text {
  width: 100%;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  background: #fff;
  color: var(--text-secondary);
}

.primary-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-row {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
}

.timer {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-weight: 800;
}

.pix-instructions {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.pix-instructions ol {
  margin: 0;
  padding-left: 1.2rem;
}

.pix-instructions li + li {
  margin-top: 0.4rem;
}

.modal-success {
  display: none;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #138a36 0%, #22c55e 100%);
  color: #fff;
  text-align: center;
  font-weight: 800;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .campaign-shell {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .campaign-card,
  .campaign-card--hero,
  .modal-panel {
    padding: 1.1rem;
  }

  .progress-head,
  .progress-foot,
  .sticky-progress__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-head__goal {
    text-align: left;
  }

  .comment-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-button,
  .primary-copy {
    font-size: 0.88rem;
  }

  .donation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .donation-button {
    padding: 0.95rem 0.55rem;
    font-size: 0.92rem;
  }

  .most-chosen-tag {
    font-size: 0.58rem;
    padding: 0.16rem 0.55rem;
  }
}
