/* ===========================================================================
   HAMERZ — دعوت‌نامه اختصاصی (Standalone Invitation)
   ---------------------------------------------------------------------------
   This stylesheet is fully self-contained. All fonts/images it needs live in
   this same folder (assets/), so the folder can be copied anywhere and still
   work without the main project.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Fonts (self-hosted in assets/fonts)
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'KalamehFaNum';
  src: url('../fonts/KALAMEHFANUM-THIN.TTF') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'KalamehFaNum';
  src: url('../fonts/KALAMEHFANUM-REGULAR.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'KalamehFaNum';
  src: url('../fonts/KALAMEHFANUM-BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'KalamehFaNum';
  src: url('../fonts/KALAMEHFANUM-BLACK.TTF') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   2. Design Tokens (copied from the project design system)
   --------------------------------------------------------------------------- */
:root {
  --bg-primary:    #080B0C;
  --bg-secondary:  #0D1112;
  --bg-card:       #111617;
  --bg-elevated:   #151A1C;

  --brand-teal:    #006366;
  --brand-teal-2:  #008184;
  --brand-green:   #2DFF1E;
  --brand-lime:    #DFFF6C;
  --gray:          #53595D;

  --text-primary:   #FFFFFF;
  --text-secondary: #D7DADC;
  --text-muted:     #8D969B;
  --text-faint:     #5C656A;

  --border-primary: rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.14);
  --border-brand:   rgba(0, 131, 134, 0.45);

  --success: #2FDF8C;
  --warning: #F0B429;
  --danger:  #F2555A;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --glow-green: 0 0 0 1px rgba(45, 255, 30, 0.35), 0 0 18px rgba(45, 255, 30, 0.18);
  --glow-teal:  0 0 24px rgba(0, 131, 134, 0.35);

  --font-fa: 'KalamehFaNum', 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'Roboto Mono', 'Consolas', 'Courier New', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.22s;
}

/* ---------------------------------------------------------------------------
   3. Reset & Base
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { direction: rtl; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-fa);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 99, 102, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(0, 99, 102, 0.12), transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

/* Watermark */
.inv-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.inv-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: orb-float 14s ease-in-out infinite alternate;
}
.inv-bg .orb.one { width: 480px; height: 480px; background: rgba(0, 99, 102, 0.35); top: -160px; inset-inline-end: -120px; }
.inv-bg .orb.two { width: 380px; height: 380px; background: rgba(45, 255, 30, 0.06); bottom: -140px; inset-inline-start: -100px; animation-delay: 3s; }
.inv-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.inv-bg .simorgh {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 88vh;
  width: auto;
  max-width: 100%;
  opacity: 0.22;
  filter: blur(2px) drop-shadow(0 0 90px rgba(45, 255, 30, 0.25));
  animation: simorgh-float 16s ease-in-out infinite alternate;
}
@keyframes orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-30px, 24px, 0) scale(1.08); }
}
@keyframes simorgh-float {
  from { opacity: 0.19; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 0.28; transform: translate(-50%, -50%) scale(1.06); }
}
@media (orientation: portrait) {
  .inv-bg .simorgh { height: auto; width: 92vw; }
}

/* ---------------------------------------------------------------------------
   4. Invitation Card
   --------------------------------------------------------------------------- */
.inv-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  padding: 40px 36px;
  text-align: center;
  overflow: hidden;
}
.inv-card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-green), var(--brand-teal-2), transparent);
}

/* Badge row */
.badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(45, 255, 30, 0.3);
  background: rgba(45, 255, 30, 0.07);
  color: var(--brand-green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  direction: ltr;
}
.badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 8px var(--brand-green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Logos */
.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.logos img { height: 56px; width: auto; object-fit: contain; display: block; }
.logos .divider { width: 1px; height: 40px; background: var(--border-strong); }

/* Title */
.inv-title {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.inv-subtitle {
  color: var(--brand-lime);
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 24px;
}

/* Divider line */
.divider-line {
  width: 120px;
  height: 1px;
  margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Body text */
.inv-body { color: var(--text-secondary); max-width: 520px; margin: 0 auto 28px; }
.inv-body p { margin: 0 0 12px; }
.inv-body .highlight { color: var(--text-primary); font-weight: 700; }

/* Personalized name */
.name-block {
  margin: 0 auto 30px;
  max-width: 520px;
  padding: 18px 20px;
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  background: rgba(0, 131, 134, 0.08);
}
.name-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.name-value {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-word;
}
.meta {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.meta .sep { color: var(--gray); margin: 0 6px; }

.honorific { color: var(--brand-lime); }

/* Code chip */
.code-block { margin-bottom: 28px; }
.code-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.code-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.14em;
  direction: ltr;
  color: var(--brand-green);
  background: rgba(45, 255, 30, 0.06);
  border: 1px solid rgba(45, 255, 30, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 28px;
  box-shadow: var(--glow-green);
}

/* Footer info */
.inv-footer {
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.inv-footer .row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.inv-footer .tag {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
.inv-footer .brand-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  direction: ltr;
}

/* Print */
@media print {
  body { background: #fff; padding: 0; }
  .inv-bg { display: none; }
  .inv-card { box-shadow: none; border-color: #ccc; max-width: 100%; }
}
