/* Pagina site — paper/ink palette, exact values from the app's Theme.swift */
:root {
  --paper: #FAF5E8;
  --ink: #26241F;
  --ink-soft: rgba(38, 36, 31, 0.62);
  --rule: rgba(38, 36, 31, 0.18);
  --card: #FFFDF6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1C1C1A;
    --ink: #F2EDE0;
    --ink-soft: rgba(242, 237, 224, 0.62);
    --rule: rgba(242, 237, 224, 0.2);
    --card: #24241F;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Charter, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
header {
  border-bottom: 1px solid var(--rule);
}
header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
nav a:hover { color: var(--ink); text-decoration: underline; }

/* Content */
main { padding: 2.75rem 0 3.5rem; }

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: balance;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.4rem 0 0.7rem;
}
h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.35rem;
}
p { margin-bottom: 1rem; }
p.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
ul { margin: 0 0 1rem 1.3rem; }
li { margin-bottom: 0.45rem; }
a { color: var(--ink); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* Rectangular buttons, deliberately not pill-shaped */
.button {
  display: inline-block;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 0.55rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}
.button:hover { background: var(--ink); color: var(--paper); }

/* Hero widget mockup */
.widget-demo {
  margin: 2.25rem auto;
  max-width: 21rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 1.15rem 1.25rem 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.widget-demo .book-title {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}
.widget-demo .page-text {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.widget-demo .controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.widget-demo .turn {
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.1rem 0.5rem;
}

.hero { text-align: center; }
.hero .actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Screenshots and video */
.shots {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
}
.shots li { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.shots a { display: block; }
.shots a:hover img { border-color: var(--ink); }

.demo-video {
  display: block;
  width: 100%;
  max-width: 17rem;
  height: auto;
  margin: 1.5rem auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--card);
}

/* Feature list */
.features {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.features li {
  margin: 0 0 1.3rem;
  padding-left: 0;
}
.features strong { display: block; }
.features span { color: var(--ink-soft); }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--ink); }
footer .links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
