/* ============================================================
   Casamento — Verenice & Leandro
   Sertão × Pampa · Verde escuro + Rose gold
   ============================================================ */

:root {
  --green-deep:   #1B3A2F;
  --green-darker: #0F2620;
  --green-mid:    #2D5444;
  --green-soft:   #5A7D6A;

  --rose:         #C28D8A;
  --rose-gold:    #B7846B;
  --rose-light:   #E8C9B6;
  --rose-deep:    #8B5949;

  --cream:        #FAF4ED;
  --cream-warm:   #F3E9DA;
  --ivory:        #FFFCF6;

  --terra:        #C76E4A;
  --mustard:      #D9A441;
  --berry:        #8B2840;

  --ink:          #1B1611;
  --ink-soft:     #4B4338;
  --ink-mute:     #897E6E;

  --shadow-sm:   0 2px 8px rgba(27,22,17,0.08);
  --shadow-md:   0 8px 24px rgba(27,22,17,0.12);
  --shadow-lg:   0 24px 56px rgba(27,22,17,0.22);
  --shadow-card: 0 14px 36px rgba(27,58,47,0.18);

  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-pill: 999px;

  --font-display: "DM Serif Display", "Cormorant Garamond", Georgia, serif;
  --font-script:  "Caveat", "Brush Script MT", cursive;
  --font-body:    "Outfit", "Inter", -apple-system, sans-serif;
}

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

html, body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ─────────── PAGE BG (subtle paper + ornaments) ─────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(199,110,74,0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(27,58,47,0.08), transparent 45%);
  z-index: 0;
}

/* ─────────── NAVBAR ─────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,244,237,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27,58,47,0.12);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--green-deep);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand .amp { color: var(--rose-gold); font-style: italic; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-link {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.nav-link:hover { color: var(--green-deep); background: rgba(183,132,107,0.12); }
.nav-link.active { background: var(--green-deep); color: var(--cream); }
.nav-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-warm);
  color: var(--green-deep);
  font-size: 1rem;
  transition: all 0.2s;
}
.nav-icon-btn:hover { background: var(--rose-light); }

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--green-deep); color: var(--cream); }
.btn-primary:hover { background: var(--green-mid); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-rose { background: var(--rose-gold); color: var(--ivory); }
.btn-rose:hover { background: var(--rose-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green-deep); border: 1.5px solid var(--green-deep); }
.btn-ghost:hover { background: var(--green-deep); color: var(--cream); }

/* ─────────── SECTION HEADERS ─────────── */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--green-deep);
  line-height: 1.05;
  text-align: center;
}
.section-eyebrow {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--rose-gold);
  text-align: center;
  margin-bottom: -4px;
  display: block;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 14px auto 0;
}

/* ─────────── FLORAL DIVIDER ─────────── */
.divider-flo {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  max-width: 320px;
  margin: 32px auto;
  color: var(--rose-gold);
}
.divider-flo::before,
.divider-flo::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ─────────── ANIMATIONS ─────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(20px); }
  60%  { opacity: 1; transform: scale(1.08) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-8px) rotate(-1deg); }
  40%, 80%  { transform: translateX(8px) rotate(1deg); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25%       { transform: rotate(-3deg); }
  75%       { transform: rotate(3deg); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}
@keyframes confettiFall {
  0%   { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}
.anim-fadeup { animation: fadeUp 0.7s cubic-bezier(0.2,0.7,0.2,1) both; }
.anim-bounce { animation: bounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-shake  { animation: shake 0.5s both; }
.anim-float  { animation: floatY 3.5s ease-in-out infinite; }

/* ─────────── CHARACTERS (Zé & Prenda) — Pixel Art ─────────── */
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
@keyframes charBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30%       { transform: translateY(-5px) rotate(-2deg); }
  70%       { transform: translateY(-5px) rotate(2deg); }
}

.character {
  position: fixed;
  bottom: 0;
  width: 80px;
  height: 100px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: drop-shadow(0 4px 0 rgba(27,22,17,0.35));
}
.character.show    { opacity: 1; pointer-events: auto; }
.character.resting { opacity: 0.28; pointer-events: auto; }
.character#charZe     { left: 16px; }
.character#charPrenda { right: 16px; left: auto; }

.character.resting .char-svg { animation: breathe 3s ease-in-out infinite; }
.character.bobbing .char-svg { animation: charBob 0.7s ease-in-out infinite; }

.character-body {
  width: 100%;
  height: 100%;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
}
.character-body:hover .char-svg { animation: wiggle 0.3s steps(3) both; }

.char-svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ─── Pixel art info card ─── */
.char-card {
  position: absolute;
  bottom: 108px;
  width: 240px;
  background: #fffcf6;
  border: 3px solid #1b1611;
  border-radius: 0;
  box-shadow: 4px 4px 0 #1b1611;
  padding: 12px 14px 10px;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 0.44rem;
  line-height: 1.9;
  color: #1b1611;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(8px);
  z-index: 210;
}
.char-card.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.character#charZe .char-card     { left: 0; }
.character#charPrenda .char-card { right: 0; left: auto; }

/* pixel triangle pointer */
.character#charZe .char-card::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 12px;
  border: 5px solid transparent;
  border-top: 6px solid #1b1611;
}
.character#charPrenda .char-card::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 12px;
  border: 5px solid transparent;
  border-top: 6px solid #1b1611;
}

.char-card-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: #897e6e;
  line-height: 1;
  padding: 2px 4px;
}
.char-card-close:hover { color: #1b1611; }

.char-card-name {
  font-size: 0.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  padding-right: 16px;
}
.character#charZe .char-card-name     { color: #c76e4a; }
.character#charPrenda .char-card-name { color: #1b3a2f; }

.char-card-text {
  font-size: 0.44rem;
  margin-bottom: 10px;
  line-height: 1.9;
  color: #1b1611;
}

.char-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.char-card-btn {
  display: block;
  border: 2px solid #1b1611;
  background: #1b3a2f;
  color: #fffcf6;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.4rem;
  line-height: 1;
  padding: 7px 10px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.08s, box-shadow 0.08s;
}
.char-card-btn:hover {
  background: #2d5444;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}
.char-card-btn.btn-accent { background: #c76e4a; }
.char-card-btn.btn-accent:hover { background: #a85a38; }

/* ─────────── CONFETTI ─────────── */
.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ─────────── TOAST ─────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-deep);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─────────── EDIT MODE BANNER ─────────── */
.edit-banner {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--mustard);
  color: var(--ink);
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 9999;
}
body.edit-mode .edit-banner { display: block; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 720px) {
  .nav-links { display: none; }
}
@media (max-width: 768px) {
  .character { width: 56px !important; height: 70px !important; }
  .character .char-card { display: none !important; }
}

/* ─────────── MOBILE CHAT SHEET ─────────── */
.char-mobile-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fffcf6;
  border: 3px solid #1b1611;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 0 #1b1611;
  padding: 8px 20px 44px;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 0.5rem;
  line-height: 1.9;
  color: #1b1611;
  z-index: 500;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.34, 1.1, 0.64, 1);
  max-height: 62vh;
  overflow-y: auto;
  display: none;
}
@media (max-width: 768px) {
  .char-mobile-sheet { display: block; }
  .char-mobile-sheet.show { transform: translateY(0); }
}
.char-mobile-sheet-handle {
  width: 44px; height: 5px;
  background: #c8bfb3;
  border-radius: 3px;
  margin: 0 auto 16px;
}
.char-mobile-sheet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.char-mobile-sheet-sprite {
  width: 48px; height: 60px;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.char-mobile-sheet-sprite svg {
  width: 100%; height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.char-mobile-sheet .char-card-name {
  font-size: 0.55rem;
  display: block;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.char-mobile-sheet .char-card-text {
  font-size: 0.5rem;
  line-height: 1.9;
  margin-bottom: 14px;
  color: #1b1611;
}
.char-mobile-sheet .char-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.char-mobile-sheet .char-card-btn {
  font-size: 0.45rem;
  padding: 10px 14px;
}
.char-mobile-sheet .char-card-close {
  position: absolute;
  top: 14px; right: 16px;
}
