/* Bookmuse — bookmuse.wanngo.com home pages (en, vi, es). The privacy, support and 404 pages keep styles.css. */

:root {
  color-scheme: light dark;

  --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-ink: #ffffff;
  --accent-soft: #fbe9db;
  --glass: rgba(255, 255, 255, 0.72);
  --nav: rgba(251, 248, 243, 0.72);
  --glow-1: rgba(255, 209, 102, 0.42);
  --glow-2: rgba(255, 185, 138, 0.32);
  --shadow: rgba(29, 26, 22, 0.28);

  --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 (prefers-color-scheme: dark) {
  :root {
    --bg: #15120e;
    --paper: #1f1b16;
    --card: #221e19;
    --ink: #f3eee6;
    --ink-2: #c2b9ad;
    --ink-3: #8f867b;
    --line: rgba(255, 244, 228, 0.1);
    --accent: #f0915a;
    --accent-hover: #f6a676;
    --accent-ink: #1d1206;
    --accent-soft: rgba(240, 145, 90, 0.16);
    --glass: rgba(40, 35, 29, 0.72);
    --nav: rgba(21, 18, 14, 0.72);
    --glow-1: rgba(255, 170, 80, 0.16);
    --glow-2: rgba(240, 120, 60, 0.12);
    --shadow: rgba(0, 0, 0, 0.6);
    --shadow-card: 0 0 0 1px rgba(255, 244, 228, 0.06), 0 8px 28px rgba(0, 0, 0, 0.3);
  }
}

@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); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 10px; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  -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: 26px; 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: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links { gap: 10px; }
}
@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: 26px; }
@media (max-width: 960px) {
  .nav .wrap { height: auto; flex-wrap: wrap; row-gap: 0; }
  .nav .brand, .nav .nav-links { min-height: 56px; }
  .nav .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; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-glass {
  background: var(--glass); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.btn-glass:hover { background: var(--card); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }

/* Store badges: App Store is live; Google Play shows "coming soon" and is not a link until the app is published. */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; min-width: 196px; padding: 0 20px 0 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); text-align: left;
  transition: transform 0.2s var(--ease);
}
.store:hover { color: var(--bg); }
.store:active { transform: scale(0.97); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11.5px; line-height: 1.1; opacity: 0.8; }
.store b { display: block; font-size: 19px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.store.soon { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; }
.store.soon:active { transform: none; }

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

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p, li { text-wrap: pretty; }
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 7.4vw, 78px); line-height: 1.04; letter-spacing: -0.025em; }
.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; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--accent); margin-bottom: 14px; }

/* ---------- iPhone frame (screenshots stay light inside it) ---------- */

.phone { --pw: 300px; width: var(--pw); flex: none; container-type: inline-size; }
.phone .bezel {
  position: relative; padding: 3cqw; border-radius: 16.4cqw;
  background: linear-gradient(145deg, #3b3a3c, #1a191b 40%, #2a292b);
  box-shadow: inset 0 0 0 0.6cqw #4a494c, inset 0 0 0 1.1cqw #121113, 0 2px 4px rgba(29, 26, 22, 0.1), 0 30px 60px -12px var(--shadow), 0 18px 36px -18px var(--shadow);
}
.phone .bezel::before, .phone .bezel::after { content: ""; position: absolute; width: 0.9cqw; border-radius: 1cqw; background: #2c2b2e; }
.phone .bezel::before { left: -0.6cqw; top: 26%; height: 12%; box-shadow: 0 -9cqw 0 0 #2c2b2e; }
.phone .bezel::after { right: -0.6cqw; top: 30%; height: 18%; }
.phone img { width: 100%; aspect-ratio: 1320 / 2868; border-radius: 13.4cqw; background: #f5f1e8; }

/* Browser frame for the web dashboard */
.browser { width: 100%; border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px var(--shadow); }
.browser .bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser .bar span { margin: 0 auto; padding: 2px 14px; border-radius: 6px; background: var(--card); font-size: 12px; color: var(--ink-3); }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #f5f1e8; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 64px 0 0; text-align: center; overflow: clip visible; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: min(1100px, 160vw); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow-1), var(--glow-2) 45%, transparent 100%);
  pointer-events: none; z-index: -1;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 26px;
}
.pill:hover { color: var(--ink); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.16); }
.hero .display { max-width: 15ch; margin: 0 auto; }
.hero .lede { max-width: 36em; margin-left: auto; margin-right: auto; }
.fine { margin: 16px 0 0; font-size: 14px; color: var(--ink-3); }

.hero-phones {
  --cw: clamp(230px, 32vw, 310px);
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  margin-top: 64px; height: calc(var(--cw) * 1.62); overflow: visible clip;
}
.hero-phones .phone { position: absolute; top: 0; }
.hero-phones .center { --pw: var(--cw); z-index: 2; }
.hero-phones .side { --pw: clamp(200px, 27vw, 268px); top: 48px; }
.hero-phones .left { transform: translateX(-74%) rotate(-5deg); }
.hero-phones .right { transform: translateX(74%) rotate(5deg); }
@media (max-width: 560px) {
  .hero-phones .left { transform: translateX(-60%) rotate(-6deg); }
  .hero-phones .right { transform: translateX(60%) rotate(6deg); }
}
.hero-phones::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%); z-index: 3; pointer-events: none;
}

/* Value strip under the hero */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 8px auto 0; }
.strip div { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-card); font-size: 15px; line-height: 1.35; color: var(--ink-2); text-align: left; }
.strip strong { display: block; color: var(--ink); font-weight: 600; }
.strip svg { width: 28px; height: 28px; flex: none; color: var(--accent); }
@media (max-width: 1000px) { .strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .strip { grid-template-columns: 1fr; } }

/* ---------- Feature rows ---------- */

.section { padding: 120px 0 0; }
@media (max-width: 760px) { .section { padding-top: 88px; } }
.section-head { text-align: center; max-width: 760px; margin: 0 auto; }

.feature { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 72px; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .copy { order: 2; }
.feature .copy { max-width: 470px; }
.feature.flip .copy { justify-self: end; }
.feature .phone { --pw: clamp(240px, 26vw, 290px); }
.feature .phones { display: flex; gap: 22px; align-items: flex-start; }
.feature .phones .phone { --pw: clamp(200px, 21vw, 250px); }
.feature .phones .phone:nth-child(2) { margin-top: 48px; }
.feature.wide { grid-template-columns: 0.8fr 1.2fr; }
.feature.wide .media { position: relative; padding-bottom: 40px; }
.feature.wide .media .phone { --pw: clamp(130px, 13vw, 170px); position: absolute; right: -12px; bottom: 0; }
.feature.wide .media .browser { width: 92%; }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.4l2.6 2.6L14 7.6' fill='none' stroke='%23c4561a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Devices row in "Everywhere" */
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.platforms li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; color: var(--ink); }
.platforms li.soon { color: var(--ink-3); }
.platforms svg { width: 16px; height: 16px; color: var(--accent); }

@media (max-width: 860px) {
  .feature, .feature.flip, .feature.wide { grid-template-columns: 1fr; gap: 40px; text-align: center; justify-items: center; }
  .feature.flip .copy { order: 0; justify-self: center; }
  .checks { text-align: left; max-width: 420px; margin-left: auto; margin-right: auto; }
  .platforms { justify-content: center; }
  .feature.wide .media { width: 100%; max-width: 620px; }
  .feature.wide .media .browser { width: 100%; }
  .feature.wide .media .phone { --pw: clamp(100px, 24vw, 150px); right: -4px; }
}
@media (max-width: 520px) {
  .feature .phones { gap: 12px; }
  .feature .phones .phone { --pw: calc((100vw - 2 * var(--gutter) - 12px) / 2); }
}

/* ---------- Card grid ---------- */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-card); }
.card .icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

/* ---------- Privacy band ---------- */

.privacy-band {
  margin-top: 120px; padding: 72px var(--gutter); border-radius: 32px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--glow-1), transparent 60%), var(--paper);
}
.privacy-band .lede { max-width: 34em; margin-left: auto; margin-right: auto; }
.promises { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.promises span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 500; }
.promises svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 760px) { .privacy-band { margin-top: 88px; padding: 56px 20px; border-radius: 26px; } }

/* ---------- 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='%238b8379' 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; }

/* ---------- 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); }

/* ---------- Reveal on scroll (only when JS runs and motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
