/* ============================================================
   Wedding invitation — warm floral theme
   Palette drawn from the reference flower photos:
   terracotta roses, cream & blush peonies, deep-green foliage
   ============================================================ */

:root {
  --cream:      #f6efe6;
  --cream-2:    #efe4d5;
  --paper:      #fbf7f0;
  --terracotta: #c1674a;
  --terra-deep: #a4503a;
  --blush:      #d8a891;
  --green:      #42513c;
  --green-soft: #8a9a6b;
  --gold:       #b08d57;
  --ink:        #4a3a32;
  --ink-soft:   #7a6659;

  --serif: "Noto Serif Armenian", "Cormorant Garamond", Georgia, serif;
  --sans:  "Noto Sans Armenian", system-ui, sans-serif;

  --maxw: 480px;
  --pad-x: 58px;   /* side padding so content clears the floral frame */
  --vine-w: 74px;  /* width of the floral side rails */

  /* ---- flower palette (live-swappable) ---- */
  --fl-bloom-1: #a4503a;
  --fl-bloom-2: #c1674a;
  --fl-bloom-3: #d88b63;
  --fl-center-1: #efd9c4;
  --fl-center-2: #cf9a63;
  --fl-leaf: #5c6b48;
  --fl-vein: #3d4a34;
  --fl-stem: #4a5942;
  --fl-bloom-opacity: 1;
  --vine-opacity: 1;
}

/* Muted vintage — dusty terracotta/blush + soft sage */
body[data-flowers="muted"] {
  --fl-bloom-1: #a9765f;
  --fl-bloom-2: #c39a86;
  --fl-bloom-3: #e0c6b4;
  --fl-center-1: #f1e6d8;
  --fl-center-2: #c9a884;
  --fl-leaf: #8b9a7a;
  --fl-vein: #6d7c5f;
  --fl-stem: #7f8e70;
}

/* Tonal — warm gold-sepia, little green */
body[data-flowers="tonal"] {
  --fl-bloom-1: #a5803f;
  --fl-bloom-2: #c1a066;
  --fl-bloom-3: #dcc392;
  --fl-center-1: #f2e7d1;
  --fl-center-2: #bb965b;
  --fl-leaf: #b6a06a;
  --fl-vein: #9a8452;
  --fl-stem: #ab9560;
}

/* Greenery-forward — sage leaves, small muted blooms */
body[data-flowers="greenery"] {
  --fl-bloom-1: #c39079;
  --fl-bloom-2: #d8b09a;
  --fl-bloom-3: #ecd4c4;
  --fl-center-1: #f3e8db;
  --fl-center-2: #caa07a;
  --fl-leaf: #7d9068;
  --fl-vein: #5f7150;
  --fl-stem: #6f8460;
  --fl-bloom-opacity: .55;
}

/* style toggles */
body.fx-subtle { --vine-opacity: .5; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #efe0cf 0%, transparent 60%),
    linear-gradient(160deg, #ece0d0 0%, #e6d7c4 40%, #ddc9b2 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: clamp(0px, 3vw, 40px) 0;
}

/* soft floral glow behind the card */
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(340px 340px at 8% 6%,  rgba(193,103,74,.28), transparent 70%),
    radial-gradient(300px 300px at 96% 20%, rgba(138,154,107,.22), transparent 70%),
    radial-gradient(360px 360px at 90% 96%, rgba(216,168,145,.30), transparent 70%),
    radial-gradient(320px 320px at 4% 92%, rgba(66,81,60,.20), transparent 70%);
}

/* ---- the invitation card ---- */
.invite {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, var(--maxw));
  margin: 0 auto;
  background: var(--paper);
  border-radius: 22px;
  box-shadow:
    0 30px 70px -30px rgba(74, 58, 50, .55),
    0 2px 0 rgba(255,255,255,.6) inset;
  overflow: hidden;
  border: 1px solid rgba(176, 141, 87, .28);
}
/* thin gold inset frame — the classic formal-stationery detail */
.invite::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(176, 141, 87, .45);
  border-radius: 12px;
  pointer-events: none;
  z-index: 6;
}

/* ============ typography ============ */
.h-title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: .18em;
  font-size: 1.15rem;
  color: var(--terra-deep);
  text-align: center;
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.h-title::after {
  content: "";
  display: block;
  width: 46px; height: 1px;
  background: var(--gold);
  margin: 12px auto 0;
}

.h-script {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--terra-deep);
  text-align: center;
  line-height: 1.25;
}

.lead {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 1.02rem;
  max-width: 34ch;
  margin: 16px auto 0;
}
.lead--sm { font-size: .96rem; }

.block { padding: 40px var(--pad-x); }

/* ============ floral side frame (100% code-generated SVG) ============ */
.floral-defs { position: absolute; width: 0; height: 0; }

.vine {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: var(--vine-w);
  z-index: 5;
  pointer-events: none;
  display: block;
  opacity: var(--vine-opacity, 1);
  transition: opacity .35s ease;
  /* fade the flowers softly inward so text stays readable */
  -webkit-mask: linear-gradient(90deg, #000 30%, rgba(0,0,0,.4) 60%, transparent 100%);
          mask: linear-gradient(90deg, #000 30%, rgba(0,0,0,.4) 60%, transparent 100%);
}
.vine--l { left: 0; }
.vine--r { left: auto; right: 0; transform: scaleX(-1); }

/* ---- decorations ---- */
.cover, .block { position: relative; }
.bd-el, .sep-deco { pointer-events: none; }

/* side vines — only when a flower style is selected */
.vine { display: none; }
body.vines-flowers .vine--flowers { display: block; }
body.vines-roses .vine--roses { display: block; }
body.fx-subtle.vines-on .vine { opacity: .55; }

/* =========================================================
   BORDER  (card frame) — body.bd-*  +  injected .bd-el
   ========================================================= */
/* none: remove the base gold frame entirely */
body.bd-none .invite::after { display: none; }

/* deco-frame: the extra keyline used by double / deco / engrave */
.deco-frame { position: absolute; inset: 0; z-index: 6; border-radius: 12px; }
body.bd-double .deco-frame,
body.bd-deco .deco-frame {
  inset: 21px; border: 1px solid var(--gold); border-radius: 8px; opacity: .7;
}
/* engraved: hide base frame, draw a bold + hairline pair close together */
body.bd-engrave .invite::after { display: none; }
body.bd-engrave .deco-frame {
  inset: 13px; border: 2px solid var(--gold); border-radius: 12px;
}
body.bd-engrave .deco-frame::after {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid var(--gold); border-radius: 8px; opacity: .6;
}

/* geometric side rails + corner brackets (geo) */
.deco-line {
  position: absolute; top: 26px; bottom: 26px; width: 1px; z-index: 4;
  background: linear-gradient(180deg, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
  opacity: .5;
}
.deco-line.dl-l { left: 22px; }
.deco-line.dl-r { right: 22px; }
.deco-corner { position: absolute; width: 30px; height: 30px; z-index: 6; overflow: hidden; }
.deco-corner svg { width: 100%; height: 100%; display: block; }
.deco-corner.fc-tl { top: 20px; left: 20px; }
.deco-corner.fc-tr { top: 20px; right: 20px; transform: scaleX(-1); }
.deco-corner.fc-bl { bottom: 20px; left: 20px; transform: scaleY(-1); }
.deco-corner.fc-br { bottom: 20px; right: 20px; transform: scale(-1, -1); }

/* frame corner ornaments (deco / engrave) — fc-* avoids clash with timeline .tl */
.frame-corner { position: absolute; z-index: 7; overflow: hidden; }
.frame-corner svg { width: 100%; height: 100%; display: block; }
.frame-corner.fc-tl { top: 22px; left: 22px; }
.frame-corner.fc-tr { top: 22px; right: 22px; transform: scaleX(-1); }
.frame-corner.fc-bl { bottom: 22px; left: 22px; transform: scaleY(-1); }
.frame-corner.fc-br { bottom: 22px; right: 22px; transform: scale(-1, -1); }
body.bd-deco .frame-corner { width: 34px; height: 34px; }
body.bd-engrave .frame-corner { width: 20px; height: 20px; }
body.bd-engrave .frame-corner.fc-tl { top: 19px; left: 19px; }
body.bd-engrave .frame-corner.fc-tr { top: 19px; right: 19px; }
body.bd-engrave .frame-corner.fc-bl { bottom: 19px; left: 19px; }
body.bd-engrave .frame-corner.fc-br { bottom: 19px; right: 19px; }

/* =========================================================
   SEPARATOR  (between sections) — body.sep-*  +  .sep-item
   ========================================================= */
/* the JS separator system always replaces the hardcoded rose dividers */
.divider { display: none !important; }

.sep-item { display: flex; flex-direction: column; align-items: center; justify-content: center; }
/* single hairline */
.sep-line-w { padding: 14px var(--pad-x); }
.sep-line-w span { display: block; width: min(220px, 60%); height: 1px; background: var(--gold); opacity: .6; }
/* rule with center diamond */
.sep-rule-w { padding: 12px var(--pad-x) 6px; }
.sep-rule-w .fl-rule { width: min(220px, 62%); height: auto; opacity: .9; }
/* double hairline */
.sep-double-w { gap: 4px; padding: 16px var(--pad-x); }
.sep-double-w span { display: block; width: min(220px, 60%); height: 0; border-top: 1px solid var(--gold); }
.sep-double-w span:first-child { opacity: .65; }
.sep-double-w span:last-child { opacity: .4; }
/* rose (flower) — center bloom with gold rules */
.sep-rose-w { padding: 8px var(--pad-x) 6px; overflow: visible; }
.sep-rose-w .fl-rose-sep {
  width: min(240px, 70%);
  height: auto;
  display: block;
  overflow: visible;
}
/* garland (flower) */
.sep-garland-w { padding: 10px var(--pad-x) 4px; }
.sep-garland-w .fl-garland { width: min(340px, 82%); height: auto; opacity: .96; }


/* ============ COVER ============ */
.cover {
  padding: 0 0 34px;
  text-align: center;
}
.cover__photo {
  height: 460px;
  background:
    linear-gradient(180deg, rgba(40,30,24,.12), rgba(40,30,24,0) 30%),
    linear-gradient(0deg, rgba(193,103,74,.14), rgba(193,103,74,0) 45%),
    url("assets/couple-cover.png") center 28% / cover no-repeat,
    linear-gradient(135deg, #cdb39a, #b79c82);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 3px solid var(--paper);
  position: relative;
}
.cover__photo::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 -60px 60px -30px rgba(251,247,240,.9);
}
.photo-hint {
  font-family: var(--serif);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .7rem;
  color: rgba(255,255,255,.85);
  background: rgba(74,58,50,.22);
  padding: 6px 14px;
  border-radius: 30px;
  z-index: 1;
}

.cover__eyebrow {
  font-family: var(--serif);
  letter-spacing: .34em;
  font-size: .72rem;
  color: var(--gold);
  margin: 28px 0 10px;
  text-indent: .34em;
}

.names {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1;
  margin: 4px 0 2px;
}
.names__one, .names__two {
  display: block;
  font-size: 3.15rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.names__amp {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--terracotta);
  margin: 6px 0;
}

.date {
  display: flex; align-items: center; justify-content: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink-soft);
  margin: 18px 0 10px;
}
.date span { margin-right: -0.12em; } /* cancel trailing letter-spacing so digits center between dots */
.date .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--terracotta); }

.cover__note {
  font-weight: 300;
  color: var(--ink-soft);
  margin: 8px 0 18px;
}

/* countdown */
.countdown { padding: 0 var(--pad-x); }
.countdown__label {
  font-family: var(--serif);
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .68rem;
  color: var(--gold);
  margin-bottom: 12px;
}
.countdown__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cd {
  background: rgba(251, 247, 240, .7);
  border: 1px solid rgba(176,141,87,.22);
  border-radius: 12px;
  padding: 13px 4px;
  display: flex; flex-direction: column; gap: 3px;
}
.cd__num {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--terra-deep);
  font-variant-numeric: tabular-nums;
}
.cd__unit {
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

/* ============ dividers ============ */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 4px 0;
}
.divider::before, .divider::after {
  content: "";
  height: 1px; width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { transform: scaleX(-1); }
.divider__leaf {
  width: 22px; height: 22px;
  background: var(--terracotta);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C7 6 4 10 4 15a8 8 0 0 0 16 0c0-5-3-9-8-13Zm0 4c3 3 5 6 5 9a5 5 0 0 1-10 0c0-3 2-6 5-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C7 6 4 10 4 15a8 8 0 0 0 16 0c0-5-3-9-8-13Zm0 4c3 3 5 6 5 9a5 5 0 0 1-10 0c0-3 2-6 5-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .85;
}

/* ============ MESSAGE ============ */
.message { position: relative; }
.message__photo {
  display: block;
  width: calc(100% + var(--pad-x) * 2);
  height: auto;
  margin-left: calc(var(--pad-x) * -1);
  margin-right: calc(var(--pad-x) * -1);
  margin-bottom: 30px;
}

/* ============ PROGRAM / timeline ============ */
.timeline {
  list-style: none;
  position: relative;
  max-width: 300px;
  margin: 0 auto;
  padding-left: 8px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--blush), var(--gold), var(--green-soft));
}
.tl {
  padding: 6px 0;
  position: relative;
}
.tl__link {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: background .2s ease, transform .15s ease;
}
.tl__link:hover { background: #f3e4da; transform: translateX(2px); }
.tl__link:hover .tl__icon {
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: scale(1.06);
}
.tl__link:hover .tl__time { color: var(--terra-deep); }
.tl__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid rgba(176,141,87,.4);
  border-radius: 50%;
  color: var(--terracotta);
  z-index: 1;
  transition: background .2s ease, border-color .2s ease, transform .15s ease, color .2s ease;
}
.tl__icon svg {
  width: 21px; height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tl__link:hover .tl__icon svg { stroke: #fff; }
.tl__body { display: flex; flex-direction: column; }
.tl__time {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: .02em;
  color: var(--terra-deep);
  line-height: 1.1;
}
.tl__text {
  font-size: .86rem;
  color: var(--ink-soft);
  line-height: 1.3;
  margin-top: 1px;
}
.tl__place {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: .78rem;
  color: var(--terracotta);
  line-height: 1.25;
}
.tl__pin {
  flex: 0 0 auto;
  width: 11px; height: 11px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ============ buttons ============ */
.btn {
  display: inline-block;
  font-family: var(--sans);
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, var(--terracotta), var(--terra-deep));
  padding: 13px 26px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 22px -12px rgba(164,80,58,.9);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 28px -14px rgba(164,80,58,.95); }
.btn:active { transform: translateY(0); }
.btn--full { width: 100%; margin-top: 22px; }

/* ============ CONTACTS ============ */
.contacts { text-align: center; }
.contacts__grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
  margin: 20px auto 0;
}
.contact {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  background: rgba(251, 247, 240, .7);
  border: 1px solid rgba(176,141,87,.22);
  border-radius: 14px;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.contact:hover {
  background: #f3e4da;
  border-color: rgba(176,141,87,.4);
  transform: translateY(-1px);
}
.contact__ic {
  flex: 0 0 auto;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--paper); border-radius: 50%;
  border: 1px solid rgba(176,141,87,.4);
  color: var(--terracotta);
}
.contact__ic svg { width: 19px; height: 19px; fill: currentColor; }
.contact__body { display: flex; flex-direction: column; line-height: 1.2; }
.contact__name {
  font-family: var(--serif);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact__num {
  font-size: 1.06rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============ FOOTER ============ */
.foot {
  text-align: center;
  padding: 40px 26px 48px;
  background:
    linear-gradient(180deg, transparent, rgba(216,168,145,.14)),
    var(--paper);
}
.foot__sign { font-size: 1.5rem; margin-top: 4px; }
.foot__names {
  margin-top: 14px;
  letter-spacing: .2em;
  font-size: .8rem;
  color: var(--gold);
}

/* ============ intro / entry screen ============ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 50% 0%, rgba(255, 248, 236, .7), transparent 55%),
    radial-gradient(700px 420px at 15% 90%, rgba(193, 103, 74, .12), transparent 50%),
    linear-gradient(165deg, #e9dcc8 0%, #e2d2bc 45%, #d6c3a8 100%);
  transition: opacity .8s ease, visibility .8s ease;
}
.intro.is-hidden { opacity: 0; visibility: hidden; }
.intro__inner {
  animation: introIn 1s ease both;
}
.intro__eyebrow {
  font-family: var(--serif);
  letter-spacing: .42em;
  text-indent: .42em;
  font-size: .74rem;
  color: var(--gold);
  margin-bottom: 14px;
}
.intro__names {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.05;
}
.intro__names span {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--terracotta);
  margin: 6px 0;
}
.intro__date {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .1em;
  color: var(--ink);
  margin: 16px 0 28px;
}

/* ---------- realistic rolled parchment ---------- */
.scroll {
  --scroll-w: min(300px, 78vw);
  --scroll-h: 260px;
  position: relative;
  width: var(--scroll-w);
  height: var(--scroll-h);
  margin: 8px auto 0;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll__shadow {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 42%;
  bottom: -8%;
  border-radius: 40%;
  background: radial-gradient(ellipse at 50% 40%, rgba(74, 40, 30, .32), transparent 70%);
  filter: blur(8px);
  z-index: 0;
  transition: opacity .6s ease, top 1.15s cubic-bezier(.45, .02, .2, 1), bottom 1.15s cubic-bezier(.45, .02, .2, 1);
}
.scroll__sheet {
  position: absolute;
  inset: 18px 4px;
  z-index: 1;
  border-radius: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(120, 85, 45, .18), transparent 8%, transparent 92%, rgba(120, 85, 45, .18)),
    linear-gradient(180deg, #d7c19a 0%, #f0e4c8 12%, #f7eed8 50%, #ecdcb8 88%, #d4bc92 100%);
  box-shadow:
    inset 0 0 28px rgba(140, 100, 55, .14),
    inset 8px 0 16px rgba(120, 85, 45, .08),
    inset -8px 0 16px rgba(120, 85, 45, .08);
  clip-path: inset(38% 0 38% 0);
  transition: clip-path 1.2s cubic-bezier(.45, .02, .2, 1);
}
.scroll__grain {
  position: absolute;
  inset: 0;
  opacity: .4;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(120, 85, 45, .08) .55px, transparent .7px),
    linear-gradient(90deg, transparent 0%, rgba(255, 250, 235, .2) 50%, transparent 100%);
  background-size: 3px 3px, 100% 100%;
}
.scroll__content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: scaleY(.92);
  transition: opacity .55s ease .5s, transform .55s ease .5s;
}
.scroll__eyebrow {
  font-family: var(--serif);
  font-size: .62rem;
  letter-spacing: .36em;
  text-indent: .36em;
  color: var(--gold);
}
.scroll__mono {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--terra-deep);
  line-height: 1;
}
.scroll__mono i {
  font-style: italic;
  font-size: 1rem;
  margin: 0 3px;
  color: var(--terracotta);
}
.scroll__date {
  font-family: var(--serif);
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--ink);
}

/* cylindrical parchment rolls */
.scroll__roll {
  position: absolute;
  left: -12px;
  right: -12px;
  height: 40px;
  z-index: 3;
  border-radius: 20px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(90, 60, 30, .08) 0 1px,
      transparent 1px 5px
    ),
    linear-gradient(
      180deg,
      #9a7848 0%,
      #c9a66e 16%,
      #f0e0bc 34%,
      #fff8e8 48%,
      #e8d4a8 58%,
      #c4a06a 78%,
      #8f6e42 100%
    );
  box-shadow:
    0 10px 18px -6px rgba(74, 40, 30, .55),
    inset 0 2px 3px rgba(255, 250, 235, .75),
    inset 0 -5px 8px rgba(90, 60, 30, .35);
  transition: top 1.2s cubic-bezier(.45, .02, .2, 1), bottom 1.2s cubic-bezier(.45, .02, .2, 1);
}
.scroll__roll-core {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: rgba(90, 60, 30, .28);
  box-shadow:
    0 -5px 0 rgba(255, 248, 230, .28),
    0 5px 0 rgba(90, 60, 30, .16);
}
.scroll__roll--top { top: 42%; }
.scroll__roll--bottom { bottom: 42%; }

/* silk ribbon */
.scroll__ribbon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: calc(100% + 28px);
  height: 14px;
  border-radius: 2px;
  background:
    linear-gradient(180deg, #c96a52 0%, #a4503a 40%, #833628 100%);
  box-shadow:
    0 3px 8px rgba(74, 40, 30, .4),
    inset 0 1px 0 rgba(255, 210, 190, .35);
  transition: opacity .4s ease .05s, transform .5s ease;
}
.scroll__ribbon::before,
.scroll__ribbon::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 22px;
  height: 34px;
  background: linear-gradient(180deg, #a4503a, #7a3224);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: .95;
}
.scroll__ribbon::before { left: 28%; transform: rotate(-8deg); transform-origin: top center; }
.scroll__ribbon::after { right: 28%; transform: rotate(8deg); transform-origin: top center; }

/* wax seal on the ribbon */
.scroll__seal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 28%, #d9785c, #a4503a 48%, #7a3224 78%, #5c241a 100%);
  box-shadow:
    0 6px 14px rgba(74, 40, 30, .45),
    inset 0 2px 3px rgba(255, 210, 190, .35),
    inset 0 -3px 6px rgba(60, 20, 12, .35);
  transition: opacity .4s ease, transform .5s cubic-bezier(.4, .1, .2, 1);
}
.scroll__seal-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 220, 190, .28);
  box-shadow: inset 0 0 0 1px rgba(80, 25, 15, .22);
}
.scroll__seal-mono {
  position: relative;
  font-family: var(--serif);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #f6e4d4;
  text-shadow: 0 1px 1px rgba(60, 20, 12, .45);
}

.scroll__label {
  margin-top: 22px;
  font-family: var(--serif);
  letter-spacing: .16em;
  font-size: .82rem;
  color: var(--terra-deep);
}

.scroll:hover .scroll__seal {
  transform: translate(-50%, -50%) scale(1.05);
}

/* unroll */
.scroll.is-open { cursor: default; }
.scroll.is-open .scroll__sheet {
  clip-path: inset(0 0 0 0);
}
.scroll.is-open .scroll__roll--top { top: 0; }
.scroll.is-open .scroll__roll--bottom { bottom: 0; }
.scroll.is-open .scroll__content {
  opacity: 1;
  transform: none;
}
.scroll.is-open .scroll__ribbon,
.scroll.is-open .scroll__seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
  pointer-events: none;
}
.scroll.is-open .scroll__shadow {
  top: 8%;
  bottom: -4%;
  opacity: .55;
}

@media (prefers-reduced-motion: reduce) {
  .scroll__sheet, .scroll__roll, .scroll__content, .scroll__ribbon, .scroll__seal, .scroll__shadow {
    transition: none;
  }
}

@keyframes introIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro__inner { animation: none; }
}

/* ============ background music ============ */
/* keep the YouTube player rendered but invisible (display:none can stop audio) */
.yt-audio {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(180deg, var(--terracotta), var(--terra-deep));
  box-shadow: 0 10px 24px -10px rgba(164, 80, 58, .9);
  display: grid;
  place-items: center;
  transition: transform .15s ease, filter .2s ease;
}
.music-toggle:hover { transform: translateY(-2px); filter: brightness(1.05); }
.music-toggle:active { transform: translateY(0); }

.music-toggle__note {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
}
/* equalizer bars, animated only while playing */
.music-toggle__wave {
  position: absolute;
  bottom: 15px;
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .85);
  opacity: 0;
}
.music-toggle__wave:nth-child(1) { left: 17px; }
.music-toggle__wave:nth-child(2) { left: 24.5px; }
.music-toggle__wave:nth-child(3) { left: 32px; }

.music-toggle.is-playing .music-toggle__note { opacity: 0; }
.music-toggle.is-playing .music-toggle__wave {
  opacity: 1;
  animation: eq .9s ease-in-out infinite;
}
.music-toggle.is-playing .music-toggle__wave:nth-child(2) { animation-delay: .18s; }
.music-toggle.is-playing .music-toggle__wave:nth-child(3) { animation-delay: .36s; }

@keyframes eq {
  0%, 100% { height: 7px; }
  50% { height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing .music-toggle__wave { animation: none; height: 12px; }
}

/* ============ scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* narrower phones — slim the frame so content keeps room */
@media (max-width: 420px) {
  :root { --pad-x: 44px; --vine-w: 52px; }
}
@media (max-width: 360px) {
  :root { --pad-x: 40px; --vine-w: 46px; }
  .names__one, .names__two { font-size: 2.6rem; }
  .cd__num { font-size: 1.35rem; }
  .block { padding: 34px var(--pad-x); }
}

/* ============ divider rose ============ */
.divider__rose {
  width: 26px; height: 26px;
  display: block;
  opacity: .92;
  filter: drop-shadow(0 2px 3px rgba(74,40,30,.15));
}

/* ============ add-to-calendar link ============ */
.cal-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.cal-link:hover { color: var(--terra-deep); border-color: rgba(164,80,58,.4); }
.cal-link__ic svg {
  display: block;
  width: 15px; height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ cover photo reveal (plays as the intro hands off) ============ */
@keyframes photoIn {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: none; }
}
.cover__photo { animation: none; }
.entered .cover__photo { animation: photoIn 1.3s ease both; }
@media (prefers-reduced-motion: reduce) {
  .entered .cover__photo { animation: none; }
}

/* ============ flower preview panel ============ */
.fxpanel {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 40;
  width: 210px;
  background: rgba(251, 247, 240, .96);
  border: 1px solid rgba(176, 141, 87, .5);
  border-radius: 14px;
  box-shadow: 0 14px 34px -14px rgba(74, 58, 50, .5);
  font-family: var(--sans);
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.fxpanel__tab {
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--terra-deep);
  color: #fdf7ee;
  font-family: var(--serif);
  letter-spacing: .06em;
  font-size: .82rem;
  padding: 9px 12px;
  text-align: left;
}
.fxpanel__body { padding: 10px 12px 12px; }
.fxpanel.is-collapsed .fxpanel__body { display: none; }
.fxpanel__h {
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 6px 0 6px;
}
.fxrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.fxrow button {
  flex: 1 0 auto;
  cursor: pointer;
  border: 1px solid rgba(176, 141, 87, .45);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  font-size: .74rem;
  padding: 6px 10px;
  transition: background .2s, color .2s, border-color .2s;
}
.fxrow button:hover { border-color: var(--terracotta); }
.fxrow button.is-on {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}
@media (max-width: 380px) {
  .fxpanel { width: 176px; left: 10px; bottom: 10px; }
}

/* ============ print ============ */
@media print {
  .fxpanel { display: none !important; }
  .intro, .music-toggle, .yt-audio, .page-glow, .vine { display: none !important; }
  body { background: #fff; padding: 0; }
  .invite {
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
  .invite::after { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: inherit; text-decoration: none; }
}
