/* ============================================================================
   Paleta do casamento Isabela & Lucas
   Off White - Bege - Terracota - Verde Oliva - Azul Serenity
   ============================================================================ */
:root {
  --off-white: #f7f2ea;
  --bege: #d8c4a2;
  --bege-claro: #ece2d1;
  --terracota: #b0503a;
  --terracota-dark: #954230;
  --oliva: #5e6b4a;
  --oliva-dark: #4b5639;
  --serenity: #7e9bc1;
  --serenity-dark: #5f7ea4;

  --ink: #3b342c;
  --muted: #8b7f6f;
  --card: #ffffff;
  --line: #e7dccb;
  --shadow: 0 10px 34px rgba(90, 66, 45, 0.10);
  --radius: 18px;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  /* rolagem suave ao clicar em "Ver os presentes" e outros ancoras */
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--off-white);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* respeita quem prefere menos animacoes (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; }

/* ------------------------------------------------------------------ HERO */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero .photo {
  position: absolute;
  inset: 0;
  background: #2a2a24 center 28% / cover no-repeat;
  background-image: url("/images/casal.jpg");
}
.hero .photo::after {
  content: "";
  position: absolute;
  inset: 0;
  /* veu terracota+oliva para dar identidade e legibilidade */
  background:
    linear-gradient(to bottom, rgba(59,52,44,0.15) 0%, rgba(59,52,44,0.15) 45%, rgba(59,52,44,0.78) 100%),
    linear-gradient(120deg, rgba(176,80,58,0.20), rgba(94,107,74,0.18));
}
.hero .inner {
  position: relative;
  z-index: 2;
  padding: 0 24px 8vh;
  max-width: 760px;
}
.hero .kicker {
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  color: var(--bege);
  margin-bottom: 18px;
}
.hero .names {
  font-size: clamp(52px, 12vw, 104px);
  line-height: 0.98;
  margin: 0 0 10px;
  font-weight: 600;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hero .names .amp { color: var(--bege); font-style: italic; }
.hero .tagline {
  font-family: var(--serif);
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 500;
  margin: 0 0 28px;
  color: #f4ece0;
}
.hero .date {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: clamp(15px, 2.4vw, 19px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bege);
  margin: 0 0 26px;
}
.hero .date::before,
.hero .date::after {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(216, 196, 162, 0.7);
}
.hero .scroll-btn {
  display: inline-block;
  margin-top: 6px;
}

/* --------------------------------------------------------------- PALETTE */
.palette {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0;
}
.palette span {
  width: 34px; height: 8px; display: inline-block;
}
.palette .c1 { background: var(--off-white); }
.palette .c2 { background: var(--bege); }
.palette .c3 { background: var(--terracota); }
.palette .c4 { background: var(--oliva); }
.palette .c5 { background: var(--serenity); }

/* ------------------------------------------------------------ INTRO/COPY */
.intro {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 12px;
  text-align: center;
}
.intro .palette { margin-bottom: 26px; }
.intro h2 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 16px; color: var(--terracota); }
.intro p { color: var(--muted); line-height: 1.7; font-size: 17px; margin: 0; }

/* -------------------------------------------------------------- CONTAINER */
.container { max-width: 1120px; margin: 0 auto; padding: 40px 24px 90px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

/* ------------------------------------------------------------------ CARD */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 44px rgba(90,66,45,.16); }
.card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bege-claro) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.card .thumb.empty::after {
  content: "\1F381";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; opacity: .35;
}
.card .body { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card h3 { margin: 0; font-size: 23px; }
.card .desc { color: var(--muted); font-size: 14.5px; line-height: 1.5; flex: 1; }
.card .price { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--oliva); }

/* -------------------------------------------------------------- BUTTONS */
.btn {
  appearance: none; border: none; cursor: pointer;
  border-radius: 999px; padding: 13px 22px;
  font-size: 15px; font-weight: 600; font-family: var(--sans);
  background: var(--terracota); color: #fff;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--terracota-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--terracota-dark); border: 1.5px solid var(--terracota); }
.btn.ghost:hover { background: rgba(176,80,58,.08); }
.btn.oliva { background: var(--oliva); }
.btn.oliva:hover { background: var(--oliva-dark); }
.btn.light { background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn.light:hover { background: rgba(255,255,255,.28); }

/* --------------------------------------------------------- FREE-GIFT CARD */
.card.free {
  background: linear-gradient(160deg, #fff 0%, var(--bege-claro) 100%);
  border-style: dashed;
  border-color: var(--bege);
  align-items: center; justify-content: center; text-align: center;
  padding: 34px 22px;
}
.card.free .ic { font-size: 34px; margin-bottom: 4px; }
.card.free h3 { font-size: 24px; color: var(--serenity-dark); }
.card.free p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 6px 0 10px; }

/* ------------------------------------------------------------------ MODAL */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(45,34,26,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 22px;
  width: 100%; max-width: 440px; padding: 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
  position: relative; max-height: 92vh; overflow-y: auto;
}
.modal .close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 28px; line-height: 1;
  color: var(--muted); cursor: pointer;
}
.modal h2 { margin: 0 0 6px; font-size: 27px; color: var(--terracota); }
.modal .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fdfbf7;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--serenity); border-color: transparent; }
.field .hint { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }

.amount-display {
  text-align: center; font-family: var(--serif); font-weight: 600;
  font-size: 40px; color: var(--oliva); margin: 4px 0 22px;
}

.qr-wrap { text-align: center; }
.qr-wrap img,
.qr-wrap canvas {
  width: 240px; height: 240px; object-fit: contain;
}
/* Container do QR Code gerado no navegador (biblioteca qrcode.min.js) */
#qr-canvas {
  display: inline-block;
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff;
  line-height: 0;
}
.copy-box { display: flex; gap: 8px; margin-top: 16px; }
.copy-box input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 12px; background: #fdfbf7; color: var(--muted);
}

.status { text-align: center; margin-top: 18px; font-size: 15px; padding: 13px; border-radius: 12px; }
.status.waiting { background: #fbf2e4; color: #96702f; }
.status.paid { background: #eaf3ec; color: var(--oliva-dark); font-weight: 600; }
.status.failed { background: #f7e7e3; color: var(--terracota-dark); }

.error-msg { color: var(--terracota-dark); font-size: 14px; margin-top: 8px; }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(150,112,47,.3); border-top-color: #96702f;
  border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: -3px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ FOOTER */
footer {
  text-align: center; padding: 40px 24px 56px;
  color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line);
}
footer .palette { margin-bottom: 18px; }
footer .hearts { color: var(--terracota); }
