/* Apóyanos: la postal del atardecer, la boleta de aporte, la meta y el diálogo de pago (simulado). */

.site-header a[aria-current=page] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.page-apoyar .site-header {
  background: #fff4de;
  border-bottom: 1px solid #d8ae86;
}

.support-postcard {
  --post-ink: #452921;
  --post-muted: #6b4c3e;
  --post-accent: #883d39;
  --post-deep: #672925;
  --post-paper: #fff5e1;
  color: var(--post-ink);
  background: radial-gradient(ellipse at 18% 0%, #ffeac0 5%, transparent 58%), repeating-linear-gradient(3deg, #9865460d 0 1px, transparent 2px 37px), linear-gradient(135deg, #edbc90, #e8ad91 55%, #d9967b);
  overflow: clip;
}

.postcard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(34px, 6vw, 88px);
  width: min(1130px, calc(100% - 100px));
  min-height: min(670px, calc(100svh - 104px));
  padding-block: clamp(40px, 5vw, 70px);
}

.postcard-back {
  display: inline-block;
  margin-bottom: clamp(16px, 2vw, 27px);
  color: #64382d;
  font-size: .94rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: #834e3e7d;
  text-underline-offset: 4px;
}

.postcard-back:hover {
  text-decoration-color: currentColor;
}

.postcard-intro h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 6.15vw, 6.1rem);
  line-height: .94;
  letter-spacing: -.068em;
}

.postcard-intro h1 em {
  display: block;
  color: var(--post-accent);
  font-style: normal;
}

.postcard-intro p {
  margin-top: 15px;
  max-width: 37ch;
  color: #55362b;
  font-size: clamp(1rem, 1.6vw, 1.23rem);
  line-height: 1.45;
}

.postcard-art {
  position: relative;
  isolation: isolate;
  width: min(100%, 514px);
  aspect-ratio: 2.02;
  margin: 31px 0 7px;
  overflow: hidden;
  border: clamp(5px, .75vw, 10px) solid #fff3d8;
  border-radius: 8px;
  outline: 1px solid #a8654e73;
  background: linear-gradient(168deg, #aa6681, #e99691 44%, #ffc58c 81%);
  box-shadow: 6px 9px 0 #9b5e4942, 0 14px 28px #7345342b;
  transform: rotate(-3deg);
}

.postcard-art::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 5px;
  border: 1px solid #fff3d879;
  border-radius: 2px;
  pointer-events: none;
}

.postcard-sun {
  position: absolute;
  top: 12%;
  left: 37%;
  width: 27%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe5a6;
  box-shadow: 0 0 30px 7px #ffd69383;
}

.postcard-mountains {
  position: absolute;
  inset: auto -2% 0;
  height: 69%;
}

.mountains-far {
  background: linear-gradient(#cb8582, #aa646e);
  clip-path: polygon(0 32%, 9% 28%, 17% 9%, 26% 31%, 35% 51%, 44% 37%, 58% 62%, 70% 26%, 81% 5%, 93% 31%, 100% 20%, 100% 100%, 0 100%);
}

.mountains-near {
  height: 52%;
  background: linear-gradient(#90546a, #704554);
  clip-path: polygon(0 16%, 12% 29%, 27% 49%, 38% 46%, 51% 69%, 67% 44%, 80% 55%, 91% 21%, 100% 11%, 100% 100%, 0 100%);
}

.postcard-ledge {
  position: absolute;
  z-index: 2;
  inset: 75% -2% 0;
  background: linear-gradient(#f1b77c 4%, transparent 5%), repeating-linear-gradient(5deg, #70423112 0 1px, transparent 2px 10px), linear-gradient(#ca8b62, #a56149);
  border-top: 2px solid #8a5346;
  box-shadow: 0 4px 8px #5d353250;
}

.postcard-art img {
  position: absolute;
  width: 31%;
  height: auto;
  filter: drop-shadow(2px 4px 0 #5c333453);
  transition: transform .55s cubic-bezier(.24,.75,.28,1.3);
}

.postcard-moka {
  left: 12%;
  bottom: 9%;
  transform: translateY(23%) rotate(-8deg);
}

.postcard-nata {
  right: 10%;
  bottom: 10%;
  transform: translateY(32%) rotate(-5deg);
}

.postcard-heart {
  position: absolute;
  z-index: 3;
  left: 47%;
  bottom: 6%;
  color: #ffdfa9;
  font-size: clamp(16px, 2.6vw, 33px);
  line-height: 1;
  opacity: .68;
  transition: transform .45s ease, opacity .45s ease;
}

.has-amount .postcard-moka {
  transform: translateY(0) rotate(5deg);
}

.has-amount .postcard-nata {
  transform: translateY(6%) rotate(9deg);
}

.has-amount .postcard-heart {
  transform: scale(1.22);
  opacity: 1;
}

.postcard-dialog {
  border: 1px solid #a47861;
  background: var(--post-paper);
  color: var(--post-ink);
  box-shadow: 6px 8px 0 #86544944, 0 15px 32px #75473b24;
}

.support-checkout {
  display: grid;
  gap: 19px;
  width: min(100%, 412px);
  min-width: 0;
  justify-self: center;
}

.support-goal {
  display: grid;
  gap: 7px;
  padding: 15px clamp(16px, 2.2vw, 24px) 18px;
  border: 1px solid #9c886e;
  border-radius: 6px;
  background: #f9efd9;
  box-shadow: 3px 4px 0 #95554324;
}

.support-goal-note {
  color: var(--post-muted);
  font-size: .79rem;
  font-weight: 800;
}

.support-goal h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.25;
}

.support-goal-total {
  margin-top: 3px;
  color: #365448;
  font-size: .92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.support-goal progress {
  display: block;
  width: 100%;
  height: 12px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 50px;
  background: #dfcbb3;
}

.support-goal progress::-webkit-progress-bar {
  background: #dfcbb3;
}

.support-goal progress::-webkit-progress-value {
  background: #527464;
  border-radius: 50px;
}

.support-goal progress::-moz-progress-bar {
  background: #527464;
  border-radius: 50px;
}

.support-receipt {
  --receipt-paper: #fff5e3;
  --receipt-rule: #ad8671;
  --receipt-type: ui-monospace, "Cascadia Mono", Consolas, monospace;
  position: relative;
  min-width: 0;
  margin-block: 8px;
  padding: clamp(23px, 3.2vw, 40px);
  border-inline: 1px solid #a478614f;
  background: repeating-linear-gradient(0deg, #6a432c05 0 1px, transparent 1px 5px), var(--receipt-paper);
  filter: drop-shadow(3px 4px 0 #95554324) drop-shadow(0 12px 17px #75473b29);
}

.support-receipt::before,
.support-receipt::after {
  content: "";
  position: absolute;
  height: 7px;
  inset-inline: -1px;
  background: conic-gradient(from -45deg at 50% 100%, var(--receipt-paper) 90deg, transparent 0) 0 0 / 14px 7px repeat-x;
  pointer-events: none;
}

.support-receipt::before {
  bottom: calc(100% - 1px);
  transform: scaleY(-1);
}

.support-receipt::after {
  top: calc(100% - 1px);
}

.receipt-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  margin-bottom: 19px;
  border-bottom: 1px dashed var(--receipt-rule);
  font: .78rem/1.4 var(--receipt-type);
  letter-spacing: .055em;
  text-transform: uppercase;
}

.receipt-heading img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.receipt-heading p {
  margin-top: 3px;
  color: var(--post-muted);
}

.support-receipt > label {
  display: block;
  font: 500 clamp(1.65rem, 2.45vw, 2.6rem)/1.08 var(--display);
  letter-spacing: -.048em;
  text-wrap: balance;
}

#amount-hint {
  margin-top: 7px;
  color: var(--post-muted);
}

.postcard-amount {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  min-height: 61px;
  padding-inline: 8px;
  border-block: 1px dashed var(--receipt-rule);
  background: #be946c0b;
  font-family: var(--receipt-type);
}

.postcard-amount:focus-within {
  border-block-color: transparent;
  outline: 2px solid var(--post-accent);
  outline-offset: 2px;
}

.postcard-amount > span {
  font-size: 1.15rem;
  font-weight: 700;
}

.postcard-amount input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 59px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--post-ink);
  font: 700 clamp(1.65rem, 2.7vw, 2.3rem)/1 var(--receipt-type);
}

.postcard-amount input::placeholder {
  color: #826756;
}

.postcard-error {
  font-weight: 800;
  line-height: 1.35;
}

.postcard-suggestions {
  margin: 17px 0 23px;
  border: 0;
  padding: 0;
  min-width: 0;
}

.support-receipt legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--post-muted);
  font-size: .88rem;
  font-weight: 800;
}

.postcard-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.postcard-options button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #c49a82;
  padding: 4px;
  color: var(--post-ink);
  font-weight: 900;
  text-align: center;
}

.postcard-options button:hover,
.postcard-options .matches-amount {
  border-color: var(--post-accent);
  background: #f4dad3;
}

.support-receipt .postcard-options button {
  border-style: dashed;
  border-radius: 4px;
  background: transparent;
  font-family: var(--receipt-type);
  white-space: nowrap;
}

.support-receipt .postcard-options button:hover,
.support-receipt .postcard-options .matches-amount {
  border-style: solid;
  background: #f4dad3;
}

.postcard-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 53px;
  padding: 8px 12px;
  border: 1px solid var(--post-deep);
  border-radius: 8px;
  background: var(--post-accent);
  color: #fff6e6;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 4px 0 #bf8b717a;
}

.postcard-primary:hover {
  background: var(--post-deep);
}

.postcard-primary:disabled {
  opacity: .6;
  cursor: default;
}

.postcard-continue span {
  font-size: 1.25rem;
}

.postcard-demo {
  text-align: center;
}

.postcard-dialog {
  width: min(445px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: clamp(22px, 4vw, 34px);
  border-radius: 14px;
}

.postcard-dialog::backdrop {
  background: #3c222ac2;
}

.postcard-dialog h2 {
  padding-right: 15px;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.postcard-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--post-deep);
  font-size: 1.65rem;
  line-height: 1;
}

.postcard-close:hover {
  background: #f4dad3;
}

.postcard-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 12px;
  justify-content: space-between;
  margin-top: 16px;
  border-bottom: 1px dashed #b78e77;
  padding-bottom: 8px;
}

.postcard-total strong {
  color: var(--post-deep);
  overflow-wrap: anywhere;
}

#support-dialog h2 {
  max-width: 18ch;
}

.payment-provider {
  margin-bottom: 8px;
  color: var(--post-muted);
  font: 700 .76rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.payment-step {
  margin-top: 16px;
}

.payment-step > p {
  margin-bottom: 16px;
  color: var(--post-muted);
  line-height: 1.45;
}

.postcard-secondary {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--post-accent);
  font-weight: 800;
}

.postcard-secondary:hover {
  border-color: #c49a82;
  background: #fffaf0;
}

.payment-qr {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 13px;
  padding: 10px 12px 8px;
  border: 1px solid #dab697;
  border-radius: 10px;
  background: #fffdf8;
  text-align: center;
}

.payment-qr-preview {
  --qr-ink: #51332d;
  position: relative;
  display: grid;
  width: min(144px, 46vw);
  aspect-ratio: 1;
  place-items: center;
  margin-inline: auto;
  background: repeating-conic-gradient(var(--qr-ink) 0 25%, transparent 0 50%) 0 0 / 14px 14px, repeating-conic-gradient(#fffdf8 0 25%, var(--qr-ink) 0 50%) 3px 7px / 33px 28px;
}

.payment-qr-preview i {
  position: absolute;
  width: 32px;
  aspect-ratio: 1;
  border: 5px solid var(--qr-ink);
  background: var(--qr-ink);
  box-shadow: inset 0 0 0 4px #fffdf8, 0 0 0 4px #fffdf8;
}

.payment-qr-preview i:nth-child(1) {
  top: 4px;
  left: 4px;
}

.payment-qr-preview i:nth-child(2) {
  top: 4px;
  right: 4px;
}

.payment-qr-preview i:nth-child(3) {
  bottom: 4px;
  left: 4px;
}

.payment-qr-preview span {
  z-index: 1;
  padding: 3px 10px;
  border: 1px solid #dab697;
  border-radius: 4px;
  background: #fff5e1;
  color: var(--post-ink);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.payment-qr figcaption {
  margin-top: 7px;
  color: var(--post-muted);
  font-size: .82rem;
}

.payment-step > .payment-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
  font-size: .88rem;
  font-weight: 800;
  text-align: center;
}

.payment-status::before {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  border-radius: 50%;
  background: #b36b2e;
}

.support-postcard button:focus-visible {
  outline: 2px solid var(--post-deep);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .postcard-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(530px, calc(100% - 38px));
    min-height: auto;
    gap: 24px;
    padding-block: 25px 41px;
  }

  .postcard-art {
    max-width: 370px;
    aspect-ratio: 2.35;
    margin-top: 21px;
  }

  .postcard-art img {
    width: 28%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .postcard-art img,
  .postcard-heart {
    transition: none;
  }
}
