/* Wondrous: getwondrous.com
   One stylesheet. No scripts, no web fonts: the type is whatever serif the reader's
   own device carries (New York on an iPhone, which is the app's own face). */

:root {
  color-scheme: dark;
  --ground: #090b11;
  --ink: #ebe7dc;
  --soft: #aba9a0;
  --faint: #8c8a81;
  --moon: #f5f0dd;
  --rule: rgba(245, 240, 221, 0.14);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70rem 34rem at 50% -14rem, rgba(52, 72, 116, 0.42), rgba(52, 72, 116, 0) 70%) no-repeat,
    var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(245, 240, 221, 0.24);
}

a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(245, 240, 221, 0.42);
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 3px;
  border-radius: 2px;
}

img {
  max-width: 100%;
}

figure {
  margin: 0;
}

/* Small capitals with wide tracking: the app's label voice. */
.eyebrow {
  font: 600 0.72rem/1.5 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft);
}

/* The name, set as the app sets it. */
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--moon);
}

/* ---------- Home ---------- */

.hero {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 11vw, 6.5rem) var(--gutter) 0;
  text-align: center;
}

.app-icon {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto;
  border-radius: 22.5%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 1.4rem 2.6rem -0.9rem rgba(0, 0, 0, 0.9);
}

.hero h1 {
  margin: 1.5rem 0 0;
  font-size: clamp(3.5rem, 16vw, 6rem);
  line-height: 1;
}

.hero .line {
  margin: 1.1rem 0 0;
  font-size: clamp(1.3rem, 5.4vw, 1.75rem);
  line-height: 1.3;
  color: var(--moon);
  text-wrap: balance;
}

.hero .lede {
  max-width: 33rem;
  margin: 1.6rem auto 0;
  text-wrap: pretty;
}

.coming {
  margin: 2.3rem 0 0;
}

.pill {
  display: inline-block;
  padding: 0.95em 1.7em 0.9em;
  border: 1px solid rgba(245, 240, 221, 0.32);
  border-radius: 999px;
  background: rgba(245, 240, 221, 0.05);
  color: var(--moon);
  font: 600 0.74rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.coming small {
  display: block;
  margin-top: 0.95rem;
  color: var(--soft);
  font: 400 0.84rem/1.4 var(--sans);
  letter-spacing: 0.02em;
}

/* A screenshot, cornered as the phone's own screen is. */
.screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12.5% / 5.75%;
  background: #12151d;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09),
    0 2rem 3.5rem -1.5rem rgba(0, 0, 0, 0.9);
}

/* Four pieces: a row to swipe through on a phone, four across on a wide screen. */
.strip {
  display: flex;
  gap: 1rem;
  margin: clamp(3rem, 9vw, 4.75rem) 0 0;
  padding: 0 var(--gutter) 2rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.strip::-webkit-scrollbar {
  display: none;
}

.strip li {
  flex: 0 0 min(64vw, 17rem);
  scroll-snap-align: center;
}

.strip figcaption {
  margin-top: 1rem;
  text-align: center;
}

@media (min-width: 62rem) {
  .strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
    width: 100%;
    max-width: 68rem;
    margin-inline: auto;
    overflow: visible;
  }
}

/* The library and the widget, side by side. */
.more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 2.5rem);
  width: 100%;
  max-width: 37rem;
  margin: clamp(2rem, 7vw, 4rem) auto 0;
  padding: 0 var(--gutter);
}

.more figcaption {
  margin-top: 1rem;
  color: var(--soft);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

/* ---------- The pages of words ---------- */

.top {
  padding: 1.75rem var(--gutter) 0;
  text-align: center;
}

.top a {
  font-size: 1.7rem;
  line-height: 1;
  text-decoration: none;
}

.prose {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--gutter) 0;
}

.prose h1 {
  margin: 0;
  color: var(--moon);
  font-size: clamp(2.3rem, 9vw, 3.1rem);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

.prose .dated {
  margin: 1rem 0 0;
}

.prose .intro {
  margin-top: 2rem;
  font-size: 1.14em;
  line-height: 1.55;
}

.prose h2 {
  margin: 2.6rem 0 0;
  padding-top: 1.7rem;
  border-top: 1px solid var(--rule);
  color: var(--moon);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0.9rem 0 0;
}

.prose p,
.prose li {
  text-wrap: pretty;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: 0.45rem;
}

.prose li::marker {
  color: var(--soft);
}

.prose strong {
  color: var(--moon);
  font-weight: 600;
}

/* Words the app itself shows: a button, a menu, a switch. */
.prose b {
  color: var(--moon);
  font-weight: 400;
  font-style: italic;
}

.prose .address {
  font-size: 1.25em;
}

/* ---------- Not found ---------- */

.lost {
  margin: auto;
  padding: 4rem var(--gutter) 0;
  text-align: center;
}

.lost h1 {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--moon);
}

.lost p {
  margin: 1rem 0 0;
  color: var(--soft);
}

/* ---------- Foot ---------- */

.foot {
  margin-top: auto;
  padding: clamp(3.5rem, 10vw, 6rem) var(--gutter) 2.5rem;
  color: var(--faint);
  font: 400 0.82rem/1.6 var(--sans);
  text-align: center;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.9rem;
  margin-bottom: 1.1rem;
}

.foot nav a {
  padding: 0.7rem 0;
  color: var(--soft);
  font: 600 0.72rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.foot nav a:hover,
.foot nav a[aria-current] {
  color: var(--moon);
}

.foot p {
  margin: 0.15rem 0 0;
}

/* ---------- On paper ---------- */

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  a,
  .wordmark,
  .prose h1,
  .prose h2,
  .prose strong,
  .prose b {
    color: #000;
  }

  .eyebrow {
    color: #444;
  }

  .prose h2 {
    border-top-color: #bbb;
  }

  .foot nav {
    display: none;
  }
}
