:root {
  --cream: #f9f3eb;
  --cream-2: #f3eadc;
  --paper: #fffcf7;
  --burgundy: #7a2036;
  --burgundy-dark: #5c1828;
  --burgundy-soft: rgba(122, 32, 54, 0.12);
  --gold: #c59d5f;
  --gold-2: #d4b57a;
  --ink: #4a2a32;
  --muted: #6d4e57;
  --white: #fffdfb;
  --shadow: 0 18px 40px rgba(122, 32, 54, 0.16);
  --radius: 28px;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Montserrat", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(249, 243, 235, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 157, 95, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--burgundy);
  font-size: 1.05rem;
}
.brand-tag {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.nav a.is-active { color: var(--gold); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--burgundy);
  font-size: 1.4rem;
}

.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--burgundy);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.gold-line {
  width: 42px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}
h1, h2, h3 {
  font-family: var(--font-sans);
  color: var(--burgundy);
  line-height: 1.15;
  margin: 0.4rem 0 0.8rem;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 14ch; }
.gold-sub {
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 1rem;
}
.lede { max-width: 42ch; color: var(--muted); font-size: 1.05rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--burgundy); color: var(--white); }
.btn-primary:hover { background: var(--burgundy-dark); }
.btn-gold { background: var(--gold); color: var(--burgundy-dark); }
.btn-ghost {
  background: transparent;
  color: var(--burgundy);
  border: 1px solid rgba(122, 32, 54, 0.25);
}

.hero-visual { position: relative; justify-self: center; }
.circles {
  position: absolute;
  right: -18px;
  top: -22px;
  width: 140px;
  height: 140px;
  pointer-events: none;
}
.circles::before,
.circles::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--burgundy);
}
.circles::after {
  inset: 14px -10px 0 14px;
  border-color: var(--gold);
}
.photo-frame {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 18px 22px 0 var(--burgundy);
  background: var(--cream-2);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section { padding: 3.2rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.stories-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.story-card {
  scroll-snap-align: start;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background: var(--cream-2);
}
.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-card span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.chapters {
  display: grid;
  gap: 1.2rem;
}
.chapter {
  position: relative;
  background: var(--paper);
  border-radius: 24px;
  padding: 1.8rem 1.6rem 1.6rem;
  border: 1px solid rgba(197, 157, 95, 0.28);
  overflow: hidden;
}
.chapter .lamp {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 72px;
  opacity: 0.35;
}
.chapter h3 { font-size: 1.45rem; }
.chapter p { white-space: pre-line; margin: 0.4rem 0 0; color: var(--muted); }
.quote {
  background: var(--burgundy);
  color: var(--white);
  border-radius: 22px;
  padding: 1.3rem 1.4rem;
  margin-top: 1rem;
  font-weight: 600;
}

.cta-band {
  background: linear-gradient(160deg, var(--burgundy) 0%, #4e1424 100%);
  color: var(--white);
  border-radius: 32px;
  padding: 2.4rem;
  display: grid;
  gap: 1rem;
}
.cta-band h2 { color: var(--white); }
.cta-band .gold-sub { color: var(--gold-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
}
.contact-card {
  background: var(--paper);
  border-radius: 24px;
  padding: 1.6rem;
  border: 1px solid rgba(197, 157, 95, 0.3);
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.4rem;
  border-top: 1px solid rgba(197, 157, 95, 0.3);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4);
  z-index: 50;
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 28px;
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-card img { height: 72px; margin: 0 auto 1rem; }
.auth-card form { display: grid; gap: 0.8rem; text-align: left; }
label { font-size: 0.8rem; color: var(--burgundy); font-weight: 600; }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(122, 32, 54, 0.2);
  background: var(--white);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.alert {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.alert-ok { background: #e8f6ee; color: #1d6b3a; }
.alert-erro { background: #fde8ec; color: var(--burgundy); }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--burgundy);
  color: var(--white);
  padding: 1.4rem 1rem;
}
.admin-side a { display: block; padding: 0.7rem 0.8rem; border-radius: 10px; color: #f7e9ee; }
.admin-side a.is-active, .admin-side a:hover { background: rgba(255,255,255,0.12); }
.admin-main { padding: 1.6rem; background: var(--cream); }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 16px; overflow: hidden; }
.table th, .table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--cream-2); font-size: 0.92rem; }
.thumb { width: 42px; height: 74px; object-fit: cover; border-radius: 8px; }
.form-grid { display: grid; gap: 0.9rem; max-width: 760px; }
.check { display: flex; align-items: center; gap: 0.5rem; }
.check input { width: auto; }

.viewer {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 1.2rem 0 3rem;
}
.phone {
  width: min(390px, 100%);
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.progress {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.progress i {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 99px;
  overflow: hidden;
}
.progress i b {
  display: block;
  height: 100%;
  width: 0;
  background: white;
}
.progress i.is-done b { width: 100%; }
.progress i.is-current b { width: var(--p, 0%); }
.hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  background: transparent;
  border: 0;
}
.hit-left { left: 0; }
.hit-right { right: 0; }
.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 1rem;
    top: 76px;
    background: var(--paper);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: block; }
  .hero-grid, .contact-grid, .admin-shell { grid-template-columns: 1fr; }
  .photo-frame { box-shadow: 12px 14px 0 var(--burgundy); }
  .admin-side { display: flex; gap: 0.4rem; overflow-x: auto; }
  .admin-side a { white-space: nowrap; }
}
