/* Family Rememories home page. The top of the page is a sheet of a child's ruled writing paper,
   because the name is a child's word. Family archives carry their own look. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Fraunces-var-latin.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/Caveat-var-latin.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/Alegreya-normal-400-800.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400 800; font-display: swap; src: url(fonts/Alegreya-italic-400-800.woff2) format("woff2"); }
:root { --ink: #1e2a44; --pencil: #d63a2f; --rule: #a8cbf0; --rule-soft: #d7e6f7; --margin: #f3a6a6; --paper: #fdfdfa; --desk: #eef3f9; --quiet: #55617a;
  --row: 4.5rem; /* one writing line: top rule, dashed middle, baseline */
  --display: "Fraunces", Georgia, serif; --hand: "Caveat", "Bradley Hand", cursive; --text: "Alegreya", "Iowan Old Style", Georgia, serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 1.2rem/1.6 var(--text); }
.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.4rem 0 5.2rem; }
a { color: var(--ink); text-underline-offset: .15em; }
a:focus-visible { outline: 3px solid var(--pencil); outline-offset: 3px; border-radius: 4px; }

.sheet { background-color: var(--paper); border-bottom: 1px solid var(--rule); padding: var(--row) 0 calc(var(--row) * 1);
  background-image: linear-gradient(90deg, transparent 3.6rem, var(--margin) 3.6rem, var(--margin) calc(3.6rem + 2px), transparent calc(3.6rem + 2px)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='72'%3E%3Cpath d='M0 1h24M0 71h24' stroke='%23a8cbf0' stroke-width='2'/%3E%3Cpath d='M0 36h24' stroke='%23d7e6f7' stroke-width='2' stroke-dasharray='12 12'/%3E%3C/svg%3E");
  background-size: auto, 1.5rem var(--row); background-repeat: no-repeat, repeat; }
.sheet h1 { margin: 0; height: var(--row); display: flex; align-items: flex-end; }
.sheet h1 img { height: calc(var(--row) * 1.33); width: auto; max-width: none; margin-bottom: calc(var(--row) * -.345); }
.say { font: 480 2.05rem/var(--row) var(--display); font-variation-settings: "opsz" 60, "SOFT" 100; margin: 0; height: calc(var(--row) * 2); max-width: none;
  display: flex; flex-direction: column; justify-content: flex-end; line-height: calc(var(--row) / 1); }
.say span { display: block; line-height: var(--row); transform: translateY(1.28rem); white-space: nowrap; }
.note { font: 600 1.75rem/1 var(--hand); color: var(--pencil); margin: 0; height: var(--row); display: flex; align-items: flex-end; transform: translateY(.78rem) rotate(-1.2deg); transform-origin: left bottom; }

main { padding: 3rem 0 2rem; }
h2 { font: 600 1.75rem/1.2 var(--display); font-variation-settings: "opsz" 48, "SOFT" 100; margin: 0 0 1.1rem; }
.families { list-style: none; margin: 0 0 3.2rem; padding: 0; display: grid; gap: 1rem; }
.families a { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1.1rem; align-items: center; padding: 1.15rem 1.3rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  text-decoration: none; color: inherit; box-shadow: 5px 5px 0 var(--rule); transition: transform .12s, box-shadow .12s; }
.families a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--pencil); }
.families .emblem { grid-row: 1 / span 3; width: 3.6rem; height: 3.6rem; border-radius: 10px; overflow: hidden; display: block; }
.families .emblem svg { width: 100%; height: 100%; display: block; }
.families strong { font: 600 1.5rem/1.15 var(--display); font-variation-settings: "opsz" 48, "SOFT" 100; }
.families span.blurb { grid-column: 2; line-height: 1.4; }
.families span.lock { grid-column: 2; font-size: .98rem; color: var(--quiet); }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem 2.4rem; margin: 0 0 2rem; padding: 0; }
.notes div { border-top: 2px solid var(--rule); padding-top: .8rem; }
.notes h3 { font: 600 1.2rem/1.25 var(--display); font-variation-settings: "SOFT" 100; margin: 0 0 .35rem; }
.notes p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
footer { border-top: 1px solid var(--rule); padding: 1.5rem 0 3rem; font-size: 1rem; color: var(--quiet); }
footer .wrap { display: flex; align-items: center; gap: .7rem; }
footer svg { width: 1.6rem; height: 1.6rem; flex: none; }
.lost { padding: 4rem 0; }
.lost img { height: 3.4rem; width: auto; }
@media (max-width: 46rem) {
  :root { --row: 3.4rem; } body { font-size: 1.1rem; }
  .wrap { padding-left: 3.4rem; padding-right: 1rem; }
  .sheet { background-image: linear-gradient(90deg, transparent 2.3rem, var(--margin) 2.3rem, var(--margin) calc(2.3rem + 2px), transparent calc(2.3rem + 2px)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='72'%3E%3Cpath d='M0 1h24M0 71h24' stroke='%23a8cbf0' stroke-width='2'/%3E%3Cpath d='M0 36h24' stroke='%23d7e6f7' stroke-width='2' stroke-dasharray='12 12'/%3E%3C/svg%3E"); }
  .sheet h1 img { height: calc(var(--row) * .92); margin-bottom: calc(var(--row) * -.235); }
  .say { font-size: 1.3rem; height: calc(var(--row) * 3); } .say span { transform: translateY(.98rem); white-space: normal; display: inline; } .say { display: block; padding-top: 0; }
  .note { font-size: 1.3rem; height: calc(var(--row) * 2); line-height: var(--row); display: block; transform: translateY(.9rem) rotate(-1deg); }
  main .wrap, footer .wrap { padding-left: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .families a { transition: none; } }
