:root {
  color-scheme: dark;
  --bg: #050505;
  --accent: #5B83C6;
  --text: #f4f4f5;
  --muted: #a1a1a6;
  --dim: #6e6e74;
  --line: #ffffff17;
  --line-strong: #ffffff30;
  --font: Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wide: min(100% - 2 * var(--gutter), 72rem);
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.5 var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { color: #0a0a0b; background: #e9e9ec; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.page {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding-bottom: 2.5rem;
  overflow-x: clip;
}

/* Light beams falling from the top, as in the mockup. */
.rays {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(48rem, 100svh);
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse 64% 50% at 50% 0%, #213f7759, transparent 73%);
  mask-image: linear-gradient(#000 32%, transparent);
}

.rays::before {
  position: absolute;
  inset: -30% -20% 0;
  content: "";
  background:
    linear-gradient(104deg, transparent 10%, #304b8228 14%, transparent 22%),
    linear-gradient(101deg, transparent 26%, #36549738 31%, #263d7417 36%, transparent 41%),
    linear-gradient(106deg, transparent 44%, #304b8224 49%, transparent 58%),
    linear-gradient(100deg, transparent 62%, #36549735 68%, transparent 78%),
    linear-gradient(105deg, transparent 82%, #304b821f 87%, transparent 95%);
}

/* Header */

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: var(--wide);
  min-height: 4.75rem;
  margin-inline: auto;
  padding-top: env(safe-area-inset-top);
}

.brand { display: inline-flex; align-items: center; justify-self: start; gap: .7rem; min-height: 2.75rem; }

.brand img {
  display: block;
  width: 2rem;
  height: auto;
}

.brand-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* The ".re" ending: a blue gradient that keeps flowing, with a soft glow. */
.tld {
  background: linear-gradient(100deg, #5b8dff 0%, #8fd0ff 25%, #ffffff 50%, #8fd0ff 75%, #5b8dff 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 .45rem #5b8dff70);
}

@media (prefers-reduced-motion: no-preference) {
  .tld { animation: tld-flow 3.6s linear infinite; }
}

@keyframes tld-flow {
  to { background-position: 200% 0; }
}

.main-nav { display: flex; gap: clamp(1.1rem, 2.2vw, 2rem); }

.main-nav a {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current] {
  color: #fff;
  font-weight: 600;
  text-decoration: underline #4b73bb90;
  text-underline-offset: .35rem;
}

.top-actions { display: flex; align-items: center; gap: .35rem; justify-self: end; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: .85rem;
  color: var(--muted);
  font-size: .88rem;
}

.text-link:hover { color: var(--text); }

.cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.5rem;
  padding: .4rem 1rem;
  border-radius: .6rem;
  background: linear-gradient(#fff, #d9d9dc);
  color: #09090a;
  font-size: .86rem;
  font-weight: 600;
  box-shadow: 0 1px 0 #fff8 inset, 0 6px 18px -8px #fff4;
}

.cta:hover { background: linear-gradient(#fff, #efeff1); }

/* Header when you are logged in: avatar and name, a link to the dashboard. */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  max-width: 13rem;
  min-height: 2.6rem;
  padding: .25rem 1rem .25rem .3rem;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: linear-gradient(#18191c, #0d0e10);
  box-shadow: inset 0 1px 0 #ffffff14, 0 8px 20px -12px #000;
  color: #f4f4f5;
  font-size: .86rem;
  font-weight: 600;
}

.account-chip:hover { border-color: #7aa2ec70; background: linear-gradient(#1b1e25, #10131a); }

.chip-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  flex: none;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border: 1px solid #ffffff3a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 8%, #46464a, #151516 72%);
  box-shadow: inset 0 1px 0 #ffffff44;
  font-size: .8rem;
  font-weight: 600;
}

.chip-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  padding: clamp(3rem, 10vh, 6rem) 1rem 0;
  text-align: center;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: min(54rem, 100%);
  height: 100%;
  content: "";
  background:
    linear-gradient(#ffffff0c 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0c 1px, transparent 1px);
  background-size: 2.4rem 2.4rem;
  mask-image: radial-gradient(ellipse 60% 62% at 50% 38%, #000 20%, transparent 72%);
  transform: translateX(-50%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 5.2vw, 4.4rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.045em;
}

.hero h1 span {
  display: block;
  padding-bottom: .14em;
  margin-bottom: -.14em;
  background: linear-gradient(180deg, #f1f1f3 8%, #77777c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(.95rem, 1.4vw, 1.08rem);
  line-height: 1.55;
  text-wrap: balance;
}

/* Cards */

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: var(--wide);
  margin: clamp(2.4rem, 6vh, 4rem) auto 0;
  scroll-margin-top: 1.5rem;
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: linear-gradient(180deg, #151516 0%, #0a0a0b 58%, #070708 100%);
  box-shadow: inset 0 1px 0 #ffffff1a, 0 26px 50px -30px #000;
}

.card:hover { border-color: var(--line-strong); transform: translateY(-.25rem); }

.card.featured {
  border-color: #ffffff30;
  background: linear-gradient(180deg, #1c1c1e 0%, #0d0d0e 56%, #080809 100%);
  box-shadow:
    inset 0 1px 0 #ffffff26,
    0 0 0 1px #ffffff08,
    0 30px 60px -30px #000,
    0 -20px 56px -34px #ffffff66;
}

/* The bright spot on the top edge of the highlighted card. */
.card.featured::before {
  position: absolute;
  top: -1px;
  left: 24%;
  right: 24%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, #4169ad8c, transparent);
  box-shadow: 0 0 15px 2px #36569a24;
}

/* Each cover is a portrait picture; only the top band shows, so --cover-y picks the height that keeps the face in frame. */
.card-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--cover) 50% var(--cover-y, 0%) / cover no-repeat;
}

.deadlock { --cover: url("/assets/deadlock.webp?v=1"); --cover-y: 8%; }
.cs2 { --cover: url("/assets/cs2.webp?v=1"); --cover-y: 0%; }
.fortnite { --cover: url("/assets/fortnite.webp?v=1"); --cover-y: 0%; }
.rob-run { --cover: url("/assets/rob-run.webp?v=1"); --cover-y: 14%; }

.card-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 11rem;
  overflow: hidden;
  border-radius: inherit;
  opacity: .62;
  mask-image: linear-gradient(#000 20%, transparent);
}

/* Keeps the left half, where the icon and the name sit, calm so the text stays readable. */
.card-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #0a0a0bf0 0%, #0a0a0bb0 34%, transparent 72%);
}

.card:hover .card-art { opacity: .9; }

.icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid #ffffff3a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 8%, #46464a, #151516 72%);
  box-shadow: inset 0 1px 0 #ffffff44, 0 0 0 .34rem #ffffff0b, 0 10px 24px -8px #000;
}

.featured .icon {
  border-color: #ffffff66;
  background: radial-gradient(circle at 50% 8%, #77777c, #1a1a1c 72%);
  box-shadow: inset 0 1px 0 #ffffff66, 0 0 0 .34rem #ffffff12, 0 0 28px -4px #ffffff40;
}

.vmark { display: block; width: 1.25rem; height: 1.11rem; fill: #f6f6f7; }

.card-name {
  margin: 1.35rem 0 0;
  font-size: clamp(1.85rem, 2.4vw, 2.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.card-tag {
  min-height: 3em;
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.card-button {
  min-height: 2.75rem;
  margin-top: 1.3rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: linear-gradient(#19191b, #0e0e0f);
  color: #f4f4f5;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff12;
}

.card-button:hover, .featured .card-button {
  border-color: transparent;
  background: linear-gradient(#f6f6f7, #bdbdc2);
  color: #09090a;
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px -10px #fff5;
}

.featured .card-button:hover { background: linear-gradient(#fff, #d3d3d7); }

.divider {
  height: 1px;
  margin: 1.5rem 0 1.25rem;
  background: linear-gradient(90deg, transparent, #ffffff2b, transparent);
}

.list-title {
  margin: 0 0 .9rem;
  color: #ededef;
  font-size: .9rem;
  font-weight: 500;
}

.checks {
  display: grid;
  gap: .72rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 1.75rem;
  color: #b3b3b8;
  font-size: .84rem;
  line-height: 1.3;
}

.checks li::before, .checks li::after {
  position: absolute;
  content: "";
}

.checks li::before {
  top: 0;
  left: 0;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid #ffffff42;
  border-radius: 50%;
}

.checks li::after {
  top: .26rem;
  left: .4rem;
  width: .25rem;
  height: .46rem;
  border: solid #dcdce0;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(40deg);
}

.status {
  margin: 2.2rem 1rem 0;
  color: var(--dim);
  font-size: .78rem;
  text-align: center;
}

.status.active { color: #c9c9ce; }

/* Short message shown when a menu entry has no page yet. */
.toast {
  position: fixed;
  z-index: 10;
  top: 5.4rem;
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: .65rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: .75rem;
  background: #0b0b0de6;
  color: #e8e8ea;
  font-size: .84rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -.4rem);
  backdrop-filter: blur(.6rem);
  box-shadow: 0 14px 34px -14px #000;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 40rem) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 70rem) {
  .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
}

/* Five menu entries need more room than the header has below 64rem: the menu moves to its own row. */
@media (max-width: 63.99rem) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "nav nav";
    min-height: 0;
    padding-top: calc(env(safe-area-inset-top) + .5rem);
  }

  .brand { grid-area: brand; }
  .top-actions { grid-area: actions; }

  .main-nav {
    grid-area: nav;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar { display: none; }

  .toast { top: 6.6rem; }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .main-nav { justify-content: center; }
}

@media (max-width: 47.99rem) {
  .card { padding: 1.45rem 1.3rem 1.35rem; }
  .card-tag { min-height: 0; }
}

@media (max-width: 40rem) {
  .hero h1 { font-size: clamp(1.6rem, 8.4vw, 2.6rem); }
}

@media (max-width: 24rem) {
  .brand { gap: .55rem; }
  .brand img { width: 1.7rem; }
  .brand-name { font-size: 1.1rem; }
  .text-link { padding-inline: .6rem; }
  .main-nav { gap: 1.1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .rays::before { animation: sway 18s ease-in-out infinite alternate; }

  .hero h1, .lede, .card, .status {
    animation: rise 760ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .hero h1 { animation-delay: 70ms; }
  .lede { animation-delay: 140ms; }
  .card:nth-child(2) { animation-delay: 240ms; }
  .card:nth-child(3) { animation-delay: 300ms; }
  .card:nth-child(4) { animation-delay: 360ms; }
  .card:nth-child(5) { animation-delay: 420ms; }

  .card, .card-art { transition: transform 260ms cubic-bezier(.16, 1, .3, 1), border-color 220ms, opacity 260ms; }
  .card-button, .cta, .text-link, .main-nav a { transition: background 180ms, color 180ms, border-color 180ms; }
  .toast { transition: opacity 200ms ease, transform 260ms cubic-bezier(.16, 1, .3, 1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(.8rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sway {
  from { transform: translateX(-2.5%); opacity: .8; }
  to { transform: translateX(2.5%); opacity: 1; }
}
