.rules {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 58px 0 64px;
  background:
    radial-gradient(circle at 78% 48%, rgba(208, 145, 12, .13), transparent 31%),
    radial-gradient(circle at 9% 30%, rgba(150, 94, 5, .08), transparent 26%),
    linear-gradient(180deg, #020202 0%, #050402 48%, #010101 100%);
}

.rules::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image:
    linear-gradient(rgba(203, 146, 24, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 146, 24, .05) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
}

.rules__heading {
  max-width: 880px;
  margin: 0 auto 14px;
  text-align: center;
}

.rules__heading h2 {
  margin: 0;
  color: #f6f2e9;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.15rem, 3.2vw, 3.35rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.rules__heading em {
  color: #d9a327;
  font-style: normal;
}

.rules__ornament {
  position: relative;
  display: block;
  width: min(720px, 88%);
  height: 1px;
  margin: 17px auto 0;
  background: linear-gradient(90deg, transparent, rgba(218, 163, 38, .8), transparent);
}

.rules__ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid #f0be43;
  background: #b98113;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 15px rgba(236, 178, 42, .65);
}

.rules__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr) !important;
  align-items: center;
  gap: clamp(32px, 5vw, 80px) !important;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
}

.rules__content { min-width: 0; }

.rules__mockup-mobile { display: none; }

.rules__intro {
  width: min(100%, 880px);
  max-width: 880px;
  margin: 0 auto 12px;
  color: #e4e1dc;
  font-size: clamp(.95rem, 1.18vw, 1.18rem);
  line-height: 1.55;
  text-align: center;
}

.rules__intro strong {
  color: #ecb52b;
  font-weight: 500;
}

.rules-timeline {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 8px 0 16px !important;
  padding: 0 0 0 145px !important;
  overflow: visible !important;
}

.rules-timeline__line {
  position: absolute !important;
  top: 24px !important;
  bottom: 34px !important;
  left: 25px !important;
  display: block !important;
  width: 2px !important;
  height: auto !important;
  overflow: visible;
  background: rgba(155, 107, 12, .32) !important;
}

.rules-timeline__progress {
  position: absolute;
  inset: 0 0 auto;
  display: block !important;
  width: 100% !important;
  height: 0;
  border-radius: 99px;
  background: linear-gradient(180deg, #fff0a3, #e2a51c 68%, #9c6200);
  box-shadow: 0 0 8px #e5aa24, 0 0 22px rgba(223, 157, 24, .7);
  transition: height .16s linear;
}

.rule {
  position: relative !important;
  display: block !important;
  min-height: 116px !important;
  padding: 14px 0 17px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(190, 132, 17, .24) !important;
  background: none !important;
  text-align: left !important;
}

.rule:last-child { border-bottom-color: transparent !important; }

.rule::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -122px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c5715;
  transform: translate(-50%, -50%);
  transition: background .35s ease, box-shadow .35s ease, transform .35s ease;
}

.rule__number,
.rule__icon {
  position: absolute !important;
  top: 50% !important;
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(213, 153, 24, .7) !important;
  border-radius: 50% !important;
  color: #d39d24 !important;
  background: rgba(7, 6, 3, .96) !important;
  transform: translateY(-50%) !important;
  transition: color .4s ease, background .4s ease, box-shadow .4s ease, border-color .4s ease !important;
}

.rule__number {
  left: -145px !important;
  width: 52px !important;
  height: 52px !important;
  font-family: "Inter", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
}

.rule__icon {
  left: -76px !important;
  width: 58px !important;
  height: 58px !important;
  font-size: 1.65rem !important;
}

.rule__icon--scales { font-size: 1.5rem !important; }

.rule__copy h3 {
  margin: 0 0 6px;
  color: #e1aa29;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  font-weight: 600;
  line-height: 1.24;
  transition: color .35s ease, text-shadow .35s ease;
}

.rule__copy p {
  margin: 0 !important;
  color: #d6d3ce !important;
  font-size: clamp(.83rem, 1vw, .98rem) !important;
  line-height: 1.48 !important;
}

.rule.is-active::before {
  background: #ffd66a;
  box-shadow: 0 0 9px #f4b528, 0 0 20px rgba(240, 177, 35, .8);
  transform: translate(-50%, -50%) scale(1.18);
}

.rule.is-active .rule__number {
  color: #161006 !important;
  border-color: #ffe18a !important;
  background: radial-gradient(circle at 35% 28%, #ffe18a, #d79417 66%, #8a5100) !important;
  box-shadow: 0 0 10px #e6a728, 0 0 28px rgba(235, 168, 34, .75) !important;
}

.rule.is-active .rule__icon {
  color: #ffd260 !important;
  border-color: #e6aa22 !important;
  box-shadow: inset 0 0 18px rgba(222, 154, 16, .1), 0 0 16px rgba(223, 159, 25, .22) !important;
}

.rule.is-active .rule__copy h3 {
  color: #f0bb3c;
  text-shadow: 0 0 18px rgba(226, 160, 25, .18);
}

.rules .rule.reveal {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1);
}

.rules .rule.reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.rules__cta {
  width: min(100%, 620px) !important;
  margin: 14px 0 0 70px !important;
  justify-content: center !important;
  text-align: center !important;
}

.rules__mockup {
  position: relative;
  display: block !important;
  min-width: 0;
  align-self: stretch;
}

.rules-phone-stage {
  position: sticky;
  top: 70px;
  display: grid;
  place-items: center;
  min-height: 710px;
}

.rules-phone-stage::before {
  content: "";
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 28px, rgba(218, 157, 27, .19) 29px 30px);
  filter: drop-shadow(0 0 16px rgba(210, 144, 20, .18));
  animation: rulesHalo 18s linear infinite;
}

.rules-phone {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 520px);
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, .82)) drop-shadow(0 0 16px rgba(206, 142, 20, .18));
  animation: rulesFloat 5.8s ease-in-out infinite;
  transform-origin: 50% 88%;
}

@keyframes rulesFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.35deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(.35deg); }
}

@keyframes rulesHalo { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .rules__grid { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .8fr) !important; gap: 24px !important; }
  .rules-timeline { padding-left: 125px !important; }
  .rule__number { left: -125px !important; }
  .rule__icon { left: -65px !important; width: 52px !important; height: 52px !important; }
  .rule::before { left: -102px; }
  .rules-phone-stage { min-height: 650px; }
  .rules__cta { margin-left: 35px !important; }
}

@media (max-width: 760px) {
  .rules { padding: 38px 0 42px; }
  .rules::before { background-size: 52px 52px; opacity: .2; }
  .rules__heading { margin-bottom: 13px; }
  .rules__heading h2 { font-size: clamp(1.72rem, 8vw, 2.2rem); line-height: 1.1; }
  .rules__heading h2 br { display: none; }
  .rules__ornament { margin-top: 12px; width: 94%; }
  .rules__grid { display: block !important; }
  .rules__intro { margin: 0 0 16px !important; font-size: .87rem; line-height: 1.55; text-align: left; }
  .rules__mockup-mobile {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(230px, 88vw, 350px);
    margin: -4px 0 8px;
    overflow: hidden;
  }
  .rules__mockup-mobile::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 12%;
    bottom: 10%;
    left: 12%;
    height: 30px;
    border-radius: 50%;
    background: rgba(212, 148, 25, .22);
    filter: blur(18px);
  }
  .rules__mobile-halo {
    position: absolute;
    z-index: 0;
    width: min(82vw, 330px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 18px, rgba(219, 157, 30, .18) 19px 20px);
    filter: drop-shadow(0 0 14px rgba(213, 147, 22, .16));
    animation: rulesHalo 22s linear infinite;
  }
  .rules__mockup-mobile img {
    position: relative;
    z-index: 1;
    display: block;
    width: min(58vw, 240px);
    height: auto;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .82)) drop-shadow(0 0 10px rgba(218, 154, 27, .2));
    animation: rulesFloatMobile 6s ease-in-out infinite;
  }
  .rules-timeline { margin-top: 0 !important; padding-left: 88px !important; }
  .rules-timeline__line { top: 22px !important; bottom: 32px !important; left: 21px !important; }
  .rule { min-height: 140px !important; padding: 15px 0 18px !important; }
  .rule::before { left: -67px; width: 6px; height: 6px; }
  .rule__number { left: -88px !important; width: 44px !important; height: 44px !important; font-size: .86rem !important; }
  .rule__icon { left: -38px !important; width: 46px !important; height: 46px !important; font-size: 1.3rem !important; }
  .rule__copy { padding-left: 14px; }
  .rule__copy h3 { margin-bottom: 7px; font-size: .98rem; line-height: 1.25; }
  .rule__copy p { font-size: .79rem !important; line-height: 1.45 !important; }
  .rules__mockup { display: none !important; }
  .rules__cta { width: 100% !important; margin: 14px 0 0 !important; min-height: 54px !important; padding-inline: 16px !important; font-size: .86rem !important; }
}

@keyframes rulesFloatMobile {
  0%, 100% { transform: translate3d(0, 2px, 0) rotate(-.2deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(.2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rules-phone, .rules-phone-stage::before, .rules__mockup-mobile img, .rules__mobile-halo { animation: none !important; }
  .rules-timeline__progress { transition: none; }
}
