/* BookFluent — lightweight site styles */

:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --ink: #253d34;
  --muted: #57665c;
  --accent: #30624d;
  --accent-hover: #224b39;
  --rule: #d9ded4;
  --panel: #e8eee4;
  --warm: #f2ead9;
  --warm-border: #b99c6c;
  --radius: 8px;
  --focus: #b36f36;
}

/* ── Reset ── */

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Links & focus ── */

a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); }
a:focus-visible,
summary:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

/* ── Skip link (accessibility) ── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* ── Layout ── */

header, footer, main {
  max-width: 1120px;
  margin: auto;
  padding: 28px 36px;
}

/* ── Header ── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 26px Georgia, serif;
  letter-spacing: -.8px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  display: block;
  width: 36px;
  height: auto;
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
}

nav a {
  text-decoration: none;
  transition: color .15s;
}

nav a[aria-current="page"] {
  text-decoration: underline;
  font-weight: 600;
}

/* ── Notice banner ── */

.notice {
  background: #ede4d2;
  color: #59472c;
  text-align: center;
  font-size: 13px;
  padding: 10px 24px;
}
.notice a { color: inherit; }

/* ── Typography ── */

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--muted);
}

h1, h2, h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1px;
}

h1 { font-size: clamp(40px, 6vw, 72px); max-width: 720px; margin: 22px 0; }
h2 { font-size: 32px; margin: 44px 0 18px; }
h3 { font-size: 23px; margin: 28px 0 10px; }

.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 650px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

/* ── Hero ── */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 58px 0 82px;
}

.hero h1 {
  font-size: clamp(42px, 5vw, 66px);
}

.button {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  margin-top: 18px;
  transition: background .15s;
}
.button:hover {
  background: var(--accent-hover);
  color: white;
}

/* ── Reading sample card ── */

.sample {
  background: #fffdf7;
  box-shadow: 0 12px 42px #24382b12;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}

.sample::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: -6px;
  background: var(--panel);
  border-radius: var(--radius);
  z-index: -1;
  opacity: .55;
}

.sample .reading {
  font: 25px/1.8 Georgia, serif;
}

.sample mark {
  color: inherit;
  background: #dbe9d8;
  border-radius: 3px;
  padding: 3px 1px;
}

.sample .translation {
  border-top: 1px solid var(--rule);
  margin-top: 30px;
  padding-top: 18px;
  font-size: 14px;
}

.sample .translation strong {
  font: 24px Georgia, serif;
}

/* ── Steps ── */

.steps {
  border-top: 1px solid var(--rule);
  padding: 12px 0 48px;
}

.step {
  display: grid;
  grid-template-columns: 64px 220px 1fr;
  gap: 24px;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}

.step h3 { margin: 0; }
.step p  { margin: 0; color: var(--muted); }

.number {
  font: 24px Georgia, serif;
  color: var(--muted);
}

/* ── Highlight / note panels ── */

.note {
  padding: 28px;
  background: var(--panel);
  border-radius: var(--radius);
  margin: 28px 0;
}

.note h2, .note h3 { margin-top: 0; }

/* ── Privacy features strip ── */

.features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0 12px;
}

.feature-card {
  background: #fffdf7;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-card .icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--accent);
  background: #d6e5d6;
  border-radius: 50%;
}

.feature-card .icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.feature-card h3 {
  font-size: 19px;
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ── Document pages (privacy, support) ── */

.document {
  max-width: 780px;
  padding-top: 32px;
  padding-bottom: 70px;
}

.document h1 { font-size: 52px; }
.document h2 { scroll-margin-top: 24px; }
.document p, .document li { max-width: 720px; }

/* ── Table of contents ── */

.toc {
  border-left: 2px solid var(--accent);
  padding-left: 22px;
  margin: 32px 0;
}

.toc a {
  display: block;
  margin: 5px 0;
}

/* ── Contact info card ── */

.contact-info {
  border: 1px solid var(--warm-border);
  background: var(--warm);
  padding: 22px;
  border-radius: var(--radius);
}

.contact-info strong { display: block; }

/* ── FAQ details ── */

details {
  border-bottom: 1px solid var(--rule);
  padding: 21px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding-right: 15px;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

summary::before {
  content: "+";
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  transition: transform .2s;
}

details[open] > summary::before {
  content: "−";
}

summary::-webkit-details-marker { display: none; }

details p {
  padding-left: 32px;
  color: var(--muted);
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

footer p { margin: 0; }

.footer-logo {
  display: inline-block;
  width: 28px;
  height: auto;
  margin-right: 8px;
  vertical-align: middle;
}

footer div {
  display: flex;
  gap: 20px;
}

/* ── 404 page ── */

.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found h1 {
  margin-left: auto;
  margin-right: auto;
}

.not-found p {
  font-size: 18px;
  color: var(--muted);
}

/* ── Responsive ── */

@media (max-width: 760px) {
  header, main, footer { padding: 24px; }

  header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  nav { gap: 20px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 28px 0 50px;
  }

  .sample {
    max-width: 460px;
    padding: 25px;
  }

  .sample::before { display: none; }

  .step {
    grid-template-columns: 35px 1fr;
    gap: 12px;
  }

  .step p { grid-column: 2; }

  .features-strip {
    grid-template-columns: 1fr;
  }

  .document h1 { font-size: 40px; }

  footer { flex-direction: column; }

  .lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    scroll-behavior: auto;
  }
}

/* Each language link keeps the reader on the same page. */
.language-picker { position: relative; padding: 0; border: 0; }
.language-picker summary { padding: 8px 0; font-size: 15px; }
.language-picker summary::before { content: "▾"; width: auto; font-size: 14px; }
.language-picker[open] summary::before { content: "▴"; }
.language-picker nav, .landing .language-picker nav {
  position: absolute; z-index: 3; top: 100%; inset-inline-end: 0;
  display: grid; width: max-content; gap: 0; background: var(--paper);
  border: 1px solid var(--rule); padding: 4px 12px;
}
.language-picker nav a, .landing .language-picker nav a { padding: 8px 4px; }
.language-picker [aria-current="page"] { font-weight: 700; }
.document .byline { color: var(--muted); font-size: .9em; }
@media (max-width: 700px) {
  header:not(.landing-header) .language-picker nav { inset-inline: 0 auto; }
}

.epub-walkthrough {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 16px;
  margin: 24px 0;
}
.epub-walkthrough figure { margin: 0 auto; width: min(100%, 310px); }
.epub-walkthrough img { display: block; width: 100%; height: auto; }
.epub-walkthrough figcaption { margin-top: 8px; font-size: .9em; }
@media (max-width: 600px) {
  .epub-walkthrough { grid-template-columns: minmax(0, 1fr); }
}
