/*
  Layout, type and components follow wellhellol.com.
  Colors come from the When Did I Last app: icon purples and the Pastel scheme.
*/

/* Atkinson Hyperlegible Next, self-hosted variable font (SIL OFL, see /fonts/OFL.txt) */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-italic.woff2") format("woff2");
}

:root {
  --board: #f6f4fb;
  --paper: #ffffff;
  --ink: #231446;
  --soft: #5b5175;
  --line: #cbc1e0;
  --card-edge: #dcd4ea;

  /* Pastel lavender highlighter, with lavender and pink tape */
  --hl: #d4c6e8;
  --tape-1: #d4c6e8;
  --tape-2: #f0c6dc;
  --link: #7800b6;

  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --page: 64rem;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--board);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
}

h4,
.card h3,
.item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration-color: var(--link);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.2em;
}

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

.soft {
  color: var(--soft);
}

/* Highlighter: a flat marker stroke that wraps line by line */
.hl {
  background: var(--hl);
  color: var(--ink);
  padding: 0.04em 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Page frame */

/* Body is a flex column so the footer sits at the bottom of short pages */
main {
  flex: 1;
}

.top,
.bottom,
main {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 1rem;
}

.top .name {
  font-weight: 700;
  text-decoration: none;
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  font-size: 1rem;
}

section {
  padding: 3.5rem 0;
}

section > h2 {
  font-size: 1.6rem;
  margin-bottom: 1.75rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: end;
  padding-top: 5rem;
}

.hero h1,
.intro h1 {
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  line-height: 1.3;
}

.app-icon {
  display: block;
  width: 6rem;
  height: 6rem;
  margin-bottom: 1.5rem;
  border-radius: 22%;
}

.lede {
  font-size: 1.25rem;
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
}

.cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.8rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.cta:hover {
  background: var(--hl);
  color: var(--ink);
}

/* Inner page intro */

.intro {
  padding-top: 5rem;
}

.intro h1 {
  margin-bottom: 1.5rem;
}

.intro .lede {
  max-width: 40rem;
}

/* Pinboard cards */

.cards {
  display: grid;
  gap: 2rem;
}

.cards-row {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--card-edge);
  padding: 1.75rem 1.5rem 1.25rem;
  transform: rotate(-0.6deg);
}

.card:nth-child(even) {
  transform: rotate(0.7deg);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.card li {
  margin-bottom: 0.4rem;
}

/* A strip of tape holding each card up, alternating lavender and pink */
.card::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 5.5rem;
  height: 1.3rem;
  background: var(--tape-1);
  opacity: 0.85;
  transform: translateX(-50%) rotate(-3deg);
}

.card:nth-child(3n + 2)::before {
  background: var(--tape-2);
  transform: translateX(-50%) rotate(4deg);
}

/* Ruled two-column list */

.items {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
}

.item {
  padding: 1.25rem 0;
  border-top: 1.5px solid var(--line);
}

.item p:last-child {
  margin-bottom: 0;
}

.prose {
  max-width: 40rem;
}

@media (max-width: 800px) {
  .hero,
  .cards-row,
  .items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top,
  .bottom,
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .top {
    flex-direction: column;
    gap: 0.25rem;
  }
}
