/* intro-card.css: the card laid over a page when you arrive on it (js/components/intro-card.js). */

.intro-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8cqh;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
  /* The page behind is seen through glassine: class glassine-sheet (css/effects/glassine-sheet.css). */
}

/* Sized in em: the whole card, stars included, follows its type size. */
.intro-card-paper {
  position: relative;
  display: grid;
  gap: 1.2em;
  width: 100%;
  max-width: 23em;
  padding: 2.25em 3.25em 2.75em; /* the sides leave room for the stars on the right */
  background: var(--color-paper);
  box-shadow: var(--shadow-card);
  text-wrap: balance; /* no word left alone on a line */
  font-size: var(--text-card);
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-4deg); /* a card laid down by hand, slightly off */
}

.intro-card-stars {
  position: absolute;
  /* On the right edge, their bottom level with the last line of text. */
  right: 0.4em;
  bottom: 2.4em;
  width: 3.25em;
  pointer-events: none;
}

/* "ready": the same scrap of torn black paper as the "done" button (css/components/outfit-done.css). */
.intro-card-ready {
  min-width: calc(var(--tap-target) * 1.6);
  min-height: calc(var(--tap-target) * 1.05);
  padding: 0 var(--space-2);
  border: 0;
  --torn-edge-color: var(--color-ink);
  --torn-edge-rim-color: var(--color-torn-rim);
  color: var(--color-paper);
  font-size: var(--text-body);
  letter-spacing: var(--tracking-wide);
}

@keyframes intro-card {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .intro-card:not([hidden]) {
    animation: intro-card var(--motion-snap) ease-out;
  }
}
