/* The landing page of the GitHub Pages site. The tokens, the fonts and the type voices come from
   shared/brand.css, loaded first; this file lays out the page in the manner of
   federicomedinilla.com: a mono eyebrow, a serif headline with one lime-marked phrase, and lime
   number chips on the cards. */

:root {
  color-scheme: light dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 60rem;
  padding: 0 16px 48px;
  background: var(--m-paper);
  color: var(--m-ink);
  font-size: 17px;
  line-height: 1.6;
}

h1,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 1.1;
  max-width: 18em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: var(--m-ink);
  text-underline-offset: 3px;
}

code {
  font-family: var(--m-mono);
  font-size: 0.88em;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--m-lime);
  color: var(--m-lime-ink);
  padding: 10px 16px;
  border-radius: var(--m-r-md);
  font-weight: 600;
  z-index: 1;
}

:focus-visible {
  outline: 3px solid var(--m-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.top {
  padding: 56px 0 32px;
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--m-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--m-ink-2);
}

/* The brand's highlighter: a lime band set low behind the words, dark ink on top in both themes.
   A positioned gradient instead of a plain background, so the band does not climb into the line
   above when the headline wraps. */
.marked {
  background-image: linear-gradient(var(--m-lime), var(--m-lime));
  background-size: 100% 72%;
  background-position: 0 62%;
  background-repeat: no-repeat;
  color: var(--m-lime-ink);
  padding-inline: 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.sub {
  margin: 20px 0 0;
  max-width: 38rem;
  color: var(--m-ink-2);
}

.demos {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .demos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.demo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--m-paper-2);
  border: 1px solid var(--m-line);
  border-radius: var(--m-r-lg);
  padding: 24px;
  transition: border-color 180ms cubic-bezier(0.2, 0, 0, 1), transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.demo:hover {
  border-color: var(--m-line-strong);
  transform: translateY(-2px);
}

.demo p {
  margin: 0;
}

/* The whole card answers the click; the link text is still the app's name. */
.demo h3 a {
  text-decoration: none;
}

.demo h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--m-r-lg);
}

.demo h3 a:hover {
  text-decoration: underline;
}

.num {
  align-self: flex-start;
  font-family: var(--m-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  background: var(--m-lime);
  color: var(--m-lime-ink);
  border-radius: 999px;
  padding: 2px 10px;
}

.meta {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--m-mono);
  font-size: 0.8125rem;
  color: var(--m-ink-2);
}

.meta code {
  font-size: 1em;
  color: var(--m-ink);
}

.note {
  margin: 28px 0 0;
  max-width: 40rem;
  color: var(--m-ink-2);
}

.cta-row {
  margin: 24px 0 0;
}

/* The site's primary button: lime fill, dark ink, no border. */
.cta {
  display: inline-block;
  max-width: 100%;
  min-height: 44px;
  padding: 14px 24px;
  border-radius: var(--m-r-md);
  background: var(--m-lime);
  color: var(--m-lime-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.cta:hover {
  transform: translateY(-2px);
}

.foot {
  margin-top: 48px;
  border-top: 1px solid var(--m-line);
  padding-top: 16px;
  font-size: 0.9rem;
  color: var(--m-ink-2);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .demo,
  .cta {
    transition: none;
  }

  .demo:hover,
  .cta:hover {
    transform: none;
  }
}
