@font-face {
  font-family: Vazirmatn;
  src: url('../font/vazirmatn-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #141821; font-family: Vazirmatn, sans-serif; }

.loyalty-hero { padding: 120px 20px 64px; background: #F8F9FC; }
.loyalty-hero__inner { display: grid; align-items: center; gap: 48px; max-width: 1200px; margin-inline: auto; }
.loyalty-hero__content h1 { margin: 0; color: #141821; font-size: clamp(32px, 4vw, 52px); font-weight: 800; line-height: 1.4; letter-spacing: 0; }
.loyalty-hero__content h1 span { display: block; }
.loyalty-hero__content p { max-width: 68ch; margin: 16px 0 0; color: #4E5260; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.9; }
.loyalty-hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.loyalty-hero__button { min-height: 52px; padding: 0 28px; border: 1.5px solid transparent; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: background-color 220ms cubic-bezier(.22,.61,.36,1), color 220ms cubic-bezier(.22,.61,.36,1); }
.loyalty-hero__button--primary { background: #DD6E12; color: #fff; }
.loyalty-hero__button--primary:hover { background: #C45F10; }
.loyalty-hero__button--primary:active { background: #A64E0D; }
.loyalty-hero__button--secondary { border-color: #252A35; background: transparent; color: #252A35; }
.loyalty-hero__button--secondary:disabled { cursor: default; }
.loyalty-hero__button:focus-visible { outline: 3px solid rgba(255,76,0,.35); outline-offset: 3px; }
.loyalty-hero__visual { width: 100%; max-width: 640px; margin-inline: auto; }
.loyalty-report { display: block; width: 100%; height: auto; overflow: visible; font-family: Vazirmatn, sans-serif; }
.loyalty-report__frame { transform-box: fill-box; transform-origin: center; animation: loyalty-frame-in 720ms cubic-bezier(.22,.61,.36,1) both; }
.loyalty-report__item { opacity: 0; transform-box: fill-box; transform-origin: center; animation: loyalty-item-in 420ms cubic-bezier(.22,.61,.36,1) both; }
.loyalty-report__header { animation-delay: 600ms; }
.loyalty-report__stat--first { animation-delay: 680ms; }
.loyalty-report__stat--second { animation-delay: 760ms; }
.loyalty-report__chart { animation-delay: 840ms; }
.loyalty-report__legend { animation-delay: 920ms; }
.loyalty-report__title { fill: #141821; font-size: 19px; font-weight: 700; }
.loyalty-report__subtitle { fill: #141821; font-size: 17px; font-weight: 700; }
.loyalty-report__number { fill: #141821; font-size: 21px; font-weight: 700; }
.loyalty-report__label { fill: #4E5260; font-size: 15px; }
.loyalty-report__legend-number { fill: #141821; font-size: 16px; font-weight: 700; }
@keyframes loyalty-frame-in { from { opacity: 0; transform: scale(.015); } to { opacity: 1; transform: scale(1); } }
@keyframes loyalty-item-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.loyalty-calculator { padding: 64px 20px; background: linear-gradient(160deg, var(--brand-gradient-orange), var(--brand-gradient-red)); }
.loyalty-calculator__inner { max-width: 1200px; margin-inline: auto; }
.loyalty-calculator__intro { max-width: 900px; margin: 0 auto 32px; text-align: center; }
.loyalty-calculator__intro h2 { margin: 0; color: var(--surface-0); font-size: clamp(26px, 3.6vw, 44px); line-height: 1.4; letter-spacing: 0; }
.loyalty-calculator__intro p { margin: 16px 0 0; color: var(--surface-0); font-size: clamp(16px, 1.5vw, 18px); font-weight: 700; line-height: 1.9; }
.loyalty-calculator__grid { display: grid; gap: 24px; }
.loyalty-calculator__card { min-width: 0; padding: 20px; border: 1px solid #E4E6EC; border-radius: 20px; background: #fff; }
.loyalty-calculator__inputs { display: grid; align-content: start; gap: 24px; }
.loyalty-calculator__field { min-width: 0; margin: 0; padding: 0; border: 0; }
.loyalty-calculator__field > label, .loyalty-calculator__field legend { display: block; width: 100%; margin: 0 0 12px; padding: 0; color: #141821; font-size: 16px; font-weight: 700; line-height: 1.8; }
.loyalty-calculator__input-wrap { display: flex; align-items: center; gap: 8px; min-height: 52px; padding-inline: 16px; border: 1px solid #E4E6EC; border-radius: 12px; color: #4E5260; }
.loyalty-calculator__input-wrap:focus-within { border-color: #DD6E12; box-shadow: 0 0 0 3px rgba(221,110,18,.2); }
.loyalty-calculator__input-wrap input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: #141821; font: inherit; font-size: 16px; }
.loyalty-calculator__input-wrap input::placeholder { color: #777A87; }
.loyalty-calculator__options { display: grid; gap: 8px; }
.loyalty-calculator__options--percent { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.loyalty-calculator__options label { position: relative; min-width: 0; cursor: pointer; }
.loyalty-calculator__options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.loyalty-calculator__options span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px; border: 1px solid #E4E6EC; border-radius: 999px; color: #252A35; font-size: 14px; line-height: 1.5; text-align: center; transition: background-color 220ms cubic-bezier(.22,.61,.36,1), border-color 220ms cubic-bezier(.22,.61,.36,1), color 220ms cubic-bezier(.22,.61,.36,1); }
.loyalty-calculator__options input:checked + span { border-color: #252A35; background: #252A35; color: #fff; }
.loyalty-calculator__options input:disabled + span { border-color: #E4E6EC; background: #F8F9FC; color: #777A87; cursor: default; }
.loyalty-calculator__options input:focus-visible + span { outline: 3px solid rgba(255,76,0,.35); outline-offset: 3px; }
.loyalty-calculator__slider { padding: 0 10px; }
.loyalty-calculator__slider input { display: block; width: 100%; height: 44px; margin: 0; appearance: none; background: transparent; cursor: pointer; direction: rtl; }
.loyalty-calculator__slider input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to left, #DD6E12 var(--slider-progress, 33.33%), #E4E6EC var(--slider-progress, 33.33%)); }
.loyalty-calculator__slider input::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to left, #DD6E12 var(--slider-progress, 33.33%), #E4E6EC var(--slider-progress, 33.33%)); }
.loyalty-calculator__slider input::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -8px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #DD6E12; box-shadow: 0 0 0 1px #A64E0D; }
.loyalty-calculator__slider input::-moz-range-thumb { width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: #DD6E12; box-shadow: 0 0 0 1px #A64E0D; }
.loyalty-calculator__slider input:focus-visible { outline: 3px solid rgba(255,76,0,.35); outline-offset: 3px; border-radius: 999px; }
.loyalty-calculator__slider-labels { display: flex; justify-content: space-between; color: #4E5260; font-size: 14px; line-height: 1.7; }
.loyalty-calculator__results { display: flex; flex-direction: column; }
.loyalty-calculator__results h3 { margin: 0; color: #141821; font-size: clamp(20px, 2vw, 26px); line-height: 1.6; letter-spacing: 0; text-align: center; }
.loyalty-calculator__results h3 [data-increase] { color: #A64E0D; }
.loyalty-calculator__chart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 200px auto auto; column-gap: 20px; align-content: end; flex: 1; margin-top: 24px; text-align: center; }
.loyalty-calculator__column { display: contents; }
.loyalty-calculator__column:first-child > * { grid-column: 1; }
.loyalty-calculator__column:last-child > * { grid-column: 2; }
.loyalty-calculator__bar-area { grid-row: 1; display: flex; align-items: flex-end; justify-content: center; width: 100%; border-bottom: 1px solid #E4E6EC; }
.loyalty-calculator__bar { width: min(100%, 96px); height: 100%; border-radius: 12px 12px 0 0; transform: scaleY(var(--bar-scale, 0)); transform-origin: bottom; transition: transform 420ms cubic-bezier(.22,.61,.36,1); }
.loyalty-calculator__bar--current { background: #C9CAD3; }
.loyalty-calculator__bar--estimated { background: #DD6E12; }
.loyalty-calculator__column strong { grid-row: 2; max-width: 100%; margin-top: 12px; color: #141821; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.loyalty-calculator__column > span { grid-row: 3; margin-top: 8px; color: #4E5260; font-size: 14px; line-height: 1.8; }
.loyalty-calculator__mobile-label { display: none; }
.loyalty-calculator__note { margin: 24px 0 0; color: var(--surface-0); font-size: 16px; font-weight: 700; line-height: 1.8; text-align: center; }


@media (max-width: 767px) {
  .loyalty-calculator { padding: 40px 20px; }
  .loyalty-calculator__intro { margin-bottom: 16px; }
  .loyalty-calculator__intro p { display: none; }
  .loyalty-calculator__grid { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid #E4E6EC; border-radius: 20px; background: #fff; }
  .loyalty-calculator__inputs, .loyalty-calculator__results { display: contents; }
  .loyalty-calculator__results h3 { order: 1; margin-top: 8px; padding-top: 24px; border-top: 1px dashed var(--border); font-size: 18px; line-height: 1.6; }
  .loyalty-calculator__chart { order: 2; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 16px; flex: none; margin: 8px 0 0; }
  .loyalty-calculator__column { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); align-items: center; gap: 8px; }
  .loyalty-calculator__chart .loyalty-calculator__column > * { grid-row: 1; }
  .loyalty-calculator__chart .loyalty-calculator__column > span { grid-column: 1; margin: 0; font-size: 14px; line-height: 1.5; text-align: start; }
  .loyalty-calculator__desktop-label { display: none; }
  .loyalty-calculator__mobile-label { display: inline; }
  .loyalty-calculator__chart .loyalty-calculator__bar-area { grid-column: 2; height: 36px; overflow: hidden; border: 0; border-radius: 8px; background: #F8F9FC; }
  .loyalty-calculator__bar { width: 100%; height: 100%; border-radius: 8px; transform: scaleX(var(--bar-scale, 0)); transform-origin: right; }
  .loyalty-calculator__chart .loyalty-calculator__column strong { z-index: 1; grid-column: 2; justify-self: center; min-width: 0; margin: 0; padding: 2px 4px; border-radius: 8px; background: rgba(255,255,255,.85); font-size: 14px; line-height: 1.4; }
  .loyalty-calculator:not([data-ready="true"]) .loyalty-calculator__chart .loyalty-calculator__column strong { visibility: hidden; }
  .loyalty-calculator__inputs .loyalty-calculator__field { order: 0; }
  .loyalty-calculator__inputs > div.loyalty-calculator__field { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 8px; align-items: center; }
  .loyalty-calculator__inputs > div.loyalty-calculator__field > label { margin: 0; font-size: 14px; line-height: 1.5; }
  .loyalty-calculator__input-wrap { min-height: 44px; padding-inline: 8px; font-size: 14px; }
  .loyalty-calculator__input-wrap input { height: 42px; }
  .loyalty-calculator__field legend { margin-bottom: 8px; font-size: 14px; line-height: 1.6; }
  .loyalty-calculator__options span { min-height: 44px; }
  .loyalty-calculator__note { margin-top: 12px; }
}


@media (min-width: 768px) {
  .loyalty-hero { padding: 144px 32px 80px; }
  .loyalty-hero__actions { flex-direction: row; flex-wrap: wrap; }
  .loyalty-calculator { padding: 80px 32px; }
  .loyalty-calculator__card { padding: 28px; }
  .loyalty-calculator__chart { grid-template-rows: 240px auto auto; }
}

@media (min-width: 1024px) {
  .loyalty-hero { padding: 160px 48px 112px; }
  .loyalty-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .loyalty-hero__content h1 { font-size: clamp(24px, 2.35vw, 32px); }
  .loyalty-hero__content h1 span:last-child { white-space: nowrap; }
  .loyalty-calculator { padding: 112px 48px; }
  .loyalty-calculator__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
