/* ZFuture × Arkan — public campaign pages.
   Mobile first: almost every visitor arrives from an SMS link on a phone. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn.f6d31671339d.woff2") format("woff2-variations"),
       url("../fonts/vazirmatn.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #07061a;
  --bg-2: #0e0b2b;
  --text: #f5f3ff;
  --muted: #a9a6cf;
  --faint: #6f6b9a;
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --green: #34d399;
  --red: #fb7185;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 22px;
  --shadow: 0 24px 60px rgba(3, 2, 20, 0.55);
  --grad: linear-gradient(120deg, var(--violet) 0%, var(--pink) 50%, var(--cyan) 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
a { color: var(--violet-2); text-decoration: none; }
a:hover { color: var(--cyan); }
button, input, select { font: inherit; }
img { max-width: 100%; }

/* ---------- Background: aurora blobs + a faint grid ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.blob {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  filter: blur(90px); opacity: 0.5; will-change: transform;
}
.blob.one { background: var(--violet); top: -180px; right: -160px; animation: drift 18s ease-in-out infinite alternate; }
.blob.two { background: var(--cyan); bottom: -220px; left: -200px; opacity: 0.28; animation: drift 22s ease-in-out infinite alternate-reverse; }
.blob.three { background: var(--pink); top: 40%; left: 55%; width: 380px; height: 380px; opacity: 0.22; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 50px) scale(1.15); }
}

/* ---------- Layout ---------- */
/* `clip`, not `hidden`: the wheel's glow bleeds past a phone's edge, and a
   page even a few pixels wide makes iOS zoom the whole layout out. */
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 18px 56px; overflow-x: clip; }
.narrow { max-width: 480px; margin: 0 auto; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 26px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.wordmark:hover { color: var(--text); }
.wordmark .z {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  background: var(--grad); font-weight: 900; font-size: 22px; color: #fff;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-family: system-ui, sans-serif;
}
.wordmark .name { direction: ltr; font-weight: 800; font-size: 20px; letter-spacing: 0.01em; }
.wordmark .name small { color: var(--muted); font-weight: 500; font-size: 14px; margin-inline-start: 6px; }

.partners { display: flex; align-items: center; gap: 8px; }
.partner-chip {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.partner-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.partner-chip.cafe { background: linear-gradient(135deg, #b45309, #78350f); font-size: 17px; }

/* ---------- Cards & type ---------- */
.card {
  position: relative; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.card + .card { margin-top: 16px; }
h1, h2, h3 { line-height: 1.45; margin: 0; }
h1 { font-size: clamp(28px, 7vw, 46px); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; }
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gradient-text .emoji { -webkit-text-fill-color: initial; color: initial; background: none; }
.lede { color: var(--muted); font-size: 16px; margin: 10px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; }

.pill-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px;
  background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--gold); font-weight: 700; font-size: 13px; margin-bottom: 14px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field input[type=text], .field input[type=tel], .field select, .field input:not([type]) {
  width: 100%; padding: 13px 15px; border-radius: 14px;
  border: 1px solid var(--glass-border); background: rgba(7, 6, 26, 0.55); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: 13px 55%, 18px 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--violet-2); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}
.field input::placeholder { color: var(--faint); }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.errors { list-style: none; margin: 7px 0 0; padding: 0; color: var(--red); font-size: 13px; }
.otp-input {
  text-align: center; font-size: 28px !important; font-weight: 800; letter-spacing: 0.45em;
  padding: 14px 10px !important;
}

.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pills label { cursor: pointer; }
.choice-pills input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pills span {
  display: inline-block; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--glass-border); background: rgba(7, 6, 26, 0.45); color: var(--muted);
  transition: all 0.15s;
}
.choice-pills input:checked + span {
  color: #fff; border-color: transparent; background: var(--grad);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
}
.choice-pills input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px; border: 0; border-radius: 16px; cursor: pointer;
  font-weight: 800; font-size: 16px; color: #fff; text-align: center;
  background: var(--grad); background-size: 200% 100%; background-position: 0% 0%;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.12s, background-position 0.5s, box-shadow 0.2s;
}
.btn:hover { color: #fff; background-position: 100% 0%; box-shadow: 0 14px 36px rgba(236, 72, 153, 0.45); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.gold { background: linear-gradient(120deg, #fde68a, var(--gold) 40%, var(--gold-2)); color: #3b2300;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn.gold:hover { color: #3b2300; }
.btn.ghost { background: transparent; border: 1px solid var(--glass-border); box-shadow: none; color: var(--muted); font-weight: 600; }
.btn.ghost:hover { background: var(--glass); color: var(--text); }
.btn.small { width: auto; padding: 9px 16px; font-size: 14px; border-radius: 12px; }
.btn + .btn, form + form { margin-top: 10px; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li {
  padding: 10px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 8px;
  background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: #a7f3d0;
}
.messages li.error { background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.4); color: #fecdd3; }
.messages li.info { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.35); color: #a5f3fc; }

/* ---------- Landing ---------- */
.hero { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero .hero-wheel { order: 2; }
}
.hero-copy h1 { margin-top: 2px; }
.hero-wheel { display: grid; place-items: center; }

.capacity { margin-top: 16px; }
.capacity .bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.capacity .bar span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.capacity .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.section-title { text-align: center; margin: 56px 0 8px; }
.section-lede { text-align: center; color: var(--muted); margin: 0 0 22px; }

.prize-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .prize-grid { grid-template-columns: repeat(3, 1fr); } }
.prize-card { padding: 22px 20px; overflow: hidden; }
.prize-card::after {
  content: ""; position: absolute; inset: auto -40px -60px auto; width: 160px; height: 160px;
  border-radius: 50%; background: var(--accent, var(--violet)); filter: blur(60px); opacity: 0.35;
}
.prize-card .logo {
  width: 54px; height: 54px; border-radius: 16px; overflow: hidden; background: #fff;
  display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.prize-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.prize-card .logo.cafe { background: linear-gradient(135deg, #b45309, #78350f); font-size: 27px; }
.prize-card .amount { font-size: 22px; font-weight: 900; margin: 6px 0 4px; }
.prize-card p { margin: 0; color: var(--muted); font-size: 14px; }

.steps { display: grid; gap: 12px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.step .num {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 900; background: var(--glass-2); border: 1px solid var(--glass-border); color: var(--gold);
}
.step p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.footer { margin-top: 56px; text-align: center; color: var(--faint); font-size: 13px; }
.footer .partners { justify-content: center; margin-bottom: 10px; }

/* ---------- Wheel ---------- */
.wheel-stage { position: relative; width: min(88vw, 380px); aspect-ratio: 1; margin: 0 auto; }
.wheel-stage.small { width: min(78vw, 340px); }
.wheel-stage::before {
  content: ""; position: absolute; inset: -9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 65%);
  filter: blur(10px); z-index: -1; animation: halo 3.2s ease-in-out infinite alternate;
}
@keyframes halo { from { opacity: 0.55; transform: scale(0.96); } to { opacity: 1; transform: scale(1.03); } }
.wheel-stage canvas { width: 100%; height: 100%; display: block; }
.wheel-pointer {
  position: absolute; top: -4%; left: 50%; width: 15%; z-index: 3;
  transform-origin: 50% 22%; transform: translateX(-50%);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; width: 25%; aspect-ratio: 1; z-index: 2;
  transform: translate(-50%, -50%); border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff7d6, var(--gold) 45%, #b45309 100%);
  box-shadow: 0 0 0 5px rgba(7, 6, 26, 0.85), 0 0 0 7px rgba(251, 191, 36, 0.6), 0 10px 26px rgba(0, 0, 0, 0.55);
  color: #3b2300; font-weight: 900; font-size: clamp(13px, 3.6vw, 16px); line-height: 1.2;
  transition: transform 0.15s;
}
.wheel-hub:not(:disabled) { animation: hub-pulse 1.6s ease-in-out infinite; }
.wheel-hub:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.wheel-hub:disabled { cursor: default; }
@keyframes hub-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(7, 6, 26, 0.85), 0 0 0 7px rgba(251, 191, 36, 0.6), 0 0 0 7px rgba(251, 191, 36, 0.35), 0 10px 26px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(7, 6, 26, 0.85), 0 0 0 7px rgba(251, 191, 36, 0.6), 0 0 0 20px rgba(251, 191, 36, 0), 0 10px 26px rgba(0, 0, 0, 0.55); }
}
.spin-actions { max-width: 380px; margin: 26px auto 0; }

/* ---------- Reveal & modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px;
  background: rgba(4, 3, 16, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.overlay .card {
  width: 100%; max-width: 420px; text-align: center; background: linear-gradient(160deg, #1b1446, #0d0a2a);
  transform: translateY(24px) scale(0.94); transition: transform 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.overlay.open .card { transform: none; }
.overlay .trophy { font-size: 54px; line-height: 1; margin-bottom: 6px; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

.prize-lines { list-style: none; padding: 0; margin: 18px 0 20px; text-align: start; }
.prize-lines li {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-border); margin-bottom: 8px; font-weight: 700;
}
.prize-lines .ico {
  flex: none; width: 36px; height: 36px; border-radius: 11px; overflow: hidden; background: #fff;
  display: grid; place-items: center; font-size: 19px;
}
.prize-lines .ico img { width: 100%; height: 100%; object-fit: cover; }
.prize-lines .ico.cafe { background: linear-gradient(135deg, #b45309, #78350f); }
.prize-lines small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }

/* ---------- My prize ---------- */
.winner-hero { text-align: center; padding: 6px 0 4px; }
.winner-hero .trophy { font-size: 60px; line-height: 1; filter: drop-shadow(0 8px 24px rgba(251, 191, 36, 0.45)); }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 6px; }
.summary .tile {
  text-align: center; padding: 14px 8px; border-radius: 18px; background: var(--glass);
  border: 1px solid var(--glass-border);
}
.summary .tile b { display: block; font-size: 17px; font-weight: 900; line-height: 1.5; }
.summary .tile span { font-size: 11.5px; color: var(--muted); }

.prize-section .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prize-section .head .logo {
  flex: none; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: #fff;
  display: grid; place-items: center; font-size: 24px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.prize-section .head .logo img { width: 100%; height: 100%; object-fit: cover; }
.prize-section .head .logo.cafe { background: linear-gradient(135deg, #b45309, #78350f); }
.prize-section p { margin: 0 0 10px; color: #d9d6f3; }
.prize-section .value { font-size: 24px; font-weight: 900; margin: 4px 0 10px; }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; background: rgba(52, 211, 153, 0.12); color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.used { background: rgba(169, 166, 207, 0.12); color: var(--muted); border-color: var(--glass-border); }

.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 16px; margin: 10px 0 14px;
  background: rgba(7, 6, 26, 0.6); border: 1px dashed rgba(251, 191, 36, 0.55);
}
.code-box .code { font-size: 20px; font-weight: 800; color: var(--gold); direction: ltr; }
.copy-btn {
  border: 0; border-radius: 10px; padding: 7px 13px; cursor: pointer; font-weight: 700; font-size: 13px;
  background: var(--glass-2); color: var(--text);
}
.copy-btn.done { background: rgba(52, 211, 153, 0.18); color: var(--green); }
.guide { margin: 4px 0 16px; padding: 0 20px 0 0; list-style: persian; color: var(--muted); font-size: 14px; }
.guide li { margin-bottom: 4px; }
.guide li::marker { color: var(--gold); font-weight: 800; }
.condition {
  font-size: 13px; color: #fde68a; background: rgba(251, 191, 36, 0.08); border-radius: 12px;
  padding: 8px 12px; margin: 0 0 12px; border: 1px solid rgba(251, 191, 36, 0.2);
}
.address { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin: 0 0 14px; }

.cafe-ticket { text-align: center; }
.cafe-ticket .big-code {
  font-size: clamp(30px, 10vw, 44px); font-weight: 900; color: var(--gold); direction: ltr;
  letter-spacing: 0.08em; margin: 10px 0; padding: 18px 10px; border-radius: 18px;
  background: rgba(7, 6, 26, 0.7); border: 2px dashed rgba(251, 191, 36, 0.6);
}
.cafe-ticket .percent { font-size: 52px; font-weight: 900; line-height: 1.1; }

.closed-icon { font-size: 56px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
