/* =========================================================
   Envie seu presente · Kamila & Ewerton
   Mesmo visual do formulário: branco e dourado, bem limpo.
   Cores e fontes ficam em ":root".
   ========================================================= */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/great-vibes-latin-400-normal.woff2") format("woff2"); }

:root {
  --white: #ffffff;
  --ink: #4f4d42;
  --muted: #7a7464;
  --gold: #b99a61;
  --gold-deep: #86693a;
  --gold-soft: rgba(185, 154, 97, .45);
  --gold-wash: rgba(185, 154, 97, .12);
  --error: #9b4a3c;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  color: var(--ink); background: var(--white);
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.5;
  text-rendering: optimizeLegibility;
}
body::before {                 /* filete dourado fino, como num papel de convite */
  content: ""; position: fixed; inset: clamp(.6rem, 1.6vw, 1.25rem); z-index: 0; pointer-events: none;
  border: 1px solid var(--gold-soft);
}
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 4px; }

/* ---------- página ---------- */
.page {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(2.2rem, 6vh, 4rem) 1.5rem clamp(2.5rem, 6vh, 4rem);
}
.mono { width: clamp(8.5rem, 21vh, 12.5rem); height: auto; animation: fade-up 1s cubic-bezier(.2, .7, .2, 1) both; }
.title {
  margin-top: .3rem; text-align: center;
  font-family: var(--script); font-weight: 400; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1.2;
  color: var(--gold-deep);
  animation: fade-up 1s cubic-bezier(.2, .7, .2, 1) .15s both;
}
.rule {
  width: 5.25rem; height: 1px; margin: 1rem auto 1.8rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: fade-up 1s ease .25s both;
}
.choose, .pay { width: min(100%, 27rem); animation: fade-up 1s cubic-bezier(.2, .7, .2, 1) .35s both; }
.choose[hidden], .pay[hidden] { display: none; }

.label { display: block; padding: 0; margin-bottom: .6rem; font-style: italic; font-size: 1.15rem; color: var(--muted); text-align: center; }

/* ---------- quadradinhos de valor ---------- */
.amounts { margin: 0; padding: 0; border: 0; min-width: 0; }
.amounts legend { width: 100%; padding: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }

.amount { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.amount input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.amount__face {
  position: relative; aspect-ratio: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  text-align: center; color: var(--ink); background: var(--white);
  border: 1px solid var(--gold-soft);
  transition: border-color .25s, background-color .25s, box-shadow .25s, transform .25s;
}
.amount__cur { font-style: italic; font-size: 1rem; color: var(--muted); line-height: 1; }
.amount__num { font-size: clamp(1.25rem, 4.6vw, 1.6rem); font-weight: 600; line-height: 1.1; letter-spacing: .01em; }
.amount__other { font-style: italic; font-size: 1.2rem; line-height: 1.15; color: var(--gold-deep); }
.amount__check {
  position: absolute; top: .35rem; right: .35rem; width: 1.15rem; height: 1.15rem; padding: .12rem;
  color: #fff; background: var(--gold-deep); opacity: 0; scale: .6;
  transition: opacity .2s, scale .25s cubic-bezier(.3, 1.6, .5, 1);
}
.amount:hover .amount__face { border-color: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 10px 16px -12px rgba(95, 75, 35, .5); }
.amount input:checked + .amount__face {
  border-color: var(--gold-deep); background: var(--gold-wash);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 4px var(--white), 0 0 0 5px var(--gold-soft);
}
.amount input:checked + .amount__face .amount__check { opacity: 1; scale: 1; }
.amount input:focus-visible + .amount__face { outline: 2px solid var(--gold-deep); outline-offset: 4px; }
.amounts[data-invalid="true"] .amount__face { border-color: var(--error); }

/* "Outro valor": campo que aparece */
.other { margin-top: 1.5rem; animation: fade-up .5s ease both; }
.other[hidden] { display: none; }
.money { display: flex; align-items: baseline; justify-content: center; gap: .5rem; border-bottom: 1px solid var(--gold-soft); transition: border-color .3s, box-shadow .3s; }
.money:focus-within { border-bottom-color: var(--gold-deep); box-shadow: 0 1px 0 0 var(--gold-deep); }
.money[data-invalid="true"] { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.money__cur { font-style: italic; color: var(--muted); font-size: 1.3rem; }
.input {
  width: 9rem; padding: .45rem 0; text-align: left;
  font-size: 1.6rem; font-weight: 500; color: var(--ink);
  background: transparent; border: 0; border-radius: 0;
}
.input:focus { outline: none; }
.input::placeholder { color: rgba(122, 116, 100, .5); }

.error { margin-top: .8rem; text-align: center; font-size: 1rem; font-style: italic; color: var(--error); }
.error[hidden] { display: none; }

/* ---------- botões (mesmo estilo do site: filete duplo dourado) ---------- */
.submit { display: flex; justify-content: center; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  padding: 1rem 2.6rem; min-height: 3.6rem;
  font-size: 1.3rem; font-weight: 600; letter-spacing: .05em; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--gold-deep);
  border: 1px solid var(--gold-deep); border-radius: 0;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px rgba(134, 105, 58, .55);
  transition: background-color .3s, color .3s, transform .3s, box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.4rem; height: 1.4rem; flex: none; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.btn:hover, .btn:focus-visible {
  background: var(--white); color: var(--gold-deep); transform: translateY(-2px);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--gold-deep), 0 14px 22px -12px rgba(95, 75, 35, .4);
}
.btn:hover svg { transform: rotate(-8deg) scale(1.12); }
.btn:focus-visible { outline: none; }
.btn:active { transform: translateY(0); }
.btn--outline { color: var(--gold-deep); background: var(--white); box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--gold-soft); font-size: 1.15rem; padding: .85rem 1.8rem; min-height: 3.2rem; }
.btn--outline:hover, .btn--outline:focus-visible { color: #fff; background: var(--gold-deep); }
.btn--small { font-size: 1.1rem; padding: .7rem 1.6rem; min-height: 2.9rem; margin-top: .9rem; }

.back {
  display: block; width: fit-content; margin: 1.8rem auto 0; padding: .3rem .5rem;
  font-style: italic; font-size: 1.1rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold-soft);
  transition: color .25s;
}
.back:hover { color: var(--gold-deep); }

/* ---------- pagamento ---------- */
.pay { text-align: center; }
.pay__label { font-style: italic; font-size: 1.1rem; color: var(--muted); }
.pay__value { font-size: clamp(2.2rem, 8vw, 2.8rem); font-weight: 600; color: var(--gold-deep); line-height: 1.15; margin-bottom: 1.2rem; }
.pay__value:focus { outline: none; }

.qr {
  width: min(100%, 15.5rem); margin: 0 auto; padding: .9rem; background: #fff;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px var(--gold-soft);
}
.qr svg { display: block; width: 100%; height: auto; }
.pay__hint { margin: 1.1rem auto 0; max-width: 20rem; font-size: 1.1rem; color: var(--ink); }

.copy { margin-top: 1.8rem; }
.copy__code {
  display: block; width: 100%; margin-top: .45rem; padding: .7rem .8rem; resize: none;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .8rem; line-height: 1.35; color: var(--muted);
  background: #fbfaf7; border: 1px solid var(--gold-soft); border-radius: 0; word-break: break-all;
}
.copy__code:focus { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.pay__key { margin-top: 1.4rem; font-size: 1.05rem; color: var(--muted); }
.pay__key strong { color: var(--ink); font-weight: 600; letter-spacing: .02em; }
.pay__thanks { margin-top: .9rem; font-style: italic; color: var(--gold-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; }

@keyframes fade-up { from { opacity: 0; translate: 0 .8rem; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 360px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  body { font-size: 1.12rem; }
  .btn { width: 100%; max-width: 20rem; }
  .btn--small { width: auto; }
  .actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
