:root {
  --fondo: #08080b;
  --vetro: rgba(255, 255, 255, 0.035);
  --vetro-acceso: rgba(255, 255, 255, 0.06);
  --bordo: rgba(255, 255, 255, 0.08);
  --testo: #f4f4f6;
  --testo-2: #9b9ba6;
  --testo-3: #5e5e68;
  --accento: #8b8cff;
  --luce: rgba(139, 140, 255, 0.55);
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; margin: 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;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #121219 0%, var(--fondo) 60%);
}

.pricing {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3.4vh, 26px);
}

/* the head: the name, the headline and the glass billing switch */
.head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(6px, 1.4vh, 10px); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 560; color: var(--testo-2); letter-spacing: 0.01em; }
.eyebrow svg { width: 12px; height: 12px; fill: var(--accento); }
.title { font-size: clamp(19px, 4.4vmin, 32px); font-weight: 640; letter-spacing: -0.025em; line-height: 1.1; }

.billing {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto auto;
  padding: 3px;
  margin-top: clamp(2px, 0.8vh, 6px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bordo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  outline: none;
}
.billing:focus-visible { box-shadow: 0 0 0 2px var(--accento); }
.billing__opt {
  position: relative;
  z-index: 1;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 560;
  color: var(--testo-2);
  white-space: nowrap;
  transition: color 0.3s;
}
.billing__opt[data-on] { color: var(--testo); }
.billing__save { font-style: normal; font-weight: 600; color: var(--accento); margin-left: 4px; }
.billing__thumb {
  position: absolute;
  top: 3px; left: 0;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px -8px rgba(0, 0, 0, 0.8);
}

/* the three plans and the light behind them */
.plans {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.8vmin, 14px);
  isolation: isolate;
}
.plans__light {
  position: absolute;
  top: 0; left: 0;
  z-index: -1;
  border-radius: 40%;
  background: radial-gradient(closest-side, var(--luce), rgba(139, 140, 255, 0.18) 55%, transparent);
  filter: blur(30px);
  pointer-events: none;
}

.plan {
  position: relative;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(12px, 2.6vmin, 18px);
  border-radius: 20px;
  background: var(--vetro);
  border: 1px solid var(--bordo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  cursor: pointer;
  outline: none;
  transition: background 0.4s, border-color 0.4s;
}
.plan:focus-visible { border-color: var(--accento); }
.plan[data-on] { background: var(--vetro-acceso); border-color: rgba(139, 140, 255, 0.32); }

/* the reflection that runs once round the picked card's border */
.plan__ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--a), transparent 0deg, transparent 250deg, rgba(139, 140, 255, 0.9) 320deg, #ffffff 345deg, transparent 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);
  opacity: 0;
  pointer-events: none;
}

.plan__name { font-size: 13px; font-weight: 600; color: var(--testo-2); display: flex; align-items: center; gap: 6px; transition: color 0.4s; }
.plan[data-on] .plan__name { color: var(--testo); }
.plan__tag { font-style: normal; font-size: 10px; font-weight: 620; color: var(--accento); padding: 2px 7px; border-radius: 999px; background: rgba(139, 140, 255, 0.12); border: 1px solid rgba(139, 140, 255, 0.22); }
.plan__price { display: flex; align-items: flex-start; font-size: clamp(24px, 5.4vmin, 36px); font-weight: 660; letter-spacing: -0.03em; height: 1.12em; line-height: 1.12em; margin-top: 2px; }
.plan__cur { font-size: 0.55em; margin-top: 0.14em; margin-right: 1px; color: var(--testo-2); font-weight: 560; }
.plan__per { align-self: flex-end; font-size: 12px; font-weight: 520; letter-spacing: 0; color: var(--testo-2); margin-left: 3px; line-height: 1.6; }
.plan__line { font-size: 11.5px; color: var(--testo-3); transition: color 0.4s; }
.plan[data-on] .plan__line { color: var(--testo-2); }
.plan__feats { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.feat { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--testo-2); }
.feat svg { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--testo-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.4s; }
.plan[data-on] .feat svg { stroke: var(--accento); }

/* rolling digits */
.roll { display: inline-flex; overflow: hidden; height: 1.12em; line-height: 1.12em; vertical-align: top; }
.col { display: block; overflow: hidden; height: 1.12em; width: 0.6em; transition: width 0.28s cubic-bezier(.2, .8, .2, 1); }
.col__strip { display: flex; flex-direction: column; will-change: transform; }
.col__strip span { height: 1.12em; display: block; text-align: center; }

/* the foot: a note and the button */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.foot__note { font-size: 12px; color: var(--testo-2); }
.cta {
  appearance: none;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, #ffffff, #dcdcf0);
  color: #0b0b10;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(139, 140, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  flex: none;
}
.cta__mask { display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.cta__label { display: inline-block; }
.cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ghost {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  pointer-events: none;
  z-index: 5;
}
.ghost path { fill: #ffffff; stroke: #08080b; stroke-width: 1.4; stroke-linejoin: round; }

/* narrow: the plans stay in a row, without features and tag */
@media (max-width: 560px) {
  .plan__feats, .plan__tag, .plan__line { display: none; }
  .plan { padding: 11px 10px; border-radius: 16px; }
  .plan__per { font-size: 10px; margin-left: 2px; }
  .plan__price { font-size: clamp(20px, 6.6vw, 28px); }
  .foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .foot__note { text-align: center; }
  .cta { justify-content: center; }
  .billing__save { display: none; }
}
@media (max-height: 460px) {
  .plan__feats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plan, .billing__opt, .col { transition: none; }
}
