/* Bookmuse — bookmuse.wanngo.com */

:root {
  color-scheme: light;

  --bg: #fbf8f3;
  --paper: #f5f1e8;
  --card: #ffffff;
  --ink: #1d1a16;
  --ink-2: #5b544c;
  --ink-3: #8b8379;
  --line: rgba(29, 26, 22, 0.09);
  --accent: #a84c15;
  --accent-hover: #933f0c;
  --accent-soft: #fbe9db;
  --peach: #ffb98a;
  --sun: #ffd166;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --radius: 22px;
  --shadow-card: 0 1px 2px rgba(29, 26, 22, 0.04), 0 8px 28px rgba(29, 26, 22, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 28px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Navigation (glass bar) ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 22.5%; }

.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links a:not(.btn) { color: var(--ink-2); font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links { gap: 10px; }
}
/* Brand, Sign in and Download share one row down to 360 px (Spanish has the longest labels). */
@media (max-width: 420px) {
  .nav .wrap { gap: 8px; }
  .nav-links { gap: 6px; }
  .nav-links .btn-sm { padding: 0 10px; font-size: 13px; }
}
@media (max-width: 380px) {
  .nav .brand { gap: 8px; font-size: 16px; }
  .nav .brand img { width: 28px; height: 28px; }
}

/* ---------- Language switcher (header and footer): English · Tiếng Việt · Español ---------- */

.lang { display: flex; align-items: center; flex: none; white-space: nowrap; font-size: 14px; }
.lang a { position: relative; padding: 6px 0; color: var(--ink-3); }
.lang a + a { margin-left: 20px; }
.lang a + a::before {
  content: "·";
  content: "·" / "";
  position: absolute;
  left: -12px;
  width: 4px;
  text-align: center;
  color: var(--ink-3);
  opacity: 0.7;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { color: var(--ink); font-weight: 600; pointer-events: none; cursor: default; }

.nav .lang { margin-left: 28px; }
.nav .brand + .lang { margin-left: auto; }

/* Narrow screens: the switcher drops under the brand row as a slim centred strip. */
@media (max-width: 900px) {
  .nav .wrap { height: auto; flex-wrap: wrap; row-gap: 0; }
  .nav .brand, .nav .nav-links { min-height: 56px; }
  .nav .lang, .nav .brand + .lang { order: 3; flex: 1 0 100%; margin: 0; justify-content: center; padding-bottom: 4px; }
  .nav .lang a { padding: 4px 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  letter-spacing: -0.005em;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(168, 76, 21, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p, li { text-wrap: pretty; }

.title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 20px 0 0;
}

/* ---------- Call to action row ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin: 48px auto 0; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 9v10M9 14h10' stroke='%235b544c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); font-size: 16px; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer ol, .faq .answer ul { margin: 0 0 10px; padding-left: 22px; }

/* ---------- Final CTA ---------- */

.final {
  text-align: center;
  padding: 120px 0 40px;
}
.final .app-icon {
  width: 96px; height: 96px;
  margin: 0 auto 28px;
  border-radius: 22.5%;
  box-shadow: 0 12px 32px rgba(168, 76, 21, 0.22);
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--ink-3);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer .brand { font-size: 15px; }
.footer .brand img { width: 24px; height: 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { color: var(--ink-2); }
.footer nav a:hover { color: var(--ink); }
.footer .lang { gap: 0; }
.footer .lang a { color: var(--ink-3); }
.footer .lang a:hover { color: var(--ink); }
.footer .lang a[aria-current="page"] { color: var(--ink); }

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

.doc { max-width: 720px; margin: 0 auto; padding: 72px var(--gutter) 0; }
.doc h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
.doc .meta { margin: 14px 0 0; color: var(--ink-3); font-size: 15px; }
.doc .summary {
  margin: 36px 0 8px;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--paper);
  font-size: 17px;
  color: var(--ink);
}
.doc h2 { font-size: 22px; letter-spacing: -0.01em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--ink); font-weight: 600; }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
  padding: 26px 26px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.contact-card h2 { margin: 0 0 4px; font-size: 20px; }
.contact-card p { margin: 0; font-size: 15px; }

.doc .faq { margin-top: 8px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
