/* Walone, by ZinBo — used under the site owner's commercial licence. Limited to
   Myanmar characters, so English words on Burmese pages keep the site's
   Latin font. */
@font-face {
  font-family: "Walone";
  src: url("/assets/fonts/walone-regular.woff2") format("woff2");
  font-weight: 100 500;
  font-display: swap;
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200B-200D, U+25CC;
}
@font-face {
  font-family: "Walone";
  src: url("/assets/fonts/walone-bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200B-200D, U+25CC;
}

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --text: #1d1d1f;
  --muted: #5f5f66;
  --line: #d9d9e0;
  --accent: #0a66d8;
  --accent-text: #ffffff;
  --accent-soft: #e6f0fc;
  --rest: #9a9aa3;
  --ok: #1a7f37;
  --warn: #b35900;
  --danger: #c4262e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-my: "Walone", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Myanmar Sangam MN", "Noto Sans Myanmar", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --surface: #1a1a1d;
    --surface-2: #232327;
    --text: #f5f5f7;
    --muted: #a8a8b0;
    --line: #34343a;
    --accent: #4c9bff;
    --accent-text: #06111f;
    --accent-soft: #14243a;
    --rest: #6e6e76;
    --ok: #4ac26b;
    --warn: #f0a04b;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  overflow-x: hidden;
}

:lang(my) body, body:lang(my) {
  font-family: var(--font-my);
  line-height: 1.85;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.15em; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
:lang(my) h1, :lang(my) h2, :lang(my) h3 { line-height: 1.6; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); text-decoration: none; }
.brand img { border-radius: 6px; }
.nav { display: flex; gap: 4px 16px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 6px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.site-header nav { margin-left: auto; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--text); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; text-align: center;
}
.button.primary { background: var(--accent); color: var(--accent-text); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.button.secondary:hover { background: var(--accent-soft); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fineprint { color: var(--muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- sections */

section { padding: clamp(48px, 8vw, 88px) 0; }
section + section { border-top: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }

.hero { text-align: center; padding-top: clamp(40px, 8vw, 96px); }
.hero .app-icon { width: 112px; height: 112px; margin-bottom: 16px; }
.hero .lead { margin: 0 auto 28px; }
.hero .actions { justify-content: center; }
.hero .fineprint { margin-top: 16px; }

.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 28px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 12px; }
.card p { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- gesture diagrams */

.diagram { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 auto; color: var(--line); }
.diagram.large { max-width: 240px; }
.diagram .shell { fill: var(--surface-2); stroke: var(--rest); stroke-width: 2; }
.diagram .seam { stroke: var(--line); stroke-width: 1.5; }
.diagram .rest { fill: var(--rest); }
.diagram .active { fill: var(--accent); }
.diagram .ring { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.45; }
.diagram .arrow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.diagram .zone { fill: var(--accent-soft); }

/* ---------------------------------------------------------------- screenshot, trust */

.screenshot { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); display: block; margin: 0 auto; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { padding-left: 1.8em; position: relative; margin-bottom: 0.6em; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------------- install */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 28px 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 24px 60px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700;
}
:lang(my) .steps > li::before { content: counter(step, myanmar); }
.steps h3 { margin: 6px 0 4px; }
.steps p { color: var(--muted); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; }
summary { cursor: pointer; font-weight: 600; }
pre { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font: 0.9rem/1.5 var(--mono); }
code { font-family: var(--mono); font-size: 0.92em; }

.note { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.note h3 { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- buy */

.price-card { text-align: center; }
.price { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 750; margin: 8px 0 0; letter-spacing: -0.02em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-card .checklist { display: inline-block; text-align: left; margin-top: 16px; }
.how { padding-left: 1.3em; }
.how li { margin-bottom: 0.4em; }
:lang(my) .how { list-style: myanmar; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--surface-2); border-radius: 999px; padding: 4px 14px; font-size: 0.95rem; }

form.order { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.status { border-radius: 10px; padding: 12px 14px; margin: 0; }
.status:empty { display: none; }
.status.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.status.error { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.contact-fallback[hidden] { display: none; }

/* ---------------------------------------------------------------- faq, changelog, prose */

.faq dt { font-weight: 650; margin-top: 22px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.release { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.release h3 { margin-bottom: 4px; }
.release ul { padding-left: 1.2em; margin: 0; }
.release li { margin-bottom: 0.5em; }
.prose ul { padding-left: 1.2em; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-row p { margin: 0; }
.font-credit { font-size: 0.85rem; margin-top: 2px !important; }
.font-credit a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); }
.spaced { margin-top: 40px; }

/* ---------------------------------------------------------------- refinements */

h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a8a93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* ---------------------------------------------------------------- gesture animations
   Each diagram loops a short demonstration of its gesture. assets/gestures.js
   adds .is-playing only while a diagram is on screen; without it (no JS, or
   the visitor asked for reduced motion) every diagram shows its static pose. */

.diagram .outline { fill: none; stroke: var(--rest); stroke-width: 2; }
.diagram .hint { opacity: 0.35; }
.diagram .held { opacity: 0.6; }
.diagram .keycap { fill: var(--surface); stroke: var(--rest); stroke-width: 2; }
.diagram .keycap-label { fill: var(--text); font: 600 22px var(--font); }
.diagram circle, .diagram g { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .is-playing .anim-tap { animation: tap-press 2.2s ease-in-out infinite; }
  .is-playing .anim-tap-ring { animation: tap-ripple 2.2s ease-out infinite; }
  .is-playing .anim-tap2 { animation: tap-press-twice 2.6s ease-in-out infinite; }
  .is-playing .anim-tap2-ring { animation: tap-ripple-twice 2.6s ease-out infinite; }
  .is-playing .anim-swipe-x { animation: swipe-x 2.4s ease-in-out infinite; }
  .is-playing .anim-swipe-y { animation: swipe-y 2.4s ease-in-out infinite; }
  .is-playing .anim-spread-a { animation: spread-a 2.8s ease-in-out infinite; }
  .is-playing .anim-spread-b { animation: spread-b 2.8s ease-in-out infinite; }
  .is-playing .anim-drag { animation: drag-move 3.2s ease-in-out infinite; }
  .is-playing .anim-drag-ring { animation: drag-ripple 3.2s ease-out infinite; }
  .is-playing .anim-scroll-y { animation: scroll-y 1.6s ease-in-out infinite alternate; }
  .is-playing .anim-key { animation: key-press 2.2s ease-in-out infinite; }
}

/* A finger lands, presses, and lifts. */
@keyframes tap-press {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  8% { opacity: 0.18; transform: scale(1.5); } 14% { opacity: 1; transform: scale(1); }
  24% { transform: scale(0.78); }
  36% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.18; transform: scale(1); }
}
@keyframes tap-ripple {
  0%, 20% { opacity: 0; transform: scale(0.8); }
  26% { opacity: 0.8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(2.6); }
}
@keyframes tap-press-twice {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  10% { opacity: 1; transform: scale(1); }
  17% { transform: scale(0.78); }
  25% { opacity: 0.15; transform: scale(1.15); }
  32% { opacity: 1; transform: scale(1); }
  39% { transform: scale(0.78); }
  48% { opacity: 1; transform: scale(1); }
  60% { opacity: 0.18; transform: scale(1); }
}
@keyframes tap-ripple-twice {
  0%, 15% { opacity: 0; transform: scale(0.8); }
  19% { opacity: 0.8; transform: scale(1); }
  34% { opacity: 0; transform: scale(2.2); }
  37% { opacity: 0; transform: scale(0.8); }
  41% { opacity: 0.8; transform: scale(1); }
  75%, 100% { opacity: 0; transform: scale(2.6); }
}
/* Fingers land, slide across, and lift. */
@keyframes swipe-x {
  0% { opacity: 0; transform: translateX(-20px); }
  15% { opacity: 1; transform: translateX(-20px); }
  65% { opacity: 1; transform: translateX(20px); }
  80%, 100% { opacity: 0; transform: translateX(20px); }
}
@keyframes swipe-y {
  0% { opacity: 0; transform: translateY(22px); }
  15% { opacity: 1; transform: translateY(22px); }
  65% { opacity: 1; transform: translateY(-26px); }
  80%, 100% { opacity: 0; transform: translateY(-26px); }
}
/* Two fingers spread apart, then pinch back together. */
@keyframes spread-a {
  0%, 100% { opacity: 0; transform: translate(4px, -4px); }
  10%, 20% { opacity: 1; transform: translate(4px, -4px); }
  50%, 60% { opacity: 1; transform: translate(-12px, 12px); }
  88% { opacity: 1; transform: translate(4px, -4px); }
  96% { opacity: 0; }
}
@keyframes spread-b {
  0%, 100% { opacity: 0; transform: translate(-4px, 4px); }
  10%, 20% { opacity: 1; transform: translate(-4px, 4px); }
  50%, 60% { opacity: 1; transform: translate(12px, -12px); }
  88% { opacity: 1; transform: translate(-4px, 4px); }
  96% { opacity: 0; }
}
/* Tap once, land again and hold, then move. */
@keyframes drag-move {
  0% { opacity: 0.18; transform: translate(0, 0) scale(1); }
  8% { opacity: 1; transform: translate(0, 0) scale(1); }
  14% { transform: translate(0, 0) scale(0.78); }
  20% { opacity: 0.1; transform: translate(0, 0) scale(1.15); }
  28% { opacity: 1; transform: translate(0, 0) scale(1); }
  34% { opacity: 1; transform: translate(0, 0) scale(0.85); }
  74% { opacity: 1; transform: translate(20px, 30px) scale(0.85); }
  84% { opacity: 0; transform: translate(20px, 30px) scale(1.2); } 92% { opacity: 0; transform: translate(0, 0) scale(1); } 100% { opacity: 0.18; transform: translate(0, 0) scale(1); }
}
@keyframes drag-ripple {
  0%, 10% { opacity: 0; transform: scale(0.8); }
  14% { opacity: 0.8; transform: scale(1); }
  30%, 100% { opacity: 0; transform: scale(2.4); }
}
/* The second finger scrolls up and down while the first holds the drag. */
@keyframes scroll-y {
  from { transform: translateY(14px); }
  to { transform: translateY(-14px); }
}
@keyframes key-press {
  0%, 12%, 50%, 100% { transform: translateY(0); }
  18%, 40% { transform: translateY(3px); }
}

/* ---------------------------------------------------------------- navigation on small screens */

@media (max-width: 640px) {
  .header-row { padding-top: 8px; padding-bottom: 4px; }
  .site-header nav { width: 100%; order: 3; margin-left: 0; }
  .lang-switch { margin-left: auto; }
  .nav { flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 6px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav li { flex: none; }
}

/* ---------------------------------------------------------------- features page
   Same building blocks as Home: full-width sections and card grids. */

.page-intro { padding-bottom: clamp(24px, 4vw, 40px); }
.page-intro + section { border-top: 0; padding-top: 0; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card > h3:first-child { margin-top: 0; }
.card p + p, .card p + ul, .card ul + p { margin-top: 12px; }
.card .chips { margin-top: 4px; }
.card .checklist { margin: 8px 0 0; color: var(--muted); }

/* Example rows: the key or command on its own line, its meaning under it, so
   long commands wrap cleanly instead of squeezing into a narrow column. */
.examples { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.examples li { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.examples kbd, .examples code {
  align-self: flex-start; max-width: 100%;
  font: 600 0.92rem/1.4 var(--mono); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.examples span { color: var(--muted); font-size: 0.95rem; }
.more-link { margin-top: 24px; text-align: center; }

/* ---------------------------------------------------------------- home: before and after */

.compare { margin-top: 28px; }
.compare .before { background: var(--surface-2); box-shadow: none; }
.compare .after { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.compare .checklist { color: var(--text); }
.crosslist { list-style: none; padding: 0; margin: 8px 0 0; color: var(--muted); }
.crosslist li { padding-left: 1.8em; position: relative; margin-bottom: 0.6em; }
.crosslist li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 700; }
.closing { margin-top: 28px; }

/* ---------------------------------------------------------------- install guide pop-up, terminal command */

.install-guide {
  box-sizing: border-box; width: 680px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px); overflow-y: auto; margin: auto;
  border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 24px;
  background: var(--bg); color: var(--text); box-shadow: 0 24px 80px rgb(0 0 0 / 0.35);
}
.install-guide::backdrop { background: rgb(0 0 0 / 0.45); }
.install-guide h2 { margin-right: 32px; }
.install-guide .lead { font-size: 1rem; }
.dialog-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.dialog-x { border: 0; background: var(--surface-2); color: var(--muted); width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.dialog-actions { margin-top: 20px; }
.steps.compact { margin: 16px 0; }
.steps.compact > li { padding-bottom: 14px; }
.steps.compact h3 { font-size: 1.02rem; }

.command-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.command-row code {
  flex: 1 1 260px; display: block; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font: 0.88rem/1.4 var(--mono); overflow-wrap: anywhere; user-select: all;
}
.button.small { min-height: 38px; padding: 6px 16px; font-size: 0.95rem; }
.warning { background: color-mix(in srgb, var(--warn) 14%, transparent); border-radius: 8px; padding: 10px 12px; font-size: 0.92rem; }
.key-card { margin-top: 24px; text-align: left; }
.instant-buy { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* Step 2's alternative to the Terminal command */
.or-block { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin-top: 14px; }
.or-block .or-title { font-weight: 650; color: var(--text); margin-bottom: 4px; }
.steps .command-row + .fineprint, .steps .warning { margin-bottom: 10px; }
@media (max-width: 640px) { .install-guide { padding: 22px 18px 18px; } .steps > li { padding-left: 52px; } }
