/* The guest avatar whose frame turns gold. The card is frosted glass on a warm black page; inside it the avatar is a
   button made of layers: the metal frame (two conic gradients, silver and gold, crossfaded, with the highlight angle in
   --ang), the photo disc with the initials, and an SVG on top with the twenty notches. GSAP moves only the buttons and
   the elements marked with data-*, never the children that the CSS shapes. */
:root {
  --page: #0b0a09;              /* the page */
  --ink: #f4efe6;               /* the words */
  --muted: rgba(244, 239, 230, 0.56); /* the small words */
  --silver: #d3d8df;            /* the silver notches and words */
  --gold: #e9bd6a;              /* the accent once it turns gold */
  --gold-deep: #9a6a26;         /* the shadow side of the gold */
  --photo-a: #3a4766;           /* the photo disc, light side */
  --photo-b: #161b2a;           /* the photo disc, dark side */
  --card: rgba(255, 255, 255, 0.045); /* the frosted card */
  --edge: rgba(255, 255, 255, 0.09);  /* the card's edge */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(70% 55% at 50% 30%, rgba(255, 236, 205, 0.06), transparent 70%),
    var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

.ga {
  --s: min(148px, 29vh, 40vw);
  position: relative;
  display: grid;
  place-items: center;
  width: min(330px, 100%);
}

/* the light the avatar throws around itself, silver then gold */
.ga__glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: calc(var(--s) * 2.6);
  height: calc(var(--s) * 2.1);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ga__glow-l {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(26px);
}

.ga__glow-l--silver {
  background: radial-gradient(closest-side, rgba(205, 216, 235, 0.16), transparent 72%);
}

.ga__glow-l--gold {
  background: radial-gradient(closest-side, rgba(233, 189, 106, 0.34), rgba(233, 150, 70, 0.08) 55%, transparent 76%);
  opacity: 0;
}

.ga__card {
  --mx: 50%;
  --my: 20%;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(14px, 3.6vh, 22px) 20px clamp(14px, 3.4vh, 20px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), var(--card) 40%, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 10px 24px -8px rgba(0, 0, 0, 0.7),
    0 34px 70px -24px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
  isolation: isolate;
}

/* a soft light inside the glass that follows the pointer */
.ga__light {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255, 244, 225, 0.07), transparent 70%);
  pointer-events: none;
}

.ga__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.ga__top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.ga__brand {
  color: var(--ink);
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: 0.01em;
  font-size: 13px;
}

.ga__brand-s {
  margin-left: 4px;
  font-weight: 420;
  font-stretch: 100%;
  color: var(--muted);
}

/* the avatar: GSAP scales this button, the layers inside are CSS only */
.ga__face {
  appearance: none;
  position: relative;
  width: var(--s);
  height: var(--s);
  margin: clamp(10px, 2.6vh, 18px) 0 clamp(8px, 2vh, 14px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ga__face:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.ga__frame {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  box-shadow:
    0 6px 14px -4px rgba(0, 0, 0, 0.75),
    0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.ga__metal {
  --ang: -40;
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.ga__metal--silver {
  background:
    conic-gradient(from calc(var(--ang) * 1deg), #f6f8fa, #a9afb8 14%, #6a707a 30%, #c9ced6 46%, #f2f4f7 52%, #8a9099 66%, #5b616a 82%, #d9dde2 94%, #f6f8fa);
}

.ga__metal--gold {
  background:
    conic-gradient(from calc(var(--ang) * 1deg), #fff0c4, #e2ad55 14%, #8a5a1c 30%, #d9a24a 46%, #ffe7a8 52%, #b07a2c 66%, #6e4512 82%, #f2c878 94%, #fff0c4);
  opacity: 0;
}

/* one beam of light that runs once around the frame when it turns gold (rotated by GSAP) */
.ga__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 300deg, rgba(255, 250, 235, 0.25) 330deg, rgba(255, 255, 255, 0.95) 352deg, transparent 360deg);
  mix-blend-mode: screen;
  opacity: 0;
}

.ga__photo {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 30% 22%, rgba(255, 255, 255, 0.16), transparent 46%),
    radial-gradient(circle at 36% 30%, var(--photo-a), var(--photo-b) 78%);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.ga__initials {
  font-size: calc(var(--s) * 0.24);
  font-weight: 560;
  font-stretch: 116%;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.ga__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ga__notch {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3.4;
  stroke-linecap: round;
}

.ga__notch--on {
  stroke: var(--silver);
  stroke-dasharray: 1 1;
  transition: stroke 0.9s ease;
}

.ga__halo .ga__notch--on {
  stroke-width: 6;
  opacity: 0.45;
}

.ga.is-gold .ga__notch--on {
  stroke: var(--gold);
}

.ga__glint {
  fill: #fffaf0;
}

.ga__name {
  margin: 0;
  font-size: clamp(18px, 4.6vh, 21px);
  font-weight: 600;
  font-stretch: 106%;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* the tier rolls from Silver to Gold */
.ga__tier {
  margin: 4px 0 0;
  height: 18px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 520;
  line-height: 18px;
}

.ga__roll {
  display: grid;
}

.ga__roll-i {
  grid-area: 1 / 1;
  text-align: center;
  color: var(--silver);
}

.ga__roll-i--gold {
  background: linear-gradient(100deg, var(--gold-deep), var(--gold) 30%, #fff1cb 50%, var(--gold) 70%, var(--gold-deep));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  visibility: hidden;
}

.ga__slot {
  position: relative;
  width: 100%;
  height: 30px;
  margin: clamp(8px, 2vh, 12px) 0 clamp(10px, 2.4vh, 16px);
}

.ga__count,
.ga__perks {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.ga__digits {
  display: inline-block;
  height: 18px;
  overflow: hidden;
  line-height: 18px;
  color: var(--ink);
  font-weight: 640;
  text-align: center;
}

.ga__digits-col {
  display: flex;
  flex-direction: column;
}

.ga__of {
  margin-left: 6px;
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.ga__perks {
  visibility: hidden;
}

.ga__perk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  color: #f6dfb0;
  background: linear-gradient(180deg, rgba(233, 189, 106, 0.16), rgba(233, 189, 106, 0.07));
  box-shadow: inset 0 0 0 1px rgba(233, 189, 106, 0.26), inset 0 1px 0 rgba(255, 240, 200, 0.12);
  font-size: 12.5px;
  font-weight: 520;
  white-space: nowrap;
}

.ga__perk svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the action: GSAP scales the button, the face inside is CSS */
.ga__btn {
  appearance: none;
  width: 100%;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ga__btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.ga__btn-face {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #f6f1e8, #e2dbcf);
  color: #17140f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 8px 20px -8px rgba(255, 230, 190, 0.35);
  transition: background 0.6s ease, box-shadow 0.3s ease;
}

.ga.is-gold .ga__btn-face {
  background: linear-gradient(180deg, #f6d48d, #d8a453);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 225, 0.9),
    inset 0 -1px 0 rgba(90, 50, 0, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 10px 26px -8px rgba(233, 189, 106, 0.6);
}

@media (hover: hover) {
  .ga__btn:hover .ga__btn-face {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 1px 2px rgba(0, 0, 0, 0.5),
      0 12px 28px -8px rgba(255, 230, 190, 0.55);
  }
}


.ga__btn-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.ga__tick {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

.ga__btn-labels {
  display: grid;
  height: 22px;
  overflow: hidden;
  line-height: 22px;
}

.ga__btn-l {
  grid-area: 1 / 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  font-stretch: 104%;
  white-space: nowrap;
}

.ga__btn-l + .ga__btn-l {
  visibility: hidden;
}
