:root {
  --ink: #171311;
  --chocolate: #3b2418;
  --brown: #5a351e;
  --gold: #a87835;
  --gold-light: #c49a55;
  --cream: #e8dcc8;
  --sand: #d5c2a5;
  --paper: #f4ecdf;
  --white: #fffaf2;
  --display: "Aref Ruqaa", serif;
  --body: "Noto Kufi Arabic", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  color: var(--chocolate);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.intro-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  inset: 12px auto auto 12px;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  color: var(--ink);
  background: var(--cream);
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

.intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: max(2rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  color: var(--cream);
  background: var(--ink);
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.intro-image {
  position: absolute;
  inset: -4%;
  background-image: linear-gradient(rgba(23, 19, 17, 0.14), rgba(23, 19, 17, 0.34)), url("intro-bg-v2.png");
  background-position: center center;
  background-size: cover;
  filter: blur(12px) brightness(0.72);
  transform: scale(1.12);
  transition: filter 2.2s cubic-bezier(0.2, 0.7, 0.2, 1), transform 5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.9s ease;
}

.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 10%, rgba(23, 19, 17, 0.35) 68%, rgba(23, 19, 17, 0.82) 120%);
}

.intro.is-ready .intro-image {
  filter: blur(0) brightness(0.78);
  transform: scale(1.04);
}

.intro-scene {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  text-align: center;
  transition: opacity 0.55s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.65s ease;
}

.intro-bismillah,
.intro-prelude,
.intro h1,
.intro-groom,
.enter-button {
  opacity: 0;
  transform: translateY(24px);
}

.intro.is-ready .intro-bismillah { animation: intro-text 0.9s 0.25s both; }
.intro.is-ready .intro-prelude { animation: intro-text 0.9s 0.6s both; }
.intro.is-ready h1 { animation: intro-title 1.15s 0.82s both; }
.intro.is-ready .intro-groom { animation: intro-text 0.9s 1.15s both; }
.intro.is-ready .enter-button { animation: intro-text 0.8s 1.45s both; }

.intro-bismillah {
  margin: 0 0 clamp(2.4rem, 7vh, 4.5rem);
  color: rgba(232, 220, 200, 0.88);
  font-family: var(--display);
  font-size: clamp(1.1rem, 3.8vw, 1.45rem);
}

.intro-prelude {
  margin: 0 0 0.5rem;
  color: var(--gold-light);
  font-size: clamp(0.76rem, 2.5vw, 0.94rem);
}

.intro h1 {
  margin: 0;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(4.8rem, 20vw, 9.4rem);
  font-weight: 700;
  line-height: 0.88;
  text-shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
}

.intro h1 span {
  display: block;
  color: var(--gold-light);
  font-size: 0.5em;
  line-height: 1.1;
}

.intro-groom {
  margin: 1.35rem 0 2rem;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(2.15rem, 8vw, 3.6rem);
  line-height: 1.2;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.enter-button,
.primary-button,
.share-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.enter-button {
  position: relative;
  overflow: hidden;
  color: var(--chocolate);
  background: rgba(232, 220, 200, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.enter-button::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -40%;
  width: 26%;
  height: 260%;
  background: rgba(255, 255, 255, 0.45);
  transform: rotate(25deg);
  animation: button-light 3.8s 2.2s infinite;
}

.intro-farewell {
  position: absolute;
  z-index: 4;
  margin: 0;
  opacity: 0;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(3.8rem, 17vw, 8rem);
  filter: blur(14px);
  transform: scale(0.9);
  transition: opacity 0.5s ease, filter 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.intro.is-opening .intro-scene {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(-28px) scale(0.96);
}

.intro.is-opening .intro-image {
  filter: blur(5px) brightness(0.62);
  transform: scale(1.1) translateY(-1%);
}

.intro.is-opening .intro-farewell {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  min-height: 100svh;
  padding: clamp(5rem, 8vw, 8rem) max(6vw, 2rem) 0;
  overflow: hidden;
  color: var(--cream);
  background: radial-gradient(ellipse at 27% 45%, rgba(196, 154, 85, 0.13), transparent 34%), linear-gradient(135deg, #171311 0%, #3b2418 62%, #271810 100%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  max-width: 590px;
  padding-bottom: 4rem;
  text-align: right;
}

.verse {
  max-width: 550px;
  margin: 0 0 2.3rem;
  color: rgba(232, 220, 200, 0.84);
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.section-kicker {
  margin: 0 0 0.35rem;
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.hero-copy h2 {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: clamp(5rem, 9vw, 9rem);
  font-weight: 700;
  line-height: 0.82;
}

.hero-copy h2 span {
  display: block;
  margin-top: 0.38em;
  color: var(--cream);
  font-size: 0.56em;
}

.hero-message {
  max-width: 560px;
  margin: 2rem 0;
  color: rgba(232, 220, 200, 0.82);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 2.15;
}

.text-link {
  min-height: 48px;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(196, 154, 85, 0.55);
}

.hero-portrait {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: center;
  width: min(100%, 620px);
  height: min(90svh, 900px);
  min-height: 570px;
}

.hero-portrait img {
  position: absolute;
  z-index: 2;
  inset: auto 50% 0 auto;
  width: auto;
  height: min(88svh, 880px);
  max-width: 106%;
  object-fit: contain;
  transform: translateX(50%);
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.42));
}

.portrait-light {
  position: absolute;
  z-index: 0;
  inset: 10% 2% 4%;
  background: radial-gradient(ellipse at center, rgba(196, 154, 85, 0.32), rgba(168, 120, 53, 0.07) 46%, transparent 72%);
  filter: blur(18px);
}

.hero-portrait p {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 2.2rem;
  margin: 0;
  color: rgba(232, 220, 200, 0.72);
  font-family: var(--display);
  font-size: 1.05rem;
}

.section {
  position: relative;
  padding: clamp(5.5rem, 12vw, 9rem) 1.25rem;
}

.welcome {
  overflow: hidden;
  background: linear-gradient(150deg, #f6efe4, var(--cream));
  text-align: center;
}

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

.welcome h2,
.contact h2 {
  margin: 0.35rem 0 1.5rem;
  color: var(--chocolate);
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 6.8rem);
  line-height: 1.06;
}

.welcome-copy {
  margin: 0 auto;
  color: var(--brown);
  font-family: var(--display);
  font-size: clamp(1.55rem, 4.4vw, 2.3rem);
  line-height: 1.95;
}

.signature {
  margin: 3rem 0 0;
  color: rgba(90, 53, 30, 0.78);
  font-size: 0.86rem;
}

.signature strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--chocolate);
  font-family: var(--display);
  font-size: 1.8rem;
}

.details {
  color: var(--cream);
  background: linear-gradient(145deg, #171311, #3b2418 72%, #24160f);
}

.details-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: stretch;
  gap: clamp(3rem, 7vw, 7rem);
  width: min(100%, 1100px);
  margin: 0 auto;
}

.date-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 540px;
}

.date-copy h2 {
  margin: 0.2rem 0 0;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(3.8rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.1;
}

.date-main {
  margin: 0.4rem 0 0.8rem;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.hijri-date {
  margin: 0;
  color: rgba(232, 220, 200, 0.74);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
}

.dinner-note {
  margin: 2.8rem 0 0;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.location-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 540px;
  padding: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  background: linear-gradient(to top, rgba(23, 19, 17, 0.94), rgba(23, 19, 17, 0.3)), url("intro-bg-v2.png") center 74% / cover no-repeat;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.location-copy h3 {
  margin: 0.25rem 0 0.8rem;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
}

.location-copy h3 span {
  color: var(--gold-light);
  font-size: 0.62em;
}

.location-copy > p:not(.section-kicker) {
  margin: 0 0 1.7rem;
  color: rgba(232, 220, 200, 0.72);
  font-size: 0.88rem;
}

.primary-button {
  align-self: flex-start;
  color: var(--ink);
  background: var(--cream);
  border: 0;
}

.primary-button svg,
.share-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact {
  background: linear-gradient(160deg, var(--paper), #eadcc7);
  text-align: center;
}

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

.contact h2 { font-size: clamp(3.2rem, 8vw, 5.7rem); }

.contact-intro {
  max-width: 650px;
  margin: 0 auto 2.8rem;
  color: var(--brown);
}

.phone-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 5vw, 4rem);
  width: min(100%, 740px);
  margin: 0 auto 3rem;
}

.phone-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  color: var(--chocolate);
  border-bottom: 1px solid rgba(90, 53, 30, 0.28);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.phone-list a:hover,
.phone-list a:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}

.phone-label {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
}

.phone-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1rem, 2.5vw, 1.13rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.share-button {
  color: var(--cream);
  background: var(--chocolate);
  border: 1px solid var(--chocolate);
}

.share-status {
  min-height: 1.6rem;
  margin: 0.7rem 0 0;
  color: var(--brown);
  font-size: 0.78rem;
}

footer {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 4rem 1.25rem max(4rem, env(safe-area-inset-bottom));
  color: var(--cream);
  background: var(--ink);
  text-align: center;
}

footer p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.3rem, 6vw, 3.5rem);
}

footer span {
  color: rgba(232, 220, 200, 0.55);
  font-size: 0.78rem;
}

.enter-button:hover,
.enter-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.share-button:hover,
.share-button:focus-visible,
.text-link:hover,
.text-link:focus-visible { transform: translateY(-2px); }

.enter-button:focus-visible,
.primary-button:focus-visible,
.share-button:focus-visible,
.text-link:focus-visible,
.phone-list a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 4px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes intro-text {
  from { opacity: 0; transform: translateY(24px); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes intro-title {
  from { opacity: 0; transform: translateY(38px) scale(0.94); filter: blur(12px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes button-light {
  0%, 58% { transform: translateX(-520%) rotate(25deg); }
  78%, 100% { transform: translateX(800%) rotate(25deg); }
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 6.2rem 1.25rem 0;
    text-align: center;
  }

  .hero-copy {
    max-width: 660px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }

  .verse, .hero-message { margin-inline: auto; }
  .hero-copy h2 { font-size: clamp(4.7rem, 18vw, 7.5rem); }

  .hero-portrait {
    width: min(100%, 550px);
    height: min(78svh, 760px);
    min-height: 520px;
    margin-top: 2rem;
  }

  .hero-portrait img { height: min(76svh, 740px); }
  .hero-portrait p { right: 50%; transform: translateX(50%); }

  .details-inner {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .date-copy, .location-copy { min-height: auto; }

  .date-copy {
    align-items: center;
    text-align: center;
  }

  .location-copy {
    width: min(100%, 620px);
    min-height: 520px;
    margin: 0 auto;
    text-align: center;
  }

  .primary-button { align-self: center; }
}

@media (max-width: 620px) {
  .intro { padding-inline: 1.1rem; }
  .intro-image { background-position: center center; }
  .intro-bismillah { margin-bottom: clamp(2rem, 8vh, 3.7rem); }
  .hero { padding-top: 5.2rem; }

  .verse {
    max-width: 330px;
    line-height: 1.85;
  }

  .hero-portrait {
    height: 67svh;
    min-height: 490px;
    max-height: 680px;
  }

  .hero-portrait img {
    height: 66svh;
    min-height: 485px;
    max-height: 670px;
  }

  .date-main { font-size: clamp(2.55rem, 13vw, 4rem); }

  .location-copy {
    min-height: 480px;
    padding: 2rem 1.4rem;
  }

  .primary-button { width: 100%; }

  .phone-list {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  footer { min-height: 230px; }
}

@media (max-width: 380px) {
  .hero-copy h2 { font-size: 4.2rem; }
  .hero-message { font-size: 0.94rem; }
  .date-main { font-size: 2.35rem; }

  .primary-button {
    padding-inline: 0.9rem;
    font-size: 0.82rem;
  }
}

@media (max-height: 640px) and (orientation: landscape) {
  .intro-scene { transform: scale(0.82); }
  .intro-bismillah { margin-bottom: 1rem; }
  .hero { min-height: 780px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
