/* Paintpane intro pages (English: index.html, Chinese: zh/index.html).
   System fonts only: no web fonts, CDN or analytics. Light and dark follow the system. */

:root {
  color-scheme: light dark;
  --bg: #f7f5f0; --surface: #ffffff; --text: #1d1b18; --muted: #6b665e; --line: #e6e1d8;
  --ink: #1d1b18; --on-ink: #ffffff; --link: #1d1b18; --code: #f0ece4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513; --surface: #201f1c; --text: #edeae4; --muted: #a39e95; --line: #34322d;
    --ink: #edeae4; --on-ink: #161513; --link: #edeae4; --code: #2a2825;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* .btn sets display, which would otherwise show a hidden button */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
a { color: var(--link); text-decoration: none; }
p a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }

/* 1 · top bar: stays at the top while scrolling */
.top { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--bg) 92%, transparent);
       border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); margin-right: auto; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 400; font-size: inherit; color: var(--muted); }
.icon { width: 28px; height: 28px; border-radius: 2px; flex: none; display: block; image-rendering: pixelated; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: 15px; white-space: nowrap; }
.top nav a:not(.btn) { color: var(--text); }
.btn { display: inline-block; border-radius: 8px; padding: 8px 18px; font-size: 15px; font-weight: 600; text-align: center; border: 1px solid transparent; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn.small { padding: 4px 12px; font-size: 14px; }
a.btn:hover { text-decoration: none; opacity: .88; }

/* Sizes scale with the page width between a phone and a desktop value, so nothing jumps at a breakpoint. */
/* 2 · first screen */
.hero { text-align: center; padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 36px); }
.hero h1 { font-size: clamp(28px, 2.4vw + 18px, 46px); line-height: 1.2; margin: 0 auto 18px; max-width: 820px; letter-spacing: -.01em; }
:lang(zh) .hero h1 { word-break: keep-all; }          /* Chinese headline breaks only at the comma */
.lead { font-size: clamp(18px, .4vw + 16.5px, 21px); max-width: 760px; margin: 0 auto 28px; }
.lead span { display: block; text-wrap: balance; }   /* break after the comma; a long clause wraps evenly within itself */
:lang(zh) .lead span { word-break: keep-all; }        /* Chinese: break only at spaces and punctuation */
h1, h2, figcaption { text-wrap: balance; }
.actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.actions .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }   /* as tall as the Store badge */
.store-badge { display: inline-block; line-height: 0; border-radius: 4px; }
.store-badge img { width: auto; height: 44px; display: block; }   /* Microsoft's artwork at its own size: never stretch or recolour it */
a.store-badge:hover { opacity: .88; }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; }

figure { margin: 0; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; }
.hero figure { margin-top: clamp(32px, 4vw, 48px); }

/* Desktop screenshots (S1, S2): real shots of a 2560 × 1600 desktop. */
.desk-shot { display: block; width: 100%; height: auto; border-radius: 10px;
             box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.12); }

/* 3 · points */
section { padding: clamp(44px, 5.5vw, 64px) 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(24px, .8vw + 20.5px, 30px); line-height: 1.25; margin: 0 0 14px; }
.point { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(22px, 4.5vw, 56px); align-items: center; }
.point > * { min-width: 0; }
.point + .point { margin-top: clamp(56px, 7.5vw, 88px); }
.point.flip > .text { order: 2; }
.point.wide { grid-template-columns: 1fr; gap: 28px; }
.point.wide > .text { max-width: 720px; }
.num { color: var(--muted); font-size: 14px; letter-spacing: .08em; margin-bottom: 8px; }
.point p { margin: 0 0 12px; }

/* three display modes: mode name, then one line on what it does */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.trio > * { min-width: 0; }
.trio figcaption { text-align: left; margin-top: 10px; text-wrap: pretty; }
.trio figcaption span { display: block; }   /* Chinese: one clause per line, so the three captions line up */
.trio figcaption b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

.shot { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
        box-shadow: 0 12px 40px rgba(0,0,0,.10); }

/* Tray menu screenshot (S5): shown near its real size (the shot is at 200 % scaling) and centred. */
.menu-shot { max-width: 340px; margin: 0 auto; }

/* 8 · sources */
.museums { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.museums li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.other { color: var(--muted); }

/* 10 · questions */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; margin-top: 24px; }
.faq h3 { font-size: 17px; margin: 0 0 6px; }
.faq p { margin: 0; color: var(--muted); }

/* 11 · license and credits */
.credits p { max-width: 760px; color: var(--muted); margin: 0 0 10px; }

/* 12 · footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 8px 22px; flex-wrap: wrap; }
footer .lang { margin-left: auto; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* text pages (privacy.html) */
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(28px, 1.6vw + 20px, 38px); line-height: 1.2; margin: 0 0 8px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; }
.doc .fine { margin: 0 0 28px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc code { background: var(--code); border-radius: 4px; padding: 1px 5px; font-size: .92em; overflow-wrap: anywhere; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }

/* tablet and narrow windows: points stack (text above, picture below) */
@media (max-width: 900px) {
  .point { grid-template-columns: 1fr; }
  .point.flip > .text { order: 0; }
  .point:not(.wide) > figure { width: 100%; max-width: 560px; margin: 0 auto; }
}
/* phone width: the top bar keeps icon, language link and Download */
@media (max-width: 720px) {
  .wrap { padding-left: 18px; padding-right: 18px; }   /* sides only: keep the first screen's top and bottom spacing */
  .top .wrap { gap: 14px; height: 54px; }
  .top .gh, .brand small { display: none; }
  .museums { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; }   /* phone: one block per row */
  .doc thead { display: none; }
  .doc tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; }
  footer .lang { margin-left: 0; }
}
/* the three display modes stay side by side until they get too small to compare */
@media (max-width: 560px) {
  .trio { grid-template-columns: 1fr; }
}
