/* ─────────────────────────────────────
   RESET & TOKENS
───────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --fg:       #cfc3c3;
  --fg-dim:   #a89e9e;
  --muted:    #7a7480;
  --muted2:   #4d4860;

  --bg0:      #0e0d12;
  --bg1:      #2a2830;
  --bg2:      #4d4a51;
  --bg2-t:    rgba(77,74,81,0.40);

  --surface:  rgba(255,255,255,0.035);
  --border:   rgba(207,195,195,0.09);
  --border-h: rgba(207,195,195,0.20);

  --success:  #7dff9b;
  --gold:     #f0c060;
  --silver:   #b8c4d0;
  --bronze:   #cd8b5a;

  --font:     'Outfit', system-ui, sans-serif;
  --mono:     'JetBrains Mono', 'Fira Code', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────────────────────────────
   LAYOUT & SCROLL
   proximity = user can scroll freely,
   snaps only when close to a section
───────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  font-family: var(--font);
  background: var(--bg0);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────
   BACKGROUND & CANVAS
───────────────────────────────────── */
.bg-layer {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%,
    var(--bg2) 0%, var(--bg1) 40%, var(--bg0) 100%);
  z-index: 0;
  pointer-events: none;
}

#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ─────────────────────────────────────
   SECTION FADE CONNECTOR
   gradient at the bottom of each section
   so pages blend into each other cleanly
───────────────────────────────────── */
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg0) 100%);
  pointer-events: none;
  z-index: 4;
}

.hero::after {
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(14,13,18,0.7) 60%,
    var(--bg0) 100%);
}

/* ─────────────────────────────────────
   SHARED SECTION BASE
───────────────────────────────────── */
.section {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  z-index: 10;
}

/* ─────────────────────────────────────
   SECTION 1 — HERO
───────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: relative;
  z-index: 5;
  text-align: center;
  width: min(580px, 94vw);
  padding: 40px 24px;
  animation: fadeUp 800ms var(--ease-out) both;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(30px); filter:blur(6px); }
  to   { opacity:1; transform:translateY(0);    filter:blur(0); }
}

.reg-heading {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(140deg, #cfc3c3 0%, #ffffff 45%, #b0a6a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.reg-subheading {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 26px;
  line-height: 1.6;
}

/* ─────────────────────────────────────
   SECTION 1.5 — REGISTRATION
───────────────────────────────────── */
.register-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,
    var(--bg0) 0%,
    rgba(30,28,38,1) 50%,
    var(--bg0) 100%);
  padding: 80px 20px 100px;
}

.register-container { width: min(420px, 100%); }

.register-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
}

.register-fee {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: linear-gradient(120deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border-h);
  position: relative;
  overflow: hidden;
}

.register-fee::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: feeShine 5s ease-in-out infinite;
}

@keyframes feeShine {
  0%, 100% { background-position: 130% 0; }
  50%      { background-position: -30% 0; }
}

.register-fee-icon {
  display: flex;
  color: var(--fg-dim);
  flex-shrink: 0;
}

.register-fee-label {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1;
}

.register-fee-amount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
}

/* ─────────────────────────────────────
   SINGLE-PAGE REGISTRATION SITE
   The whole site is now just this one glowing hero + form card.
───────────────────────────────────── */
.reg-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 60px;
}

.reg-main-card {
  width: min(460px, 94vw);
  padding: 44px 30px 36px;
  border-radius: 24px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out;
  transform-style: preserve-3d;
  text-align: center;
}

/* animated glow ring around the card — the "خفن‌تر" touch */
.reg-main-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 24px;
  padding: 2px;
  background: conic-gradient(from var(--glow-angle, 0deg),
    transparent 0%, rgba(207,195,195,0.55) 12%, transparent 26%,
    transparent 55%, rgba(207,195,195,0.35) 67%, transparent 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGlow 7s linear infinite;
  opacity: 0.8;
}

@property --glow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateGlow {
  to { --glow-angle: 360deg; }
}

/* Small glowing ticket badge above the heading */
.reg-badge-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  border: 1px solid var(--border-h);
  color: var(--fg);
  box-shadow: 0 0 0 rgba(207,195,195,0);
  animation: badgePulse 3.2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(207,195,195,0); transform: translateY(0); }
  50%      { box-shadow: 0 0 26px rgba(207,195,195,.28); transform: translateY(-3px); }
}

.reg-form {
  text-align: right;
  margin-top: 8px;
}

.reg-submit {
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .reg-main-card { padding: 34px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #particleCanvas { display: none; }
}

/* ─────────────────────────────────────
   FORM FIELDS & SUBMIT BUTTON
   (shared by the registration form)
───────────────────────────────────── */
.purchase-field { margin-bottom: 14px; }

.purchase-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.purchase-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  direction: ltr;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.purchase-field input:focus {
  border-color: rgba(207,195,195,.5);
  background: rgba(255,255,255,0.055);
  box-shadow: 0 0 0 3px rgba(207,195,195,.12);
}
.purchase-field input:focus + .input-icon,
.input-icon-wrap:focus-within .input-icon { color: var(--fg); }
.purchase-field input::placeholder { color: var(--muted2); }

.purchase-error {
  font-size: 0.76rem;
  color: #ff8383;
  margin: -4px 0 14px;
  min-height: 1em;
  line-height: 1.5;
}

.purchase-submit {
  position: relative;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-h);
  background: linear-gradient(150deg, #3a3740, #4d4a51);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  transition: all 0.25s var(--ease-out);
}
.purchase-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.16) 50%, transparent 60%);
  background-size: 250% 100%;
  background-position: 130% 0;
  transition: background-position 0.7s ease;
  pointer-events: none;
}
.purchase-submit:hover:not(:disabled)::before { background-position: -30% 0; }
.purchase-submit:hover:not(:disabled) {
  background: linear-gradient(150deg, #4d4a51, #5e5b64);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
}
.purchase-submit:active:not(:disabled) { transform: translateY(0); }
.purchase-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.reg-submit-icon { flex-shrink: 0; }

.purchase-note {
  margin-top: 14px;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 10;
  background: rgba(14, 13, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.footer-copy strong {
  color: var(--fg-dim);
  font-weight: 600;
}

.footer-enamad {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-enamad img {
  max-height: 60px;
  width: auto;
  transition: transform 0.3s ease;
  border-radius: 4px;
}

.footer-enamad img:hover {
  transform: scale(1.05);
}

/* ── Responsive Footer ── */
@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-info {
    align-items: center;
  }

  .footer-enamad img {
    max-height: 50px;
  }
}
