/* web2epub — shared styles */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f3;
  --text: #1c1b1a;
  --text-muted: #5c5a57;
  --border: #e4e1dc;
  --accent: #a8402c;
  --accent-hover: #8a341f;
  --accent-bg: #fdf1ee;
  --code-bg: #f0efec;
  --max-width: 880px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171615;
    --bg-alt: #1e1d1b;
    --text: #ece9e4;
    --text-muted: #a9a59e;
    --border: #322f2b;
    --accent: #e2775f;
    --accent-hover: #ec8b74;
    --accent-bg: #2a1d19;
    --code-bg: #232120;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

header.site-header {
  border-bottom: 1px solid var(--border);
}

header.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

nav.site-nav {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

nav.site-nav a {
  color: var(--text-muted);
}

nav.site-nav a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* Format chips under hero */

.formats {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero-image {
  margin: 48px auto 0;
  max-width: 320px;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}

.chip {
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
}

/* Sections */

section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

section .section-intro {
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 620px;
}

/* Feature grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.feature h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.96rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* How it works */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FAQ */

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

/* CTA band */

.cta-band {
  text-align: center;
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 48px 32px;
  border: 1px solid var(--border);
}

.cta-band h2 {
  margin-top: 0;
}

/* Policy page */

.policy header.page-head {
  padding: 48px 0 8px;
}

.policy h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0;
}

.policy-body {
  padding: 32px 0 72px;
}

.policy-body h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
}

.policy-body h2:first-child {
  margin-top: 0;
}

.policy-body p,
.policy-body li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.policy-body ul {
  padding-left: 22px;
}

.policy-body a {
  color: var(--accent);
}

/* Footer */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 24px;
}

footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer.site-footer nav {
  display: flex;
  gap: 18px;
  font-size: 0.88rem;
}

footer.site-footer nav a {
  color: var(--text-muted);
}

footer.site-footer nav a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero p.lede {
    font-size: 1.05rem;
  }
  nav.site-nav {
    gap: 14px;
  }
}
