<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nikah Invitation</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
background: #f7eee9;
color: #54202c;
font-family: Georgia, serif;
text-align: center;
overflow-x: hidden;
}
section {
padding: 65px 22px;
position: relative;
}
.maroon {
color: #702b3b;
}
.gold {
color: #b58b49;
}
.eyebrow {
font-size: 12px;
letter-spacing: 4px;
text-transform: uppercase;
color: #a57a52;
margin-bottom: 18px;
}
h1, h2 {
font-weight: normal;
}
h1 {
font-size: clamp(32px, 8vw, 48px);
}
h2 {
font-size: 30px;
margin-bottom: 20px;
}
p {
line-height: 1.9;
}
.ornament {
color: #ad8150;
font-size: 25px;
margin: 18px 0;
}
.flower {
font-size: 28px;
color: #9c5260;
margin: 15px;
}
/* ENVELOPE */
.opening {
min-height: 100svh;
background: #702b3b;
color: #f8eee5;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 30px 15px;
}
.opening .eyebrow {
color: #e0bf88;
}
.envelope {
position: relative;
width: min(310px, 85vw);
height: 195px;
margin: 45px auto 25px;
cursor: pointer;
perspective: 800px;
}
.env-body {
position: absolute;
inset: 0;
background: #f2dfce;
border-radius: 5px;
box-shadow: 0 15px 35px #2e101c80;
z-index: 2;
}
.env-body:before,
.env-body:after {
content: "";
position: absolute;
bottom: 0;
width: 0;
height: 0;
border-style: solid;
}
.env-body:before {
left: 0;
border-width: 0 155px 115px 155px;
border-color: transparent transparent #dfc0a7 transparent;
}
.env-body:after {
left: 0;
border-width: 98px 155px 0 155px;
border-color: #e9d0bc transparent transparent transparent;
}
.flap {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
border-left: 155px solid transparent;
border-right: 155px solid transparent;
border-top: 115px solid #c9a58c;
transform-origin: top;
transition: transform 1s ease;
z-index: 4;
}
.seal {
position: absolute;
top: 76px;
left: 50%;
transform: translateX(-50%);
width: 43px;
height: 43px;
background: #a77b3e;
border-radius: 50%;
color: white;
display: grid;
place-items: center;
z-index: 5;
font-size: 22px;
box-shadow: 0 2px 7px #5c3540;
transition: opacity .4s;
}
.envelope.open .flap {
transform: rotateX(180deg);
z-index: 1;
}
.envelope.open .seal {
opacity: 0;
}
.open-text {
color: #e8c99a;
font-size: 13px;
letter-spacing: 2px;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
50% { opacity: .45; }
}
/* INVITATION */
#inside {
display: none;
animation: fadeIn 1.5s ease;
}
#inside.visible {
display: block;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.invitation {
background: #f7eee9;
border: 1px solid #d6b990;
margin: 12px;
padding: 45px 20px;
}
.names {
font-size: clamp(30px, 8vw, 43px);
line-height: 1.5;
color: #702b3b;
}
.ampersand {
color: #b18a54;
font-size: 30px;
margin: 5px;
}
.small {
font-size: 14px;
color: #82645d;
}
/* COUPLE */
.couple {
background: #702b3b;
color: #f8eee5;
}
.couple .eyebrow {
color: #e4c69d;
}
.couple-art {
margin: 30px auto;
width: 230px;
height: 240px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #c49c69;
border-radius: 120px 120px 8px 8px;
background: #f2e3d6;
font-size: 65px;
}
.couple .small {
color: #ead5c7;
}
/* SCRATCH CARD */
.scratch-section {
background: #f7eee9;
}
.scratch-card {
width: min(310px, 90vw);
margin: 30px auto;
position: relative;
height: 205px;
border: 2px solid #c5a16d;
border-radius: 18px;
overflow: hidden;
background: #fffaf4;
box-shadow: 0 8px 25px #702b3b18;
}
.date-under {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #702b3b;
}
.date-under strong {
font-size: 28px;
margin: 12px;
}
#scratchCanvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
touch-action: none;
cursor: crosshair;
}
.scratch-instruction {
color: #94724e;
font-size: 13px;
letter-spacing: 1px;
}
/* DETAILS */
.details {
background: #702b3b;
color: #f9eee6;
}
.details .eyebrow {
color: #dfc08d;
}
.detail-box {
border: 1px solid #b58b62;
padding: 25px 15px;
margin: 20px auto;
max-width: 370px;
}
.detail-box h3 {
color: #e6c18c;
font-weight: normal;
margin-bottom: 10px;
}
.map-button {
display: inline-block;
padding: 13px 25px;
background: #e9d6c2;
color: #702b3b;
text-decoration: none;
border-radius: 30px;
margin-top: 18px;
font-size: 13px;
}
/* QURAN */
.quran {
background: #f2e4d8;
}
.arabic {
font-size: 30px;
line-height: 1.9;
color: #702b3b;
margin: 20px 0;
}
/* END */
.ending {
background: #702b3b;
color: #f9eee6;
min-height: 350px;
}
.ending .eyebrow {
color: #e6c18c;
}
.footer-flower {
font-size: 32px;
color: #d3ad80;
margin: 20px;
}
@media (max-width: 380px) {
.invitation { padding: 35px 12px; }
}
</style>
</head>
<body>
<!-- OPENING ENVELOPE -->
<section class="opening">
<div class="eyebrow">Together with their families</div>
<h1>A Special Invitation</h1>
<div class="ornament">❦ ❦ ❦</div>
<div class="envelope" id="envelope"
onclick="openInvitation()">
<div class="env-body"></div>
<div class="flap"></div>
<div class="seal">♥</div>
</div>
<div class="open-text" id="openText">
TAP THE ENVELOPE TO OPEN
</div>
<p class="small" style="color:#e9d4c6;margin-top:20px">
A beautiful beginning awaits...
</p>
</section>
<main id="inside">
<!-- MAIN INVITATION -->
<section class="invitation">
<div class="flower">❀ ❁ ❀</div>
<div class="eyebrow">Bismillahir Rahmanir Raheem</div>
<h2 class="maroon">Nikah Invitation</h2>
<p class="small">
Together with their families,
</p>
<div class="names" style="margin-top:20px">
BRIDE NAME
<div class="ampersand">&</div>
GROOM NAME
</div>
<div class="ornament">❦</div>
<p>
Request the pleasure of your company
and blessings at their Nikah.
</p>
<div class="flower">✿ ❀ ✿</div>
<p class="small">
Your presence and duas will make
our special day even more meaningful.
</p>
</section>
<!-- COUPLE SECTION -->
<section class="couple">
<div class="eyebrow">A beautiful journey begins</div>
<h2>Two Hearts, One Promise</h2>
<div class="couple-art">
👰🏻♀️ 🤵🏻
</div>
<p>
Two families, two hearts, and a beautiful
new chapter written with love and faith.
</p>
<div class="ornament">❦</div>
<p class="small">
May Allah bless their journey together.
</p>
</section>
<!-- SCRATCH HEART -->
<section class="scratch-section">
<div class="eyebrow">A little surprise for you</div>
<h2>Something Special!</h2>
<p>
We've kept one little secret for you.
Scratch the heart to discover our special day!
</p>
<div class="scratch-card">
<div class="date-under">
<span class="small">OUR NIKAH DATE</span>
<strong>DD · MM · YYYY</strong>
<span class="small">Save the date ♡</span>
</div>
<canvas id="scratchCanvas"></canvas>
</div>
<p class="scratch-instruction">
♡ SCRATCH THE HEART TO REVEAL THE DATE ♡
</p>
</section>
<!-- NIKAH DETAILS -->
<section class="details">
<div class="eyebrow">The celebration</div>
<h2>Join Us On Our Special Day</h2>
<div class="detail-box">
<h3>✧ Date ✧</h3>
<p>DD Month YYYY</p>
</div>
<div class="detail-box">
<h3>✧ Time ✧</h3>
<p>00:00 PM</p>
</div>
<div class="detail-box">
<h3>✧ Venue ✧</h3>
<p>Wedding Hall Name</p>
<p>Full Address, City</p>
<a class="map-button"
href="https://maps.google.com/?q=Wedding+Venue"
target="_blank">
VIEW LOCATION ON MAP
</a>
</div>
<div class="detail-box">
<h3>✧ With Love ✧</h3>
<p>Bride's Family</p>
<p>&</p>
<p>Groom's Family</p>
</div>
</section>
<!-- QURANIC MESSAGE -->
<section class="quran">
<div class="eyebrow">A blessing from the Quran</div>
<div class="arabic" dir="rtl">
وَخَلَقْنَاكُمْ أَزْوَاجًا
</div>
<h2>And We created you in pairs.</h2>
<p class="small">Surah An-Naba · 78:8</p>
<div class="ornament">❀</div>
<p>
May Allah fill their marriage with
mercy, love, peace and endless blessings.
Ameen.
</p>
</section>
<!-- FINAL SCREEN -->
<section class="ending">
<div class="footer-flower">❀ ❁ ❀</div>
<div class="eyebrow">With love and duas</div>
<h1>We Await Your Presence</h1>
<div class="ornament">❦</div>
<p>
Your presence, blessings and duas
would mean the world to us.
</p>
<div class="footer-flower">♡</div>
<p class="small" style="color:#e9d4c6">
Made with love for a beautiful beginning.
</p>
</section>
</main>
<script>
// ENVELOPE OPENING
function openInvitation() {
const envelope = document.getElementById("envelope");
const inside = document.getElementById("inside");
const openText = document.getElementById("openText");
if (envelope.classList.contains("open")) return;
envelope.classList.add("open");
openText.textContent = "YOUR INVITATION IS OPENING...";
setTimeout(() => {
inside.classList.add("visible");
openText.textContent = "SCROLL DOWN TO EXPLORE";
}, 1100);
}
// HEART SCRATCH EFFECT
const canvas = document.getElementById("scratchCanvas");
const ctx = canvas.getContext("2d");
let drawing = false;
let revealed = false;
function drawHeartCover() {
const rect = canvas.getBoundingClientRect();
const dpr = window.devicePixelRatio || 1;
canvas.width = rect.width * dpr;
canvas.height = rect.height * dpr;
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
const w = rect.width;
const h = rect.height;
ctx.fillStyle = "#702b3b";
ctx.fillRect(0, 0, w, h);
// Heart-shaped scratch covering
ctx.save();
ctx.translate(w / 2, h / 2);
ctx.scale(Math.min(w / 280, h / 190), Math.min(w / 280, h / 190));
ctx.beginPath();
ctx.moveTo(0, 75);
ctx.bezierCurveTo(-25, 50, -110, 0, -110, -35);
ctx.bezierCurveTo(-110, -105, -20, -105, 0, -45);
ctx.bezierCurveTo(20, -105, 110, -105, 110, -35);
ctx.bezierCurveTo(110, 0, 25, 50, 0, 75);
ctx.closePath();
ctx.fillStyle = "#9a5361";
ctx.fill();
ctx.strokeStyle = "#d9b77e";
ctx.lineWidth = 3;
ctx.stroke();
ctx.restore();
ctx.font = "16px Georgia";
ctx.textAlign = "center";
ctx.fillStyle = "#f9e8d6";
ctx.fillText("♡", w / 2, h / 2 - 3);
ctx.font = "11px Georgia";
ctx.fillText("SCRATCH ME", w / 2, h / 2 + 20);
}
drawHeartCover();
window.addEventListener("resize", () => {
if (!revealed) drawHeartCover();
});
function getPosition(e) {
const rect = canvas.getBoundingClientRect();
return {
x: e.clientX - rect.left,
y: e.clientY - rect.top
};
}
canvas.addEventListener("pointerdown", (e) => {
if (revealed) return;
drawing = true;
canvas.setPointerCapture(e.pointerId);
scratch(e);
});
canvas.addEventListener("pointermove", (e) => {
if (!drawing || revealed) return;
scratch(e);
});
function stopScratch() {
drawing = false;
checkScratch();
}
canvas.addEventListener("pointerup", stopScratch);
canvas.addEventListener("pointercancel", stopScratch);
function scratch(e) {
const pos = getPosition(e);
ctx.globalCompositeOperation = "destination-out";
ctx.beginPath();
ctx.arc(pos.x, pos.y, 19, 0, Math.PI * 2);
ctx.fill();
ctx.globalCompositeOperation = "source-over";
}
function checkScratch() {
const pixels = ctx.getImageData(
0, 0, canvas.width, canvas.height
).data;
let transparent = 0;
for (let i = 3; i < pixels.length; i += 4) {
if (pixels[i] < 50) transparent++;
}
const percentage = transparent / (pixels.length / 4);
if (percentage > 0.30 && !revealed) {
revealed = true;
canvas.style.transition = "opacity 1s ease";
canvas.style.opacity = "0";
setTimeout(() => {
canvas.style.display = "none";
}, 1000);
}
}
</script>
</body>
</html>