/* Option B — "Try it": the app's own look (index.css tokens), product first. */
@font-face {
  font-family: 'Inter';
  src: url('./assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --primary: #b81f1f;
  --primary-hover: #951818;
  --primary-soft: #fdecec;
  --text: #18181b;
  --text-2: #71717a;
  --text-3: #a1a1aa;
  --border: #e5e5e5;
  --card: #f4f4f5;
  --page: #ffffff;
  --success: #16a34a;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --cjk: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', sans-serif;
  --cjk-read: 'Songti SC', 'STSong', 'Noto Serif SC', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.03em; }
[lang^='zh'] { font-family: var(--cjk); }

/* nav */
.nav {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.03em; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; font-size: 0.93rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 3rem; padding: 0 1.4rem; border-radius: 0.8rem;
  font: 600 0.98rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 0;
  transition: background 0.15s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 2.4rem; padding: 0 1rem; font-size: 0.9rem; border-radius: 0.65rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--text); }
.btn-secondary:hover { background: #e9e9eb; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); align-items: center; gap: clamp(2rem, 6vw, 6rem);
  max-width: 68rem; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}
.hero h1 { font-size: clamp(2.9rem, 6.6vw, 5.4rem); line-height: 0.98; font-weight: 750; letter-spacing: -0.045em; }
.red { color: var(--primary); }
.lede { max-width: 30rem; margin: 1.5rem 0 2.25rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-2); }
.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* On a phone, that phone's store comes first; every platform stays offered. */
[data-platform='android'] .stores [data-link='android']:not([data-soon]) { order: -1; }
.store {
  display: inline-flex; align-items: center; gap: 0.7rem; height: 3.4rem; min-width: 9.75rem; padding: 0 1.1rem 0 1rem;
  border-radius: 0.9rem; background: var(--card); color: var(--text); text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.store:hover { background: #e9e9eb; transform: translateY(-1px); }
.store svg { flex: none; }
.store span { display: grid; font-size: 1.08rem; font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; }
.store small { font-size: 0.68rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
/* a store whose listing is not live yet (site.js sets data-soon): the same badge, faded */
.store[data-soon] { background: var(--card); opacity: 0.5; cursor: default; transform: none; }
.btn .soon { font-size: 0.72rem; font-weight: 500; }
.hero-phone, .phone {
  margin: 0; border-radius: 2.6rem; overflow: hidden; background: #fff; border: 8px solid #18181b;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 40px 80px -30px rgba(24, 24, 27, 0.45);
}
.hero-phone { transform: rotate(2deg); }

/* how it works */
.how { padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem) 1rem; }
.step {
  display: grid; grid-template-columns: 5rem minmax(0, 26rem) minmax(0, 15rem);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: center; justify-content: center;
  max-width: 64rem; margin: 0 auto 4.5rem;
}
.step-flip { grid-template-columns: minmax(0, 15rem) 5rem minmax(0, 26rem); }
.step-flip .phone { order: -1; }
.step-num { font-family: var(--cjk-read); font-size: 5rem; line-height: 1; color: var(--primary); justify-self: center; }
.step h3 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.6rem; }
.step p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.step .phone { border-width: 7px; border-radius: 2.2rem; transform: rotate(-1.5deg); }
.step-flip .phone { transform: rotate(1.5deg); }

/* comparison */
.compare { padding: 0 clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.compare-wrap { max-width: 54rem; margin: 0 auto; overflow-x: auto; }
.compare-table { width: 100%; min-width: 36rem; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 0.9rem 0.5rem; text-align: center; vertical-align: middle; }
.compare-table thead th { padding-top: 1.25rem; padding-bottom: 1rem; font-size: 0.92rem; font-weight: 600; color: var(--text-2); white-space: nowrap; vertical-align: bottom; }
.compare-table thead th:first-child { width: 30%; }
.compare-table thead .us { color: var(--text); font-size: 1.05rem; font-weight: 700; }
.compare-table thead .us img { display: block; margin: 0 auto 0.35rem; }
.compare-table tbody th { text-align: left; font-weight: 550; font-size: 0.98rem; padding-left: 0; }
.compare-table td { color: var(--text-2); font-size: 0.95rem; }
.compare-table td small { display: block; margin-top: 0.3rem; font-size: 0.78rem; line-height: 1.2; color: var(--text-3); white-space: nowrap; }
.compare-table .us { background: var(--primary-soft); }
.compare-table .us small { color: var(--primary); font-weight: 600; }
.compare-table thead .us { border-radius: 1rem 1rem 0 0; }
.compare-table tbody tr:last-child .us { border-radius: 0 0 1rem 1rem; }
/* A check: a grey tick, or on Tung's side a red disc with a white one. */
.compare { --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); --tick-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ck, .no { display: inline-block; vertical-align: middle; }
.ck { width: 1.15rem; height: 1.15rem; background: var(--text-3); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.us .ck { width: 1.5rem; height: 1.5rem; border-radius: 50%; -webkit-mask: none; mask: none; background: var(--primary) var(--tick-white) center / 0.85rem no-repeat; }
.no { width: 0.85rem; height: 2px; border-radius: 1px; background: #d4d4d8; }
.compare-table .price th, .compare-table .price td { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.compare-table .price td { font-size: 0.98rem; font-weight: 550; color: var(--text-2); }
.compare-table .price td.us { color: var(--primary); font-size: 1.15rem; font-weight: 750; }
.compare-table tbody tr:not(:last-child) th, .compare-table tbody tr:not(:last-child) td:not(.us) { border-bottom: 1px solid #f1f1f2; }
.compare-note { margin: 1.1rem 0 0; font-size: 0.8rem; color: var(--text-3); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* questions */
.faq { padding: 0 clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.faq-list { max-width: 44rem; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font-size: 1.1rem; font-weight: 620; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: -0.35rem 0 1.25rem; color: var(--text-2); font-size: 1.02rem; max-width: 40rem; }

/* readings shelf */
.readings { padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) 0; }
.shelf { list-style: none; margin: 0 auto; padding: 0; max-width: 68rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.75rem 1rem; }
.book-art { position: relative; aspect-ratio: 3 / 2; border-radius: 0.8rem; overflow: hidden; background: var(--card); }
.book-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.book:hover .book-art img { transform: scale(1.05); }
.chip { position: absolute; top: 0.4rem; left: 0.4rem; padding: 0.2rem 0.4rem; border-radius: 0.4rem; font-size: 0.66rem; font-weight: 700; background: rgba(244, 244, 245, 0.8); backdrop-filter: blur(8px); }
.book-title { margin: 0.6rem 0 0; font-weight: 600; font-size: 1rem; }
.book-en { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--text-2); line-height: 1.35; }
.book-new .book-art { display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px rgba(184, 31, 31, 0.25); }

/* section headings */
.section-head { text-align: center; max-width: 38rem; margin: 0 auto 3rem; }
.section-head h2, .download h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; font-weight: 720; }
.section-head p { color: var(--text-2); font-size: 1.1rem; margin: 1rem 0 0; }
.readings { padding-bottom: clamp(4rem, 8vw, 6rem); }

/* download */
.download { padding: 0 clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.download-inner {
  max-width: 68rem; margin: 0 auto; border-radius: 1.5rem; overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 100% 0%, #fde8e8 0%, #fff5f5 40%, #fafafa 75%);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); align-items: center; gap: 2rem;
  padding: clamp(2rem, 5vw, 4rem); min-height: 26rem;
}
.download-copy p { color: var(--text-2); font-size: 1.08rem; margin: 1rem 0 2rem; max-width: 28rem; }
.download .stores { justify-content: flex-start; }
.phones { position: relative; height: 22rem; align-self: end; margin-bottom: calc(-1 * clamp(2rem, 5vw, 4rem)); }
.dphone { position: absolute; width: 11.5rem; border-radius: 1.6rem; border: 6px solid #18181b; box-shadow: 0 30px 50px -25px rgba(0, 0, 0, 0.5); background: #fff; }
.phone-back { right: 1.25rem; top: 3rem; transform: rotate(6deg); }
.phone-front { right: 10rem; top: 0.5rem; transform: rotate(-4deg); }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.75rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--text-2); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lede { margin-inline: auto; }
  .stores { justify-content: center; }
  .hero-phone { max-width: 16rem; justify-self: center; }
  .step, .step-flip { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; margin-bottom: 4rem; }
  .step-flip .phone { order: 0; }
  .step .phone { max-width: 15rem; justify-self: center; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-inner { grid-template-columns: 1fr; }
  .phones { height: 19rem; }
  .dphone { width: 10rem; }
  .phone-front { right: auto; left: 0; }
  .foot { flex-direction: column; }
  /* The table's four apps share the width; each feature's name sits above its row. */
  .compare-table { min-width: 0; display: block; }
  .compare-table thead, .compare-table tbody { display: block; }
  .compare-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .compare-table thead th:first-child { display: none; }
  .compare-table thead th { font-size: 0.74rem; padding: 0.9rem 0.2rem 0.6rem; line-height: 1.25; white-space: normal; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
  .compare-table thead .us { font-size: 0.92rem; }
  .compare-table tbody th { grid-column: 1 / -1; text-align: center; padding: 1rem 0.25rem 0.1rem; font-size: 0.86rem; color: var(--text-2); border-bottom: 0 !important; }
  .compare-table td { padding: 0.45rem 0.2rem 0.9rem; font-size: 0.86rem; }
  .compare-table td small { white-space: normal; font-size: 0.7rem; }
  .compare-table tbody tr:not(:last-child) td:not(.us) { border-bottom: 0; }
}
