/* دعوت‌نامه الکامپ — صفحه مستقل · مرتب و ریسپانسیو */

@font-face {
  font-family: "Droid Arabic Kufi";
  src: url("./fonts/DroidArabicKufi-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Droid Arabic Kufi";
  src: url("./fonts/DroidArabicKufi-Bold.ttf") format("truetype");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #b41011;
  --brand-hover: #8e0c0d;
  --brand-soft: rgba(180, 16, 17, 0.08);
  --gold: #d7a86e;
  --paper: #fffdf8;
  --paper-2: #f7f3ec;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #78716c;
  --stage: #12100e;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1rem, 3vw, 2rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Droid Arabic Kufi", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
}

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

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% -5%, rgba(180, 16, 17, 0.32), transparent 60%),
    radial-gradient(50% 35% at 90% 100%, rgba(215, 168, 110, 0.1), transparent 55%),
    var(--stage);
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(var(--pad), var(--safe-t))
    var(--pad)
    max(var(--pad), var(--safe-b));
}

.card {
  width: min(100%, 34rem);
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1px solid rgba(215, 168, 110, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.15rem);
  text-align: center;
}

.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.logo-box {
  padding: 0.75rem 1.15rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(215, 168, 110, 0.35);
  box-shadow: 0 8px 20px rgba(28, 25, 23, 0.06);
}

.logo-box img {
  display: block;
  width: clamp(7.5rem, 28vw, 10rem);
  height: auto;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 28ch;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--brand);
  text-wrap: balance;
}

.event {
  margin: 0;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  font-weight: 700;
  color: var(--ink-2);
}

/* تاریخ — ساختار جدا تا اعداد قطع نشوند */
.date-banner {
  width: 100%;
  padding: 1rem 1.25rem 1.1rem;
  border-radius: 1.15rem;
  background: linear-gradient(165deg, #c41819, var(--brand) 45%, var(--brand-hover));
  color: #fffdf8;
  box-shadow: 0 14px 32px rgba(180, 16, 17, 0.28);
}

.date-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  direction: rtl;
}

.date-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  padding-block: 0.15rem;
}

.date-sep {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(230, 211, 163, 0.95);
  padding-bottom: 0.15rem;
}

.date-month {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e6d3a3;
}

.details {
  width: 100%;
  display: grid;
  gap: 0.55rem;
}

.detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(215, 168, 110, 0.28);
  text-align: right;
}

.detail-link:hover {
  border-color: rgba(180, 16, 17, 0.35);
  background: #fffaf5;
}

.detail-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand);
}

.detail-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.detail > div,
.detail-link > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-3);
}

.detail strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.detail-link strong {
  color: var(--brand);
}

.note {
  margin: 0;
  max-width: 36ch;
  font-size: 0.85rem;
  line-height: 1.85;
  color: var(--ink-2);
}

.actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 160ms var(--ease),
    transform 160ms var(--ease),
    border-color 160ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(180, 16, 17, 0.25);
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-ghost {
  color: var(--brand);
  background: #fff;
  border-color: rgba(180, 16, 17, 0.22);
}

.btn-ghost:hover {
  border-color: rgba(215, 168, 110, 0.55);
  background: #fffaf5;
}

.catalog-ctas {
  width: 100%;
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(180, 16, 17, 0.2);
  text-align: center;
}

.catalog-ctas-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-3);
}

.catalog-ctas-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-catalog {
  color: #3b2410;
  background: var(--gold);
  border-color: transparent;
}

.btn-catalog:hover {
  filter: brightness(0.97);
}

.btn-catalog-outline {
  color: var(--brand);
  background: transparent;
  border-color: rgba(180, 16, 17, 0.28);
}

.btn-catalog-outline:hover {
  background: var(--brand-soft);
}

.mail {
  display: block;
  padding: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-3);
  direction: ltr;
}

.mail:hover {
  color: var(--brand);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.foot a {
  color: var(--brand);
  font-weight: 700;
}

/* انیمیشن ساده */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.card.is-ready .reveal {
  animation: fadeUp 560ms var(--ease) forwards;
}

.reveal[data-d="0"] {
  animation-delay: 40ms;
}
.reveal[data-d="1"] {
  animation-delay: 100ms;
}
.reveal[data-d="2"] {
  animation-delay: 160ms;
}
.reveal[data-d="3"] {
  animation-delay: 220ms;
}
.reveal[data-d="4"] {
  animation-delay: 280ms;
}
.reveal[data-d="5"] {
  animation-delay: 340ms;
}
.reveal[data-d="6"] {
  animation-delay: 400ms;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* موبایل باریک */
@media (max-width: 380px) {
  .card {
    gap: 0.7rem;
    padding: 1.1rem 0.95rem;
    border-radius: 1.2rem;
  }

  .date-day {
    min-width: 2.25rem;
    font-size: 1.85rem;
  }

  .btn {
    min-height: 2.75rem;
    font-size: 0.9rem;
  }
}

/* تبلت و دسکتاپ — کارت بزرگ‌تر و خواناتر */
@media (min-width: 640px) {
  .card {
    width: min(100%, 40rem);
    padding: 2.5rem 2.75rem;
    gap: 1.25rem;
  }

  .hero {
    max-width: 34ch;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .date-banner {
    padding: 1.25rem 1.5rem 1.35rem;
  }

  .date-day {
    font-size: 3rem;
    min-width: 3.25rem;
  }
}

@media (min-width: 900px) {
  .shell {
    padding: 2.5rem;
  }

  .card {
    width: min(100%, 52rem);
    padding: 2.75rem 3rem;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "head head"
      "hero date"
      "details details"
      "note actions"
      "foot foot";
    align-items: start;
    text-align: right;
    column-gap: 2rem;
    row-gap: 1.35rem;
  }

  .head {
    grid-area: head;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hero {
    grid-area: hero;
    align-items: flex-start;
    text-align: right;
    max-width: none;
  }

  .date-banner {
    grid-area: date;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .details {
    grid-area: details;
    grid-template-columns: repeat(3, 1fr);
  }

  .detail {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    min-height: 100%;
  }

  .note {
    grid-area: note;
    max-width: none;
    text-align: right;
    align-self: center;
  }

  .actions {
    grid-area: actions;
  }

  .foot {
    grid-area: foot;
    justify-content: flex-start;
    border-top: 1px solid rgba(215, 168, 110, 0.25);
    padding-top: 1rem;
    margin-top: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
