/* =========================================================
   Raymelz — Digital Invitations page
   Hero with an animated invitation on a phone, occasion and
   business cards with hand-drawn SVG illustrations.
   Loaded only on /digital-invitations/.
   ========================================================= */

/* ---------- Hero ---------- */
.inv-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, var(--accent) 120%);
  padding: 72px 0 96px;
}
.inv-hero::before { content: ""; position: absolute; width: 620px; height: 620px; right: -160px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,163,224,.45), transparent 65%); animation: invOrb 16s ease-in-out infinite alternate; }
.inv-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%); }
@keyframes invOrb { to { transform: translate(-60px, 50px) scale(1.15); } }
.inv-hero .breadcrumb { margin-bottom: 18px; }
.inv-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.inv-hero .eyebrow { color: #a8e4ff; }
.inv-hero h1 { color: #fff; font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.1; }
.inv-hero h1 .hl { color: var(--gold-light); }
.inv-hero .lead { font-size: 1.12rem; color: rgba(255,255,255,.88); max-width: 560px; }
.inv-perks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.inv-perks li { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 14px; font-size: .92rem; }
.inv-perks strong { color: var(--gold-light); }

/* Rotating occasion word */
.inv-rot { display: inline-block; vertical-align: top; overflow: hidden; height: 1.65em; line-height: 1.65; }
.inv-rot span { display: inline-block; color: #7fd8ff; }
.inv-rot span.out { animation: invRotOut .35s ease forwards; }
.inv-rot span.in { animation: invRotIn .45s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes invRotOut { to { transform: translateY(-110%); opacity: 0; } }
@keyframes invRotIn { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Hero entrance */
.js .inv-copy > * { opacity: 0; animation: invUp .8s cubic-bezier(.2,.7,.2,1) forwards; }
.js .inv-copy > :nth-child(2) { animation-delay: .08s; } .js .inv-copy > :nth-child(3) { animation-delay: .16s; }
.js .inv-copy > :nth-child(4) { animation-delay: .26s; } .js .inv-copy > :nth-child(5) { animation-delay: .36s; }
.js .inv-copy > :nth-child(6) { animation-delay: .46s; }
@keyframes invUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- Animated invitation on a phone ---------- */
.inv-visual { position: relative; display: grid; place-items: center; min-height: 700px; }
.inv-phone { position: relative; z-index: 2; width: 290px; height: 580px; border-radius: 44px; background: #0b1530; padding: 12px;
  box-shadow: 0 40px 80px rgba(3,18,52,.55), 0 0 0 2px rgba(255,255,255,.18); animation: invPhone 1s .2s cubic-bezier(.2,.7,.2,1) both; }
@keyframes invPhone { from { opacity: 0; transform: translateY(40px) scale(.95); } }
.inv-phone::before { content: ""; position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #0b1530; z-index: 3; }
.inv-screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden;
  background: radial-gradient(ellipse 120% 50% at 50% 0%, #e6f4fb 0%, #fff 60%); color: var(--ink); text-align: center; }

/* Envelope intro: the flap opens, the card rises */
.inv-env { position: absolute; left: 50%; top: 300px; width: 210px; height: 140px; margin-left: -105px; z-index: 4; animation: invEnvGo .6s 2.6s ease forwards; }
.inv-env .body { position: absolute; inset: 0; background: #0a4fd6; border-radius: 10px; }
.inv-env .flap { position: absolute; left: 0; right: 0; top: 0; height: 90px; background: #073a9e; clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; animation: invFlap .6s 1.2s ease forwards; z-index: 2; }
.inv-env .seal { position: absolute; left: 50%; top: 70px; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: #7fd8ff; z-index: 3;
  display: grid; place-items: center; font-size: 18px; animation: invSeal .3s 1.05s ease forwards; }
@keyframes invSeal { to { transform: scale(0); opacity: 0; } }
@keyframes invFlap { to { transform: rotateX(180deg); } }
@keyframes invEnvGo { to { transform: translateY(260px); opacity: 0; } }
.inv-card { position: absolute; inset: 0; padding: 50px 20px 20px; opacity: 0; transform: translateY(40px); animation: invCard .8s 2.4s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes invCard { to { opacity: 1; transform: none; } }
.inv-card .small { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.inv-card .names { margin: 6px 0 2px; font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; color: var(--primary-deep); }
.inv-card .names span { color: var(--accent); }
.inv-card .what { font-size: .85rem; color: var(--muted); }
.inv-card svg.inv-arch { display: block; width: 150px; height: 96px; margin: 10px auto 6px; }
.inv-when { margin: 4px auto 0; display: inline-flex; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--primary-deep); background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; }
.inv-count { display: flex; justify-content: center; gap: 6px; margin: 14px 0; }
.inv-count div { width: 52px; padding: 6px 0; border-radius: 10px; background: var(--primary-deep); color: #fff; }
.inv-count b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.inv-count small { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.inv-btns { display: grid; gap: 8px; }
.inv-btns span { display: block; padding: 10px; border-radius: 12px; font-size: .82rem; font-weight: 800; }
.inv-btns .rsvp { background: #25d366; color: #fff; }
.inv-btns .map { background: #fff; border: 1px solid var(--line); color: var(--primary); }
.inv-sched { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.inv-sched span { flex: 1; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 6px 2px; font-size: .66rem; font-weight: 700; color: var(--muted); }
.inv-sched b { display: block; font-size: .78rem; color: var(--primary-deep); }
.inv-petal { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 60% 0 60% 0; background: #7fd8ff; opacity: .8; animation: invFall 6s linear infinite; }
.inv-petal:nth-child(2n) { background: #ffd36b; }
.inv-petal:nth-child(3n) { background: #ff9fc0; }
@keyframes invFall { to { transform: translate(30px, 620px) rotate(360deg); } }

/* Floating chips around the phone */
.inv-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 700; opacity: 0; animation: invChip .7s cubic-bezier(.2,.7,.2,1) forwards, invFloat 6s ease-in-out infinite; }
.inv-chip i { font-style: normal; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1rem; }
.inv-chip.c1 { left: 0; top: 0; animation-delay: 3s, 3.6s; }
.inv-chip.c2 { right: 0; bottom: 0; animation-delay: 3.3s, 3.9s; }
.inv-chip.c3 { left: 0; bottom: 0; animation-delay: 3.6s, 4.2s; }
@keyframes invChip { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes invFloat { 50% { translate: 0 -8px; } }
.inv-env-float { position: absolute; z-index: 1; width: 64px; opacity: .9; animation: invFloat 7s ease-in-out infinite; }
.inv-env-float.e1 { right: 30px; top: 40px; } .inv-env-float.e2 { left: 20px; top: 300px; width: 48px; animation-delay: 1.5s; } .inv-env-float.e3 { right: 10px; bottom: 40px; width: 54px; animation-delay: 3s; }

/* ---------- Occasion strip (marquee) ---------- */
.inv-strip { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 0; overflow: hidden; }
.inv-strip-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; width: max-content; animation: invScroll 40s linear infinite; }
.inv-strip:hover .inv-strip-track { animation-play-state: paused; }
.inv-strip-track li { white-space: nowrap; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-alt); font-weight: 600; font-size: .92rem; color: var(--ink); }
@keyframes invScroll { to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- Occasion & business cards ---------- */
.inv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.inv-cards.four { grid-template-columns: repeat(4, 1fr); }
.inv-card-item { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 22px; transition: transform .25s, box-shadow .25s; }
.inv-card-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.inv-ill { height: 150px; border-radius: 14px; background: linear-gradient(160deg, var(--accent-soft), #fff); display: grid; place-items: center; margin-bottom: 16px; overflow: hidden; }
.inv-ill svg { width: auto; height: 124px; max-width: 92%; overflow: visible; }
.inv-ill svg * { transform-box: fill-box; }
.inv-card-item h3 { font-size: 1.12rem; margin-bottom: .3em; }
.inv-card-item p { margin: 0; color: var(--muted); font-size: .94rem; }
.inv-tag { display: inline-block; margin-top: 12px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--gold-dark); background: #fef3c7; border-radius: 999px; padding: 4px 10px; }
.inv-biz { background: linear-gradient(160deg, var(--primary-deep), #0a3aa8); }
.inv-biz .section-head h2, .inv-biz .section-head p { color: #fff; }
.inv-biz .section-head p { opacity: .85; }
.inv-biz .eyebrow { color: #a8e4ff; }
.inv-biz .inv-card-item { background: rgba(255,255,255,.06); border-color: rgba(127,216,255,.25); color: #fff; }
.inv-biz .inv-card-item h3 { color: #fff; }
.inv-biz .inv-card-item p { color: rgba(255,255,255,.78); }
.inv-biz .inv-ill { background: linear-gradient(160deg, rgba(127,216,255,.18), rgba(255,255,255,.04)); }
.inv-biz .inv-tag { background: rgba(255,209,102,.16); color: var(--gold-light); }
.inv-biz-price { margin: 34px auto 0; max-width: 640px; text-align: center; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(127,216,255,.35); border-radius: 22px; padding: 22px; }
.inv-biz-price b { color: #7fd8ff; font-size: 1.6rem; }

/* Illustration motion */
.a-float { animation: aFloat 4s ease-in-out infinite; }
.a-float2 { animation: aFloat 5s 1s ease-in-out infinite; }
.a-sway { transform-origin: 50% 0%; animation: aSway 3s ease-in-out infinite; }
.a-flick { transform-origin: 50% 100%; animation: aFlick .35s ease-in-out infinite alternate; }
.a-pop { transform-origin: center; animation: aPop 2.6s ease-in-out infinite; }
.a-spin { transform-origin: center; animation: aSpin 9s linear infinite; }
.a-beat { transform-origin: center; animation: aBeat 1.6s ease-in-out infinite; }
.a-rise { animation: aRise 3s ease-in-out infinite; }
@keyframes aFloat { 50% { transform: translateY(-6px); } }
@keyframes aSway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes aFlick { to { transform: scale(1.12, 1.22); } }
@keyframes aPop { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes aSpin { to { transform: rotate(360deg); } }
@keyframes aBeat { 50% { transform: scale(1.14); } }
@keyframes aRise { 0% { transform: translateY(8px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }

/* ---------- Features ---------- */
.inv-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.inv-feat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.inv-feat .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.inv-feat .ic svg { width: 24px; height: 24px; }
.inv-feat h3 { font-size: 1.02rem; margin-bottom: .3em; }
.inv-feat p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Pricing ---------- */
.inv-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.inv-price { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px 26px; }
.inv-price.hot { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.inv-price .badge { position: absolute; top: -14px; left: 26px; background: var(--primary); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.inv-price h3 { font-size: 1.1rem; margin-bottom: .2em; }
.inv-price .amt { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; color: var(--primary); line-height: 1.1; }
.inv-price .amt small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.inv-price ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: .94rem; }
.inv-price li { position: relative; padding-left: 26px; }
.inv-price li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 900; }

/* Word-by-word headline reveal (invite.js splits the words) */
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split-words .w > span { display: inline-block; }
.js .inv-copy > h1.split-words { animation: none; opacity: 1; }
.inv-hero h1.split-words .w > span { transform: translateY(110%); animation: invWord .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(.15s + var(--i) * .07s); }
@keyframes invWord { to { transform: none; } }
.reveal .split-words .w > span { transform: translateY(110%); transition: transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(.12s + var(--i) * .05s); }
.reveal.in .split-words .w > span { transform: none; }
.scroll-prog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1001; pointer-events: none; background: linear-gradient(90deg, var(--primary), var(--accent)); transform: scaleX(0); transform-origin: left; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .inv-grid { grid-template-columns: 1fr; gap: 32px; }
  .inv-visual { min-height: 720px; }
  .inv-cards, .inv-cards.four, .inv-prices { grid-template-columns: 1fr 1fr; }
  .inv-feats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .inv-hero { padding: 48px 0 70px; }
  .inv-cards, .inv-cards.four, .inv-prices { grid-template-columns: 1fr; }
  .inv-feats { grid-template-columns: 1fr; }
  .inv-chip { font-size: .8rem; padding: 8px 10px; }
  .inv-chip i { width: 26px; height: 26px; }
  .inv-chip.c2 { bottom: 52px; right: auto; left: 0; }
  .inv-chip.c3 { bottom: 0; }
  .inv-ill { height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .inv-copy > *, .inv-card, .inv-chip, .inv-phone { opacity: 1 !important; transform: none !important; animation: none !important; }
  .inv-env { display: none; }
  .split-words .w > span { transform: none !important; }
}

/* ---------- Occasion thumbnails ---------- */
.inv-thumb { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 16 / 10; background: var(--accent-soft); }
.inv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.inv-card-item:hover .inv-thumb img { transform: scale(1.06); }
.inv-thumb::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(10,79,214,.08); pointer-events: none; }

/* ---------- Colourful feature icons ---------- */
.inv-feat { transition: transform .25s, box-shadow .25s; }
.inv-feat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.inv-feat .ic { width: 58px; height: 58px; border-radius: 18px; color: #fff; box-shadow: 0 10px 22px rgba(10,79,214,.22); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.inv-feat .ic svg { width: 28px; height: 28px; }
.inv-feat:hover .ic { transform: rotate(-8deg) scale(1.08); }
.inv-feat .ic.c1 { background: linear-gradient(135deg, #0a4fd6, #00a3e0); }
.inv-feat .ic.c2 { background: linear-gradient(135deg, #ff6b8a, #ffb36b); box-shadow: 0 10px 22px rgba(255,107,138,.28); }
.inv-feat .ic.c3 { background: linear-gradient(135deg, #7c3aed, #c084fc); box-shadow: 0 10px 22px rgba(124,58,237,.25); }
.inv-feat .ic.c4 { background: linear-gradient(135deg, #e11d48, #fb7185); box-shadow: 0 10px 22px rgba(225,29,72,.25); }
.inv-feat .ic.c5 { background: linear-gradient(135deg, #f59e0b, #fcd34d); box-shadow: 0 10px 22px rgba(245,158,11,.3); }
.inv-feat .ic.c6 { background: linear-gradient(135deg, #16a34a, #4ade80); box-shadow: 0 10px 22px rgba(22,163,74,.25); }
.inv-feat .ic.c7 { background: linear-gradient(135deg, #0891b2, #67e8f9); box-shadow: 0 10px 22px rgba(8,145,178,.25); }
.inv-feat .ic.c8 { background: linear-gradient(135deg, #06245f, #0a4fd6); }

/* ---------- Launch-offer pricing (4 plans) ---------- */
.inv-prices.four { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.inv-price .amt s { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.inv-price .badge { background: #fef3c7; color: var(--gold-dark); }
.inv-price.hot .badge { background: var(--gold); color: var(--primary-deep); }
.inv-price.premium { background: linear-gradient(160deg, var(--primary-deep), #0a3aa8); border: 0; color: #fff; }
.inv-price.premium h3, .inv-price.premium .amt { color: #fff; }
.inv-price.premium .amt small { color: #a8e4ff; }
.inv-price.premium li::before { color: #7fd8ff; }
.inv-price.premium b { display: block; color: #7fd8ff; }
.inv-price.premium .badge { background: linear-gradient(90deg, var(--gold-light), var(--gold)); color: #06245f; }
.inv-perks s { opacity: .6; margin-left: 2px; }
@media (max-width: 1100px) { .inv-prices.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .inv-prices.four { grid-template-columns: 1fr; } }

/* ---------- Compact hero (fits one laptop screen) + wedding welcome template ---------- */
.inv-hero { padding: 36px 0 44px; }
.inv-hero .breadcrumb { margin-bottom: 12px; }
.inv-hero h1 { font-size: clamp(2rem, 3.3vw, 2.75rem); margin-bottom: .4em; }
.inv-hero .lead { font-size: 1.05rem; margin-bottom: 0; }
.inv-hero .hero-actions { margin-top: 22px; }
.inv-perks { margin-top: 18px; }
.inv-visual { min-height: 540px; }
.inv-phone { width: 262px; height: 520px; border-radius: 40px; padding: 10px; }
.inv-phone::before { top: 18px; width: 84px; height: 22px; }
.inv-screen { border-radius: 31px; background: radial-gradient(ellipse 120% 45% at 50% 0%, #fdf1dc 0%, #fff 62%); }
.inv-env { top: 250px; }
.inv-card { padding: 40px 16px 16px; }
.inv-photo { width: 100%; height: 150px; border-radius: 110px 110px 14px 14px; overflow: hidden; border: 3px solid #f2c14e; box-shadow: 0 8px 20px rgba(6,36,95,.18); }
.inv-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.inv-welcome { margin-top: 10px; font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.35rem; color: #c9861f; line-height: 1.1; }
.inv-card .names { font-size: 1.5rem; margin: 2px 0 0; }
.inv-card .what { font-size: .78rem; }
.inv-count { margin: 10px 0; gap: 5px; }
.inv-count div { width: 48px; padding: 5px 0; }
.inv-count b { font-size: 1.05rem; }
.inv-btns { gap: 6px; }
.inv-btns span { padding: 8px; font-size: .78rem; }
.inv-chip { padding: 8px 12px; font-size: .82rem; }
.inv-chip i { width: 28px; height: 28px; }
.inv-env-float.e1 { top: 20px; } .inv-env-float.e3 { bottom: 20px; }
@media (max-width: 960px) { .inv-visual { min-height: 600px; } }
.inv-hero { padding: 28px 0 32px; }
.inv-visual { min-height: 500px; }
.inv-phone { height: 480px; }
.inv-photo { height: 132px; }
.inv-card { padding-top: 36px; }
.inv-perks { gap: 8px; }
.inv-perks li { padding: 6px 12px; font-size: .86rem; }
@media (max-width: 960px) { .inv-visual { min-height: 560px; } }
.inv-photo img { object-position: 50% 50%; }
.inv-demo-link { display: block; margin-top: 14px; font-weight: 800; font-size: .94rem; color: var(--primary); text-decoration: none; }
.inv-demo-link:hover { text-decoration: underline; }
