:root {
  --paper: #f8f3ea;
  --paper-strong: #efe4d4;
  --ink: #2f2a22;
  --muted: #786f62;
  --leaf: #526345;
  --leaf-dark: #2f402c;
  --gold: #8b642e;
  --gold-soft: #b88a44;
  --clay: #a76548;
  --straw: #c3a56f;
  --rose-dry: #b98575;
  --olive-dry: #7c7656;
  --white: #fffaf3;
  --shadow: 0 24px 80px rgba(47, 42, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.book {
  overflow: visible;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 96px clamp(20px, 8vw, 110px) 54px;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: clamp(180px, 26vw, 340px);
  aspect-ratio: 1.38;
  pointer-events: none;
  background: url("assets/olive-branch-corner.svg") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(43, 64, 51, 0.08));
  opacity: 0.68;
  transform-origin: center;
  animation: floralSway 8s ease-in-out infinite;
}

.page::before {
  top: 78px;
  left: -64px;
  transform: rotate(-3deg);
}

.page::after {
  right: -42px;
  bottom: 18px;
  transform: rotate(178deg);
  animation-delay: -3s;
  display: none;
}

.page-copy::after,
.rsvp-form::after,
.gallery-frame::after {
  content: "";
  position: absolute;
  inset: clamp(10px, 1.4vw, 18px);
  z-index: -1;
  border: 1px solid rgba(184, 138, 68, 0.24);
  pointer-events: none;
}

@keyframes floralSway {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

.hero::before,
.hero::after,
.countdown-page::before,
.countdown-page::after,
.gifts::before,
.gifts::after {
  display: none;
  opacity: 0;
  mix-blend-mode: normal;
}

.story::before,
.details::before,
.schedule::before,
.gallery::before,
.location::before,
.rsvp::before {
  opacity: 0.76;
}

.story::after,
.details::after,
.schedule::after,
.gallery::after,
.location::after,
.rsvp::after {
  opacity: 0.68;
}

.page-copy,
.rsvp-form,
.gallery-frame {
  isolation: isolate;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  width: 100vw;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 52px);
  color: var(--white);
  mix-blend-mode: difference;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

nav {
  display: flex;
  gap: clamp(12px, 3vw, 32px);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

nav a,
.page-dots a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.page-dots {
  position: fixed;
  top: 50%;
  right: 24px;
  z-index: 25;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.page-dots a {
  width: 44px;
  height: 44px;
  background: transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.page-dots a.is-active {
  background: transparent;
  transform: scale(1.45);
}

.page-dots a::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 250, 243, 0.8);
  border-radius: 50%;
  background: rgba(47, 42, 34, 0.22);
}

.page-dots a.is-active::before {
  background: var(--gold-soft);
}

.page-turn {
  position: fixed;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%) rotateX(18deg);
  transform-origin: bottom center;
  background:
    linear-gradient(100deg, rgba(255, 250, 243, 0), rgba(255, 250, 243, 0.75) 52%, rgba(184, 138, 68, 0.18)),
    var(--paper);
  box-shadow: 0 -30px 80px rgba(47, 42, 34, 0.25);
}

body.is-turning .page-turn {
  animation: turnPage 0.62s cubic-bezier(0.2, 0.72, 0.26, 1);
}

@keyframes turnPage {
  0% {
    opacity: 0;
    transform: translateY(100%) rotateX(22deg);
  }
  42% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translateY(-100%) rotateX(0deg);
  }
}

.hero {
  display: grid;
  align-items: end;
  color: var(--white);
}

.hero-slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s ease, transform 7s ease;
}

.hero-photo-01 {
  background-position: center 42%;
}

.hero-photo-02 {
  background-position: center 40%;
}

.hero-photo-03 {
  background-position: center 22%;
}
.hero-photo-04 {
  background-position: center 22%;
}

.hero-photo-05 {
  background-position: center 22%;
}

.hero-photo-06 {
  background-position: center 22%;
}

.hero-photo-07 {
  background-position: center 22%;
}

.hero-photo-08 {
  background-position: center 22%;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(41, 31, 22, 0.54), rgba(41, 31, 22, 0.16) 55%, rgba(41, 31, 22, 0.28)),
    linear-gradient(0deg, rgba(43, 31, 22, 0.68), rgba(184, 138, 68, 0.16) 58%, transparent);
}

.hero-content,
.page-copy,
.gallery-copy,
.gallery-frame,
.map-embed,
.rsvp-copy,
.rsvp-form {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: min(820px, calc(100vw - 40px));
  min-width: 0;
  width: 100%;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.page.is-visible .reveal {
  animation: revealIn 0.75s ease both;
}

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker,
.section-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(3.4rem, 9vw, 8.4rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.date-line {
  margin-bottom: 18px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
}

.hero-copy,
.page-copy p,
.rsvp-copy p {
  max-width: min(650px, 100%);
  width: 100%;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.hero-copy {
  color: rgba(255, 250, 243, 0.9);
}

.button,
.next-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover,
.next-link:hover {
  transform: translateY(-2px);
}

.button:active,
.next-link:active {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(139, 100, 46, 0.9);
  outline-offset: 4px;
}

.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

.ghost {
  color: var(--white);
}

.secondary {
  border-color: var(--leaf);
  color: var(--leaf-dark);
}

.disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.hero-actions,
.gift-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.next-link {
  margin-top: 28px;
  color: var(--leaf-dark);
}

.action-row .next-link {
  margin-top: 0;
}

.button:disabled {
  pointer-events: none;
}

.story,
.details {
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(184, 138, 68, 0.16), transparent 30%),
    linear-gradient(135deg, var(--paper), #fff9ee);
}

.ornament {
  position: absolute;
  right: clamp(18px, 10vw, 120px);
  bottom: clamp(28px, 9vw, 100px);
  color: rgba(184, 138, 68, 0.16);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(6rem, 24vw, 19rem);
  line-height: 0.8;
}

.countdown-page,
.gifts {
  display: grid;
  align-items: center;
  color: var(--white);
}

.countdown-page {
  background:
    linear-gradient(rgba(47, 64, 44, 0.86), rgba(47, 64, 44, 0.86)),
    url("assets/photo-05.jpg") center 30% / cover;
}

.gifts {
  background:
    linear-gradient(rgba(47, 64, 44, 0.76), rgba(47, 64, 44, 0.84)),
    url("assets/photo-05.jpg") center 30% / cover;
}

.countdown-page .page-copy p,
.gifts .page-copy p,
.countdown-page .section-label,
.gifts .section-label {
  color: rgba(255, 250, 243, 0.78);
}

.centered {
  width: min(900px, 100%);
  margin: 0 auto;
  text-align: center;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: clamp(10px, 2vw, 22px);
  width: min(760px, 100%);
  margin: 34px auto 0;
}

.countdown span {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 250, 243, 0.26);
  background: rgba(255, 250, 243, 0.1);
  padding: 18px 12px;
  text-align: center;
  text-transform: uppercase;
  color: rgba(255, 250, 243, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.countdown strong {
  color: var(--white);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.detail-grid article {
  min-height: 190px;
  border: 1px solid rgba(82, 99, 69, 0.18);
  background: rgba(255, 250, 243, 0.62);
  padding: 28px;
}

.detail-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.schedule {
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 16% 80%, rgba(82, 99, 69, 0.18), transparent 32%),
    var(--paper-strong);
}

.timeline {
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
  margin: 30px 0;
}

.timeline article {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(82, 99, 69, 0.22);
  padding: 16px 0;
}

.timeline strong {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 400;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(300px, 0.44fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  background: var(--paper);
}

.location {
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  background:
    radial-gradient(circle at 92% 14%, rgba(184, 138, 68, 0.14), transparent 32%),
    var(--paper-strong);
}

.location-card {
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  margin-top: 28px;
  border: 1px solid rgba(139, 100, 46, 0.24);
  background: rgba(255, 250, 243, 0.62);
  padding: clamp(22px, 3vw, 34px);
}

.location-card span {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.location-card p {
  margin-bottom: 0;
}

.map-embed {
  overflow: hidden;
  height: min(68vh, 680px);
  min-height: 420px;
  border: 1px solid rgba(139, 100, 46, 0.22);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.82) contrast(0.96);
}

.gallery-copy {
  display: grid;
  gap: 24px;
}

.gallery-controls {
  display: flex;
  gap: 10px;
}

.gallery-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(82, 99, 69, 0.35);
  border-radius: 50%;
  background: transparent;
  color: var(--leaf-dark);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.gallery-status,
.form-status {
  min-height: 1.3em;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.form-status a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gallery-frame {
  overflow: hidden;
  height: min(78vh, 820px);
  height: min(78dvh, 820px);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 243, 0.72), rgba(239, 228, 212, 0.98)),
    var(--paper-strong);
  box-shadow: var(--shadow);
}

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: opacity 0.25s ease, transform 0.45s ease;
}

.gallery-frame:hover img {
  transform: scale(1.025);
}

.gifts .secondary {
  border-color: rgba(255, 250, 243, 0.62);
  color: var(--white);
}

.pix-card {
  width: min(360px, 100%);
  max-height: min(58vh, 520px);
  margin-top: 28px;
  overflow: hidden;
  background: #fff;
  border: 10px solid rgba(255, 250, 243, 0.9);
  box-shadow: 0 24px 60px rgba(18, 24, 16, 0.32);
}

.pix-card img {
  display: block;
  width: 100%;
  height: auto;
}

.gifts .next-link {
  color: var(--white);
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: clamp(26px, 6vw, 70px);
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 138, 68, 0.16), transparent 32%),
    var(--paper);
}

.rsvp-form {
  display: grid;
  gap: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 38px);
}

label {
  display: grid;
  gap: 7px;
  color: var(--leaf-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(82, 99, 69, 0.22);
  border-radius: 0;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
  text-transform: none;
}

textarea {
  resize: vertical;
}

@media (max-width: 900px) {
  .gallery,
  .location,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .gallery-frame {
    height: 52vh;
    height: 52dvh;
  }

  .map-embed {
    height: 44vh;
    height: 44dvh;
    min-height: 320px;
  }
}

@media (max-width: 620px) {
  html {
    scroll-snap-type: y proximity;
  }

  .page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    scroll-snap-stop: normal;
    padding: 78px 20px 34px;
  }

  .site-header {
    color: var(--ink);
    mix-blend-mode: normal;
    padding: 16px 18px;
  }

  body[data-page="inicio"] .site-header,
  body[data-page="contagem"] .site-header,
  body[data-page="presentes"] .site-header {
    color: var(--white);
  }

  .site-header nav,
  .page-dots {
    display: none;
  }

  .brand {
    font-size: 1rem;
  }

  .page::before,
  .page::after {
    width: 188px;
    opacity: 0.58;
  }

  .page::before {
    top: 76px;
    left: -72px;
  }

  .page::after {
    right: -58px;
    bottom: 18px;
  }

  .story::before,
  .details::before,
  .schedule::before,
  .gallery::before,
  .location::before,
  .rsvp::before {
    opacity: 0.58;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5.2rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero {
    align-items: end;
  }

  .hero-photo-01 {
    background-position: center 42%;
  }

  .hero-photo-02 {
    background-position: center 38%;
  }

  .hero-photo-03 {
    background-position: center 36%;
  }
	
  .hero-photo-04 {
    background-position: center 36%;
  }

  .hero-photo-05 {
    background-position: center 36%;
  }

  .hero-photo-06 {
    background-position: center 36%;
  }

  .hero-photo-07 {
    background-position: center 36%;
  }

  .hero-photo-08 {
    background-position: center 36%;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(43, 31, 22, 0.78), rgba(43, 31, 22, 0.12) 62%),
      linear-gradient(90deg, rgba(43, 31, 22, 0.3), rgba(43, 31, 22, 0.16));
  }

  .hero-actions,
  .gift-actions,
  .action-row {
    display: grid;
  }

  .button,
  .next-link {
    width: 100%;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-page {
    background-position: center 36%;
  }

  .gifts {
    background-position: center 36%;
  }

  .detail-grid article {
    min-height: auto;
    padding: 22px;
  }

  .timeline article {
    grid-template-columns: 88px 1fr;
  }

  .gallery {
    align-content: center;
  }

  .gallery-frame {
    height: 46vh;
    height: 46dvh;
  }

  .location {
    align-content: start;
    gap: 18px;
  }

  .location-card {
    padding: 20px;
  }

  .map-embed {
    height: 36vh;
    height: 36dvh;
    min-height: 260px;
  }

  .rsvp {
    align-content: start;
    gap: 16px;
    overflow: visible;
  }

  .rsvp-form {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

}
