/* The links page: Alex Eagle's Taplink page, copied as it looks — the
   emblem and a column of coloured buttons, on the site's one background. */


.links {
  position: relative;
  max-width: 824px;   /* Taplink's 792px column, plus the side margins */
  margin: 0 auto;
  padding: 16px 16px 8px;
  text-align: center;
}

/* The header: the emblem, and the name beside it, centred. */
.home-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 0 18px;
  text-align: left;
}

.avatar {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
}

.links h1 {
  margin: 0;
  font: 400 42px/1.05 var(--heading);
  text-transform: uppercase;
  color: var(--ink);
}

.links h1 .gold { color: var(--gold); }


/* A section: its heading, centred, then its buttons. */
.links h2 {
  margin: 0;
  padding: 26px 0 12px;
  font: 400 32px/1.2 var(--heading);
  text-transform: uppercase;
  color: var(--ink);
}

/* Each button's colour; its size is site.css's default button. */
.button { background: var(--bg, #fff); }

.button .title {
  display: block;
  font: 400 17px/1.3 var(--heading);
  text-transform: uppercase;
}

.button .sub {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.85;
}

.button:has(.icon) { padding-left: 68px; padding-right: 68px; }

.button .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  filter: invert(1);
}

/* A logo heavier than the others (Patreon's solid mark) is drawn smaller. */
.button .icon.small { left: 16px; width: 32px; height: 32px; }

/* A button whose ground is white: dark-orange words, as on Taplink. */
.button.light { color: #e8590c; }

.button.outlined { border-color: rgba(204, 93, 232, 0.9); }

/* Taplink's two attention effects, as its own stylesheet defines them. */

/* "blink": a white bar, turned 45 degrees, sweeps across the button from
   left to right, once every three seconds. */
.blink { overflow: hidden; }
.blink::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 1;
  width: 1rem;
  height: 100%;
  background: #fff;
  opacity: 0.9;
  transform: rotate(45deg) scale(2);
  animation: shine 3s linear infinite;
}
@keyframes shine {
  0% { left: -100%; }
  20%, 100% { left: 120%; margin-left: 5rem; }
}

/* "buzz": a quick shake in the first fifth of every three seconds. */
.buzz { animation: buzz 3s linear infinite; }
@keyframes buzz {
  0%, 4% { transform: translateX(3px) rotate(1deg); }
  2%, 6% { transform: translateX(-3px) rotate(-1deg); }
  8%, 12% { transform: translateX(2px) rotate(1deg); }
  10%, 14% { transform: translateX(-2px) rotate(-1deg); }
  16%, 18% { transform: translateX(1px) rotate(1deg); }
  20%, 100% { transform: translateX(0) rotate(0); }
}

/* A few words about Alex, in a black card with a gold edge like the card
   buttons, in the headings' font; the Patreon button follows outside it. */
.about-card {
  margin: 0 0 12px;
  padding: 18px 16px;
  border: 1px solid rgba(217, 180, 91, 0.65);
  border-radius: 12px;
  background: #000;
}

.about { margin: 0; color: #d8d8d8; font: 400 17px/1.5 var(--heading); text-align: left; }

/* The home page's card buttons: one element for the app, the Study pages and
   the courses. Black, a gold edge, a picture fading in on the right, and a
   chevron; every one at least the same height. */
.card-buttons { display: grid; gap: 8px; }

.card-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 12px 16px;
  overflow: hidden;
  border: 1px solid rgba(217, 180, 91, 0.65);
  border-radius: 12px;
  background: #000;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.card-button:hover { filter: brightness(1.1); }

.card-button .pic {
  position: absolute;
  top: 0;
  right: 0;
  width: 170px;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.card-button::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 170px;
  height: 100%;
  background: linear-gradient(90deg, #000, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

.card-button .ico { position: relative; z-index: 1; flex: none; width: 52px; height: 52px; border-radius: 12px; }

.card-button .words { position: relative; z-index: 1; flex: 1; max-width: calc(100% - 150px); }

/* A card button with no picture gives its words the whole width. */
.card-button:not(:has(.pic)) .words { max-width: none; }

.card-button .title {
  display: block;
  color: var(--gold);
  font: 400 22px/1.15 var(--heading);
  text-transform: uppercase;
}

.card-button .sub { display: block; margin-top: 3px; color: #d8d8d8; font: 400 15px/1.3 var(--heading); }

.card-button .chev {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: var(--gold);
  font: 400 30px/1 var(--heading);
  text-shadow: 0 0 6px #000;
}

/* The quiet link under a section of card buttons. */
.more-link {
  display: block;
  margin: 12px 0 0;
  color: var(--gold);
  font: 400 16px var(--heading);
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

/* The courses page opens with the site's page header rather than the emblem. */
.links .page-head { text-align: center; }
