/* SHIN EXALTED — a dark, technological screen: a city in pixels behind, a CRT tube in front. */

:root {
  --ink: #05070a;
  --phosphor: #e9f3f2;
  --dim: #7f9a9c;
  --cyan: #59e3ff;
  --magenta: #ff3f8e;
  --amber: #ffb347;
  --font: "Silkscreen", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--phosphor);
  font-family: var(--font);
  font-weight: 700;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: none;
}

/* ── the city ─────────────────────────────────────────────────────────── */
#city {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 0;
}

/* ── the content ──────────────────────────────────────────────────────── */
.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto 1fr;
  justify-items: center;
  align-items: center;
  gap: clamp(18px, 3vh, 32px);
  padding: clamp(28px, 6vh, 64px) 16px;
  text-align: center;
}

.masthead { align-self: end; width: 100%; }

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(5, 7, 10, .55), transparent 75%);
}

.logo { margin: 0; }
.logo img {
  display: block;
  width: min(820px, 92vw);
  height: auto;
  margin: 0 auto;
  /* the beam's colours not quite converging, and the phosphor's glow */
  filter:
    drop-shadow(2px 0 0 rgba(255, 63, 142, .55))
    drop-shadow(-2px 0 0 rgba(89, 227, 255, .55))
    drop-shadow(0 0 14px rgba(160, 240, 255, .35));
}
.logo.is-glitching img { animation: glitch .32s steps(2) 1; }

/* the avatar, round, in a ring of phosphor; the tube over the page scans it like the rest */
.avatar {
  display: block;
  width: clamp(96px, 14vw, 140px);
  height: auto;
  aspect-ratio: 1;
  margin: clamp(36px, 7vh, 64px) auto 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(233, 243, 242, .55);
  box-shadow:
    0 0 0 4px rgba(5, 7, 10, .75),
    0 0 18px rgba(89, 227, 255, .35),
    0 0 42px rgba(255, 120, 110, .25);
  /* the screen's colour cast: a little cooler and harder, like a picture on a monitor */
  filter: contrast(1.08) saturate(.9) drop-shadow(1px 0 0 rgba(255, 63, 142, .45)) drop-shadow(-1px 0 0 rgba(89, 227, 255, .45));
}

.tagline {
  margin: clamp(10px, 2vh, 20px) 0 0;
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--dim);
  text-shadow: 0 0 8px rgba(89, 227, 255, .35);
}
.cursor { color: var(--cyan); animation: blink 1s steps(1) infinite; }

/* ── the links: a terminal's menu ─────────────────────────────────────── */
.links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(640px, 100%);
  /* air between the avatar and the menu */
  margin-top: clamp(8px, 2vh, 20px);
}
.links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  color: var(--phosphor);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: .04em;
  border: 2px solid rgba(233, 243, 242, .28);
  background: rgba(5, 7, 10, .72);
  box-shadow: inset 0 0 0 1px rgba(5, 7, 10, .9), 0 0 0 1px rgba(5, 7, 10, .6);
  transition: color .12s steps(2), border-color .12s steps(2), background .12s steps(2);
}
.links__key { font-size: 8px; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.links a::before,
.links a::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 2px solid;
  opacity: 0;
}
.links a::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.links a::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
/* each network lights up in its own colour: --brand fills the button (a colour or a gradient),
   --brand-edge draws its border and corner brackets, --brand-ink writes on it */
.links a {
  --brand: var(--cyan);
  --brand-edge: var(--cyan);
  --brand-ink: var(--ink);
}
.links a.link--instagram {
  --brand: linear-gradient(45deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5);
  --brand-edge: #d62976;
  --brand-ink: #fff;
}
.links a.link--x { --brand: #f2f2f2; --brand-edge: #f2f2f2; --brand-ink: #000; }
.links a.link--bluesky { --brand: #1185fe; --brand-edge: #1185fe; --brand-ink: #fff; }
.links a.link--youtube { --brand: #ff0000; --brand-edge: #ff0000; --brand-ink: #fff; }
.links a.link--tiktok {
  --brand: linear-gradient(90deg, #25f4ee, #000 45%, #000 55%, #fe2c55);
  --brand-edge: #fe2c55;
  --brand-ink: #fff;
}
.links a.link--soundcloud { --brand: #ff5500; --brand-edge: #ff5500; --brand-ink: #fff; }
.links a::before,
.links a::after { border-color: var(--brand-edge); }

.links a:hover,
.links a:focus-visible {
  color: var(--brand-ink);
  background: var(--brand);
  border-color: var(--brand-edge);
  outline: none;
  text-shadow: none;
}
.links a.link--tiktok:hover,
.links a.link--tiktok:focus-visible { text-shadow: -1px 0 #25f4ee, 1px 0 #fe2c55; }
.links a:hover .links__key,
.links a:focus-visible .links__key { color: var(--brand-ink); opacity: .75; }
.links a:hover::before, .links a:hover::after,
.links a:focus-visible::before, .links a:focus-visible::after { opacity: 1; }

.handle {
  margin: 0;
  font-size: 16px;
  letter-spacing: .08em;
  color: var(--dim);
  text-shadow: 0 0 3px var(--ink), 0 0 8px var(--ink);
}

/* ── coming soon ──────────────────────────────────────────────────────── */
.soon { align-self: start; }
.soon__text {
  position: relative;
  margin: clamp(8px, 2vh, 24px) 0 4px;
  font-size: 40px;
  letter-spacing: .06em;
  color: var(--phosphor);
  text-shadow: 0 0 18px rgba(89, 227, 255, .45);
  animation: breathe 3.2s ease-in-out infinite;
}
/* the two misregistered copies of the beam */
.soon__text::before,
.soon__text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.soon__text::before { color: var(--magenta); transform: translateX(2px); opacity: .6; animation: split 4.5s steps(1) infinite; }
.soon__text::after { color: var(--cyan); transform: translateX(-2px); opacity: .6; animation: split 4.5s steps(1) infinite reverse; }

.soon__signal {
  margin: 0;
  font-size: 8px;
  letter-spacing: .2em;
  color: var(--amber);
  opacity: .9;
  text-shadow: 0 0 3px var(--ink), 0 0 8px var(--ink);
}
.soon__bars::after { content: "▮▮▮▯"; animation: bars 2.4s steps(1) infinite; }

/* ── the tube ─────────────────────────────────────────────────────────── */
.crt {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background:
    /* scanlines */
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px),
    /* the phosphor mask: red, green and blue stripes */
    repeating-linear-gradient(to right, rgba(255, 0, 60, .05) 0 1px, rgba(0, 255, 120, .04) 1px 2px, rgba(0, 90, 255, .05) 2px 3px),
    /* the glass: darker toward the corners */
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .85), inset 0 0 18px rgba(0, 0, 0, .9);
  animation: flicker 6s infinite;
}
/* a band of brighter scan rolling down the glass */
.crt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22vh;
  top: -22vh;
  background: linear-gradient(to bottom, transparent, rgba(180, 240, 255, .05), transparent);
  animation: roll 7s linear infinite;
}

/* ── motion ───────────────────────────────────────────────────────────── */
@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe { 50% { text-shadow: 0 0 26px rgba(89, 227, 255, .65); } }
@keyframes split {
  0%, 92%, 100% { transform: translateX(2px); }
  93% { transform: translate(6px, -1px); }
  95% { transform: translate(-4px, 1px); }
}
@keyframes bars {
  0% { content: "▮▯▯▯"; } 25% { content: "▮▮▯▯"; } 50% { content: "▮▮▮▯"; } 75% { content: "▮▮▮▮"; }
}
@keyframes glitch {
  0% { transform: translate(-3px, 1px) skewX(-4deg); clip-path: inset(10% 0 55% 0); }
  50% { transform: translate(4px, -1px); clip-path: inset(45% 0 20% 0); }
  100% { transform: none; clip-path: none; }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  41% { opacity: .96; } 42% { opacity: 1; }
  77% { opacity: .97; } 78% { opacity: 1; }
}
@keyframes roll { to { top: 100vh; } }

/* the font is drawn on an 8 px grid: it is set in multiples of 8 so every pixel lands whole */
@media (min-width: 900px) {
  .tagline { font-size: 24px; }
  .links a { font-size: 16px; }
  .soon__text { font-size: 64px; }
  .soon__signal { font-size: 16px; }
}

@media (max-width: 560px) {
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .links a { padding: 12px 6px; letter-spacing: 0; }
  .links__key { display: none; }
  .soon__text { font-size: 32px; letter-spacing: .02em; }
  .soon__signal { letter-spacing: .14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
