:root {
  --cream: #f4f1ea;
  --cream-deep: #ece6d6;
  --green: #2f4a3c;
  --green-soft: #4a6b58;
  --green-line: #6b8a78;
  --ink: #2a3b30;
  --brown: #5d4037;
  --shadow: rgba(47, 74, 60, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--green);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.5) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(120,140,110,0.08) 0, transparent 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.29 0 0 0 0 0.23 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px 64px;
  position: relative;
}

/* ---------- Botanical corners ---------- */
.botanical {
  position: absolute;
  width: clamp(160px, 22vw, 280px);
  pointer-events: none;
  opacity: 0.92;
  z-index: 1;
}
.botanical.tl { top: 8px; left: -10px; }
.botanical.br { bottom: 8px; right: -10px; transform: rotate(180deg); }
.botanical.bl { bottom: 8px; left: -14px; width: clamp(140px, 18vw, 230px); }

/* ---------- Hero quote ---------- */
.hero-quote {
  text-align: right;
  max-width: 320px;
  margin-left: auto;
  padding-right: 8px;
  position: relative;
  z-index: 3;
}
.hero-quote .script {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--green);
  line-height: 1.15;
}
.hero-quote .divider {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; margin-top: 6px;
}
.hero-quote .divider .line { width: 70px; height: 1px; background: var(--green-line); }
.hero-quote .divider .heart { color: var(--green-soft); font-size: 14px; }

/* ---------- Photo collage ---------- */
.collage { position: relative; margin: 34px 0 8px; min-height: 460px; z-index: 2; }

.photo-main {
  position: relative;
  width: clamp(260px, 46%, 460px);
  margin-top: 10px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.35);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='600' preserveAspectRatio='none'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.018' numOctaves='3' seed='7'/><feDisplacementMap in='SourceGraphic' scale='14'/></filter><rect x='6' y='6' width='388' height='588' fill='black' filter='url(%23r)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='600' preserveAspectRatio='none'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.018' numOctaves='3' seed='7'/><feDisplacementMap in='SourceGraphic' scale='14'/></filter><rect x='6' y='6' width='388' height='588' fill='black' filter='url(%23r)'/></svg>");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: floatIn 1s ease both;
}
.photo-main img { display: block; width: 100%; height: auto; }

.photo-polaroid {
  position: absolute;
  top: 40px; right: 4%;
  width: clamp(180px, 30%, 300px);
  transform: rotate(5deg);
  background: #fffdf8;
  padding: 14px 14px 56px;
  box-shadow: 0 22px 38px -16px rgba(0,0,0,0.4), 0 4px 10px rgba(0,0,0,0.08);
  border-radius: 2px;
  z-index: 4;
  animation: floatInRot 1.1s 0.15s ease both;
}
.photo-polaroid img { display: block; width: 100%; height: auto; filter: saturate(0.96) contrast(1.02); }
.photo-polaroid .caption {
  position: absolute; bottom: 14px; left: 0; right: 0;
  text-align: center; font-family: 'Great Vibes', cursive;
  color: var(--brown); font-size: clamp(16px, 2vw, 22px);
}

/* ---------- Save the Date ---------- */
.std-block { text-align: center; margin: 28px auto 0; max-width: 640px; position: relative; z-index: 3; animation: floatIn 1.1s 0.25s ease both; }
.std-line { display: flex; align-items: baseline; justify-content: center; gap: 18px; }
.std-line .script-big { font-family: 'Great Vibes', cursive; font-size: clamp(54px, 11vw, 104px); color: var(--green); line-height: 0.95; }
.std-line .the { font-family: 'Playfair Display', serif; font-size: clamp(14px, 2vw, 20px); letter-spacing: 0.42em; text-transform: uppercase; color: var(--green-soft); padding-bottom: 10px; }
.std-underline { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.std-underline .line { width: 90px; height: 1px; background: var(--green-line); }
.std-underline .heart { color: var(--green-soft); font-size: 15px; }

/* ---------- Names ---------- */
.names { text-align: center; margin-top: 30px; position: relative; z-index: 3; animation: floatIn 1.1s 0.35s ease both; }
.names .couple { font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(26px, 5vw, 46px); letter-spacing: 0.18em; color: var(--green); }
.names .couple .amp { font-family: 'Great Vibes', cursive; font-weight: 400; letter-spacing: 0; font-size: 1.1em; color: var(--green-soft); padding: 0 6px; }
.names .sub { margin-top: 10px; font-family: 'Playfair Display', serif; font-size: clamp(13px, 2vw, 17px); letter-spacing: 0.34em; text-transform: uppercase; color: var(--green-soft); }

/* ---------- Date ---------- */
.date-block { display: flex; align-items: stretch; justify-content: center; gap: 26px; margin: 34px auto 6px; position: relative; z-index: 3; animation: floatIn 1.1s 0.45s ease both; }
.date-block .vline { width: 1px; background: var(--green-line); }
.date-block .date-inner { text-align: center; }
.date-block .nums { font-family: 'Playfair Display', serif; font-weight: 700; font-size: clamp(48px, 9vw, 86px); line-height: 1; color: var(--green); letter-spacing: 0.04em; }
.date-block .month { margin-top: 8px; font-family: 'Playfair Display', serif; font-size: clamp(15px, 2.4vw, 22px); letter-spacing: 0.4em; text-transform: uppercase; color: var(--green-soft); }

/* ---------- Venue ---------- */
.venue { text-align: center; margin: 34px auto 0; max-width: 560px; position: relative; z-index: 3; animation: floatIn 1.1s 0.5s ease both; }
.venue-label { font-family: 'Playfair Display', serif; font-style: italic; font-size: 15px; letter-spacing: 0.18em; color: var(--green-soft); text-transform: uppercase; }
.venue-name { font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(24px, 4.5vw, 38px); color: var(--green); margin-top: 8px; letter-spacing: 0.06em; }
.venue-city { font-family: 'Great Vibes', cursive; font-size: clamp(22px, 3.6vw, 32px); color: var(--green-soft); margin-top: 2px; }
.map-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-family: 'Playfair Display', serif; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); text-decoration: none; border-bottom: 1px solid var(--green-line); padding-bottom: 3px; transition: color 0.2s, border-color 0.2s; }
.map-link:hover { color: var(--green-soft); border-color: var(--green-soft); }

/* ---------- Add to Calendar ---------- */
.cal-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 26px auto 0; position: relative; z-index: 3; animation: floatIn 1.1s 0.6s ease both; }
.cal-btn { display: inline-flex; align-items: center; gap: 9px; font-family: 'Playfair Display', serif; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 12px 26px; border-radius: 999px; border: 1px solid var(--green); transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s; }
.cal-google { color: var(--cream); background: var(--green); box-shadow: 0 10px 24px -12px var(--shadow); }
.cal-google:hover { transform: translateY(-2px); }
.cal-google:active { transform: translateY(0); }
.cal-ics { color: var(--green); background: transparent; }
.cal-ics:hover { background: var(--green); color: var(--cream); transform: translateY(-2px); }
.cal-ics:active { transform: translateY(0); }

/* ---------- Countdown ---------- */
.countdown { margin: 30px auto 0; max-width: 560px; text-align: center; position: relative; z-index: 3; animation: floatIn 1.1s 0.7s ease both; }
.countdown .label { font-family: 'Playfair Display', serif; font-style: italic; font-size: 15px; letter-spacing: 0.18em; color: var(--green-soft); margin-bottom: 14px; text-transform: uppercase; }
.count-grid { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); }
.count-cell { text-align: center; min-width: 64px; }
.count-cell .num { font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(30px, 6vw, 52px); line-height: 1; color: var(--green); }
.count-cell .unit { margin-top: 6px; font-family: 'Playfair Display', serif; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--green-soft); }

/* ---------- Footer ---------- */
.footer-note { text-align: center; margin-top: 36px; position: relative; z-index: 3; animation: floatIn 1.1s 0.8s ease both; }
.footer-note .heart { color: var(--green-soft); font-size: 16px; }
.footer-note .more { font-family: 'Great Vibes', cursive; font-size: clamp(22px, 3.4vw, 32px); color: var(--green); margin-top: 4px; }
.credit { text-align: center; margin-top: 40px; font-family: 'Playfair Display', serif; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--green-line); opacity: 0.8; }

/* ---------- Animations ---------- */
@keyframes floatIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatInRot { from { opacity: 0; transform: rotate(5deg) translateY(18px); } to { opacity: 1; transform: rotate(5deg) translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .page { padding: 40px 18px 124px; }
  .hero-quote { text-align: center; margin: 0 auto 6px; padding: 0; }
  .hero-quote .divider { justify-content: center; }
  .collage { min-height: auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
  .photo-main { width: 78%; margin: 0; }
  .photo-polaroid { position: relative; top: auto; right: auto; transform: rotate(4deg); width: 64%; }
  .botanical.tl { width: 104px; opacity: 0.6; top: 6px; left: -16px; }
  .botanical.br { width: 104px; opacity: 0.6; bottom: 6px; right: -16px; }
  .botanical.bl { width: 92px; opacity: 0.55; bottom: 6px; left: -18px; }
  .date-block { gap: 16px; }
  .date-block .vline { display: none; }
  .credit { margin-top: 36px; }
}
