/* Rekin links page. Dusk palette, azure into purple; the buttons are outlined panels that tilt, lift and press. */
@font-face {
  font-family: "Jost";
  src: url("fonts/jost.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --azure: #2c6cc4;     /* light from above */
  --lilac: #7a5fd6;     /* glow from below */
  --deep: #18285c;
  --abyss: #251650;
  --face: rgba(34, 52, 112, .78);
  --face-2: rgba(30, 30, 86, .78);
  --ink: #eef1ff;
  --soft: #aab5e6;      /* secondary text */
  --ease-spring: cubic-bezier(.25, 1.7, .45, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 18px/1.5 "Jost", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(120% 70% at 50% -12%, var(--azure) 0%, rgba(44, 108, 196, 0) 62%),
    radial-gradient(110% 60% at 50% 112%, rgba(122, 95, 214, .75) 0%, rgba(122, 95, 214, 0) 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--abyss) 85%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 16px 72px;
  text-align: center;
}

/* ---------- wordmark: extruded letters, the depth follows the pointer (app.js) ---------- */
.mark {
  margin: 0 0 clamp(40px, 8vh, 72px);
  font-weight: 300;
  font-size: clamp(76px, 22vw, 168px);
  line-height: .9;
  letter-spacing: .12em;
  padding-left: .12em;   /* balances the tracking after the last letter */
  color: var(--ink);
  user-select: none;
  /* static extrusion for when scripts are off; app.js replaces it */
  text-shadow:
    1px 1px 0 #4a7fd0, 2px 2px 0 #4570c4, 3px 3px 0 #4062b6, 4px 4px 0 #3b54a6,
    5px 5px 0 #354694, 6px 6px 0 #2f3a80, 7px 7px 0 #292f6c, 8px 8px 0 #23255a,
    10px 14px 28px rgba(8, 4, 30, .6);
}

/* ---------- groups ---------- */
.group + .group { margin-top: 56px; }

.group-title {
  margin: 0;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: .01em;
}

.group-note {
  max-width: 34em;
  margin: 10px auto 0;
  color: var(--soft);
  font-size: 18px;
  text-wrap: balance;
}

.slabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
  perspective: 900px;
}

/* ---------- panels: a dark face with a brand-coloured outline ---------- */
.slab {
  --rx: 0deg; --ry: 0deg;   /* tilt, set by app.js */
  --mx: 50%; --my: 50%;     /* pointer position for the shine */
  position: relative;
  display: block;
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.slab.tracking { transition: transform .12s ease-out; }

.slab-face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 14px 18px;
  border: 2px solid color-mix(in srgb, var(--brand) 60%, transparent);
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(180deg, var(--face) 0%, var(--face-2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 10px 24px -8px rgba(8, 4, 30, .55);
  transition: transform .45s var(--ease-spring), border-color .2s ease, box-shadow .3s ease;
}

/* light that follows the pointer across the face */
.slab-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.slab-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand);
  box-shadow: 0 4px 10px rgba(8, 4, 30, .4);
  transition: transform .45s var(--ease-spring);
}

.slab-text { display: grid; min-width: 0; }

.slab-name {
  font-weight: 500;
  font-size: 21px;
  line-height: 1.2;
}

.slab-sub {
  color: var(--soft);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the two support buttons are the main event */
.slabs-big .slab-face {
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 188px;
  padding: 24px 18px;
  text-align: center;
}
.slabs-big .slab-icon { width: 72px; height: 72px; border-radius: 18px; }

/* follow links: one per row, Twitter first; as wide as one support button, centred */
.slabs-stack { grid-template-columns: minmax(0, 334px); justify-content: center; gap: 14px; }
.slabs-stack .slab-face { justify-content: center; }
.slabs-stack .slab-text { width: 11.5em; }   /* same width for both, so the icons line up */
.slabs-big .slab-name { font-size: 25px; }

/* hover: lifts, the outline lights up with a thin halo, shine comes on */
@media (hover: hover) {
  .slab:hover .slab-face {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .12),
      0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent),
      0 18px 32px -10px rgba(8, 4, 30, .7);
  }
  .slab:hover .slab-face::after { opacity: 1; }
  .slab:hover .slab-icon { transform: translateY(-2px) rotate(-4deg) scale(1.06); }
}

/* press: pushed in a little, outline at full colour; it springs back on release */
.slab:active .slab-face, .slab.pressed .slab-face {
  transform: translateY(1px) scale(.975);
  border-color: var(--brand);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent),
    0 4px 10px -4px rgba(8, 4, 30, .6);
  transition-duration: .07s;
  transition-timing-function: ease-out;
}
.slab:active .slab-icon, .slab.pressed .slab-icon { transform: scale(.92); transition-duration: .07s; }

/* ring that spreads from where you clicked */
.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  pointer-events: none;
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple {
  from { transform: scale(.4); opacity: .9; }
  to   { transform: scale(14); opacity: 0; }
}

.slab:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

/* brand colours (outline, halo, icon tile, ripple) */
.patreon       { --brand: #f96854; }
.subscribestar { --brand: #17a08f; }
.twitter       { --brand: #1da1f2; }
.bluesky       { --brand: #1185fe; }

@media (max-width: 560px) {
  .slabs { grid-template-columns: 1fr; gap: 16px; }
  .slabs-stack .slab-face { justify-content: flex-start; }   /* line up with the support buttons above */
  .slabs-big .slab-face { flex-direction: row; justify-content: flex-start; min-height: 104px; text-align: left; }
  .slabs-big .slab-icon { width: 60px; height: 60px; border-radius: 15px; }
  .group + .group { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .slab, .slab-face, .slab-icon { transition-duration: .01s !important; }
  .slab { transform: none !important; }
  .ripple { display: none; }
}
