/* Soliloquy site. Colors come from the app: the icon's mocha gradient and cream word,
   iconBrown (BookRead/ReaderView.swift), and the Sepia theme (BookRead/ReaderSettings.swift).
   Type is the system serif, New York on Apple devices, like the reader's default font. */

:root {
  --paper: #f6f1e9;
  --card: #fffdf9;
  --ink: #2b1e16;
  --ink-soft: #4a3a2f;
  --muted: #7d6c60;
  --line: #e6ddd1;
  --mocha: #563724;
  --copper: #d4996e;
  --link: #8a5a3b;

  /* the icon */
  --night-top: #714a33;
  --night-bottom: #3b271b;
  --cream: #f3ebdd;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --r-card: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161210;
    --card: #201a16;
    --ink: #f3ebdd;
    --ink-soft: #d8ccbd;
    --muted: #a3958a;
    --line: #342b24;
    --mocha: #d4996e;
    --link: #d4996e;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

/* nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 16px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; }
.brand img { border-radius: 8px; }

.nav-links { display: flex; align-items: center; gap: 20px; font-size: 15px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--mocha);
  color: var(--paper) !important;
}

@media (max-width: 560px) {
  .nav-links .wide { display: none; }
}

/* hero: the icon, running */

.hero {
  background: linear-gradient(var(--night-top), var(--night-bottom));
  color: var(--cream);
  padding: 72px 0 56px;
  text-align: center;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 160px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.reel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font: 500 clamp(52px, 11vw, 96px) / 1 var(--serif);
}

.word { position: relative; display: inline-block; }

/* The app's default "Edges" look: the words around show only a letter or two, at 40%,
   fading out over 44pt from the word at a 40pt size (BookRead/ReaderView.swift, side()). */
.side {
  position: absolute;
  top: 0;
  opacity: 0.4;
}

.side.before {
  right: 100%;
  padding-right: 0.35em;
  -webkit-mask-image: linear-gradient(to left, #000 0.35em, transparent 1.45em);
  mask-image: linear-gradient(to left, #000 0.35em, transparent 1.45em);
}

.side.after {
  left: 100%;
  padding-left: 0.35em;
  -webkit-mask-image: linear-gradient(to right, #000 0.35em, transparent 1.45em);
  mask-image: linear-gradient(to right, #000 0.35em, transparent 1.45em);
}

.hint {
  margin: 18px 0 0;
  font-size: 14px;
  color: rgba(243, 235, 221, 0.6);
  min-height: 1.5em;
}

.speed {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
  color: rgba(243, 235, 221, 0.75);
}

.speed output { min-width: 64px; text-align: left; font-variant-numeric: tabular-nums; }

.speed input { width: 160px; accent-color: var(--copper); }

.hero-copy { max-width: 640px; margin: 48px auto 0; padding: 0 16px; }

.hero-copy h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.1; }

.hero-copy p { margin: 14px 0 0; font-size: 19px; color: rgba(243, 235, 221, 0.8); }

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--night-bottom);
  font-weight: 600;
}

.store small { font-weight: 400; font-size: 13px; opacity: 0.7; }

/* sections */

.section { max-width: 1040px; margin: 0 auto; padding: 72px 16px 0; }

.label {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section > h2 { font-size: clamp(28px, 4.5vw, 38px); line-height: 1.15; max-width: 640px; }

.section > .lede { margin: 12px 0 0; max-width: 620px; color: var(--ink-soft); font-size: 19px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-top: 32px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px;
}

.card h3 { font-size: 22px; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.pace {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 20px;
}

.pace span { color: var(--muted); font-family: var(--sans); font-size: 14px; margin-left: 4px; }

.price {
  margin-top: 32px;
  padding: 32px 24px;
  border-radius: var(--r-card);
  background: linear-gradient(var(--night-top), var(--night-bottom));
  color: var(--cream);
  text-align: center;
}

.price h2 { font-size: clamp(28px, 4.5vw, 38px); }
.price p { margin: 10px auto 0; max-width: 520px; color: rgba(243, 235, 221, 0.8); }

/* prose pages */

.prose { max-width: 680px; margin: 0 auto; padding: 48px 16px 0; }
.prose h1 { font-size: clamp(34px, 6vw, 46px); line-height: 1.1; }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose p { margin: 12px 0 0; color: var(--ink-soft); }
.prose .lede { font-size: 20px; color: var(--ink); margin-top: 16px; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: var(--copper); text-underline-offset: 3px; }

/* footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1040px;
  margin: 80px auto 0;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.foot a:hover { color: var(--ink); }
