body {
  --bg: #f7f4ef;
  --card: #ffffff;
  --accent: #6b7a6b; /* deep green */
  --accent-dark: #445445;
  --muted: #8d644d; /* warm beige */
  background: var(--bg);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  color: #2b2b2b;
  overflow-x: hidden;
}

.container {
  /* Full-bleed container that becomes the scroll-snap viewport */
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

h1 {
  text-align: center;
  margin-bottom: 6px;
}

.center {
  text-align: center;
}

button {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  font-size: 15px;
}

section {
  margin-top: 28px;
}

hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 28px 0;
}



/* Envelope overlay (initial screen) */
#envelope-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  /* use envelope image as full-screen background */
  background-image: url('img/envelope.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity 700ms ease, transform 700ms ease;
}

/* Seal button centered on overlay; use the provided seal image */
.seal {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
  transition: transform 220ms ease, opacity 300ms ease;
}

.seal-img {
  width: 25vh;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.15));
  transition: width 0.4s ease;
}

.seal-img:hover {
  width: 27vh;
}

/* Opening state: fade out overlay and slightly scale down */
#envelope-overlay.opening {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

#envelope-overlay.hidden { opacity: 0; pointer-events: none; }

/* Promise Section: Full-width layout with side photos and center content */
.promise-section {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100vh;
  background: white;
  position: relative;
}

/* Side photos */
.promise-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.promise-left {
  background: #f5f5f5;
}

.promise-right {
  background: #f5f5f5;
}

.promise-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* Gradient dividers (subtle fade between photo and center) */
.gradient-divider {
  position: absolute;
  top: 0;
  width: 140px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.gradient-left {
  right: -70px;
  background: linear-gradient(to right, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
}

.gradient-right {
  left: -70px;
  background: linear-gradient(to left, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
}

/* Center content */
.promise-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: white;
}

.promise-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--accent);
  text-align: center;
  margin: 0 0 24px;
}

.promise-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: var(--muted);
  text-align: center;
  max-width: 420px;
  line-height: 1.8;
}

@media (max-width: 1024px) {
  .promise-section {
    flex-direction: column;
    height: auto;
  }
  .promise-side {
    height: 280px;
    flex: 0 0 auto;
  }
  .promise-center {
    flex: 0 0 auto;
    padding: 48px 24px;
    min-height: 380px;
  }
  .promise-title {
    font-size: 2.4rem;
  }
}



/* Hero / Names */
.hero {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero .names {
  font-family: "Monsieur La Doulaise", cursive;
  font-size: 6rem;
  font-weight: lighter;
  line-height: 0.9;
  color: var(--accent-dark);
  text-align: center;
  margin: 0;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInText 1000ms ease-out forwards;
}

.hero-spacer {
  height: 3rem;
}

.subtitle {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--muted);
  width: 80%;
  margin: 12px auto 24px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInText 1000ms ease-out 350ms forwards;
}

.date-section {
  text-align: center;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInText 1500ms ease-out 600ms forwards;
}

.date-month {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 500;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: "Cormorant Garamond", serif;
  color: var(--muted);
  flex: 0 0 auto;
  transform: translateX(-1vw);
}

.date-day-name,
.date-year {
  font-size: 3rem;
  position: relative;
  padding: 8px 12px;
}

.date-day-name {
  font-size: 2.5rem;
}

.date-day-name::after,
.date-year::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: rgba(141, 100, 77, 0.3);
}

.date-day {
  font-size: 6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Folhas */
.leaf {
  position: absolute;
  width: 80vw;
  height: auto;
  opacity: 0.65;
  z-index: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

.leaf--top-left {
  top: -400px;
  left: -30vw;
  animation: fadeIn 1.2s ease-out forwards, swayLeft 6s ease-in-out infinite;
}

.leaf--bottom-right {
  bottom: -300px;
  right: -30vw;
  animation: fadeIn 1.2s ease-out forwards, swayRight 7s ease-in-out infinite;
}

/* Entrada suave */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 0.65;
  }
}

/* Fade for text (full opacity) */
@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Movimento tipo brisa - respeita rotação inicial */
@keyframes swayLeft {
  0%   { transform: rotate(120deg) translateY(0); }
  50%  { transform: rotate(122deg) translateY(8px); }
  100% { transform: rotate(120deg) translateY(0); }
}

@keyframes swayRight {
  0%   { transform: rotate(-60deg) translateY(0); }
  50%  { transform: rotate(-64deg) translateY(4px); }
  100% { transform: rotate(-60deg) translateY(0); }
}

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
}

.play-btn:focus {
  outline: 3px solid rgba(255,255,255,0.12);
}

.play-btn.playing {
  background: rgba(255,255,255,0.22);
}

.play-icon {
  display: inline-block;
  transform: translateX(2px);
}

/* Details/Timeline Section */
.details {
  padding: 80px 18px;
  background: var(--accent);
  color: #f4f3ef;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.details__title {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(44px, 5vw, 72px);
  margin: 0 0 60px;
  letter-spacing: 1px;
  color: white;
}

.timeline {
  position: relative;
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.timeline__line {
  position: absolute;
  left: 50%;
  top: 20px;
  bottom: -40px;
  width: 2px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  z-index: 0;
}

.titem {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 40px;
  margin-bottom: 100px;
  align-items: start;
  z-index: 1;
}

.titem:last-child {
  margin-bottom: 0;
}

.titem__dot {
  grid-column: 2;
  justify-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f4f3ef;
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 6px #f4f3ef;
  margin-top: 8px;
}

.titem__media {
  grid-column: 1;
  align-self: start;
}

.titem__media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.titem__content {
  grid-column: 3;
  align-self: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 28px 24px;
  backdrop-filter: blur(10px);
}

.titem__time {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-weight: 500;
  color: white;
  margin: 0 0 8px;
}

.titem__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 400;
  color: white;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.titem__subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 14px;
  font-style: italic;
}

.titem__info {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.titem__info p {
  margin: 6px 0;
}

/* Mobile: single column */
@media (max-width: 860px) {
  .timeline {
    width: 100%;
  }

  .timeline__line {
    left: 25px;
    top: -60px;
    bottom: -60px;
    transform: none;
  }

  .titem {
    grid-template-columns: 50px 1fr;
    gap: 20px;
    margin-bottom: 60px;
  }

  .titem__dot {
    grid-column: 1;
    justify-self: center;
  }

  .titem__media {
    grid-column: 2;
  }

  .titem__media img {
    height: 180px;
  }

  .titem__content {
    grid-column: 2;
  }

  .details__title {
    margin-bottom: 40px;
    font-size: 40px;
  }
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.gallery-item {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
}

@media (max-width: 700px) {
  .hero .names { font-size: 2.8rem; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item { height: 220px; }
}

/* Scroll snapping: make the card a vertical snap container */

html, body {
  height: 100%;
}

.container > .hero,
.container > section,
.container > .gallery {
  scroll-snap-align: start;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 48px;
}

@media (max-width: 700px) {
  .card > .hero,
  .card > section,
  .card > .gallery {
    min-height: auto;
    padding: 28px;
  }
}
