:root {
  --green: #2f4f3e;
  --gold: #c9a227;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --ink: #17231d;
  --muted: #6d756f;
  --line: rgba(47, 79, 62, 0.18);
  --shadow: 0 28px 80px rgba(20, 35, 28, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #edf1eb;
  font-family: Poppins, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.invite-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(47, 79, 62, 0.08), rgba(47, 79, 62, 0.08)),
    url("/assets/invite-bg.svg") center / cover no-repeat;
}

.invite-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 480px);
  min-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 20px 24px 26px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.98)),
    url("/assets/letycia-mateus.jpeg") center / cover no-repeat;
  border: 1px solid rgba(201, 162, 39, 0.34);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.96) 46%, rgba(255, 255, 255, 0.99)),
    radial-gradient(circle at 50% 26%, rgba(255, 247, 220, 0.44), transparent 42%);
  pointer-events: none;
}

.invite-card > * {
  position: relative;
  z-index: 1;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 430px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: url("/assets/letycia-mateus.jpeg") center / cover no-repeat;
  box-shadow: 0 16px 44px rgba(20, 35, 28, 0.16);
  animation: photoReveal 1100ms ease both, photoFloat 7s ease-in-out 1200ms infinite;
}

.monogram {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-top: -52px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.62);
  border-radius: 50%;
  color: var(--green);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  animation: riseIn 800ms ease 180ms both;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--green);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: 48px;
  line-height: 0.95;
  animation: riseIn 900ms ease 280ms both;
}

h2 {
  font-size: 31px;
  line-height: 1.1;
}

.divider {
  width: 86px;
  height: 1px;
  background: var(--gold);
}

.event-copy {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  animation: riseIn 900ms ease 380ms both;
}

.event-meta {
  display: flex;
  width: 100%;
  max-width: 300px;
  justify-content: center;
  gap: 10px;
  animation: riseIn 900ms ease 480ms both;
}

.event-meta span {
  min-width: 128px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  color: var(--green);
  font-weight: 600;
}

address {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  animation: riseIn 900ms ease 580ms both;
}

.icon-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(47, 79, 62, 0.28);
  color: var(--green);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-action:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.icon-action.primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.music-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: var(--green);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  animation: riseIn 900ms ease 680ms both;
}

.music-control.playing {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.music-control.unavailable {
  display: none;
}

.signature {
  margin: auto 0 0;
  color: rgba(47, 79, 62, 0.58);
  font-size: 11px;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(23, 35, 29, 0.52);
  backdrop-filter: blur(8px);
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  position: relative;
  width: min(100%, 420px);
  padding: 34px 26px 26px;
  background: var(--paper);
  border: 1px solid rgba(201, 162, 39, 0.36);
  box-shadow: var(--shadow);
  animation: modalIn 180ms ease both;
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--green);
  background: var(--soft);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

label {
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}

.submit {
  min-height: 52px;
  border: 0;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 600;
}

.submit:disabled {
  opacity: 0.64;
  cursor: wait;
}

.feedback {
  min-height: 44px;
  margin: 16px 0 0;
  color: var(--green);
  line-height: 1.5;
}

.feedback.error {
  color: #9c2828;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes photoReveal {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes photoFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.012);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  .invite-shell {
    min-height: 100svh;
    padding: 10px;
  }

  .invite-card {
    width: min(100%, calc((100svh - 20px) * 0.5625));
    min-width: min(100%, 320px);
    min-height: 0;
    aspect-ratio: 9 / 16;
    border: 0;
    padding: 12px 14px 14px;
    gap: 8px;
  }

  .photo-frame {
    max-height: none;
    aspect-ratio: 1.08 / 1;
    flex: 0 0 auto;
  }

  .monogram {
    width: 56px;
    height: 56px;
    margin-top: -38px;
    font-size: 17px;
  }

  .eyebrow {
    font-size: 10px;
  }

  h1 {
    font-size: 38px;
  }

  .divider {
    width: 62px;
  }

  .event-copy {
    max-width: 260px;
    font-size: 13px;
    line-height: 1.35;
  }

  .event-meta {
    gap: 7px;
  }

  .event-meta span {
    min-width: 0;
    flex: 1;
    padding: 8px 7px;
    font-size: 12px;
  }

  .actions {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 3px;
  }

  .icon-action {
    min-height: 42px;
    padding: 9px;
    font-size: 13px;
  }

  .music-control {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .signature {
    margin-top: auto;
    font-size: 10px;
  }
}
