:root {
  --fondo: #07070a;
  --vetro: rgba(22, 22, 30, 0.62);
  --bordo: rgba(255, 255, 255, 0.075);
  --testo: #f5f4f7;
  --testo-2: #a3a1ad;
  --testo-3: #64626e;
  --solo: #9d92ff;
  --duo: #ff7f9f;
  --family: #ffb457;
  --accento: #9d92ff;
  --scuro: #0b0a10;
}

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

* { 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;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(70% 70% at 50% 110%, rgba(255, 255, 255, 0.025), transparent 70%),
    var(--fondo);
}

/* the coloured light behind the card: two soft blobs that take the plan's colour */
.glow {
  position: absolute;
  left: 50%; top: 50%;
  width: min(760px, 120vw);
  height: min(420px, 80vh);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}
.glow__a, .glow__b {
  position: absolute;
  border-radius: 50%;
  background: var(--accento);
  filter: blur(70px);
}
.glow__a { left: 4%; top: 18%; width: 46%; height: 64%; opacity: 0.22; }
.glow__b { right: 6%; bottom: 4%; width: 34%; height: 46%; opacity: 0.14; }

/* film grain over everything, very low */
.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* the glass card */
.card {
  position: relative;
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 42%),
    var(--vetro);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 18px 40px -18px rgba(0, 0, 0, 0.85),
    0 50px 90px -40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.card__edge, .card__beam {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  -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;
}
.card__edge { background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.08)); }
/* the accent light that runs along the 1px border: the colour comes from the script */
.card__beam { padding: 1.2px; }
.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(60% 50% at 18% 0%, rgba(255, 255, 255, 0.07), transparent 70%);
}

.card__main, .card__side {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3.6vmin, 28px);
}
.card__main { gap: clamp(10px, 2.2vh, 16px); }
.card__side { gap: clamp(8px, 1.6vh, 12px); border-left: 1px solid rgba(255, 255, 255, 0.06); }

.brand { display: flex; align-items: center; gap: 8px; }
.brand__mark { width: 20px; height: 20px; flex: none; }
.brand__ring { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.2; }
.brand__wave { fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font-size: 14px; font-weight: 640; letter-spacing: -0.01em; }
.brand__tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--testo-2);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

/* the three-way switch */
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.04);
}
.seg__pill {
  position: absolute;
  top: 3px; left: 0;
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px -8px rgba(0, 0, 0, 0.9), 0 0 22px -6px var(--accento);
}
.seg__opt {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  font-variation-settings: "wdth" 100;
  color: var(--testo-2);
  padding: 8px 6px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: color 0.3s;
}
.seg__opt[aria-checked="true"] { color: var(--testo); }
.seg__opt:focus-visible { box-shadow: 0 0 0 2px var(--accento); }
@media (hover: hover) {
  .seg__opt:hover { color: var(--testo); }
}

/* the figures: price and seats */
.figures { display: flex; flex-direction: column; gap: clamp(10px, 2.2vh, 16px); }
.money { display: flex; flex-direction: column; gap: 4px; }

/* the price */
.price {
  display: flex;
  align-items: flex-start;
  font-size: clamp(34px, 7.6vmin, 50px);
  font-weight: 660;
  letter-spacing: -0.035em;
  line-height: 1;
  height: 1.08em;
  margin-top: 2px;
}
.price__cur { font-size: 0.48em; margin-top: 0.16em; margin-right: 2px; color: var(--testo-2); font-weight: 560; }
.price__per { align-self: flex-end; font-size: 13px; font-weight: 520; letter-spacing: 0; color: var(--testo-2); margin-left: 6px; line-height: 1.7; }
.roll { display: inline-flex; height: 1.08em; overflow: hidden; }
.col { display: block; overflow: hidden; height: 1.08em; width: 0.6em; transition: width 0.32s cubic-bezier(.2, .8, .2, 1); }
.col--dot { width: 0.26em; text-align: center; }
.col__strip { display: flex; flex-direction: column; will-change: transform; }
.col__strip span { display: block; height: 1.08em; line-height: 1.08em; text-align: center; }
.each { height: 1.4em; overflow: hidden; font-size: 12.5px; color: var(--testo-2); }
.each__text { display: inline-block; }

/* the seats: avatars on top of each other and the account count */
.seats { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.seats__row { position: relative; display: block; height: 32px; flex: none; }
.av {
  position: absolute;
  top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 640;
  color: rgba(20, 14, 18, 0.72);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 60% 110%, var(--h2), transparent 75%),
    var(--h1);
  box-shadow: 0 0 0 2.5px #15141b, 0 6px 12px -4px rgba(0, 0, 0, 0.8), inset 0 -2px 4px rgba(0, 0, 0, 0.18);
}
.av:nth-child(1) { z-index: 6; } .av:nth-child(2) { z-index: 5; } .av:nth-child(3) { z-index: 4; }
.av:nth-child(4) { z-index: 3; } .av:nth-child(5) { z-index: 2; } .av:nth-child(6) { z-index: 1; }
.seats__label { font-size: 12.5px; color: var(--testo-2); white-space: nowrap; }
.seats__label b { color: var(--testo); font-weight: 620; display: inline-block; }

/* the perks */
.side__cap { font-size: 11.5px; font-weight: 600; color: var(--testo-3); letter-spacing: 0.01em; }
.perks { list-style: none; display: flex; flex-direction: column; }
.perk { overflow: hidden; }
.perk__in { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--testo-2); line-height: 1.35; }
.perk__in svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--accento); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.cta {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: 0;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 999px;
  color: var(--scuro);
  font-size: 14px;
  font-weight: 640;
  font-variation-settings: "wdth" 100;
  cursor: pointer;
  outline: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%), var(--accento);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 12px 30px -12px var(--accento);
}
.cta:focus-visible { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--accento); }
.cta__label { position: relative; }
.cta svg { position: relative; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cta__shine {
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  opacity: 0;
}
.note { font-size: 11px; color: var(--testo-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

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

/* narrow: one column */
@media (max-width: 600px) {
  .card { grid-template-columns: minmax(0, 1fr); border-radius: 22px; }
  .av { width: 26px; height: 26px; font-size: 10.5px; box-shadow: 0 0 0 2px #15141b, 0 5px 10px -4px rgba(0, 0, 0, 0.8), inset 0 -2px 4px rgba(0, 0, 0, 0.18); }
  .seats__row { height: 26px; }
  .seats { min-height: 0; }
  .price__per { font-size: 11.5px; margin-left: 4px; }
  .card__main { padding-bottom: 8px; gap: clamp(8px, 1.6vh, 12px); }
  .card__side { border-left: 0; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); margin: 0 clamp(16px, 3.6vmin, 28px); padding-left: 0; padding-right: 0; gap: 4px; }
  .side__cap { display: none; }
  .perk__in { padding: 2.5px 0; font-size: 12.5px; }
  .price { font-size: clamp(28px, 8.4vw, 40px); }
  .figures { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .seats { flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 2px; }
  .seats__label { font-size: 11px; }
  .cta { height: 42px; }
  .foot { gap: 6px; padding-bottom: clamp(14px, 3vmin, 22px); }
}
@media (max-height: 440px) {
  .note { display: none; }
}

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