/* ============================================================
   CELESTIAL9 — /links, the link-in-bio card.

   Loaded on top of style.css, which supplies the tokens, the fonts and .btn.
   The page is one oversized playing card, built to the same anatomy as the
   god cards in the fan on the home page (.card / .card__face there): paper
   face, inked keyline, a coloured glow under the art, halftone over it all,
   and a rank in opposing corners.

   The card sits on ink rather than on paper. A cream card on a cream sheet
   is a rectangle; on a dark table it is an object.
   ============================================================ */

body.lk-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 2.5rem) clamp(0.8rem, 3.5vw, 2rem);
  background-color: var(--ink);
  /* Table light, then the site's newsprint dots knocked back to near-black. */
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(23, 162, 176, .20), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(107, 46, 158, .18), transparent 70%),
    radial-gradient(circle at center, rgba(246, 236, 210, .05) 1.05px, transparent 1.15px);
  background-size: auto, auto, 7px 7px;
}

.lk { width: min(100%, 27.5rem); }

/* ---------- The card ---------- */
.lkcard {
  /* Gold, not the cards' teal: over cream paper a teal glow reads as mint and
     drags the whole face off-palette. Gold just warms it, like lamp on paper. */
  --fc: var(--gold);
  position: relative;
  padding: clamp(0.95rem, 3.6vw, 1.35rem);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 10px 12px 0 rgba(11, 10, 15, .55);
  overflow: hidden;
  text-align: center;
}
/* Colour thrown up from behind the art, exactly as on the god cards. */
.lkcard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, var(--fc) 0%, transparent 52%);
  opacity: .2;
  pointer-events: none;
}
/* Printed halftone over the whole face. */
.lkcard::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(11,10,15,.2) 1.1px, transparent 1.2px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
  opacity: .55;
  pointer-events: none;
}
.lkcard > * { position: relative; z-index: 1; }

/* ---------- Art window ---------- */
.lkcard__art {
  margin: 0;
  border: 3px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--celestial);
  box-shadow: 3px 4px 0 rgba(11, 10, 15, .35);
}
/* height:auto is load-bearing on every image here. The width/height attributes are
   kept for layout stability, but they arrive as presentational hints — leave the
   height in place and it wins over aspect-ratio, freezing the art at 360px tall. */
.lkcard__art img {
  width: 100%;
  height: auto;
  aspect-ratio: 25 / 11;
  object-fit: cover;
  object-position: 50% 32%;
}

/* ---------- Title block ---------- */
.lkcard__plate {
  width: min(64%, 13.5rem);
  height: auto;
  margin: clamp(.75rem, 3vw, 1rem) auto clamp(.4rem, 1.8vw, .55rem);
}
.lkcard__sub {
  font-size: clamp(.6rem, 2.3vw, .68rem);
  letter-spacing: .2em;
  color: var(--ink-soft);
}
html[data-cjk] .lkcard__sub { font-family: var(--f-cn); letter-spacing: .22em; }

.lkcard__handle {
  margin-top: .45rem;
  font-size: clamp(.72rem, 2.7vw, .8rem);
  color: var(--cinnabar);
  font-family: var(--f-util);
  letter-spacing: .08em;
}

/* ---------- Primary call to action ---------- */
.lkcard__cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(.85rem, 3.4vw, 1.05rem);
  padding-block: .6em .5em;
  font-size: clamp(1rem, 3.7vw, 1.2rem);
  box-shadow: 4px 4px 0 var(--ink);
}
.lkcard__cta:hover { box-shadow: 6px 6px 0 var(--ink); }
/* In Chinese .btn switches to --f-cn, which has no Latin in the subset, so the word
   "Steam" inside the label drops to PingFang. --f-display covers both scripts. */
html[data-cjk] .lkcard__cta { font-family: var(--f-display); }
.lkcard__cta .ico { width: 1.1em; height: 1.1em; fill: currentColor; }

.lkcard__note {
  margin-top: .45rem;
  font-family: var(--f-util);
  font-size: clamp(.56rem, 2.1vw, .64rem);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .72;
}
html[data-cjk] .lkcard__note { font-family: var(--f-cn); letter-spacing: .16em; }

/* ---------- Divider ---------- */
.lkcard__rule {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: clamp(.9rem, 3.6vw, 1.15rem) 0 .7rem;
  font-size: clamp(.58rem, 2.2vw, .68rem);
  color: var(--ink-soft);
}
.lkcard__rule::before,
.lkcard__rule::after { content: ''; flex: 1; border-top: 2px dashed rgba(11, 10, 15, .28); }

/* ---------- Link tiles ---------- */
.lkcard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  text-align: left;
}
.lkcard__grid li { min-width: 0; }

.tile {
  --c: var(--ink);
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: .45rem .55rem;
  background: var(--paper-2);
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              background-color .16s var(--ease), color .16s var(--ease);
}
.tile:hover {
  background: var(--c);
  color: var(--paper);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.tile__chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 4px;
  transition: background-color .16s var(--ease);
}
.tile__chip .ico { width: .9rem; height: .9rem; fill: var(--paper); transition: fill .16s var(--ease); }
.tile:hover .tile__chip { background: var(--paper); }
.tile:hover .tile__chip .ico { fill: var(--c); }

/* Brand names hold --f-display in both languages: they read as Latin either way,
   and the CJK subset carries no Latin glyphs, so --f-cn would drop them to PingFang. */
.tile__name {
  min-width: 0;
  font-family: var(--f-display);
  font-size: clamp(.82rem, 3vw, .95rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The site tile is the quiet one — the visitor is already inside the domain. */
.tile--ghost { --c: var(--ink-soft); background: transparent; border-style: dashed; box-shadow: none; }
.tile--ghost:hover { box-shadow: 3px 3px 0 var(--ink); }

/* ---------- Foot ---------- */
.lkcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: clamp(.9rem, 3.6vw, 1.15rem);
  padding: .75rem .2rem 0;
  border-top: 2px dashed rgba(11, 10, 15, .28);
  font-size: clamp(.58rem, 2.2vw, .66rem);
  color: var(--ink-soft);
}
.lkcard__foot .lang { flex: none; }
.lkcard__foot .langpick__btn { font-size: .7rem; padding: .3em .55em .26em; }

@media (prefers-reduced-motion: reduce) {
  .tile, .tile__chip, .tile__chip .ico { transition: none; }
  .tile:hover, .tile:active { transform: none; }
}
