/* ilonium.dev
   ---------------------------------------------------------------------------
   Everything the site looks like, in one file. No framework, nothing fetched
   from anybody else's server, no build step. The only asset is the font the
   game itself uses, which is why the page and the client look related.        */

@font-face {
  font-family: "Expressway";
  src: url("/font/expresswayfree.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --void: #04050a;
  --deep: #080a12;
  --panel: rgba(255, 255, 255, .028);
  --edge: rgba(255, 255, 255, .09);
  --text: #f2f5fb;
  --dim: #98a1b5;
  --faint: #5f6982;
  --cyan: #45d9ff;
  --violet: #9b7bff;
  --magenta: #ff5bc8;
  --display: "Expressway", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 16px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A film of grain over everything. It is the difference between a flat black
   page and one that looks photographed. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .04;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(69, 217, 255, .3); }

.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }

/* --- the light that follows the pointer -------------------------------- */

#glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 620px; height: 620px; margin: -310px 0 0 -310px;
  background: radial-gradient(circle, rgba(69,217,255,.10), rgba(155,123,255,.05) 40%, transparent 68%);
  opacity: 0; transition: opacity .6s;
}
body.pointing #glow { opacity: 1; }

/* --- the bar ----------------------------------------------------------- */

header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
header.stuck { background: rgba(4,5,10,.72); backdrop-filter: blur(18px) saturate(140%); border-bottom-color: var(--edge); }
header .wrap { display: flex; align-items: center; gap: 2rem; height: 72px; }

.mark { font-family: var(--display); font-size: 1.2rem; letter-spacing: .04em; text-transform: lowercase; }
.mark i { font-style: normal; color: var(--cyan); text-shadow: 0 0 22px rgba(69,217,255,.8); }

nav { margin-left: auto; display: flex; gap: 2rem; align-items: center; font-size: .93rem; }
nav a { color: var(--dim); position: relative; transition: color .25s; }
nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px;
  background: var(--cyan); transition: right .35s cubic-bezier(.2,.8,.2,1);
}
nav a:hover { color: var(--text); }
nav a:hover::after { right: 0; }
nav .cta { color: var(--text); padding: .45rem 1.05rem; border: 1px solid var(--edge); border-radius: 100px; transition: background .25s, border-color .25s; }
nav .cta::after { display: none; }
nav .cta:hover { background: rgba(69,217,255,.12); border-color: rgba(69,217,255,.5); }
@media (max-width: 720px) { nav a:not(.cta) { display: none; } }

/* --- the arena --------------------------------------------------------- */

.stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
#arena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* the ceiling and the floor of the frame: keeps type legible without turning
   the arena into soup */
.stage::before, .stage::after {
  content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1;
}
.stage::before { top: 0; height: 42%; background: linear-gradient(180deg, rgba(4,5,10,.92), transparent); }
.stage::after  { bottom: 0; height: 58%; background: linear-gradient(0deg, var(--void) 12%, rgba(4,5,10,.72) 46%, transparent); }

.stage .wrap {
  position: absolute; inset: auto 0 0; z-index: 2;
  padding-bottom: clamp(3rem, 9vh, 7rem);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.6rem;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan); animation: beat 2.6s ease-in-out infinite;
}
@keyframes beat { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .3; transform: scale(.7) } }

h1 {
  font-family: var(--display);
  margin: 0 0 1.5rem;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: .88;
  letter-spacing: -.02em;
  font-weight: 400;
  text-transform: uppercase;
}
h1 .glowing {
  background: linear-gradient(96deg, var(--cyan), var(--violet) 48%, var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 34px rgba(120, 160, 255, .35));
}

/* every line rises into place, one after the other */
.line { display: block; overflow: hidden; }
.line > span { display: block; transform: translateY(102%); animation: rise 1.1s cubic-bezier(.16,1,.3,1) forwards; }
.line:nth-child(2) > span { animation-delay: .09s; }
.line:nth-child(3) > span { animation-delay: .18s; }
@keyframes rise { to { transform: none; } }

.lead {
  margin: 0 0 2.4rem; max-width: 44ch; color: var(--dim);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  opacity: 0; animation: fade 1s ease .5s forwards;
}
@keyframes fade { to { opacity: 1 } }

.row { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.hero-row { opacity: 0; animation: fade 1s ease .68s forwards; }

/* --- buttons ----------------------------------------------------------- */

.button {
  --shine: 50%;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.9rem; border-radius: 100px;
  border: 1px solid var(--edge); background: rgba(255,255,255,.04);
  font-family: var(--display); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, background .3s;
}
.button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }

.button.primary {
  border-color: transparent; color: #032230;
  background: linear-gradient(120deg, #7ce8ff, #45d9ff 45%, #7f9bff);
  box-shadow: 0 12px 50px -18px rgba(69,217,255,.9);
}
.button.primary::after {
  /* a highlight that sweeps across when the pointer is on it */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.button.primary:hover::after { transform: translateX(120%); }
.button.primary:hover { box-shadow: 0 18px 60px -16px rgba(69,217,255,1); }

.hint { color: var(--faint); font-size: .88rem; }
kbd {
  font-family: var(--display); font-size: .82rem; letter-spacing: .06em;
  border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 6px;
  padding: .1rem .45rem; color: var(--dim);
}

/* the invitation to take the wheel, and what it becomes once you do */
.take {
  position: absolute; z-index: 3; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: .7rem;
  color: var(--faint); font-size: .84rem;
  animation: float 3.4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%, 0) } 50% { transform: translate(-50%, 8px) } }
.take.playing { animation: none; color: var(--cyan); }

/* --- sections ---------------------------------------------------------- */

section { position: relative; padding: clamp(6rem, 14vh, 11rem) 0; }
section + section::before {
  /* a thread of light between chapters instead of a border */
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14) 30%, rgba(69,217,255,.4) 50%, rgba(255,255,255,.14) 70%, transparent);
}

.tag {
  font-family: var(--display); font-size: .76rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cyan); display: block; margin-bottom: 1.1rem;
}

h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  margin: 0 0 1.2rem; font-size: clamp(2.1rem, 5.2vw, 4.4rem);
  line-height: .95; letter-spacing: -.02em;
}
.sub { margin: 0 0 3.5rem; color: var(--dim); max-width: 58ch; font-size: clamp(1rem, 1.3vw, 1.12rem); }

.rise { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.rise.seen { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .line > span { transform: none; animation: none; }
  .lead, .hero-row { opacity: 1; animation: none; }
  .eyebrow::before, .take { animation: none; }
}

/* --- the rules, told as a scroll --------------------------------------- */

.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
@media (max-width: 900px) { .chapters { grid-template-columns: 1fr; gap: 2.5rem; } }

.sticky { position: sticky; top: 24vh; }
@media (max-width: 900px) { .sticky { position: static; } }

.beat { padding: 22vh 0; }
.beat:first-child { padding-top: 6vh; }
.beat:last-child { padding-bottom: 10vh; }
@media (max-width: 900px) { .beat { padding: 1.5rem 0; } }

.beat h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: -.01em;
           font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 0 0 .8rem; font-weight: 400; }
.beat p { margin: 0; color: var(--dim); max-width: 42ch; }
.beat .n { font-family: var(--display); color: var(--faint); font-size: .8rem; letter-spacing: .3em; display: block; margin-bottom: .9rem; }

/* the panel that stays while the words change */
.panel {
  border: 1px solid var(--edge); border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  box-shadow: 0 40px 120px -60px rgba(69,217,255,.4);
  aspect-ratio: 4/3;
}
.panel canvas { width: 100%; height: 100%; display: block; }

/* --- numbers ----------------------------------------------------------- */

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem 3rem; }
.figure .n {
  font-family: var(--display); font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1;
  background: linear-gradient(140deg, #fff, #7fb6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.figure .k { margin-top: .7rem; color: var(--dim); font-size: .95rem; }

/* --- the catalogue ----------------------------------------------------- */

.filters { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.chip {
  font-family: var(--display); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; padding: .55rem 1.1rem; border-radius: 100px;
  border: 1px solid var(--edge); background: transparent; color: var(--faint);
  transition: color .3s, border-color .3s, background .3s;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.on { color: #032230; background: linear-gradient(120deg, #7ce8ff, #45d9ff); border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.1rem; }

.item {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid var(--edge); border-radius: 18px; padding: 1.6rem 1.7rem 1.7rem;
  background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .45s;
  transform-style: preserve-3d;
}
/* a soft light that follows the pointer across the card */
.item::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(69,217,255,.16), transparent 62%);
}
.item:hover { border-color: rgba(255,255,255,.2); }
.item:hover::before { opacity: 1; }

.item h3 { font-family: var(--display); font-size: 1.12rem; font-weight: 400; text-transform: uppercase;
           letter-spacing: .01em; margin: 0 0 .6rem; }
.item p { margin: 0; color: var(--dim); font-size: .95rem; }
.item .where { display: block; margin-top: 1.1rem; font-family: var(--display);
               font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }

/* --- servers ----------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--edge); border-radius: 20px; padding: 2rem;
  background: linear-gradient(165deg, rgba(255,255,255,.05), rgba(255,255,255,.012));
  display: flex; flex-direction: column;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), border-color .45s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.2); }
.card h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase;
           font-size: 1.5rem; margin: 0 0 .3rem; }
.card .meta { font-family: var(--display); color: var(--faint); font-size: .82rem; letter-spacing: .16em; margin-bottom: 1.4rem; }
.card p { margin: 0 0 1.6rem; color: var(--dim); font-size: .96rem; flex: 1; }
.card ul { margin: 1.4rem 0 0; padding-left: 1.1rem; color: var(--dim); font-size: .92rem; }
.card li { margin-bottom: .45rem; }
.card .button { justify-content: center; }

.badge {
  display: inline-block; font-family: var(--display); font-size: .7rem; letter-spacing: .22em;
  text-transform: uppercase; padding: .3rem .8rem; border-radius: 100px;
  border: 1px solid rgba(69,217,255,.45); color: var(--cyan); background: rgba(69,217,255,.08);
}

/* --- the end ----------------------------------------------------------- */

.finale { text-align: center; padding: clamp(7rem, 18vh, 14rem) 0; position: relative; overflow: hidden; }
.finale::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px;
  transform: translate(-50%,-50%); z-index: -1;
  background: radial-gradient(circle, rgba(69,217,255,.12), transparent 62%);
}
.finale h2 { font-size: clamp(2.6rem, 8vw, 6rem); }
.finale .sub { margin-inline: auto; }
.finale .row { justify-content: center; }

footer { border-top: 1px solid var(--edge); padding: 3rem 0 4rem; color: var(--faint); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
footer .mark { font-size: 1rem; }
