/* The two reading pages: the sky from the front page as a header, then the page drops into the
   cloud, where the words are dark ink on cloud white. */
:root {
  --ivory: #fffaf0; --ink: #1f3157; --ink-soft: #4b5b80; --cloud: #f7f6fc; --line: #d9dcec; --sun: #b9791f;
  --serif: "Sorts Mill Goudy", "Goudy Old Style", "Iowan Old Style", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--serif); color: var(--ink); background: var(--cloud); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sky-head {
  position: relative; height: clamp(300px, 46svh, 520px); overflow: hidden; color: var(--ivory); text-align: center;
  background: linear-gradient(to top, #f4f1ee 0%, #ffd9a8 28%, #8fb2e6 55%, #2b5fb8 100%);
  display: flex; flex-direction: column; align-items: center; padding: clamp(16px, 3svh, 36px) 24px 0;
}
.sky-head canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(to top, var(--cloud) 6%, rgba(247, 246, 252, 0)); pointer-events: none; }
.sky-head > * { position: relative; }
.sky-head .home img { height: clamp(40px, 6.4svh, 76px); width: auto; max-width: 80vw; display: block; filter: drop-shadow(0 1px 14px rgba(16, 34, 78, 0.45)); }
.sky-head h1 { margin: clamp(18px, 4.5svh, 54px) 0 0; font-weight: 400; font-size: clamp(2.1rem, 1.3rem + 3.2vw, 4.2rem); line-height: 1.1; max-width: 18ch; text-wrap: balance; text-shadow: 0 2px 30px rgba(16, 34, 78, 0.45); }
main { max-width: 44rem; margin: 0 auto; padding: 8px 24px 40px; font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.3rem); line-height: 1.62; }
main p { margin: 0 0 1.05em; }
main .sub { font-style: italic; color: var(--ink-soft); text-align: center; margin: 0 0 2em; }

.index { list-style: none; margin: 0 0 56px; padding: 0; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.index a { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 14px 4px; text-decoration: none; }
.index a:hover .t { text-decoration: underline; text-underline-offset: 0.18em; }
.index .w { font-style: italic; color: var(--ink-soft); white-space: nowrap; font-size: 0.92em; }

.story { padding: 8px 0 56px; scroll-margin-top: 24px; }
.story + .story { border-top: 1px solid var(--line); padding-top: 56px; }
.story h2 { margin: 0; font-weight: 400; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.story .meta { margin: 0.45em 0 1.5em; font-style: italic; color: var(--ink-soft); }
.story .top { font-size: 0.92em; font-style: italic; color: var(--ink-soft); }

form { display: grid; gap: 26px; margin-top: 8px; }
label { display: grid; gap: 7px; }
label .q { font-size: 1.05em; }
label .hint { font-style: italic; color: var(--ink-soft); font-size: 0.9em; }
input[type="text"], input[type="email"], textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9bfd8; border-radius: 6px; padding: 12px 14px; width: 100%;
}
input:hover, textarea:hover { border-color: var(--ink-soft); }
textarea { min-height: 16em; resize: vertical; line-height: 1.5; }
input[type="file"] { font: inherit; font-size: 0.92em; color: var(--ink-soft); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send {
  justify-self: start; font: inherit; font-size: 1.1em; color: var(--ivory); background: var(--ink); border: 0; border-radius: 999px;
  padding: 14px 30px 15px; cursor: pointer; transition: background 200ms;
}
.send:hover { background: #2b4379; }
.send[disabled] { opacity: 0.6; cursor: default; }
.note { font-style: italic; color: var(--ink-soft); font-size: 0.95em; }
.problem { margin: 0; padding: 12px 16px; border-radius: 6px; background: #fbeeee; color: #7a1f1f; border: 1px solid #e9c8c8; }
.sent { padding: 8px 0 24px; }
.sent h2 { margin: 0 0 0.4em; font-weight: 400; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }

footer.ways { max-width: 44rem; margin: 0 auto; padding: 26px 24px 56px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 34px; font-style: italic; font-size: 1.08rem; }
footer.ways a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

@media (max-width: 560px) { .index a { flex-direction: column; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
