/* components.css: how single pieces look. Buttons, cards, notes, illustrations. */

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 800;
  text-decoration: none;
}

/* A chalk stick: a tilted rectangle */
.logo-mark {
  width: 10px;
  height: 22px;
  border: 2px solid var(--text);
  border-radius: 3px;
  background: var(--tint-yellow);
  transform: rotate(25deg);
}

/* Text */

.lead {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.nav-link {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--bg);
}

.button--primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button--primary:hover {
  background: var(--accent-hover);
}

.button--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* Cards */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden; /* clips the colored art block to the rounded corners */
}

.card-body {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.card-body p {
  margin-top: var(--space-2);
  color: var(--text-muted);
}

/* Illustrations */

/* A colored block with a person standing at the bottom of it */
.art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.art .illustration {
  width: 70%;
}

.card .art {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.card .art .illustration {
  width: 55%;
}

/* People wobble on hover, swaying from their feet */
.illustration {
  transform-origin: bottom;
}

.illustration:hover {
  animation: wobble 0.6s ease-in-out;
}

/* Keyframes help us define animations we want to use when using pseudo classes  */
@keyframes wobble {
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

.tint-red { background: var(--tint-red); }
.tint-purple { background: var(--tint-purple); }
.tint-green { background: var(--tint-green); }
.tint-blue { background: var(--tint-blue); }
.tint-yellow { background: var(--tint-yellow); }

/* Sticky notes */

.sticky-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-7) var(--space-5);
}

.sticky-note {
  position: relative;
  width: 184px;
  min-height: 184px;
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--note-color);
  transform: rotate(var(--tilt));
  transition: transform 0.2s;
  /* The only shadow on the site: it makes the note look like paper */
  box-shadow: 0 10px 12px -10px rgb(0 0 0 / 0.25);
}

.sticky-note:hover {
  transform: rotate(0deg) scale(1.03);
}

/* The strip of tape */
.sticky-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 76px;
  height: 24px;
  background: rgb(255 255 255 / 0.6);
  transform: translateX(-50%) rotate(-4deg);
}

.sticky-note h3 {
  font-size: 1.5rem;
}

.sticky-note p {
  margin-top: var(--space-2);
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 1.2;
}

.sticky-note[data-label="rant"] { --note-color: var(--label-rant); --tilt: -2deg; }
.sticky-note[data-label="poetry"] { --note-color: var(--label-poetry); --tilt: 1.5deg; }
.sticky-note[data-label="mess"] { --note-color: var(--label-mess); --tilt: -1deg; }
.sticky-note[data-label="music"] { --note-color: var(--label-music); --tilt: 2deg; }
.sticky-note[data-label="fixit"] { --note-color: var(--label-fixit); --tilt: -1.5deg; }

/* Tick list */

.check-list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-left: var(--space-5);
}

.check-list li::marker {
  content: "✓  ";
  font-weight: 700;
}

/* Page load */

.fade-in {
  animation: fade-in 0.6s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Turn animations off for people who asked their device for less motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
