/* 蓮寶's site: 敦煌極簡 drawn as Lifebear's stickers. The page itself is ink on warm paper;
   the mineral colours of the murals (石青, 石綠, 朱砂, 土黃) appear only in the pictures and a
   few small marks, never as large fields. */

:root {
  --paper: #FBF8F2;
  --paper-2: #F4EEE3;
  --ink: #2B2622;
  --ink-2: #5E5650;
  --ink-3: #8F867D;
  --line: #E7DFD2;
  --button: #2B2622;
  --on-button: #FBF8F2;
  --shiqing: #3E6B8A;
  --zhusha: #B5523B;
  --shilv: #6E9A7A;
  --tuhuang: #D4A24C;
  --serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1916;
    --paper-2: #24211D;
    --ink: #EFE8DC;
    --ink-2: #C4BBAE;
    --ink-3: #8E857A;
    --line: #35302A;
    --button: #EFE8DC;
    --on-button: #1B1916;
    --shiqing: #8DB0C8;
    --zhusha: #E08C74;
    --shilv: #9DC2A6;
    --tuhuang: #E3BC74;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1916;
  --paper-2: #24211D;
  --ink: #EFE8DC;
  --ink-2: #C4BBAE;
  --ink-3: #8E857A;
  --line: #35302A;
  --button: #EFE8DC;
  --on-button: #1B1916;
  --shiqing: #8DB0C8;
  --zhusha: #E08C74;
  --shilv: #9DC2A6;
  --tuhuang: #E3BC74;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.8 var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .04em; margin: 0; }
p { margin: 0; }
code { font-size: 13px; word-break: break-all; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.bar.scrolled { border-bottom-color: var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: .08em; }
.brand svg { width: 24px; height: 24px; color: var(--zhusha); }
.bar nav { display: none; gap: 26px; margin-left: auto; }
.bar nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; letter-spacing: .06em; }
.bar nav a:hover { color: var(--ink); }
.bar .button { margin-left: auto; }
@media (min-width: 800px) { .bar nav { display: flex; } .bar .button { margin-left: 0; } }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; background: var(--button); color: var(--on-button); border: 1px solid var(--button);
  font-size: 15px; letter-spacing: .06em; text-decoration: none; cursor: pointer; }
.button svg { width: 18px; height: 18px; }
.button.small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button:hover { opacity: .86; }
.button[aria-disabled="true"] { opacity: .5; cursor: default; }
.button[aria-disabled="true"]:hover { opacity: .5; }

/* Small marks taken from the murals: a row of three dots (散花) before each kicker */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .24em; color: var(--ink-3); }
.kicker::before { content: ""; width: 22px; height: 6px; flex: none;
  background: radial-gradient(circle, var(--zhusha) 2.4px, transparent 2.8px) 0 0 / 8px 6px repeat-x; }

/* Hero */
.hero { padding: 24px 0 40px; }
/* The picture's own paper is #F6F0E4; on a phone only its right half (the desk) is shown. */
.hero .stage { position: relative; }
.hero .stage img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 88% center;
  border-radius: 24px; background: #F6F0E4; }
.hero .copy { padding: 28px 4px 0; }
.hero h1 { font-size: clamp(34px, 6.4vw, 60px); line-height: 1.25; margin: 14px 0 18px; }
.hero .lead { color: var(--ink-2); font-size: 17px; max-width: 30em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.hero .meta { font-size: 13px; color: var(--ink-3); }
/* On a wide screen the words sit in the picture's empty left half, on its own paper. */
@media (min-width: 900px) {
  .hero { padding: 24px 0 56px; }
  .hero .stage img { aspect-ratio: 16 / 9; border-radius: 28px; }
  .hero .copy { position: absolute; inset: 0 auto 0 0; width: 50%; padding: 0 0 0 7%; display: flex; flex-direction: column;
    justify-content: center; color: #2B2622; }
  .hero .copy .lead { color: #5E5650; }
  .hero .copy .meta, .hero .copy .kicker { color: #8F867D; }
  .hero .copy .button { background: #2B2622; color: #FBF8F2; border-color: #2B2622; }
  .hero .copy .button.ghost { background: transparent; color: #2B2622; border-color: #D9CFBF; }
}

/* Sections, parted by a band of 卷草 with a lotus at its heart */
section { padding: 72px 0; }
.divider { display: flex; justify-content: center; padding: 0 16px; }
.divider img { width: min(300px, 70vw); opacity: .9; }
section.decorated { position: relative; overflow: hidden; }
.corner { position: absolute; pointer-events: none; opacity: .85; }
.corner.cloud { width: 150px; top: 56px; right: max(16px, calc(50% - 540px)); }
.corner.ribbon { width: 220px; top: 40px; right: max(-40px, calc(50% - 600px)); }
@media (max-width: 760px) { .corner { display: none; } }
.head { max-width: 40em; margin-bottom: 44px; }
.head h2 { font-size: clamp(26px, 4.2vw, 36px); line-height: 1.4; margin: 12px 0 12px; }
.head p { color: var(--ink-2); }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }

.features { display: grid; gap: 44px 36px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature img { width: 76px; height: 76px; margin: 0 0 14px -6px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 15px; }

/* 蓮寶 in a conversation */
.talk { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .talk { grid-template-columns: 1fr 1fr; gap: 64px; } }
.phone { background: var(--paper-2); border: 1px solid var(--line); border-radius: 32px; padding: 22px 18px; width: 100%; max-width: 380px; justify-self: center; }
.msg { width: fit-content; max-width: 86%; padding: 10px 15px; border-radius: 20px; font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.msg.me { margin-left: auto; background: var(--button); color: var(--on-button); border-bottom-right-radius: 6px; }
.msg.it { background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); margin: 16px 0 8px; }
.who img { width: 30px; height: 30px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; font-size: 14px; }
.card .row { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.card .bar-mark { width: 4px; height: 18px; border-radius: 2px; flex: none; }
.card .ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid; flex: none; margin: 0 -4px 0 -4px; }
.card .when { margin-left: auto; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.card .ok { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.card .ok span { border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: 13px; }
.card .ok span.yes { background: var(--button); color: var(--on-button); border-color: var(--button); }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; color: var(--ink-2); }
.points li::before { content: ""; width: 7px; height: 7px; margin-top: .72em; border-radius: 50%; background: var(--zhusha); }
.points b { color: var(--ink); font-weight: 600; display: block; }

/* The three collections */
.shelf { display: grid; gap: 16px; }
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(3, 1fr); } }
.book { border: 1px solid var(--line); border-radius: 22px; padding: 22px 22px 20px; position: relative; overflow: hidden; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.book h3 { font-size: 20px; }
.book .sub { color: var(--ink-3); font-size: 13px; margin: 4px 0 14px; }
.book p { color: var(--ink-2); font-size: 15px; }
.book .count { margin-top: 16px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.note { color: var(--ink-3); font-size: 14px; margin-top: 22px; }

/* Plain text beside one picture */
.split { display: grid; gap: 28px; }
@media (min-width: 860px) { .split { grid-template-columns: 120px 1fr; gap: 48px; } }
.split > img { width: 96px; height: 96px; }

/* Platforms */
.platforms { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .platforms { grid-template-columns: repeat(4, 1fr); } }
.platform { border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.platform b { display: block; font-family: var(--serif); font-size: 17px; }
.platform span { font-size: 13px; color: var(--ink-3); }
.platform.later { border-style: dashed; }

/* The closing download */
.download { text-align: center; padding: 88px 0 72px; }
/* 蓮寶 sits under a 藻井 lotus, as a figure under a mural's canopy. */
.download .halo { position: relative; width: 190px; height: 190px; margin: 0 auto 8px; }
.download .halo .ring { position: absolute; inset: 0; width: 100%; opacity: .32; }
.download .halo .art { position: absolute; width: 132px; left: 29px; top: 36px; }
.download h2 { font-size: clamp(28px, 5vw, 42px); margin: 10px 0 12px; }
.download p { color: var(--ink-2); }
.download .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 30px 0 14px; }
.download .meta { font-size: 12px; letter-spacing: .12em; color: var(--ink-3); }
.steps { max-width: 560px; margin: 36px auto 0; text-align: left; color: var(--ink-2); font-size: 15px; padding-left: 22px; }
.steps li + li { margin-top: 6px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 52px; color: var(--ink-3); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .items { display: flex; gap: 6px; margin-left: auto; }
footer .items img { width: 30px; height: 30px; }
