/* Date/time numerals — self-hosted (no Google Fonts fetch) */
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/crimson-pro-500.ttf") format("truetype");
}

@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/crimson-pro-600.ttf") format("truetype");
}

:root {
  --navy: #001b3a;
  --navy-deep: #001229;
  --gold: #d4af37;
  --gold-soft: #c9a962;
  --white: #ffffff;
  --white-line: rgba(255, 255, 255, 0.55);
  --white-muted: rgba(255, 255, 255, 0.88);
  --modal-paper: #f6f4ef;
  --ink: #1c1914;
  --muted: #5c564c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Heebo", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  color: var(--white);
  background: var(--navy);
  line-height: 1.55;
}

.serif {
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-weight: 500;
}

/* ——— Invitation ——— */
.invite {
  max-width: 26rem;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.75rem 1.25rem 2.5rem;
  border-inline: 1px solid var(--white-line);
}

.invite-section {
  border-bottom: 1px solid var(--white-line);
  padding: 1.35rem 0;
}

.invite-save {
  padding-top: 0.5rem;
  text-align: center;
}

.save-the-date {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white);
}

.invite-photo-wrap {
  padding: 0;
}

.invite-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 11.5rem;
  object-fit: cover;
}

.invite-headline {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.headline-gold {
  margin: 0;
  font-family: "Heebo", sans-serif;
  font-size: clamp(1.35rem, 4.5vw, 1.65rem);
  font-weight: 600;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.invite-sub {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--white-muted);
  line-height: 1.5;
}

.invite-details {
  padding: 0;
  border-bottom: 1px solid var(--white-line);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  direction: rtl;
  text-align: center;
  min-height: 5.5rem;
  align-items: center;
}

.detail-cell {
  padding: 1rem 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

.detail-cell + .detail-cell {
  border-inline-start: 1px solid var(--white-line);
}

.detail-primary {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
}

/* Date & time: Crimson Pro (local files — always loads with the site) */
.invite-details .detail-primary.detail-romantic,
.invite-details .detail-time.detail-romantic {
  font-family: "Crimson Pro", "Cormorant Garamond", Georgia, serif;
  font-style: normal;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.invite-details .detail-primary.detail-romantic {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.invite-details .detail-time.detail-romantic {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.detail-secondary {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--white-muted);
}

.detail-cell-time {
  justify-content: center;
}

.detail-time {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.06em;
}

.invite-footer {
  border-bottom: none;
  text-align: center;
  padding: 1.5rem 0.25rem 0.5rem;
}

.family-name {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--white);
}

.btn-rsvp {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 2rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--white-line);
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-rsvp:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-rsvp:active {
  background: rgba(255, 255, 255, 0.1);
}

.btn-rsvp:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ——— Modal ——— */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 18, 41, 0.72);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 22rem;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--modal-paper);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  text-align: right;
}

.modal-panel h2 {
  margin: 0 0 0.35rem;
  font-family: "Heebo", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
}

.modal-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 2px;
}

.modal-close:hover {
  color: var(--ink);
}

.choice-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-choice {
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--navy);
  background: rgba(0, 27, 58, 0.06);
  border: 1px solid rgba(0, 27, 58, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-choice:hover {
  background: rgba(0, 27, 58, 0.1);
}

.btn-outline {
  background: transparent;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.field span {
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 500;
}

.field input {
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid rgba(0, 27, 58, 0.22);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.field input:focus {
  outline: 2px solid rgba(212, 175, 55, 0.45);
  outline-offset: 1px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--navy);
  background: linear-gradient(145deg, var(--gold) 0%, #b8942e 100%);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 27, 58, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 27, 58, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.msg {
  margin-top: 1rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  border-radius: 2px;
  text-align: center;
  line-height: 1.5;
}

.msg.ok {
  background: rgba(90, 140, 90, 0.15);
  color: #2d4a2d;
}

.msg.err {
  background: rgba(160, 80, 80, 0.12);
  color: #6b3030;
}

@media (min-width: 480px) {
  .invite {
    padding: 2.25rem 1.75rem 3rem;
  }
}
