:root {
  --ivory: #fffaf2;
  --ivory-deep: #f6eadc;
  --purple: #45645f;
  --purple-dark: #294641;
  --purple-soft: #6e8b86;
  --gold: #c69a4b;
  --gold-light: #efd49a;
  --ink: #314b47;
  --muted: #6d7f7b;
  --line: rgba(198, 154, 75, 0.32);
  --surface: rgba(255, 251, 244, 0.96);
  --shadow: 0 24px 60px rgba(49, 76, 71, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ivory-deep);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(177, 207, 198, 0.25), transparent 28rem),
    linear-gradient(180deg, #fbf3ea 0%, #f6e9db 100%);
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100dvh;
  overflow: hidden;
  background: #efe2d3;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.cover.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover__background,
.hero__background {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.01);
}

.cover__background {
  background-image: url("assets/door-poster.jpg");
}

.hero__background {
  background-image: url("assets/hero-poster.jpg");
}

.cover__shade,
.hero__shade {
  position: absolute;
  inset: 0;
}

.cover__shade {
  background:
    linear-gradient(180deg, rgba(41, 29, 42, 0.08), rgba(41, 29, 42, 0.02) 35%, rgba(41, 29, 42, 0.65) 100%),
    radial-gradient(circle at center, transparent 20%, rgba(48, 29, 45, 0.18) 100%);
}

.cover__content {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding:
    max(28px, env(safe-area-inset-top))
    24px
    max(48px, calc(env(safe-area-inset-bottom) + 28px));
  text-align: center;
  color: #fffaf4;
  text-shadow: 0 3px 22px rgba(31, 18, 30, 0.48);
}

.cover__badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 246, 226, 0.52);
  border-radius: 999px;
  background: rgba(77, 48, 72, 0.38);
  backdrop-filter: blur(12px);
  color: #fff7e8;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cover__cap {
  margin: 14px 0 4px;
  font-size: clamp(2.4rem, 10vw, 4rem);
  filter: drop-shadow(0 8px 22px rgba(25, 14, 24, 0.38));
}

.cover__intro,
.hero__pretitle {
  margin: 8px 0 0;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 500;
}

.cover__name {
  margin: 8px 0 2px;
  font-size: clamp(2.4rem, 11vw, 4.7rem);
  font-weight: 800;
  line-height: 1.05;
}

.cover__university {
  margin: 5px 0 18px;
  max-width: 30rem;
  color: rgba(255, 250, 244, 0.88);
  font-size: clamp(0.95rem, 3.7vw, 1.15rem);
}

.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(82vw, 280px);
  min-height: 56px;
  padding: 13px 28px;
  border: 1px solid rgba(255, 247, 231, 0.72);
  border-radius: 999px;
  color: #4a334b;
  background: linear-gradient(135deg, #fff8ec, #ead3a0);
  box-shadow: 0 14px 34px rgba(34, 20, 34, 0.26);
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.open-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(34, 20, 34, 0.32);
}

.open-button:active {
  transform: scale(0.98);
}

.cover__hint {
  margin: 12px 0 0;
  color: rgba(255, 250, 244, 0.75);
  font-size: 0.82rem;
}

.invite {
  opacity: 0;
  visibility: hidden;
  min-height: 100dvh;
  transition: opacity 0.7s ease;
}

.invite.is-visible {
  opacity: 1;
  visibility: visible;
}

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero__shade {
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.08), rgba(54, 35, 54, 0.12) 46%, rgba(43, 29, 43, 0.72) 100%),
    radial-gradient(circle at 50% 38%, rgba(255, 248, 224, 0.12), transparent 42%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(90%, 620px);
  margin-top: auto;
  padding:
    max(42px, env(safe-area-inset-top))
    18px
    max(48px, calc(env(safe-area-inset-bottom) + 30px));
  text-align: center;
  color: #fffaf4;
  text-shadow: 0 3px 24px rgba(34, 21, 34, 0.5);
}

.hero__cap {
  display: block;
  margin: 16px 0 2px;
  font-size: clamp(2.4rem, 10vw, 4.2rem);
}

.hero__name {
  margin: 8px 0;
  font-size: clamp(2.7rem, 12vw, 5.8rem);
  line-height: 1;
  font-weight: 800;
}

.hero__major,
.hero__university,
.hero__year,
.hero__sub {
  margin: 5px auto;
  max-width: 36rem;
}

.hero__major {
  font-size: clamp(1.05rem, 4.5vw, 1.45rem);
  font-weight: 700;
}

.hero__university {
  color: rgba(255, 250, 244, 0.9);
  font-size: clamp(0.95rem, 4vw, 1.2rem);
}

.hero__year {
  width: fit-content;
  margin-top: 12px;
  padding: 6px 16px;
  border: 1px solid rgba(255, 248, 225, 0.5);
  border-radius: 999px;
  background: rgba(79, 51, 75, 0.35);
  color: #ffeec8;
  font-weight: 800;
}

.hero__sub {
  margin-top: 14px;
  font-size: clamp(1rem, 4.2vw, 1.3rem);
  line-height: 1.8;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #fff8eb;
  text-decoration: none;
  font-weight: 700;
}

.scroll-cue b {
  animation: cue 1.4s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-item.is-in {
  opacity: 1;
  transform: translateY(0);
}

.content-card {
  position: relative;
  z-index: 5;
  width: min(calc(100% - 24px), 720px);
  margin: -18px auto 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.section {
  position: relative;
  margin: 12px 0;
  padding: 28px 20px;
  overflow: hidden;
  border: 1px solid rgba(198, 154, 75, 0.25);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(201, 174, 205, 0.18), transparent 17rem),
    rgba(255, 252, 246, 0.86);
  text-align: center;
}

.section::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(198, 154, 75, 0.15);
  border-radius: 18px;
}

.section__icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff8e9, #ead09a);
  color: var(--purple);
  box-shadow: 0 8px 22px rgba(105, 74, 103, 0.12);
}

.section__title {
  position: relative;
  z-index: 1;
  margin: 4px 0 12px;
  color: var(--purple-dark);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 800;
}

.section__text,
.verse,
.venue__address,
.notes__list,
.contact__link {
  position: relative;
  z-index: 1;
}

.section__text,
.verse {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 2;
}

.verse {
  margin-bottom: 16px;
  color: var(--purple-soft);
  font-weight: 700;
}

.academic-details {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px auto 0;
  max-width: 36rem;
}

.families__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 34rem;
  margin: 0 auto;
}

.families__name {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(198, 154, 75, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.families__name span {
  color: var(--muted);
  font-size: 0.82rem;
}

.families__name strong {
  color: var(--purple-dark);
  font-size: 1.05rem;
}

.academic-detail {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(198, 154, 75, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.academic-detail span {
  color: var(--muted);
  font-size: 0.78rem;
}

.academic-detail strong {
  color: var(--purple-dark);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

[data-graduation-field][hidden],
.academic-details[hidden] {
  display: none !important;
}

.countdown__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.countdown__grid div {
  min-width: 0;
  padding: 14px 6px;
  border: 1px solid rgba(198, 154, 75, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.countdown__grid strong,
.countdown__grid span {
  display: block;
}

.countdown__grid strong {
  color: var(--purple);
  font-size: clamp(1.25rem, 6vw, 2rem);
  font-variant-numeric: tabular-nums;
}

.countdown__grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.countdown__done {
  color: var(--purple);
  font-weight: 800;
}

.program__list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.program__item {
  display: grid;
  grid-template-columns: minmax(95px, auto) 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(198, 154, 75, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  text-align: right;
}

.program__time {
  color: var(--gold);
  font-weight: 800;
}

.program__title {
  color: var(--ink);
  font-weight: 700;
}

.venue__name {
  position: relative;
  z-index: 1;
  margin: 2px 0 6px;
  color: var(--purple);
  font-size: 1.25rem;
  font-weight: 800;
}

.venue__address {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.venue__date-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--purple-soft);
  font-weight: 700;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.map-button,
.contact__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid rgba(198, 154, 75, 0.48);
  border-radius: 999px;
  color: var(--purple-dark);
  background: linear-gradient(135deg, #fffaf1, #f2dfb6);
  text-decoration: none;
  font-weight: 800;
}

.notes__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes__list li {
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  line-height: 1.75;
}

.closing {
  padding: 30px 18px 16px;
  text-align: center;
}

.closing__ornament {
  display: block;
  color: var(--gold);
  font-size: 1.6rem;
}

.closing p,
.closing strong,
.closing small {
  display: block;
}

.closing p {
  margin: 8px 0;
  color: var(--purple);
  font-size: 1.1rem;
  font-weight: 700;
}

.closing strong {
  color: var(--ink);
}

.closing small {
  margin-top: 8px;
  color: var(--gold);
}

.content-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.content-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dawati-extra-sections {
  width: min(calc(100% - 24px), 720px);
  margin: 0 auto 32px;
}

@media (min-width: 700px) {
  .content-card {
    padding: 26px;
  }

  .section {
    padding: 34px 28px;
  }
}

@media (max-width: 420px) {
  .content-card {
    width: calc(100% - 14px);
    padding: 10px;
    border-radius: 24px;
  }

  .section {
    padding: 24px 14px;
  }

  .program__item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .academic-details,
  .families__grid {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
