/* =====================================================================
   Mariya & Jose — ONE continuous scrolling wedding card
     Section 1 : the cover artwork (images/wedding-cover.png)
     Section 2 : the live HTML invitation
   Both use the SAME centred width so it reads as one piece of stationery.
   Floral decoration = watercolour corners cropped from the cover itself
   (images/florals/*.png).
   ===================================================================== */

:root {
  /* one width for the whole invitation */
  --card-w: 552px;
  --pad-x:  clamp(14px, 4.4vw, 22px);

  --paper:      #f4ecda;
  --paper-2:    #efe4cd;
  --paper-3:    #e7d9bb;

  --burgundy:   #5e1622;
  --burgundy-w: #7a2330;
  --wine:       #43101b;
  --rose:       #9a3b47;

  --gold:       #c09a54;
  --gold-lt:    #ddc191;
  --gold-dk:    #a2823f;

  --ink:        #4a2a20;
  --ink-soft:   #6b4a3b;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23p)'/%3E%3C/svg%3E");
}

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

/* the shared measure — cover and invitation are exactly this wide */
.cover__art,
.invite {
  width: min(100% - 2 * var(--pad-x), var(--card-w));
  margin-inline: auto;
}

/* ---------------------------------------------------------------- */
/*  SECTION 1 — COVER                                               */
/* ---------------------------------------------------------------- */

.cover {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-block: var(--pad-x);
  background: var(--paper);
  cursor: pointer;
}

.cover__art { position: relative; }

.cover__base {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

/* the caricature, positioned exactly over the printed couple and
   gently swaying — pivots at the feet so it just "breathes" */
.cover__couple {
  position: absolute;
  left: 22.66%;
  top: 22.4%;
  width: 45.7%;
  height: auto;
  transform-origin: 50% 96%;      /* pivot at the feet */
  will-change: transform;
  pointer-events: none;
  animation: couple-wobble 7s ease-in-out infinite;
}
/* scale(1.07) always fully blankets the printed couple, so however the
   cut-out sways only the cut-out is visible — no printed edge peeks */
@keyframes couple-wobble {
  0%, 100% { transform: scale(1.07) rotate(-0.5deg); }
  30%      { transform: scale(1.07) rotate(0.42deg) translateY(-0.25%); }
  55%      { transform: scale(1.07) rotate(0.55deg); }
  80%      { transform: scale(1.07) rotate(0.2deg) translateY(-0.12%); }
}
@media (prefers-reduced-motion: reduce) {
  .cover__couple { animation: none; transform: scale(1.07); }
}

/* ---------------------------------------------------------------- */
/*  SECTION 2 — LIVE INVITATION  (same width, no separate box)      */
/* ---------------------------------------------------------------- */

.invite {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: clamp(18px, 5vw, 34px) 0 clamp(44px, 12vw, 84px);
  overflow: hidden;
}

/* thin antique-gold double rule, echoing the cover's frame */
.invite__frame {
  position: absolute;
  inset: clamp(9px, 2.6vw, 18px);
  border: 1px solid rgba(160, 130, 63, 0.55);
  border-radius: 2px;
  pointer-events: none;
}
.invite__frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(160, 130, 63, 0.32);
  border-radius: 1px;
}

/* watercolour floral corners — cropped straight from wedding-cover.png */
.invite__corner {
  position: absolute;
  width: clamp(106px, 33vw, 188px);
  height: auto;
  opacity: 0.94;
  z-index: 2;
}
.invite__corner--tl { top: 0; left: 0; }
.invite__corner--tr { top: 0; right: 0; }
.invite__corner--bl { bottom: 0; left: 0; }
.invite__corner--br { bottom: 0; right: 0; }

.invite__inner {
  position: relative;
  z-index: 3;
  width: min(82%, 420px);
  margin: 0 auto;
  text-align: center;
}

/* ---- intro ---- */

.intro { padding-top: clamp(44px, 12vw, 84px); }

/* monogram — matches the "M | J" on the cover: burgundy serif caps
   with a thin gold rule between, a gold dot above */
.mono-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-dk);
  margin: 0 auto 0.5rem;
}
.monogram {
  margin: 0 0 0.35rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--burgundy);
}
.monogram .bar {
  display: inline-block;
  width: 1px;
  height: 1.15em;
  margin: 0 0.62em;
  vertical-align: -0.14em;
  background: var(--gold-dk);
}

.ornament {
  display: block;
  width: min(176px, 50vw);
  height: auto;
  margin: 0.55rem auto 1.25rem;
  color: var(--gold-dk);
}

.intro__line {
  margin: 0 auto;
  max-width: 30ch;
  font-style: italic;
  font-size: clamp(1rem, 4.3vw, 1.14rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

.intro__title {
  margin: 1.3rem 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.55rem, 6.6vw, 2.2rem);
  color: var(--wine);
}

/* ---- event blocks ---- */

.event { padding-top: clamp(24px, 7vw, 46px); }

.divider {
  display: block;
  height: auto;
  margin: 0 auto clamp(16px, 4.6vw, 28px);
  color: var(--gold-dk);
}
.divider--wide  { width: min(260px, 76vw); }
.divider--flourish { width: min(210px, 62vw); }
.divider--narrow { width: min(150px, 46vw); }
.divider--close { margin: clamp(22px, 6vw, 34px) auto 0; width: min(180px, 52vw); }

.event__eyebrow {
  margin: 0 0 0.4rem;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: clamp(0.6rem, 2.7vw, 0.76rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rose);
}

.event__name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  line-height: 1.15;
  color: var(--burgundy);
}
.event__name .amp { color: var(--gold); font-style: italic; font-weight: 500; }
.event__name--lg { font-size: clamp(1.9rem, 8.5vw, 2.9rem); }

.event--minor .event__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.28rem, 5.4vw, 1.62rem);
  letter-spacing: 0.02em;
  color: var(--burgundy-w);
}

.event__rule {
  display: block;
  width: 54px;
  height: 1px;
  margin: 0.9rem auto 1.1rem;
  background: linear-gradient(90deg, transparent, var(--gold-dk), transparent);
  position: relative;
}
.event__rule::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gold-dk);
}
.event__rule--lg { width: 76px; }
.event--minor .event__rule { width: 40px; margin: 0.7rem auto 0.9rem; }
.event--minor .event__rule::after { width: 4px; height: 4px; }

.event__date {
  margin: 0.1rem 0 1.2rem;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1;
}
.event__date .d {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.3rem, 10.5vw, 3.2rem);
  color: var(--wine);
}
.event__date .m {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: clamp(0.8rem, 3.5vw, 0.98rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.event__date--lg { gap: 0.62rem; margin-bottom: 1.4rem; }
.event__date--lg .d { font-size: clamp(2.9rem, 14vw, 4.2rem); }
.event__date--lg .m { font-size: clamp(0.88rem, 3.9vw, 1.08rem); letter-spacing: 0.26em; }
.event--minor .event__date { margin-bottom: 0.85rem; }
.event--minor .event__date .d { font-size: clamp(1.85rem, 7.6vw, 2.3rem); }
.event--minor .event__date .m { font-size: clamp(0.7rem, 3vw, 0.84rem); letter-spacing: 0.2em; }

.event__meta {
  margin: 0.4rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-size: clamp(1rem, 4.1vw, 1.12rem);
  color: var(--ink);
}
.event__meta--venue { align-items: flex-start; text-align: left; }
.event__meta--venue span { line-height: 1.45; }

.ic {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  color: var(--gold-dk);
  margin-top: 0.08em;
}

.event--minor .event__meta { font-size: clamp(0.92rem, 3.7vw, 1.02rem); }

/* buttons — real Google Maps links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.9rem;
  padding: 0.72em 1.6em;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: clamp(0.58rem, 2.6vw, 0.7rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--burgundy);
  background: linear-gradient(180deg, #fffaf0, #f2e6cd);
  border: 1px solid var(--gold);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn__ic { width: 1.15em; height: 1.15em; color: var(--gold-dk); }
.btn:hover, .btn:focus-visible {
  transform: translateY(-1px);
  color: var(--wine);
  background: linear-gradient(180deg, #fffdf7, #efe1c2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 8px 18px rgba(67, 16, 27, 0.14);
  outline: none;
}
.btn:active { transform: translateY(0); }
.btn--sm { padding: 0.6em 1.3em; font-size: clamp(0.54rem, 2.4vw, 0.64rem); }

/* "followed by reception" sub-block */
.event__sub {
  margin-top: clamp(20px, 5.5vw, 32px);
  padding-top: clamp(15px, 4vw, 21px);
  border-top: 1px solid rgba(160, 130, 63, 0.35);
}
.event__sublabel {
  display: block;
  margin-bottom: 0.7rem;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: clamp(0.56rem, 2.5vw, 0.68rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose);
}

/* the wedding — the featured block */
.event--feature {
  margin-top: clamp(12px, 3.5vw, 24px);
  padding: clamp(26px, 6vw, 42px) clamp(14px, 5vw, 30px) clamp(22px, 5.5vw, 34px);
  border: 1px solid rgba(160, 130, 63, 0.5);
  border-radius: 3px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 251, 242, 0.65), transparent 70%),
    var(--paper-2);
  position: relative;
}
.event--feature::before,
.event--feature::after {
  content: "";
  position: absolute;
  width: 15px; height: 15px;
  border: 1px solid var(--gold-dk);
}
.event--feature::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.event--feature::after  { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

/* ---- scroll reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- larger screens: same width, just a touch more air ---- */

@media (min-width: 720px) {
  .invite { padding-top: clamp(30px, 5vh, 48px); }
  .invite__inner { width: 400px; }
  .invite__corner { width: clamp(126px, 14vw, 184px); }
}
