:root {
  --rose-950: #4f2f31;
  --rose-800: #704448;
  --rose-700: #8f5d5d;
  --rose-500: #bc8887;
  --rose-300: #dfb9b3;
  --rose-100: #f5e6e2;
  --rose-50: #fcf7f5;
  --paper: #fffdfb;
  --ink: #34292a;
  --muted: #786768;
  --green: #27794c;
  --green-dark: #1f623e;
  --shadow: 0 20px 55px rgba(79, 47, 49, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  direction: rtl;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
}

body,
button,
a {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.center {
  text-align: center;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(28, 17, 18, 0.38), rgba(56, 30, 33, 0.62)),
    url("../image/cover.jpeg") center 36% / cover no-repeat;
  background-attachment: fixed;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(34, 18, 20, 0.18), transparent 34%, transparent 66%, rgba(34, 18, 20, 0.18)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 22%, transparent 72%, rgba(0, 0, 0, 0.3));
}

.site-nav {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(26, 16, 17, 0.45), transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.nav-brand {
  font-family: "Aref Ruqaa", serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  font-size: 0.98rem;
  font-weight: 500;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  border-radius: 4px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 82px 0 118px;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
}

.hero-kicker {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  font-family: "Aref Ruqaa", serif;
  font-size: clamp(3.25rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.hero-title-en {
  margin-top: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.hero-divider {
  width: 76px;
  height: 1px;
  margin: 23px auto 19px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.3);
}

.hero-date {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.24rem);
  font-weight: 500;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  width: min(540px, 100%);
  margin-top: 34px;
  direction: rtl;
}

.countdown-item {
  padding: 13px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(7px);
}

.countdown-item strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.countdown-item span {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.countdown.is-finished {
  display: block;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(7px);
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  right: 50%;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  transform: translateX(50%);
}

.scroll-cue svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  animation: float-down 1.8s ease-in-out infinite;
}

@keyframes float-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.section {
  padding: 94px 32px;
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(760px, 100%);
}

.section-eyebrow {
  margin: 0 0 5px;
  color: var(--rose-700);
  font-size: 0.98rem;
  font-weight: 700;
}

.section-title {
  margin: 0 0 48px;
  color: var(--rose-950);
  font-family: "Aref Ruqaa", serif;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.25;
}

.invitation {
  position: relative;
  overflow: hidden;
  background:
    url("../image/divider-flowers-leaves.png") bottom -45px center / auto 180px no-repeat,
    var(--paper);
}

.invitation::before,
.invitation::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(188, 136, 135, 0.18);
  border-radius: 50%;
}

.invitation::before {
  top: -150px;
  right: -80px;
}

.invitation::after {
  bottom: -155px;
  left: -90px;
}

.bismillah {
  width: auto;
  max-width: min(290px, 80%);
  max-height: 66px;
  margin-bottom: 25px;
  object-fit: contain;
}

.greeting {
  margin: 0 0 16px;
  color: var(--rose-800);
  font-size: 1.15rem;
  font-weight: 700;
}

.invitation-copy {
  margin: 0 auto;
  font-size: clamp(1.04rem, 2.2vw, 1.22rem);
}

.couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 42px 0 0;
  color: var(--rose-800);
  font-family: "Aref Ruqaa", serif;
}

.couple-names p {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  font-weight: 700;
  line-height: 1.15;
}

.couple-names > span {
  margin: -2px 0;
  color: var(--rose-500);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.7rem;
  line-height: 1;
}

.couple-names small {
  margin-top: 12px;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.floral-divider {
  display: block;
  width: auto;
  max-width: min(220px, 70%);
  max-height: 62px;
  margin: 46px auto 0;
  object-fit: contain;
}

.schedule-section {
  background: linear-gradient(135deg, var(--rose-100), #f2deda);
}

.schedule-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(820px, 100%);
  margin: 0 auto 35px;
  overflow: hidden;
  border: 1px solid rgba(143, 93, 93, 0.2);
  border-radius: 22px;
  background: rgba(255, 253, 251, 0.74);
  box-shadow: var(--shadow);
}

.schedule-part {
  display: flex;
  min-height: 185px;
  padding: 28px 18px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.schedule-part + .schedule-part {
  border-right: 1px solid rgba(143, 93, 93, 0.17);
}

.schedule-part span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.schedule-part strong {
  color: var(--rose-950);
  font-family: "Aref Ruqaa", serif;
  font-size: 2.35rem;
  line-height: 1.15;
}

.schedule-date strong {
  color: var(--rose-700);
  font-size: 4.7rem;
}

.schedule-part b {
  color: var(--rose-800);
  font-size: 1rem;
}

.action-button,
.rsvp-submit {
  display: inline-flex;
  min-height: 58px;
  padding: 12px 24px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 12px 28px rgba(79, 47, 49, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.action-button {
  background: var(--rose-700);
}

.action-button:hover,
.action-button:focus-visible {
  background: var(--rose-800);
  box-shadow: 0 16px 32px rgba(79, 47, 49, 0.27);
  transform: translateY(-2px);
}

.action-button svg,
.rsvp-submit svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.location-section {
  background: var(--rose-50);
}

.venue-copy {
  width: min(760px, 100%);
  margin: -19px auto 35px;
}

.venue-copy h3 {
  margin: 0 0 8px;
  color: var(--rose-800);
  font-family: "Aref Ruqaa", serif;
  font-size: 2rem;
}

.venue-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.map-frame {
  width: min(980px, 100%);
  margin: 0 auto 28px;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #e6d8d6;
  box-shadow: var(--shadow);
}

.map-frame iframe {
  display: block;
  border: 0;
}

.gallery-section {
  background: var(--paper);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.memory-card {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--rose-100);
  box-shadow: 0 13px 36px rgba(79, 47, 49, 0.16);
}

.memory-card::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(31, 17, 19, 0.86));
}

.memory-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.memory-card:nth-child(1) img {
  object-position: center 34%;
}

.memory-card:nth-child(3) img {
  object-position: center center;
}

.memory-card:nth-child(4) img {
  object-position: center 38%;
}

.memory-card:hover img {
  transform: scale(1.035);
}

.memory-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 25px;
  color: #fff;
  text-align: right;
}

.memory-card figcaption span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 500;
}

.memory-card figcaption p {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.55;
}

.rsvp-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(78, 44, 47, 0.9), rgba(78, 44, 47, 0.94)),
    url("../image/gallery-4.jpeg") center 42% / cover no-repeat;
}

.rsvp-section .section-eyebrow,
.rsvp-section .section-title {
  color: #fff;
}

.rsvp-copy {
  margin: -18px auto 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.rsvp-form {
  position: relative;
  display: grid;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 30px;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  text-align: right;
  backdrop-filter: blur(9px);
}

.rsvp-field {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.rsvp-field input,
.rsvp-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.rsvp-field input {
  height: 52px;
  padding: 0 15px;
}

.rsvp-field textarea {
  min-height: 130px;
  padding: 13px 15px;
  resize: vertical;
}

.rsvp-field input:focus,
.rsvp-field textarea:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.rsvp-field input:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.guest-count-field {
  width: min(230px, 100%);
}

.attendance-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.attendance-fieldset legend {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.attendance-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.attendance-options label {
  display: flex;
  min-height: 50px;
  padding: 10px 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.attendance-options input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.rsvp-submit {
  min-width: 240px;
  margin: 3px auto 0;
  border: 0;
  background: var(--green);
  box-shadow: 0 14px 32px rgba(13, 50, 31, 0.28);
  cursor: pointer;
}

.rsvp-submit:hover,
.rsvp-submit:focus-visible {
  background: var(--green-dark);
  box-shadow: 0 18px 36px rgba(13, 50, 31, 0.36);
  transform: translateY(-2px);
}

.rsvp-submit:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.rsvp-status {
  min-height: 1.55em;
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.rsvp-status.is-success {
  color: #c7f7d9;
}

.rsvp-status.is-error {
  color: #ffd2d5;
}

.privacy-note {
  width: min(720px, 100%);
  margin: 17px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  line-height: 1.7;
}

.rsvp-section .floral-divider {
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.closing-names {
  margin: 24px 0 0;
  font-family: "Aref Ruqaa", serif;
  font-size: 2.45rem;
  font-weight: 700;
}

.closing-date {
  margin: -7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
}

#toTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--rose-700);
  box-shadow: 0 12px 28px rgba(79, 47, 49, 0.28);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

#toTop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#toTop:hover {
  background: var(--rose-800);
}

#toTop svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--rose-100);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--rose-100);
  border-radius: 999px;
  background: var(--rose-500);
}

@media (max-width: 900px) {
  .hero {
    background-attachment: scroll;
  }

  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(28, 17, 18, 0.38), rgba(56, 30, 33, 0.62)),
      url("../image/cover-mobile.jpeg");
    background-position: center center;
    background-size: cover;
  }

  .site-nav {
    padding: 16px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    position: absolute;
    top: 65px;
    right: 20px;
    left: 20px;
    display: none;
    padding: 15px 18px;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    background: rgba(55, 31, 34, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(14px);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 10px 5px;
    text-align: center;
  }

  .hero-content {
    padding-top: 70px;
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(65px, 1fr));
    gap: 7px;
  }

  .countdown-item {
    padding: 11px 5px 8px;
  }

  .countdown-item strong {
    font-size: 1.5rem;
  }

  .countdown-item span {
    font-size: 0.76rem;
  }

  .section {
    padding: 76px 20px;
  }

  .section-title {
    margin-bottom: 38px;
  }

  .schedule-card {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
  }

  .schedule-part {
    min-height: 135px;
    padding: 22px 18px;
  }

  .schedule-part + .schedule-part {
    border-top: 1px solid rgba(143, 93, 93, 0.17);
    border-right: 0;
  }

  .schedule-date strong {
    font-size: 4rem;
  }

  .map-frame {
    border-width: 5px;
    border-radius: 17px;
  }

  .map-frame iframe {
    height: 370px;
  }
}

@media (max-width: 560px) {
  .hero-content {
    width: min(100% - 28px, 680px);
  }

  .hero-title {
    font-size: clamp(2.85rem, 14vw, 4.2rem);
  }

  .hero-title-en {
    font-size: 0.38em;
  }

  .hero-kicker {
    font-size: 0.95rem;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    width: min(430px, 100%);
    margin: 0 auto;
  }

  .memory-card {
    aspect-ratio: 4 / 5;
  }

  .memory-card figcaption {
    padding: 22px;
  }

  .action-button,
  .rsvp-submit {
    width: 100%;
    max-width: 340px;
  }
}

@media (max-width: 620px) {
  .rsvp-form {
    padding: 22px 17px;
  }

  .attendance-options {
    grid-template-columns: 1fr;
  }

  .guest-count-field {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    padding-bottom: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
