:root {
  --bg: #000000;
  --ink: #f5f5f5;
  --muted: #a7a7a7;
  --soft: #1a1a1a;
  --line: #2f3336;
  --card: #16181c;
  --accent: #1d9bf0;
  --screen: #f5f6f2;
  --p1: #111111;
  --p2: #e7e7e0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(29, 155, 240, 0.12), transparent 24rem),
    linear-gradient(180deg, #070707 0%, var(--bg) 44%, #000000 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 2;
  opacity: 0.16;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.07) 0,
    rgba(255, 255, 255, 0.07) 1px,
    transparent 1px,
    transparent 6px
  );
  mix-blend-mode: soft-light;
}

body::after {
  z-index: 3;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 64%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px);
  background-size: 9px 11px, 13px 17px;
  opacity: 0.24;
}

a {
  color: inherit;
  text-decoration: none;
}

.pricing-shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 30px 0;
  display: grid;
  align-content: center;
  gap: 28px;
}

.offer-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.billing-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(330px, 100%);
  padding: 4px;
  border: 1px solid #202327;
  border-radius: 999px;
  background: #16181c;
  color: #71767b;
  font-size: 0.92rem;
}

.billing-toggle button {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.billing-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.billing-toggle .is-active {
  background: #eff3f4;
  color: #000000;
  font-weight: 700;
}

.plans {
  display: grid;
  gap: 16px;
}

.plan-card {
  --display-glow: rgba(255, 255, 255, 0.06);
  min-height: 500px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  border: 1px solid #2f3336;
  border-radius: 18px;
  background: var(--card);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.04),
    0 20px 54px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.05);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.plan-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.plan-card.is-selected {
  border-color: var(--accent);
  transform: scale(1.035);
  box-shadow:
    0 0 0 1px rgba(29, 155, 240, 0.28),
    0 0 34px rgba(29, 155, 240, 0.2),
    0 22px 54px rgba(0, 0, 0, 0.58);
}

.pixel-screen {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--screen);
  box-shadow:
    inset 0 0 0 1px rgba(15, 20, 25, 0.03),
    inset 0 -28px 56px rgba(15, 20, 25, 0.08),
    0 0 34px var(--display-glow);
}

.pixel-screen::before,
.pixel-screen::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.pixel-screen::before {
  background: repeating-linear-gradient(
    0deg,
    rgba(15, 20, 25, 0.06) 0,
    rgba(15, 20, 25, 0.06) 1px,
    transparent 1px,
    transparent 8px
  );
  opacity: 0.34;
  mix-blend-mode: overlay;
}

.pixel-screen::after {
  background:
    radial-gradient(circle at 50% 40%, transparent 0 44%, rgba(255, 255, 255, 0.32) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 46%);
}

.pixel-screen span {
  min-width: 0;
  min-height: 0;
  background: var(--p2);
  image-rendering: pixelated;
  box-shadow: none;
  animation: idle-pixel 4.8s steps(1, end) infinite;
}

.pixel-screen span:nth-child(1),
.pixel-screen span:nth-child(4),
.pixel-screen span:nth-child(6),
.pixel-screen span:nth-child(7),
.pixel-screen span:nth-child(10),
.pixel-screen span:nth-child(11),
.pixel-screen span:nth-child(13),
.pixel-screen span:nth-child(16) {
  background: var(--p1);
}

.pixel-screen span:nth-child(6),
.pixel-screen span:nth-child(7),
.pixel-screen span:nth-child(10),
.pixel-screen span:nth-child(11) {
  animation-name: cross-pixel;
}

.pixel-screen span:nth-child(2),
.pixel-screen span:nth-child(5),
.pixel-screen span:nth-child(8),
.pixel-screen span:nth-child(9),
.pixel-screen span:nth-child(12),
.pixel-screen span:nth-child(15) {
  animation-name: trace-pixel;
}

.pixel-screen span:nth-child(1) {
  animation-delay: 0s;
}

.pixel-screen span:nth-child(2) {
  animation-delay: 0.15s;
}

.pixel-screen span:nth-child(3) {
  animation-delay: 0.3s;
}

.pixel-screen span:nth-child(4) {
  animation-delay: 0.45s;
}

.pixel-screen span:nth-child(5) {
  animation-delay: 0.6s;
}

.pixel-screen span:nth-child(6) {
  animation-delay: 0.75s;
}

.pixel-screen span:nth-child(7) {
  animation-delay: 0.9s;
}

.pixel-screen span:nth-child(8) {
  animation-delay: 1.05s;
}

.pixel-screen span:nth-child(9) {
  animation-delay: 1.2s;
}

.pixel-screen span:nth-child(10) {
  animation-delay: 1.35s;
}

.pixel-screen span:nth-child(11) {
  animation-delay: 1.5s;
}

.pixel-screen span:nth-child(12) {
  animation-delay: 1.65s;
}

.pixel-screen span:nth-child(13) {
  animation-delay: 1.8s;
}

.pixel-screen span:nth-child(14) {
  animation-delay: 1.95s;
}

.pixel-screen span:nth-child(15) {
  animation-delay: 2.1s;
}

.pixel-screen span:nth-child(16) {
  animation-delay: 2.25s;
}

.plan-details {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px 22px 24px;
  background: var(--card);
}

.plan-name,
.price,
.billing-note,
ul {
  margin: 0;
}

.plan-name {
  font-family: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.price {
  padding-top: 4px;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 2rem;
  font-weight: 450;
  line-height: 1;
  color: var(--ink);
}

.price span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.billing-note {
  color: #71767b;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.35;
}

ul {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
  color: #eff3f4;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 450;
}

li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.feature-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: rgba(245, 245, 245, 0.94);
}

.feature-icon::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  content: "";
}

li:nth-child(1) .feature-icon::before {
  content: "✺";
}

li:nth-child(2) .feature-icon::before {
  content: "◌";
  font-size: 22px;
}

li:nth-child(3) .feature-icon::before {
  content: "⌁";
  font-size: 19px;
}

.plan-card--starter {
  --screen: #f3f1ec;
  --p1: #262626;
  --p2: #e3e0d7;
  --selected-screen: #eef7ff;
  --selected-p1: #1d9bf0;
  --selected-p2: #d8ecff;
  --display-glow: rgba(38, 38, 38, 0.07);
}

.plan-card--pro {
  --screen: #f2f4f5;
  --p1: #44505a;
  --p2: #d9e0e5;
  --selected-screen: #f0f7ff;
  --selected-p1: #1d9bf0;
  --selected-p2: #dcefff;
  --display-glow: rgba(68, 80, 90, 0.08);
}

.plan-card--max {
  --screen: #f2f1ee;
  --p1: #554f48;
  --p2: #ddd8d1;
  --selected-screen: #f1f8ff;
  --selected-p1: #1d9bf0;
  --selected-p2: #e1f1ff;
  --display-glow: rgba(85, 79, 72, 0.08);
}

.plan-card.is-selected .pixel-screen {
  --screen: var(--selected-screen);
  --p1: var(--selected-p1);
  --p2: var(--selected-p2);
}

.plan-card--pro .pixel-screen span:nth-child(1),
.plan-card--pro .pixel-screen span:nth-child(2),
.plan-card--pro .pixel-screen span:nth-child(5),
.plan-card--pro .pixel-screen span:nth-child(6),
.plan-card--pro .pixel-screen span:nth-child(11),
.plan-card--pro .pixel-screen span:nth-child(12),
.plan-card--pro .pixel-screen span:nth-child(15),
.plan-card--pro .pixel-screen span:nth-child(16) {
  background: var(--p1);
}

.plan-card--pro .pixel-screen span:nth-child(3),
.plan-card--pro .pixel-screen span:nth-child(4),
.plan-card--pro .pixel-screen span:nth-child(7),
.plan-card--pro .pixel-screen span:nth-child(8),
.plan-card--pro .pixel-screen span:nth-child(9),
.plan-card--pro .pixel-screen span:nth-child(10),
.plan-card--pro .pixel-screen span:nth-child(13),
.plan-card--pro .pixel-screen span:nth-child(14) {
  background: var(--p2);
}

.plan-card--max .pixel-screen span:nth-child(2),
.plan-card--max .pixel-screen span:nth-child(3),
.plan-card--max .pixel-screen span:nth-child(5),
.plan-card--max .pixel-screen span:nth-child(8),
.plan-card--max .pixel-screen span:nth-child(9),
.plan-card--max .pixel-screen span:nth-child(12),
.plan-card--max .pixel-screen span:nth-child(14),
.plan-card--max .pixel-screen span:nth-child(15) {
  background: var(--p1);
}

.plan-card--max .pixel-screen span:nth-child(1),
.plan-card--max .pixel-screen span:nth-child(4),
.plan-card--max .pixel-screen span:nth-child(6),
.plan-card--max .pixel-screen span:nth-child(7),
.plan-card--max .pixel-screen span:nth-child(10),
.plan-card--max .pixel-screen span:nth-child(11),
.plan-card--max .pixel-screen span:nth-child(13),
.plan-card--max .pixel-screen span:nth-child(16) {
  background: var(--p2);
}

@keyframes cross-pixel {
  0%,
  12%,
  100% {
    opacity: 0.42;
    filter: blur(0.7px);
  }

  18%,
  46% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes trace-pixel {
  0%,
  30%,
  100% {
    opacity: 0.48;
  }

  38%,
  58% {
    opacity: 0.88;
  }
}

@keyframes idle-pixel {
  0%,
  100% {
    opacity: 0.76;
  }

  50% {
    opacity: 0.6;
  }
}

@media (min-width: 760px) {
  .pricing-shell {
    width: min(980px, calc(100% - 56px));
    padding: 38px 0;
  }

  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-card {
    min-height: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
