* { box-sizing: border-box; }

:root {
  --paper: #f8f4ec;
  --paper-deep: #efe6d8;
  --ink: #3e3432;
  --muted: #806f68;
  --red: #8f1d2c;
  --red-soft: #b65a63;
  --line: rgba(62, 52, 50, .15);
  --shadow: 0 14px 45px rgba(60, 40, 35, .08);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #ddd5c9;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

.paper {
  position: relative;
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.72), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(213,190,175,.22), transparent 32%),
    var(--paper);
  box-shadow: 0 0 60px rgba(30, 20, 15, .18);
}

main { position: relative; z-index: 2; }

.section {
  position: relative;
  padding: 92px 16% 96px;
  text-align: center;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-left: 18%;
  padding-right: 18%;
}

.eyebrow, .section-kicker {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .67rem;
  color: var(--muted);
}

.bismillah {
  margin: 28px 0 8px;
  font-family: serif;
  font-size: 1.25rem;
  color: var(--red);
}

.invite-line {
  margin-top: 24px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
}

.names {
  margin: 20px 0 10px;
  color: var(--red);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .95;
}

.names span {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.2rem, 10vw, 5.4rem);
  font-weight: 400;
}

.names i {
  font-family: "Cormorant Garamond", serif;
  font-style: normal;
  font-size: 1.4rem;
  margin: 10px 0;
}

.hero-copy {
  max-width: 430px;
  margin: 22px auto;
  line-height: 1.8;
  color: var(--muted);
}

.scroll-hint {
  margin-top: 70px;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #9b8981;
}

h2 {
  margin: 13px auto 28px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
}

h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 500;
  margin: 22px 0 10px;
}

.muted {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}

.verse-section {
  background: rgba(255,255,255,.35);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.verse {
  max-width: 590px;
  margin: 38px auto 0;
}

.arabic {
  direction: rtl;
  font-family: serif;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 2.1;
  color: #5a2c31;
}

.translation {
  margin: 24px auto 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  line-height: 1.55;
}

.reference {
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .08em;
}

.countdown-section { background: #fffdfa; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 510px;
  margin: 36px auto 20px;
}

.countdown div {
  padding: 17px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--red);
}

.countdown span {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .58rem;
  color: var(--muted);
}

.countdown-date {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
}

.family-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 38px;
}

.family-card {
  padding: 28px 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.42);
}

.family-label {
  color: var(--red);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  margin: 0 0 12px;
}

.name-list { line-height: 1.75; color: #574946; font-size: .86rem; }

.events-section { background: rgba(248,239,231,.48); }

.event-grid {
  display: grid;
  gap: 18px;
  margin-top: 38px;
}

.event-card {
  position: relative;
  text-align: left;
  padding: 28px 28px 30px;
  border: 1px solid rgba(50,40,35,.13);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  right: -40px;
  top: -40px;
  border: 1px solid rgba(255,255,255,.5);
}

.event-card.yellow { background: #e9c94a; }
.event-card.moss { background: #758253; color: #fff; }
.event-card.tea { background: #b5c9b0; }
.event-card.red { background: #fff; color: var(--red); border: 2px solid var(--red); }
.event-card.forest { background: #315747; color: #fff; }

.event-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  margin: 0 0 7px;
}

.event-date { font-size: .88rem; letter-spacing: .04em; }
.event-time { margin-top: 6px; font-size: .78rem; opacity: .82; }
.event-note { margin-top: 10px; font-family: "Cormorant Garamond", serif; font-size: 1rem; font-style: italic; }

.event-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.35);
}

.event-card.red .event-meta { border-top-color: rgba(143,29,44,.2); }

.venue { font-size: .75rem; line-height: 1.45; opacity: .9; }

.map-button, .button, .guest-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .61rem;
  cursor: pointer;
}

.event-card.red .map-button,
.rsvp-section .button {
  color: var(--red);
}

.scratch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 36px;
}

.scratch-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fffdfa;
  box-shadow: var(--shadow);
}

.scratch-info { padding: 24px 18px; }

.scratch-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  color: var(--red);
}

.scratch-date { margin-top: 10px; font-size: .76rem; line-height: 1.7; }

.scratch-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #d7c6b9;
  color: #6d5b54;
  cursor: crosshair;
  transition: opacity .35s ease;
}

.scratch-overlay span {
  border: 1px solid rgba(80,60,50,.25);
  padding: 11px 15px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .6rem;
}

.guest-section {
  background: #f4ebe3;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guest-form {
  display: flex;
  max-width: 460px;
  margin: 26px auto 0;
}

.guest-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-right: 0;
  padding: 13px 14px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.guest-form button {
  border-radius: 0 999px 999px 0;
  border-color: var(--red);
  background: var(--red);
  color: white;
}

.guest-message {
  min-height: 24px;
  margin: 14px auto 0;
  color: var(--red);
  font-size: .78rem;
}

.rsvp-section { background: #fffdfa; }

.rsvp-section code {
  font-size: .75em;
  background: #eee7dd;
  padding: 3px 6px;
}

.remembrance-section {
  background: #f3ede5;
  padding-bottom: 105px;
}

.remembrance-intro {
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.8;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
}

.remembrance-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  max-width: 560px;
  margin: 0 auto;
}

.remembrance-names span {
  padding: 10px 14px;
  border: 1px solid rgba(80,60,50,.15);
  background: rgba(255,255,255,.4);
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
}

.dua {
  margin-top: 30px;
  color: var(--red);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-style: italic;
}

.footer {
  padding: 45px 20px 55px;
  text-align: center;
  background: #fffdfa;
  color: var(--muted);
}

.footer p {
  margin: 10px 0 5px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
}

.footer small { font-size: .62rem; letter-spacing: .12em; }
.tiny-flower { color: var(--red); font-size: 1.5rem; }

.floral { filter: drop-shadow(0 5px 7px rgba(80,55,45,.08));
  position: fixed;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 180px;
  background-image: url("floral-border.svg");
  background-repeat: repeat-y;
  background-size: 180px auto;
  background-position: center top;
  pointer-events: none;
  opacity: .92;
}

.floral-left { left: max(calc(50% - 380px), 0px); }
.floral-right { right: max(calc(50% - 380px), 0px); transform: scaleX(-1); }

@media (max-width: 620px) {
  .section { padding: 75px 18% 78px; }
  .hero { padding-left: 19%; padding-right: 19%; }
  .floral { filter: drop-shadow(0 5px 7px rgba(80,55,45,.08)); width: 104px; background-size: 104px auto; opacity: .72; }
  .floral-left { left: 0; }
  .floral-right { right: 0; }
  .family-grid, .scratch-grid { grid-template-columns: 1fr; }
  .event-card { padding: 24px 20px; }
  .event-meta { align-items: flex-end; }
  .guest-form { flex-direction: column; gap: 8px; }
  .guest-form input { border-right: 1px solid var(--line); border-radius: 999px; }
  .guest-form button { border-radius: 999px; }
}

@media (max-width: 420px) {
  .section { padding-left: 23%; padding-right: 23%; }
  .hero { padding-left: 23%; padding-right: 23%; }
  .floral { filter: drop-shadow(0 5px 7px rgba(80,55,45,.08)); width: 82px; background-size: 82px auto; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .names span { font-size: 3rem; }
}

/* v4 floral-rich invitation treatment */
.hero::before, .hero::after {
  content: "✽";
  position: absolute;
  color: #a24d58;
  font-size: 2rem;
  opacity: .55;
}
.hero::before { top: 12%; left: 24%; }
.hero::after { bottom: 15%; right: 24%; }

.events-section::before, .remembrance-section::before {
  content: "❀  ✿  ❁";
  display: block;
  color: #9b4c58;
  letter-spacing: .65em;
  font-size: 1.1rem;
  margin-bottom: 22px;
  opacity: .7;
}

.event-card {
  min-height: 190px;
  border-radius: 2px;
}
.event-card.red {
  background:
    radial-gradient(circle at 88% 15%, rgba(143,29,44,.10), transparent 22%),
    #fffdfb;
  color: var(--red);
  border: 2px solid var(--red);
  box-shadow: 0 16px 45px rgba(110,25,35,.12);
}
.event-card.red::before {
  content: "❁";
  position: absolute;
  right: 24px;
  bottom: 16px;
  font-size: 4.2rem;
  color: rgba(143,29,44,.11);
}
.event-card.red .event-name { font-size: 2.5rem; }

.event-note {
  margin-top: 7px;
  font-family: serif;
  font-size: 1.18rem;
  color: currentColor;
  direction: rtl;
}
.event-note::before { content: ""; }

.floral-left { left: max(calc(50% - 380px), 0px); }
.floral-right { right: max(calc(50% - 380px), 0px); }

@media (max-width: 620px) {
  .floral { width: 104px; background-size: 104px auto; opacity: .86; }
  .hero::before { left: 28%; }
  .hero::after { right: 28%; }
}
