/* The landing page (templates/home.html), in the look's own colours: a
   sample card standing beside what PrintCard does, what it costs and the
   way to make one, and for an account that has ordered, its orders in a
   row each under. The sample card never changes with the look. */

.home { max-width: 72rem; }
/* Carry on with your card, at the top while a card is being made. */
.home-carry-on { margin: 0 0 1.5rem; }
.home-carry-on[hidden] { display: none; }
.home h1 {
  margin: 0;
  font: var(--display-weight) clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem)/1 var(--display);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.home h2 {
  margin: 0;
  font: var(--display-weight) 1.4rem/1.15 var(--display);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.015em;
}
.home h3 { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.home p { margin: 0; }
.home-lede { font-size: 1.1875rem; line-height: 1.5; max-width: 34rem; color: var(--on); }
.home-hint, .home-meta { color: var(--on-soft); font-size: 0.9375rem; }
.home [hidden] { display: none !important; }

/* The one button to press, a size up. */

/* Someone new: the card, and beside it what it is. */
.home-hero {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(0, 27rem);
  grid-template-areas: "title title" "card text";
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(0.5rem, 2vw, 1.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}
.home-hero > h1 { grid-area: title; max-width: 18em; }
.home-hero > .home-sample { grid-area: card; }
/* Beside the words, the card a fifth larger, its sheet's empty edges
   spilling into the gap, and in view as the words go by. */
@media (min-width: 48.01rem) {
  .home-hero > .home-sample { position: sticky; top: 1.5rem; }
  .home-hero > .home-sample .sheet { width: 120%; margin-inline: -10%; }
}
.home-hero > .home-hero-text { grid-area: text; }
.home-hero-text { display: grid; gap: 1.25rem; justify-items: start; }
.home-hero-text > div { display: grid; gap: 0.75rem; justify-items: start; }

/* What it costs, on the tear strip: where the card leaves the page.
   The words and the choice of how many on the left, the adding machine
   standing beside them. */
.home-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1.25rem;
  align-items: start;
  max-width: 34rem;
  padding: 0.75rem 1rem 1rem;
  background: var(--strip);
  color: var(--strip-ink);
  border: 1.5px dashed var(--strip-rule);
  border-radius: var(--radius);
}
.home-price-figure {
  margin: 0;
  font: var(--display-weight) 2.1rem/1 var(--display);
  font-stretch: var(--size-stretch);
  letter-spacing: -0.01em;
}
.home-price > :not(.calc) { grid-column: 1; }
.home-price p { margin: 0; }
.home-price-cta[rst-btn] { justify-self: start; }

/* How many: a segmented pair, the chosen filled as the cart's paper is.
   The radios need no form: home.css alone shows the sum chosen. */
.home-price-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 6.5rem));
  justify-self: start;
  border: 1.5px solid var(--strip-rule);
  border-radius: var(--radius);
}
.home-price-choice label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  white-space: nowrap;
  font-weight: 650;
  cursor: pointer;
}
.home-price-choice label + label { border-left: 1.5px solid var(--strip-rule); }
.home-price-choice input { position: absolute; opacity: 0; pointer-events: none; }
.home-price-choice label:hover { background: var(--strip-hover); }
.home-price-choice label:has(input:checked) { background: var(--chosen); color: var(--chosen-ink); }
.home-price-choice label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -1px; z-index: 1; }

/* The adding machine (calc.css) stands beside the words. One card's
   sum shows until ten are chosen; without :has the first stays, which
   is still true. */
.home-price .calc { --calc-w: 9.5rem; grid-column: 2; grid-row: 1 / span 4; align-self: end; }
.home-price [data-copies="10"] { display: none; }
.home-price:has(input[value="10"]:checked) [data-copies="10"] { display: revert; }
/* revert is the browser's own display, inline for the window's figures,
   which calc.css stacks in one place as a grid: given back as inline,
   ten cards' figures lay out in a row, and each as it is typed comes
   in from the left. */
.home-price:has(input[value="10"]:checked) .calc-window > [data-copies="10"] { display: grid; }
.home-price:has(input[value="10"]:checked) [data-copies="1"] { display: none; }
@media (max-width: 30rem) {
  .home-price { gap: 0.75rem; padding-inline: 0.75rem; }
  .home-price .calc { --calc-w: 8.5rem; }
  .home-price-figure { font-size: 1.75rem; }
}

[rst-page] .home-price a { color: var(--strip-ink); }

/* When the cards come, and the way to start, with the way to read
   more beside it. */
.home-for, .home-when { max-width: 34rem; color: var(--on-soft); }
.home-start { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }

/* Why PrintCard, under the hero: four short reasons, side by side. */
.home-reasons { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.home-reasons ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem 2rem;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem) 0 0;
  border-top: 1.5px solid var(--rule);
  list-style: none;
}
.home-reasons li { display: grid; gap: 0.35rem; align-content: start; }
.home-reasons p { color: var(--on-soft); line-height: 1.5; }

/* The sample card, standing as the card page's preview stands a card
   (/fold.css): its sheet is the card opened out flat, twice as wide as
   the card, so the card standing takes about half of it. Under it, the
   side showing, between the arrows that turn it (home-sample.js). */
.home-sample { display: grid; gap: 0.75rem; justify-items: center; width: 100%; max-width: 36rem; margin: 0; justify-self: center; }
.home-sample .sheet {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4286;
  container-type: inline-size;
}
.home-sample figcaption { width: 100%; }
.home-sample-turn { display: flex; gap: 0.75rem; align-items: center; justify-content: center; color: var(--on-soft); font-size: 0.9375rem; }
.home-sample-side { min-width: 6.5em; font-weight: 700; color: var(--on); text-align: center; }
.home-sample-arrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--rule);
  border-radius: 50%;
  background: var(--ground);
  color: var(--on);
  cursor: pointer;
}
.home-sample-arrow:hover { border-color: var(--on); }
.home-sample-arrow:focus-visible { outline: 2px solid var(--on); outline-offset: 2px; }
.home-sample-arrow .icon { width: 1.25rem; height: 1.25rem; }

.home-delete h2 {
  margin-bottom: 0.25rem;
  font: var(--display-weight) 1.6rem/1.15 var(--display);
  font-stretch: var(--display-stretch);
}

/* Sections, ruled off. */
.home-section { padding: 2rem 0 0; border-top: 1px solid var(--rule); margin-top: 1rem; }
.home-section + .home-section { margin-top: 2.5rem; }
.home-section-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }

/* An account's orders, a row each between rules, as the account page
   lists them: the cards stacked small on the left, the order and where
   it is, its two days (order.css) at body size, and ordering it again. */
.home-orders, .home-kept { list-style: none; margin: 0; padding: 0; }
.home-orders { display: grid; }
.home-order {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center;
  padding: 1rem 0; border-top: 1px solid var(--doc-rule, light-dark(#cfcac0, #3a3631));
}
.home-order > .home-order-fronts { font-size: 0.5rem; }
.home-order-text { flex: 1 1 12rem; min-width: 0; display: grid; gap: 0.35rem; }
.home-order-head { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; }
.home-order h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 750; }
.home-order h3 a { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.home-order .order-days { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.home-order .order-days > div { gap: 0.1rem; }
.home-order .order-day-label { font-size: 0.875rem; }
.home-order .order-day { font-size: 1.125rem; }
.home-order .order-day-note { display: none; }
.home-order-again { flex: none; margin-left: auto; }
.home-order-again [rst-btn] { gap: 0.5rem; min-height: 2.5rem; padding-block: 0.375rem; }
.home-order-again [rst-btn] .icon { width: 1.125rem; height: 1.125rem; }

/* The cards, up to three, fanned as if dropped on a table, the last on
   top. Drawn in em, so font-size sets the size. */
.home-order-fronts { position: relative; flex: none; display: block; width: 12.5em; height: 12.25em; font-size: 1rem; }
.home-order-fronts > img, .home-order-blank {
  position: absolute; left: 2.875em; top: 2.875em; width: 6em;
  background: #fff;
  box-shadow: 0 0.125em 0.375em rgb(var(--shade) / 0.25), 0 1em 1.375em -0.5em rgb(var(--shade) / 0.5);
  rotate: -1.5deg;
}
.home-order-fronts > img.landscape, .home-order-blank.landscape { left: 1.75em; top: 4em; width: 8.5em; }
.home-order-fronts > img:nth-child(1):not(:nth-last-child(2)) { left: 0.375em; top: 1.875em; rotate: -9deg; box-shadow: 0 1px 3px rgb(var(--shade) / 0.25); }
.home-order-fronts > img:nth-child(2):not(:nth-last-child(2)) { left: 5.75em; top: 0.875em; rotate: 8deg; box-shadow: 0 1px 3px rgb(var(--shade) / 0.25); }
.home-order-fronts > img:nth-child(1):nth-last-child(3) { left: 1.5em; top: 1.25em; rotate: -6deg; }
.home-order-blank { aspect-ratio: 5 / 7; border: 1px dashed var(--rule); background: none; box-shadow: none; }
.home-order-blank.landscape { aspect-ratio: 7 / 5; }

/* How many cards the account has saved: a quiet strip across the
   sheet's foot, edge to edge and down to its rounded corners, out of
   the sheet's padding (app.css), the latest fronts small and askew. */
.home-saved {
  --pad: clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 3rem calc(-1 * var(--pad)) -3rem;
  padding: 0.75rem var(--pad);
  border-top: 1px solid var(--rule);
  border-radius: 0 0 6px 6px;
  background: color-mix(in srgb, var(--sheet), var(--on) 4%);
  font-size: 0.9375rem;
}
[rst-page] a.home-saved { color: var(--on-soft); text-decoration: none; }
[rst-page] a.home-saved:hover { background: color-mix(in srgb, var(--sheet), var(--on) 8%); color: var(--on); }
.home-saved:focus-visible { outline-offset: -3px; }
.home-saved-fronts { display: flex; flex: none; }
.home-saved-fronts img { height: 2rem; width: auto; box-shadow: 0 1px 3px rgb(var(--shade) / 0.3); }
.home-saved-fronts img + img { margin-left: -0.6rem; }
.home-saved-fronts img:nth-child(2) { rotate: 4deg; }
.home-saved-fronts img:nth-child(3) { rotate: -3deg; }
.home-saved-go { margin-left: auto; color: var(--on); font-weight: 650; white-space: nowrap; }
.home-kept .home-links { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

@media (max-width: 48rem) {
  .home-hero { grid-template-columns: 1fr; grid-template-areas: "title" "card" "text"; }
  .home-sample { max-width: 28rem; }
}
