/* The plan card with the anamorphic light: the Pro plan of an AI image tool on a near black page. The card's body is
   a layer of its own (.plan::before); over it the WebGL canvas draws the light, a little wider than the card so the
   streak can spill past its edges; the words and the button sit on top. Without WebGL a CSS line takes its place. */
:root {
  --page: #0a0a0b;          /* the page */
  --card: #121215;          /* the body of the card */
  --edge: rgba(255, 255, 255, 0.08); /* its edge at rest */
  --ink: #ededf0;           /* the words */
  --muted: #8a8a95;         /* the small words */
  --accent: #4f8bff;        /* the colour of the light */
  --button: #f4f4f5;        /* the button */
  --button-ink: #0a0a0b;    /* the words on the button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

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

body {
  min-height: 100svh;
  background: 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;
}

.plan {
  position: relative;
  width: min(84vw, 320px);
  border-radius: 20px;
  opacity: 0;
}

/* the body of the card, under the light */
.plan::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--edge), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  z-index: 0;
}

.plan__light {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

/* the light without WebGL: one thin line with a glow, moved by the same spring */
.plan__flare {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
}

.no-gl .plan__flare {
  display: block;
}

.plan__flare-line {
  position: absolute;
  left: -170px;
  top: -1px;
  width: 340px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, #ffffff 50%, var(--accent) 70%, transparent);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 55%, transparent);
}

.plan__card {
  position: relative;
  z-index: 2;
  padding: clamp(16px, 4.4vh, 26px) clamp(18px, 6vw, 26px) clamp(16px, 4vh, 24px);
}

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

.plan__name {
  font-size: 15px;
  font-weight: 600;
  font-variation-settings: 'wdth' 108;
  letter-spacing: 0.01em;
}

.plan__chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.plan__price {
  margin: clamp(12px, 3.4vh, 20px) 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* the price catches the streak: a vertical gradient whose bright band sits at the streak's height (--ly) */
.plan__amount {
  --ly: -100%;
  font-size: clamp(40px, min(13vw, 12vh), 52px);
  line-height: 1;
  font-weight: 640;
  font-variation-settings: 'wdth' 96;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--ink) calc(var(--ly) - 14px), #ffffff var(--ly), var(--ink) calc(var(--ly) + 14px));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan__per {
  font-size: 14px;
  color: var(--muted);
}

.plan__line {
  margin: clamp(8px, 2vh, 12px) 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 30ch;
}

.plan__rule {
  display: block;
  height: 1px;
  margin: clamp(14px, 3.6vh, 20px) 0;
  background: rgba(255, 255, 255, 0.07);
}

.plan__btn {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.plan__btn-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

.plan__btn-words {
  font-size: 14px;
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .plan__btn:hover .plan__btn-words {
    font-variation-settings: 'wdth' 112;
  }
}

.plan__btn-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

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