@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-0: #090807;
  --gold: #e0b84c;
  --gold-2: #f6e2a4;
  --gold-deep: #b8892a;
  --cream: #fbf6ec;
  --ink: #1a140e;
  --ink-soft: #5c5348;
  --ok: #2f9d6a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bot: max(20px, env(safe-area-inset-bottom));
}

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

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

html,
body {
  min-height: 100%;
}

body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-synthesis: none;
  background: var(--bg-0);
  color: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 184, 76, 0.22), transparent 55%),
    radial-gradient(500px 400px at 100% 80%, rgba(184, 137, 42, 0.12), transparent 50%),
    radial-gradient(400px 300px at 0% 100%, rgba(224, 184, 76, 0.08), transparent 45%);
  z-index: 0;
}

.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sparkles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-2);
  opacity: 0.35;
  animation: twinkle 4s ease-in-out infinite;
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin: 0 auto;
  min-height: 100dvh;
  padding: var(--safe-top) 20px calc(var(--safe-bot) + 16px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  text-align: center;
  animation: fadeUp 0.8s ease both 0.1s;
}

.logo-wrap {
  width: min(220px, 70vw);
  margin: 8px auto 12px;
  padding: 10px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(246, 226, 164, 0.18), rgba(184, 137, 42, 0.08));
  box-shadow: 0 0 0 1px rgba(224, 184, 76, 0.25), 0 10px 30px rgba(224, 184, 76, 0.12);
}

.logo-wrap img {
  display: block;
  width: 100%;
  height: 52px;
  object-fit: contain;
}

.store-chip {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #cbbca8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(224, 184, 76, 0.18);
  border-radius: 999px;
  padding: 2px 10px;
}

h1 {
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.45;
  margin-top: 10px;
}

.subtitle {
  margin-top: 6px;
  color: #c2b6a6;
  font-size: 13.5px;
}

.coupon {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(224, 184, 76, 0.35);
  overflow: hidden;
  animation: fadeUp 0.85s ease both 0.18s;
}

.coupon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%, transparent 100%);
  background-size: 220% 100%;
  animation: shine 3.8s ease-in-out 1.1s infinite;
  pointer-events: none;
}

.coupon-top {
  padding: 22px 22px 16px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(224, 184, 76, 0.22), transparent 45%),
    linear-gradient(180deg, #fffaf0, var(--cream));
}

.coupon-kicker {
  font-size: 12px;
  color: var(--ink-soft);
}

.off {
  font-size: clamp(3.1rem, 14vw, 4rem);
  font-weight: 900;
  line-height: 1;
  margin: 4px 0 2px;
  background: linear-gradient(180deg, #b8892a, #7a5a18);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.off-label {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 16.5em;
  margin-inline: auto;
}

.stamp {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 64px;
  height: 64px;
  border: 2px solid #c45c4a;
  color: #c45c4a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  transform: rotate(-18deg);
  opacity: 0.85;
  animation: stampIn 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) 0.7s both;
}

.perforation {
  position: relative;
  height: 28px;
  background:
    repeating-linear-gradient(90deg, #d3c4a4 0 7px, transparent 7px 14px) center / auto 2px no-repeat,
    var(--cream);
}

.perforation::before,
.perforation::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-0);
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(224, 184, 76, 0.15);
}

.perforation::before { right: -14px; }
.perforation::after { left: -14px; }

.coupon-bottom {
  padding: 8px 18px 20px;
}

.code-label {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.copy-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 56px;
  padding: 10px 76px 10px 12px;
  border: 1.5px dashed #d3c4a4;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.copy-btn.copied {
  border-color: var(--ok);
  background: #f1fbf6;
}

.code-value {
  font-size: clamp(1.25rem, 5.4vw, 1.55rem);
  font-weight: 800;
  font-family: Vazirmatn, Tahoma, sans-serif;
  letter-spacing: 0.12em;
}

.copy-meta {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.copy-meta svg {
  width: 18px;
  height: 18px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border-radius: 18px;
  text-decoration: none;
  color: #1a140e;
  font-weight: 800;
  font-size: 1.05rem;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 12px 28px rgba(184, 137, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: fadeUp 0.85s ease both 0.28s, ctaPulse 2.8s ease-in-out 1.4s infinite;
}

.cta:active {
  transform: translateY(1px);
}

.cta svg {
  width: 18px;
  height: 18px;
  transform: scaleX(-1);
}

.timer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(224, 184, 76, 0.14);
  animation: fadeUp 0.85s ease both 0.34s;
}

.timer.expired {
  border-color: rgba(196, 92, 74, 0.35);
  color: #f0b4aa;
}

.timer-item {
  flex: 1;
  text-align: center;
}

.timer-item b {
  display: block;
  font-size: 1.15rem;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}

.timer-item span {
  font-size: 11px;
  color: #b7aa9a;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  animation: fadeUp 0.85s ease both 0.4s;
}

.steps li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  font-size: 11.5px;
  color: #d7cbbd;
}

.steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: rgba(224, 184, 76, 0.16);
  color: var(--gold-2);
  font-size: 12px;
}

.hint {
  text-align: center;
  font-size: 12px;
  color: #9e9284;
  animation: fadeUp 0.85s ease both 0.45s;
}

.expire-date {
  display: block;
  margin-top: 4px;
  font-weight: 800;
  font-size: 14px;
  color: var(--gold-2);
}

.site-footer {
  margin-top: auto;
  padding-top: 10px;
  text-align: center;
  color: #8d8276;
  font-size: 11.5px;
  animation: fadeUp 0.85s ease both 0.5s;
}

.site-footer a {
  color: var(--gold-2);
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.terms {
  margin-top: 8px;
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bot) + 18px);
  transform: translate(-50%, 12px);
  background: #143325;
  color: #d9f5e6;
  border: 1px solid rgba(142, 224, 182, 0.35);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti-piece {
  position: fixed;
  top: -10px;
  width: 8px;
  height: 12px;
  z-index: 30;
  pointer-events: none;
  border-radius: 1px;
  animation: fall linear forwards;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.6); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shine {
  0% { background-position: 180% 0; }
  40%, 100% { background-position: -40% 0; }
}

@keyframes stampIn {
  from { opacity: 0; transform: rotate(-18deg) scale(1.5); }
  to { opacity: 0.85; transform: rotate(-18deg) scale(1); }
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(184, 137, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 14px 36px rgba(224, 184, 76, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
}

@keyframes fall {
  to {
    transform: translateY(110dvh) rotate(360deg);
    opacity: 0;
  }
}

@media (min-width: 768px) {
  body {
    background: #050403;
  }

  .app {
    margin: 24px auto;
    min-height: calc(100dvh - 48px);
    background: linear-gradient(180deg, rgba(22, 17, 12, 0.92), rgba(9, 8, 7, 0.96));
    border: 1px solid rgba(224, 184, 76, 0.12);
    border-radius: 36px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

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