/* Bookhand — shared page styles. Paper-and-ink, dark-adaptive. */

:root {
  --paper: #faf7f0;
  --ink: #2b2620;
  --ink-soft: #5c554a;
  --rule: #d8d1c2;
  --accent: #3b3f6e;
  --board: #262a49;
  --foil: #c9b47e;
  --board-shade: rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191817;
    --ink: #d9d2c4;
    --ink-soft: #9a9284;
    --rule: #3a3733;
    --accent: #9ba0d6;
    --board: #232746;
    --foil: #c9b47e;
    --board-shade: rgba(0, 0, 0, 0.5);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* --- Type --- */

h1, h2, h3 {
  font-family: "DM Serif Text", Georgia, serif;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 2.5rem 0 1rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* --- Header / wordmark --- */

.masthead {
  text-align: center;
  margin-bottom: 1rem;
}

.wordmark {
  font-family: "Uncial Antiqua", "DM Serif Text", serif;
  font-size: 3rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.wordmark a {
  color: inherit;
  text-decoration: none;
}

.tagline {
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.25rem;
  font-size: 1.25rem;
}

/* --- Ornaments --- */

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem auto;
  width: 60%;
}

.fleuron {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  letter-spacing: 0.6em;
  margin: 2.5rem 0;
}

/* --- Hero: prose beside a book cover --- */

.hero {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin: 2.5rem 0;
}

.hero-text {
  flex: 1;
}

@media (max-width: 38rem) {
  .hero {
    flex-direction: column;
  }
}

/* A little rendering of the Welcome book's cover, drawn in CSS. */

.book {
  flex-shrink: 0;
  width: 12rem;
  aspect-ratio: 148 / 210;
  background: var(--board);
  background-image: linear-gradient(
    to right,
    var(--board-shade) 0,
    rgba(0, 0, 0, 0) 7%
  );
  border-radius: 2px 8px 8px 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: var(--foil);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 1.6rem 1.1rem;
  position: relative;
}

.book::after {
  /* double frame */
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 1px solid var(--foil);
  outline: 1px solid var(--foil);
  outline-offset: 3px;
  border-radius: 1px;
  opacity: 0.55;
  pointer-events: none;
}

.book .cover-top,
.book .cover-bottom {
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.book .cover-title {
  font-family: "DM Serif Text", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.3;
}

.book .cover-rule {
  width: 2.2rem;
  border-top: 1px solid var(--foil);
  margin: 0.5rem auto 0;
  opacity: 0.7;
}

/* --- App Store button (disabled for now) --- */

.store {
  text-align: center;
  margin: 3rem 0 1rem;
}

.store-button {
  display: inline-block;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  opacity: 0.6;
  cursor: default;
  user-select: none;
}

.store-note {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* When the app ships: turn the div into an <a class="store-button live"> */
a.store-button.live {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
  cursor: pointer;
  text-decoration: none;
}

/* --- Screenshots --- */

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  margin: 3rem 0 1rem;
}

.shots figure {
  margin: 0;
  text-align: center;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.shots figcaption {
  margin-top: 0.6rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (max-width: 38rem) {
  .shots {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
}

/* --- Footer --- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
}
