:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --page-width: 480px;
  --page-padding: 20px;
  --button-height: 52px;
  --radius: 12px;
  --background: #fdfcf8;
  --foreground: #12314b;
  --muted: #607185;
  --primary: #3e9f3b;
  --primary-strong: #31822e;
  --accent: #e9f7e7;
  --border: #dce7df;
  --surface: #f3f7fb;
  --shadow: 0 8px 24px #12314b0a;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #eef2f4;
  color: var(--foreground);
  font:
    400 16px/1.6 "Manrope",
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: "Nunito", "Manrope", sans-serif;
  font-weight: 800;
  text-wrap: balance;
}
button,
input {
  font: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}
img,
video,
svg {
  display: block;
}
img,
video {
  max-width: 100%;
}
a {
  color: var(--primary-strong);
}
[hidden] {
  display: none !important;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
.site-frame {
  width: 100%;
  max-width: var(--page-width);
  min-height: 100svh;
  margin-inline: auto;
  background: var(--background);
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
.site-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-6) var(--page-padding) var(--space-8);
}
.section {
  min-width: 0;
  text-align: center;
}
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.hero-title {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.eyebrow {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-strong);
  letter-spacing: 0.6px;
}
.hero-subtitle {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 800;
}
.section-title {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}
.copy {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.text-primary {
  color: var(--primary);
}
.card,
.story-section,
.faq-section,
.share-section {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}
.section-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.icon-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary-strong);
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.button,
.donation-values button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--button-height);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}
.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px #31822e1a;
}
.button-outline {
  background: white;
  border-color: var(--primary);
  color: var(--primary-strong);
}
.button:disabled {
  opacity: 0.6;
  cursor: wait;
}
@media (hover: hover) {
  .button-primary:hover {
    background: var(--primary-strong);
  }
  .button-outline:hover,
  .donation-values button:hover {
    background: var(--accent);
  }
}
.video-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.video-section .section-title {
  font-size: 20px;
  line-height: 1.4;
}
.video-frame {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px #12314b1f;
}
.local-video {
  position: relative;
  background: black;
  aspect-ratio: 3/4;
}
.local-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.local-video-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 2px solid white;
  border-radius: 50%;
  background: #0008;
  color: white;
  cursor: pointer;
}
#doar {
  scroll-margin-top: var(--space-6);
}
.checkout-panel {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--accent);
}
.donation-checkout h3 {
  font-size: 20px;
  line-height: 1.4;
}
.donation-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-block: var(--space-4);
}
.donation-values button {
  font-size: 18px;
  background: white;
  color: var(--primary-strong);
  border-color: var(--border);
}
.donation-values button[aria-pressed="true"] {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.donation-checkout label {
  display: block;
  margin-bottom: var(--space-2);
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}
.donation-checkout input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: var(--button-height);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--foreground);
  font-size: 16px;
  line-height: 24px;
}
.donation-primary {
  margin-top: var(--space-4);
}
#donation-error:not(:empty) {
  margin-top: var(--space-4);
  color: #a12323;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
#donation-total {
  margin-top: var(--space-2);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 800;
}
#donation-qr {
  width: 110px;
  height: 110px;
  margin: var(--space-4) auto;
  object-fit: contain;
}
#donation-code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#donation-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}
#donation-status.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid #c8ddc3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: donation-loading 0.8s linear infinite;
}
#donation-new {
  margin-top: var(--space-4);
}
@keyframes donation-loading {
  to {
    transform: rotate(360deg);
  }
}
.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.impact-item {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent);
  text-align: left;
}
.impact-value {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--primary-strong);
}
.impact-copy {
  margin-top: var(--space-2);
  font-size: 14px;
  line-height: 1.5;
}
.note {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.story-section,
.share-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.story-section > .button,
.share-section > .button {
  margin-top: var(--space-2);
}
.story-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius);
}
.faq-section {
  background: var(--surface);
}
.faq-list {
  margin-top: var(--space-6);
  text-align: left;
}
.faq-item {
  border-top: 1px solid var(--border);
}
.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 64px;
  padding-block: var(--space-4);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary svg {
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq-item[open] summary svg {
  transform: rotate(180deg);
}
.faq-item p {
  padding-bottom: var(--space-4);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.share-status {
  color: var(--primary-strong);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}
.share-status:empty {
  display: none;
}
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--page-padding);
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.footer-title {
  font-weight: 800;
}
.footer-link {
  color: var(--muted);
  text-underline-offset: 3px;
}
.fixed-bottom-bar {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--page-width);
  padding: var(--space-3) var(--page-padding)
    calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #fffffff5;
  box-shadow: 0 -4px 16px #12314b0a;
}
.bottom-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.bottom-bar-label {
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}
.bottom-bar-content .button {
  width: auto;
  flex-shrink: 0;
}
@media (max-width: 359px) {
  :root {
    --page-padding: 16px;
  }
  .hero-title {
    font-size: 28px;
  }
  .section-title {
    font-size: 24px;
  }
  .card,
  .story-section,
  .faq-section,
  .share-section {
    padding: var(--space-4);
  }
  .bottom-bar-label {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.document-page {
  min-height: 100svh;
  padding: var(--space-6) var(--page-padding);
  background: var(--background);
}
.document-card {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.document-card h2 {
  font-size: 20px;
  line-height: 1.4;
  margin-top: var(--space-2);
}
.document-card p {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.document-card a.button {
  text-decoration: none;
}
.thank-you-card {
  align-items: center;
  text-align: center;
}
.local-video-toggle.is-playing {
  opacity: 0;
  pointer-events: none;
}
.local-video-toggle.is-playing:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.local-video video {
  cursor: pointer;
}

.success-check {
  color: var(--primary);
  flex-shrink: 0;
}
.success-check-circle {
  fill: var(--accent);
  stroke: currentColor;
  stroke-width: 3;
  stroke-dasharray: 227;
  stroke-dashoffset: 227;
  animation: success-check-draw 0.7s ease-out forwards;
}
.success-check-mark {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: success-check-draw 0.45s ease-out 0.55s forwards;
}
@keyframes success-check-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .success-check-circle,
  .success-check-mark {
    animation: none;
    stroke-dashoffset: 0;
  }
}
