:root {
  --color-cream: #faf3ea;
  --color-cream-deep: #f2e6d3;
  --color-terracotta: #b5654a;
  --color-terracotta-deep: #8f4a35;
  --color-ink: #3a2e28;
  --color-gold: #b8934a;
  --color-sage: #6f7860;
  --font-display: "Aref Ruqaa", serif;
  --font-body: "Tajawal", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background-color: transparent;
  border-radius: 0;
}

button {
  appearance: button;
  cursor: pointer;
}

input:focus {
  outline: none;
  border-color: currentColor;
}

::placeholder {
  color: color-mix(in oklab, currentcolor 50%, transparent);
}

[hidden]:where(:not([hidden="until-found"])) {
  display: none !important;
}

.page {
  min-height: 100vh;
}

.paper-texture {
  background-image: radial-gradient(circle at 1px 1px, #3a2e280f 1px, #0000 0);
  background-size: 18px 18px;
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  to {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-14px) rotate(3deg);
  }
}

.fade-up {
  animation: 0.9s cubic-bezier(0.16, 1, 0.3, 1) both fade-up;
}

.drift {
  animation: 7s ease-in-out infinite drift;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 7rem;
}

.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(64px);
}

.blob--terracotta {
  top: -2.5rem;
  right: -4rem;
  width: 16rem;
  height: 16rem;
  opacity: 0.4;
  background: var(--color-terracotta);
}

.blob--gold {
  bottom: 0;
  left: -5rem;
  width: 18rem;
  height: 18rem;
  opacity: 0.3;
  background: var(--color-gold);
  animation-delay: 2.5s;
}

.hero__inner {
  position: relative;
  margin-inline: auto;
  max-width: 48rem;
  text-align: center;
}

.kicker {
  font-size: 0.875rem;
  letter-spacing: 0.3em;
}

.kicker--deep {
  margin-bottom: 1.5rem;
  letter-spacing: 0.35em;
  color: var(--color-terracotta-deep);
}

.kicker--gold {
  margin-bottom: 1rem;
  color: var(--color-gold);
}

.invite {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--color-ink);
}

.name {
  margin-bottom: 2.5rem;
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: inherit;
  line-height: 1.25;
  color: var(--color-terracotta-deep);
}

.gold-line {
  margin: 2.5rem auto 0;
  height: 1px;
  width: 6rem;
  background: var(--color-gold);
}

.date {
  margin-top: 2.5rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.countdown-section {
  padding: 0 1.5rem 6rem;
}

.countdown-wrap {
  margin-inline: auto;
  max-width: 48rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  border-radius: 1.5rem;
  border: 1px solid var(--color-cream-deep);
  background: #fff;
  padding: 1.5rem;
}

.countdown__cell {
  text-align: center;
}

.countdown__value {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--color-terracotta-deep);
}

.countdown__label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  color: var(--color-sage);
}

.story {
  padding: 0 1.5rem 6rem;
}

.story__inner {
  margin-inline: auto;
  max-width: 42rem;
  text-align: center;
}

.display-title {
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: inherit;
  line-height: calc(2.5 / 2.25);
  color: var(--color-terracotta-deep);
}

.display-title--rsvp {
  margin-bottom: 1rem;
}

.story__text {
  font-size: 1.125rem;
  line-height: 2;
  color: var(--color-ink);
}

.event {
  padding: 6rem 1.5rem;
  background: var(--color-cream-deep);
}

.event__wrap {
  margin-inline: auto;
  max-width: 36rem;
}

.event__card {
  border-radius: 1.5rem;
  background: #fff;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
}

.event .kicker--gold {
  margin-bottom: 0.75rem;
}

.event__venue {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: inherit;
  line-height: 2;
  color: var(--color-terracotta-deep);
}

.event__meta {
  line-height: 1.625;
  color: var(--color-ink);
}

.map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.75rem auto 0;
  max-width: 20rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: var(--color-terracotta-deep);
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #fffdf8 0%, #f7ecdc 100%);
  box-shadow: 0 1px 0 #fff inset, 0 8px 18px #8f4a3514;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.map-link:hover {
  transform: translateY(-2px);
  border-color: var(--color-terracotta);
  box-shadow: 0 1px 0 #fff inset, 0 12px 22px #8f4a3522;
}

.map-link__seal {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--color-terracotta-deep);
  flex-shrink: 0;
}

.map-link__seal svg {
  width: 2.35rem;
  height: 2.35rem;
}

.map-link__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  line-height: 1.35;
}

.map-link__copy strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.map-link__copy em {
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-sage);
}

.rsvp {
  padding: 6rem 1.5rem;
}

.rsvp__inner {
  margin-inline: auto;
  max-width: 36rem;
  text-align: center;
}

.rsvp .kicker--gold {
  margin-bottom: 0.75rem;
}

.rsvp__hint {
  margin-bottom: 2.5rem;
  line-height: 1.625;
  color: var(--color-ink);
}

.rsvp-form {
  border-radius: 1.5rem;
  border: 1px solid var(--color-cream-deep);
  background: #fff;
  padding: 2rem;
  text-align: right;
  box-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
}

.honeypot {
  display: none;
}

.field {
  margin-bottom: 1.25rem;
}

.field--guests {
  margin-bottom: 1.75rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--color-cream-deep);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.field input[type="text"]:focus,
.field input[type="number"]:focus {
  border-color: currentColor;
}

.choice-row {
  display: flex;
  gap: 0.75rem;
}

.choice {
  flex: 1;
  border-radius: 0.75rem;
  border: 1px solid var(--color-cream-deep);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  color: var(--color-ink);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s, opacity 0.15s;
}

.choice.is-active {
  border-color: var(--color-terracotta);
  background: var(--color-terracotta);
  color: #fff;
}

.submit {
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.875rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-terracotta-deep);
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit:hover {
  opacity: 0.9;
}

.rsvp-success {
  border-radius: 1.5rem;
  border: 1px solid var(--color-gold);
  background: #fff;
  padding: 2.5rem;
}

.rsvp-success__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-terracotta-deep);
}

.rsvp-success__text {
  margin-top: 0.75rem;
  color: var(--color-ink);
}

.footer {
  padding: 2rem 1.5rem 4rem;
  text-align: center;
}

.footer__name {
  font-family: var(--font-display);
  color: var(--color-terracotta-deep);
  font-size: 1.75rem;
}

.footer__note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-sage);
}

@media (min-width: 48rem) {
  .hero {
    padding-top: 7rem;
    padding-bottom: 9rem;
  }

  .invite {
    font-size: 1.25rem;
  }

  .name {
    font-size: 6rem;
    line-height: 1;
  }

  .date {
    font-size: 1.5rem;
    line-height: 2;
  }

  .countdown {
    gap: 1.5rem;
    padding: 2.5rem;
  }

  .countdown__value {
    font-size: 3rem;
    line-height: 1;
  }

  .countdown__label {
    font-size: 0.875rem;
  }

  .display-title {
    font-size: 3rem;
    line-height: 1;
  }

  .event__card,
  .rsvp-form {
    padding: 2.5rem;
  }
}

.admin-page {
  min-height: 100vh;
}

.admin-shell {
  margin-inline: auto;
  max-width: 48rem;
  padding: 4.5rem 1.5rem 5rem;
  text-align: center;
}

.admin-error {
  margin: 0 auto 1.25rem;
  max-width: 28rem;
  font-size: 0.875rem;
  color: var(--color-terracotta-deep);
}

.admin-gate {
  margin-inline: auto;
  max-width: 22rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--color-cream-deep);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
  line-height: 1.7;
  color: var(--color-ink);
}

.admin-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-stat {
  background: #fff;
  border: 1px solid var(--color-cream-deep);
  border-radius: 1.5rem;
  padding: 1.4rem 1rem;
}

.admin-stat__value {
  font-size: 2.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-terracotta-deep);
}

.admin-stat__label {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--color-sage);
}

.admin-note {
  margin-bottom: 1.75rem;
  color: var(--color-ink);
}

.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--color-cream-deep);
  border-radius: 1.5rem;
  padding: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--color-cream-deep);
}

.admin-table th {
  color: var(--color-sage);
  font-weight: 500;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 48rem) {
  .admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
