/* ==========================================================================
   OMAR & RAGHDA — INVITATION CARD
   The finished flat-lay artwork is the card. All type is live HTML,
   set into the clear area to the right of the twine and wax seal.
   ========================================================================== */

/* ---------- the card ---------- */

.parchment {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 973 / 1262;
  margin-inline: auto;
  container-type: inline-size;
  filter: drop-shadow(0 26px 42px rgba(47, 50, 39, 0.22));
  animation: card-settle 1.1s var(--ease-out) both;
}

.parchment__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.parchment__text {
  position: absolute;
  z-index: 2;
  left: 20%;
  right: 6%;
  top: 10%;
  bottom: 2%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  color: var(--ink-900);
}

.parchment__eyebrow {
  margin: 0 0 2.4cqw;
  max-width: 46%;
  font-family: var(--font-serif);
  font-size: clamp(9px, 2.15cqw, 14px);
  font-weight: 700;
  line-height: 1.85;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #6a6554;
}

.parchment__kicker {
  margin: 0 0 2cqw;
  font-family: var(--font-serif);
  font-size: clamp(9px, 2.15cqw, 14px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: #4c4d3d;
}

.parchment__heart {
  display: block;
  width: clamp(9px, 1.8cqw, 14px);
  height: auto;
  margin: 0 auto 4cqw;
  color: #5f6b4c;
  opacity: 0.9;
}

.parchment__names {
  margin: 0 0 6.5cqw;
  font-family: var(--font-script);
  font-size: clamp(36px, 13.2cqw, 80px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  color: #3b3d2f;
}

.parchment__name { display: block; }

.parchment__amp {
  display: block;
  margin: 0.26em 0 0.2em;
  font-family: var(--font-script);
  font-size: 0.55em;
  line-height: 0.78;
  color: #3b3d2f;
}

.parchment__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.7cqw, 11px);
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(9px, 2.05cqw, 14px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #4c4d3d;
}

.parchment__date b {
  font-size: clamp(22px, 5.5cqw, 34px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #3b3d2f;
  font-variant-numeric: lining-nums;
}

.parchment__date i {
  display: block;
  width: 1px;
  height: clamp(16px, 2.8cqw, 28px);
  background: rgba(59, 61, 47, 0.35);
}

.parchment__when {
  margin: 1cqw 0 5.5cqw;
  font-family: var(--font-serif);
  font-size: clamp(9px, 1.95cqw, 13px);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6a6554;
}

.parchment__venue {
  margin: 0 0 3.5cqw;
  font-family: var(--font-serif);
  font-size: clamp(12px, 2.75cqw, 18px);
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: #4c4d3d;
}

.parchment__close {
  margin: 5cqw 0 0;
  max-width: 70%;
  font-family: var(--font-script);
  font-size: clamp(15px, 3.4cqw, 22px);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  color: #4c4d3d;
}

@keyframes card-settle {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* keep the full lockup inside the plate on narrow phones */
@container (max-width: 380px) {
  .parchment__eyebrow { margin-bottom: 1cqw; }
  .parchment__heart { margin-bottom: 2cqw; }
  .parchment__names { font-size: clamp(34px, 12.5cqw, 44px); margin-bottom: 3cqw; }
  .parchment__when { margin-bottom: 2.6cqw; }
  .parchment__venue { margin-bottom: 1cqw; }
  .parchment__close { margin-top: 2.2cqw; }
}

@media (prefers-reduced-motion: no-preference) {
  .parchment__text > * {
    animation: type-arrive 600ms var(--ease-out) both;
    animation-delay: 0.5s;
  }
  .parchment__text > :nth-child(2) { animation-delay: 0.55s; }
  .parchment__text > :nth-child(3) { animation-delay: 0.6s; }
  .parchment__text > :nth-child(4) { animation-delay: 0.65s; }
  .parchment__text > :nth-child(5) { animation-delay: 0.7s; }
  .parchment__text > :nth-child(6) { animation-delay: 0.75s; }
  .parchment__text > :nth-child(7) { animation-delay: 0.8s; }
}

@keyframes type-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- invitation page ---------- */

.invite-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter);
  background:
    radial-gradient(120% 90% at 12% 0%, #b8b9a8 0%, transparent 55%),
    radial-gradient(110% 100% at 92% 100%, #7c816e 0%, transparent 62%),
    linear-gradient(135deg, #a9aa9a 0%, #9a9c8b 46%, #8d907e 100%);
  position: relative;
  overflow-x: hidden;
}

.invite-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(114deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 24px),
    var(--texture-paper);
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.invite-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  display: grid;
  justify-items: center;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.invite-below {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  text-align: center;
}

.invite-note {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(252, 248, 239, 0.82);
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-3) var(--s-6);
}

.invite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 var(--s-7);
  border: 1px solid var(--paper-50);
  border-radius: var(--radius-sm);
  background: var(--paper-50);
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.invite-btn:hover { background: var(--paper-200); border-color: var(--paper-200); }

.invite-link {
  font-family: var(--font-serif);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-100);
  border-bottom: 1px solid rgba(252, 248, 239, 0.5);
  padding-bottom: 3px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.invite-link:hover { border-bottom-color: var(--paper-100); }

.invite-page :focus-visible { outline-color: var(--paper-100); }

@media (max-width: 560px) {
  .invite-page { padding: 1.25rem; align-content: start; padding-top: 2rem; }
  .parchment { width: 100%; }
  .invite-shell { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .parchment { animation: none; }
  .parchment__text > * { animation: none; }
}
