:root {
  --ivory: #f2eee5;
  --paper: #fbf8f0;
  --maroon: #711e2a;
  --maroon-deep: #4c131d;
  --maroon-soft: #8e3b45;
  --gold: #b99349;
  --gold-dark: #87651e;
  --gold-pale: #e0ca91;
  --olive: #536247;
  --ink: #302825;
  --muted: #766c62;
  --line: rgba(154, 116, 43, 0.52);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "DM Sans", system-ui, sans-serif;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(155, 119, 56, 0.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
body::before { top: -19rem; left: -14rem; }
body::after { right: -18rem; bottom: -19rem; }

.page-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem) 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.invitation-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(810px, calc(100vh - 4.3rem));
  display: grid;
  place-items: center;
  border: 1px solid rgba(169, 128, 52, 0.72);
  background:
    linear-gradient(rgba(251, 248, 240, 0.9), rgba(251, 248, 240, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 34px, rgba(113, 30, 42, 0.028) 34px 35px),
    repeating-linear-gradient(-45deg, transparent 0 34px, rgba(185, 147, 73, 0.035) 34px 35px),
    var(--paper);
  box-shadow: 0 18px 44px rgba(76, 19, 29, 0.1);
}

.pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  background-image:
    linear-gradient(30deg, rgba(185, 147, 73, 0.07) 12%, transparent 12.5%, transparent 87%, rgba(185, 147, 73, 0.07) 87.5%, rgba(185, 147, 73, 0.07)),
    linear-gradient(150deg, rgba(185, 147, 73, 0.07) 12%, transparent 12.5%, transparent 87%, rgba(185, 147, 73, 0.07) 87.5%, rgba(185, 147, 73, 0.07)),
    linear-gradient(30deg, rgba(185, 147, 73, 0.07) 12%, transparent 12.5%, transparent 87%, rgba(185, 147, 73, 0.07) 87.5%, rgba(185, 147, 73, 0.07));
  background-position: 0 0, 25px 0, 50px 43px;
  background-size: 50px 86px;
}

.inner-frame {
  position: absolute;
  inset: 1rem;
  z-index: -1;
  border: 1px solid rgba(169, 128, 52, 0.4);
}
.inner-frame::before,
.inner-frame::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  content: "";
  transform: rotate(45deg);
}
.inner-frame::before { top: -7px; left: calc(50% - 7px); background: var(--paper); }
.inner-frame::after { bottom: -7px; left: calc(50% - 7px); background: var(--paper); }

.card-content {
  width: min(100%, 510px);
  padding: 5rem 1.6rem 4.2rem;
  text-align: center;
}

.arabic {
  margin: 0 0 0.7rem;
  color: var(--maroon);
  font-family: Amiri, serif;
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  line-height: 1.15;
}
.card-label {
  margin: 0;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.38em;
}

.name-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.6rem auto 0;
  color: var(--maroon-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4rem, 10vw, 7.4rem);
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 0.72;
}
.name-lockup > span:first-child { margin-left: 0.13em; }
.name-lockup > span:last-child { margin-left: 0.13em; }
.name-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.1rem 0 1rem;
  color: var(--gold);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: 0;
  line-height: 1;
}
.name-divider i { width: 42px; height: 1px; background: var(--gold); }
.name-divider b { font-weight: 400; }

.gold-ornament {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 245px);
  margin: 2.05rem auto 2.2rem;
  color: var(--gold);
}
.gold-ornament span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); }
.gold-ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.gold-ornament b { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 400; }

.message-block {
  width: min(100%, 410px);
  margin: 0 auto;
  padding: 1.25rem 1.45rem 1.35rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.message {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: pretty;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  width: min(100%, 410px);
  margin: 1.55rem auto 0;
}
.contact-button {
  display: flex;
  min-height: 4.1rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--maroon);
  color: var(--maroon);
  background: rgba(251, 248, 240, 0.68);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.contact-button:hover,
.contact-button:focus-visible {
  color: var(--paper);
  background: var(--maroon);
  box-shadow: 0 7px 18px rgba(76, 19, 29, 0.14);
  transform: translateY(-2px);
}
.contact-button:focus-visible,
a:focus-visible { outline: 3px solid rgba(185, 147, 73, 0.55); outline-offset: 3px; }
.button-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; }
.button-number { color: var(--gold-dark); font-size: 0.77rem; }
.contact-button:hover .button-number,
.contact-button:focus-visible .button-number { color: var(--gold-pale); }

.floral {
  position: absolute;
  z-index: 0;
  width: clamp(190px, 29vw, 290px);
  height: auto;
  pointer-events: none;
}
.floral--top-left { top: -0.9rem; left: -1rem; }
.floral--bottom-right { right: -1rem; bottom: -0.9rem; transform: rotate(180deg); }
.branch { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.branch--fine { stroke: var(--gold); stroke-width: 1; opacity: 0.7; }
.leaf { stroke: var(--gold); stroke-width: 0.75; stroke-linejoin: round; }
.leaf--olive { fill: var(--olive); }
.leaf--small { opacity: 0.8; }
.rose-petal { fill: var(--maroon-soft); stroke: var(--gold); stroke-width: 1; stroke-linejoin: round; }
.rose-petal--outer { fill: var(--maroon); }
.rose-petal--light { fill: #a25259; opacity: 0.72; }
.rose-line { fill: none; stroke: var(--gold-pale); stroke-width: 1.2; stroke-linecap: round; opacity: 0.9; }
.blossom path { fill: #fffdf7; stroke: var(--gold); stroke-width: 0.8; stroke-linejoin: round; }
.blossom-center { fill: var(--gold); }
.berry { fill: var(--paper); stroke: var(--gold); stroke-width: 1.5; }
.berry--small { fill: var(--gold-pale); }

.site-footer {
  padding-top: 0.85rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--maroon); font-weight: 600; }
.site-footer a:hover { color: var(--gold-dark); }

@media (max-width: 560px) {
  .page-shell { padding: 0; }
  .invitation-card { min-height: calc(100vh - 2.35rem); border-right: 0; border-left: 0; }
  .card-content { padding: 4.7rem 1rem 3.9rem; }
  .card-label { font-size: 0.58rem; letter-spacing: 0.26em; }
  .name-lockup { font-size: clamp(3.6rem, 18vw, 5.8rem); }
  .name-divider { margin: 1rem 0 0.9rem; }
  .name-divider i { width: 30px; }
  .message-block { padding-right: 0.5rem; padding-left: 0.5rem; }
  .contact-actions { grid-template-columns: 1fr; max-width: 250px; }
  .floral { width: 195px; }
  .floral--top-left { top: -0.6rem; left: -2.2rem; }
  .floral--bottom-right { right: -2.2rem; bottom: -0.6rem; }
  .site-footer { padding: 0.75rem 1rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-button { transition: none; }
}
