/* SPDX-License-Identifier: GPL-3.0-only */
/* The website: one hand-written stylesheet, mobile first, light and dark. Fonts are self-hosted (OFL). */

@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-vietnamese-400-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-vietnamese-600-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro-vietnamese-700-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Bitter';
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/bitter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bitter';
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/bitter-vietnamese-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  /* Taken from the app's logo: the cream photo mat, the teal tile, the wooden frame, the
     green wordmark and leaves, the violet flower. */
  --bg: #f7f0de;
  --surface: #fffaee;
  --tint: #efe5cc;
  --ink: #2b2219;
  --ink-2: #514435;
  --muted: #7a6a55;
  --line: #e2d4b3;
  --brand: #2c836d;
  --brand-ink: #fffaee;
  --teal: #4aada4;
  --wood: #9a5a2c;
  --accent: #b5652a;
  --leaf: #3f7d1a;
  --leaf-soft: #e1efc9;
  --flower: #8e4fb3;
  --flower-soft: #efe2f6;
  --shadow: 0 1px 2px rgb(74 52 30 / 8%), 0 14px 34px rgb(74 52 30 / 12%);
  --radius: 18px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1712;
    --surface: #262019;
    --tint: #211b15;
    --ink: #f3ead6;
    --ink-2: #d8cab0;
    --muted: #a8977c;
    --line: #3b3127;
    --brand: #c98a52;
    --brand-ink: #1c1712;
    --teal: #5cc0b4;
    --wood: #c98a52;
    --accent: #e3a067;
    --leaf: #a9d86e;
    --leaf-soft: #27331b;
    --flower: #d3a6ef;
    --flower-soft: #33253d;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px rgb(0 0 0 / 45%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
/* The page's own scroll bar matches the changelog box: thin, in the theme colour. */
html { scrollbar-width: thin; scrollbar-color: var(--brand) var(--bg); }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; border: 2px solid var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Bitter', Georgia, serif; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: var(--ink-2); margin-top: 18px; }
.narrow { max-width: 680px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Bitter', Georgia, serif; font-weight: 750; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
.brand img { border-radius: 7px; }
.nav-links { display: none; gap: 26px; margin-left: 18px; font-size: 0.95rem; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; text-decoration: none; font-size: 0.9rem; color: var(--ink-2); }
.lang span { display: none; }
.lang:hover { background: var(--tint); color: var(--ink); }

/* Round header buttons: Star, Coffee and Download share one shape. */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.pill:hover { border-color: var(--ink-2); }
.pill-label { display: none; }
.pill-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pill-primary:hover { border-color: var(--brand); filter: brightness(1.08); }
.star .icon, .coffee .icon { color: var(--accent); }
/* Back to top: the same round button, fixed in the corner. */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 20; width: 44px; height: 44px; padding: 0; justify-content: center; box-shadow: var(--shadow); }
.to-top .icon { color: var(--brand-ink); }
.js .to-top { opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.js .to-top.shown { opacity: 1; transform: none; pointer-events: auto; }
.star-count { padding-left: 8px; border-left: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-text { max-width: 760px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.badges .badge { margin: 0; }
.badge.shield { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.badge.shield .icon { width: 1.1em; height: 1.1em; }
.badge.shield:hover { filter: brightness(1.08); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--leaf) 25%, transparent); background: var(--leaf-soft); color: var(--leaf); font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 12px; }
/* shadcn/ui-style buttons (default and outline variants), in the logo's colours. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; flex: 1 1 100%; box-shadow: 0 1px 2px rgb(74 52 30 / 6%); transition: background-color 0.15s, border-color 0.15s, filter 0.15s; }
.button:hover { background: var(--tint); }
.button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.button.primary:hover { filter: brightness(1.08); background: var(--brand); }
.shot.hero-shot { margin-top: 40px; }

/* Screenshots */
.shot { margin: 0; }
.shot img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
/* The big screenshot sits in a photo frame like the logo's: a wooden edge around a cream mat. */
.hero-shot img { border: 10px solid var(--surface); outline: 4px solid var(--wood); outline-offset: 0; border-radius: 6px; }
.shot figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--ink-2); }

/* Sections */
.section { padding: 64px 0; }
.tint { background: var(--tint); }
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 1px 2px rgb(74 52 30 / 5%); }
.card > .icon { width: 26px; height: 26px; color: var(--brand); margin-bottom: 14px; }
.card:nth-child(3n + 2) > .icon { color: var(--accent); }
.card:nth-child(3n) > .icon { color: var(--flower); }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 0.97rem; }
/* Screenshots in alternating rows: a large shot, its words beside it, sides swapping. */
.showcase { display: grid; grid-template-columns: 1fr; gap: 56px; }
.showcase-row { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.showcase-text h3 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.showcase-text p { margin-top: 10px; color: var(--ink-2); }
.showcase-text .small { margin-top: 12px; }

.stats { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 36px 0 22px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); }
.stat strong { font-family: 'Bitter', Georgia, serif; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1; letter-spacing: -0.01em; }
.stat span { opacity: 0.88; font-size: 0.97rem; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); text-decoration: none; }
.more:hover { text-decoration: underline; }

.charts { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 32px 0 20px; max-width: 820px; }
.chart { margin: 0; padding: 14px; }
.chart img { width: 100%; border-radius: 8px; }
.chart figcaption { margin-top: 10px; font-size: 0.92rem; color: var(--ink-2); }
/* Performance page: a heading, then one section per measurement and the explanations. */
.kicker { margin: 0 0 10px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.perf-head { padding-bottom: 24px; }
.perf-part { display: grid; grid-template-columns: 1fr; gap: 8px; }
.perf-part .charts { margin: 12px 0 0; }
.faq { display: grid; gap: 10px; margin-top: 28px; max-width: 820px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 650; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }
.code { overflow-x: auto; margin: 24px 0; padding: 16px 20px; font: 0.86rem/1.6 ui-monospace, 'SF Mono', Menlo, monospace; white-space: pre; max-width: 820px; }
.actions { display: flex; flex-wrap: wrap; gap: 20px; }
/* Privacy: the brand-coloured band with a big shield. */
.privacy { background: var(--brand); color: var(--brand-ink); }
.privacy .lead { color: color-mix(in srgb, var(--brand-ink) 86%, transparent); }
.privacy-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.privacy-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--brand-ink); color: var(--leaf); margin-bottom: 20px; }
.privacy-mark .icon { width: 36px; height: 36px; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.privacy-list li { padding: 18px 20px; border-radius: 14px; background: color-mix(in srgb, var(--brand-ink) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand-ink) 18%, transparent); }
.privacy-list p { margin-top: 6px; opacity: 0.9; font-size: 0.97rem; }
/* Print shops: the built-in sizes as chips, cm. */
.kiosk-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.sizes { margin-top: 26px; }
/* The print shops' logos inline in the heading, in the theme colour (site/README.md). */
.inline-logo { display: inline-block; width: auto; color: var(--brand); }
.logo-dm { height: 1.2em; vertical-align: -0.3em; }
.logo-rossmann { height: 0.72em; vertical-align: -0.02em; }
.sizes-label { margin: 16px 0 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; }
.chips li::after { content: ' cm'; font-weight: 400; color: var(--muted); }
.sizes .small { display: flex; gap: 6px; align-items: center; margin-top: 16px; }
.sizes .small .icon { color: var(--leaf); }
.kiosk-steps ol { margin: 14px 0 18px; padding-left: 1.3em; color: var(--ink-2); }
.kiosk-steps li + li { margin-top: 8px; }
.kiosk-steps li::marker { color: var(--accent); font-weight: 700; }
/* Support: the owner's VietQR code next to a short thank-you. The QR card keeps its own white. */
.support { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; padding: 28px; }
.support img { width: 220px; max-width: 100%; border-radius: 14px; background: #fff; justify-self: center; }
.support .small { margin-top: 14px; }
/* What's new: the CHANGELOG in a scrollable card, newest first. */
.latest-release { margin-top: 10px; }
.changelog { margin: 24px 0 18px; max-height: 460px; overflow-y: auto; padding: 8px 28px 24px; font-size: 0.95rem; }
.changelog h2 { font-size: 1.3rem; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.changelog h2:first-child { border-top: 0; }
.changelog h3 { font-size: 0.82rem; margin-top: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.changelog ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.changelog li + li { margin-top: 6px; }
.changelog p { margin-top: 8px; color: var(--ink-2); }
.changelog a { color: var(--brand); }
.js .changelog { position: relative; overflow: hidden; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; }
.js .changelog::after { content: ''; position: sticky; display: block; bottom: 0; height: 56px; margin: -56px -28px -24px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.js .changelog.active { overflow-y: auto; cursor: auto; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.js .changelog.active::after, .js .changelog.active .changelog-hint { display: none; }
/* A thin scroll bar in the theme colour that stays inside the rounded outline. */
.changelog { scrollbar-width: thin; scrollbar-color: var(--brand) transparent; }
.changelog::-webkit-scrollbar { width: 8px; }
.changelog::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
.changelog::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; border: 2px solid var(--surface); }
.changelog-hint { position: absolute; right: 16px; bottom: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 0.8rem; font-weight: 600; }
.changelog code { font-size: 0.88em; background: var(--tint); padding: 1px 5px; border-radius: 5px; }
.install { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 32px 0 18px; }
.install ol { margin: 12px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.install li + li { margin-top: 6px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; }
.footer-row { display: flex; flex-direction: column; gap: 22px; }
.footer-row p { margin-top: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { text-decoration: none; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-links .blog { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; }
.footer-links .blog:hover { text-decoration: none; background: var(--tint); }
.footer-base { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; font-size: 0.85rem; }
.footer-base a { color: inherit; }

a:focus-visible, .button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .button { flex: 0 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .install { grid-template-columns: repeat(2, 1fr); }
  .lang span { display: inline; }
  .footer-base { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 960px) {
  :root { --gutter: 32px; }
  .nav-links { display: flex; }
  .pill-label { display: inline; }
  .hero { padding: 80px 0 32px; }
  .section { padding: 96px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .privacy-grid { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .kiosk-grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
  .perf-part { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
  .perf-part .charts { margin: 0; }
  .support { grid-template-columns: auto 1fr; gap: 40px; padding: 36px; }
  .showcase { gap: 88px; }
  .showcase-row { grid-template-columns: 2fr 1fr; gap: 48px; }
  .showcase-row.flip { grid-template-columns: 1fr 2fr; }
  .showcase-row.flip .shot { order: 2; }
  .footer-row { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
