:root {
  --fondo: #0a0a0a;
  --carta: #0f0f11;
  --carta-2: #141417;
  --bordo: rgba(255, 255, 255, 0.07);
  --testo: #f4f4f5;
  --testo-2: #8d8d94;
  --testo-3: #5c5c63;
  --argento: #e9eaee;
  --argento-scuro: #8c8f96;
  --accento: #c8d4ff;
}

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

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.stage {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: grid;
  place-items: center;
  perspective: 1100px;
  overflow: hidden;
  background: radial-gradient(60% 50% at 50% 40%, #151518 0%, var(--fondo) 70%);
}

.tilt {
  width: min(352px, 88vw);
  transform-style: preserve-3d;
  will-change: transform;
}

.plan {
  --a: 210deg;
  --mx: 50%;
  --my: 0%;
  --sx: 30%;
  --lit: 0;
  position: relative;
  border-radius: 22px;
  background:
    radial-gradient(120% 70% at var(--mx) var(--my), rgba(255, 255, 255, calc(0.035 + var(--lit) * 0.035)), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--carta-2), var(--carta));
  box-shadow:
    0 30px 60px -28px rgba(0, 0, 0, 0.9),
    0 10px 24px -12px rgba(0, 0, 0, 0.7);
}

/* the brushed metal edge: a conic gradient shown only on a 1.2px ring, plus a hot spot where the pointer is */
.plan__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background:
    radial-gradient(160px 160px at var(--mx) var(--my), rgba(255, 255, 255, calc(0.45 + var(--lit) * 0.55)), transparent 70%),
    conic-gradient(from var(--a),
      #3a3c41 0deg, #9da0a7 40deg, #f6f7f9 62deg, #7d8087 90deg, #2c2e32 140deg,
      #6f727a 190deg, #e1e3e8 215deg, #8a8d94 240deg, #34363b 300deg, #3a3c41 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.plan__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.0) 58%);
  background-size: 260% 100%;
  background-position: var(--sx) 0;
  opacity: calc(0.4 + var(--lit) * 0.6);
  pointer-events: none;
}

.plan__body {
  position: relative;
  padding: clamp(16px, 4.6vh, 26px) clamp(16px, 5vw, 26px) clamp(14px, 3.8vh, 22px);
}

.plan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan__name { display: flex; align-items: center; gap: 8px; }

.plan__mark {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--argento-scuro);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

/* the metal title: a brushed gradient clipped to the letters, its bright band slides with the pointer */
.plan__title {
  font-size: clamp(22px, 6vh, 28px);
  font-weight: 640;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.01em;
  line-height: 1;
  background-image: linear-gradient(100deg, #74767c 0%, #b9bbc1 28%, #ffffff 40%, #9fa2a9 52%, #6c6e74 70%, #d9dbe0 86%, #7a7c82 100%);
  background-size: 260% 100%;
  background-position: var(--sx) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.switch {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #18181b;
  box-shadow: inset 0 0 0 1px var(--bordo), inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.switch__knob {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  width: 60px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6f7f9, #c3c6cc);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px -2px rgba(0, 0, 0, 0.8);
}

.switch__opt {
  position: relative;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 560;
  color: var(--testo-2);
  border-radius: 999px;
  transition: color 0.25s ease;
}

.switch__opt.is-on { color: #0c0c0d; }
.switch__opt:focus-visible { outline: 1.5px solid var(--accento); outline-offset: 2px; }

.plan__lead {
  margin-top: clamp(6px, 1.6vh, 10px);
  font-size: 13px;
  color: var(--testo-2);
}

.price {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: clamp(10px, 3.2vh, 18px);
  line-height: 1;
}

.price__cur {
  font-size: clamp(20px, 5vh, 24px);
  font-weight: 500;
  color: var(--testo-2);
  align-self: flex-start;
  margin-top: 4px;
}

.price__digits {
  display: inline-flex;
  font-size: clamp(40px, 11vh, 54px);
  font-weight: 620;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--testo);
}

.dig {
  display: inline-block;
  height: 1.16em;
  overflow: hidden;
  clip-path: inset(0);
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}

.dig__strip { display: flex; flex-direction: column; will-change: transform; }
.dig__strip span { display: block; height: 1.16em; line-height: 1.16em; text-align: center; }

.price__per { font-size: 14px; color: var(--testo-2); margin-left: 4px; }

.save {
  margin-left: auto;
  align-self: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accento);
  background: rgba(200, 212, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(200, 212, 255, 0.22);
  opacity: 0;
  transform-origin: 80% 50%;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.plan__bill {
  margin-top: 6px;
  font-size: 12px;
  color: var(--testo-3);
  height: 1.3em;
}

.plan__rule {
  display: block;
  height: 1px;
  margin: clamp(10px, 3vh, 18px) 0 clamp(8px, 2.4vh, 14px);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12) 20%, rgba(255, 255, 255, 0.12) 80%, transparent);
}

.list { list-style: none; display: grid; gap: clamp(5px, 1.6vh, 9px); }

.list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #c9c9ce;
}

.list svg, .up__done svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--argento);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.up {
  --dk: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(40px, 10.5vh, 46px);
  margin-top: clamp(12px, 3.6vh, 20px);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f8fa 0%, #d4d6db 55%, #c2c5cb 100%);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 8px 20px -10px rgba(255, 255, 255, 0.28);
  color: #0c0c0d;
  font-size: 14px;
  font-weight: 620;
  will-change: transform;
}

.up::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #1b1b1f, #121214);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: var(--dk);
}

.up:focus-visible { outline: 1.5px solid var(--accento); outline-offset: 3px; }

.up__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.95) 50%, transparent 65%);
  transform: translateX(-120%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.up__label, .up__spin, .up__done { grid-area: 1 / 1; position: relative; z-index: 1; }

.up__spin {
  width: 18px;
  height: 18px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
}
.up__spin circle { stroke: rgba(0, 0, 0, 0.16); }
.up__spin path { stroke: #0c0c0d; }

.up__done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  background-image: linear-gradient(100deg, #9fa2a9 0%, #ffffff 45%, #a7aab1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan__foot {
  margin-top: clamp(8px, 2vh, 12px);
  text-align: center;
  font-size: 11.5px;
  color: var(--testo-3);
}

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  fill: #f4f4f5;
  stroke: #000;
  stroke-width: 1.2;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

@media (max-height: 460px) {
  .plan__lead { display: none; }
  .plan__foot { display: none; }
}
