/* Landing page only (index.html, vi/index.html). Builds on the tokens in styles.css. */
:root {
  --ink: #0b0b0c;
  --ink-2: #141416;
  --ink-3: #1d1d20;
  --paper: #f3f2ee;
  --paper-muted: #a3a29d;
  --lime-glow: rgba(200, 249, 75, 0.16);
  --radius-lg: 28px;
  --shadow-lg: 0 40px 80px -20px rgba(0, 0, 0, 0.55), 0 12px 24px -8px rgba(0, 0, 0, 0.35);
  --blob: #e3f6b1;
}
html { background: var(--bg); }
body.landing { background: var(--bg); }
.landing .wrap { max-width: 1160px; padding: 0 20px; }
.landing img { max-width: 100%; }

/* ---------- dark bands (always dark, both themes) ---------- */
.band-dark { background: var(--ink); color: var(--paper); }
.band-dark .muted, .band-dark p.lead { color: var(--paper-muted); }
.band-dark a { color: var(--lime); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 9px; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.topbar nav a { color: var(--paper-muted); text-decoration: none; }
.topbar nav a:hover { color: var(--paper); }
.topbar nav a.switch { color: var(--paper); border: 1px solid #333338; border-radius: 999px; padding: 5px 14px; background: transparent; }
.topbar nav a.switch:hover { border-color: var(--paper); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 38%, var(--lime-glow), transparent 70%),
    radial-gradient(700px 400px at 8% 110%, rgba(200, 249, 75, 0.07), transparent 70%),
    var(--ink);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.95fr; gap: 40px; align-items: center; padding: 48px 0 88px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--paper); border: 1px solid #2c2c30; background: #151517; border-radius: 999px; padding: 6px 14px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200, 249, 75, 0.18); }
.hero h1 { font-size: clamp(44px, 7.2vw, 88px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; margin: 22px 0 20px; color: var(--paper); }
.hero h1 .hl { color: var(--lime); }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 34ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; border-radius: 16px; padding: 12px 20px 12px 16px; font-weight: 700; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: 0.7; letter-spacing: 0.02em; }
.btn span { display: block; font-size: 17px; line-height: 1.15; }
.btn-lime { background: var(--lime); color: var(--ink) !important; }
.btn-ghost { border: 1px solid #38383d; color: var(--paper) !important; background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--paper); }
.hero .also { margin-top: 18px; font-size: 14px; color: var(--paper-muted); }
.hero .also a { color: var(--paper); }

.phones { position: relative; height: 620px; }
.phone { position: absolute; width: 290px; border-radius: 46px; padding: 10px; background: #1a1a1c; box-shadow: var(--shadow-lg), inset 0 0 0 1px #2e2e33; }
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; }
.phones .p1 { left: 4%; top: 30px; transform: rotate(-5deg); z-index: 2; }
.phones .p2 { right: 2%; top: 0; transform: rotate(4deg); z-index: 1; }
.chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-weight: 700; font-size: 15px; }
.chip b { font-size: 22px; letter-spacing: -0.02em; }
.chip .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.chip .tick svg { width: 14px; height: 14px; }
.phones .c1 { left: -2%; bottom: 40px; }
.phones .c2 { right: 0; top: 70px; background: var(--lime); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: -44px; position: relative; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.35); }
.stat { padding: 26px 26px 24px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { display: block; font-size: 34px; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.stat b em { font-style: normal; color: var(--lime-ink, #5f8a00); }
.stat span { color: var(--muted); font-size: 15px; line-height: 1.4; }

/* ---------- section heads ---------- */
.section { padding: 104px 0 0; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.section h2, .band-dark h2, .privacy-card h2, .phone-intro h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 800; }
.section p.lead { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; max-width: 46ch; }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature.rev .media { order: -1; }
.feature .media { display: flex; justify-content: center; position: relative; }
.feature .media .phone { position: relative; width: min(330px, 80%); }
.media-blob { position: absolute; inset: 10% 4% 6%; border-radius: 48px; background: var(--blob); z-index: 0; }
.feature .media .phone { z-index: 1; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 16px; line-height: 1.5; }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0c' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- desktop band ---------- */
.band-dark.desktop { margin-top: 120px; padding: 96px 0 104px; background: radial-gradient(800px 420px at 50% 0%, var(--lime-glow), transparent 70%), var(--ink); }
.desktop .head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.desktop .head .kicker { color: var(--paper-muted); }
.desktop .head p.lead { margin: 0 auto; max-width: 56ch; font-size: 18px; line-height: 1.6; }
.window { border-radius: 16px; background: #1c1c1f; box-shadow: var(--shadow-lg), inset 0 0 0 1px #2e2e33; overflow: hidden; }
.window .bar { display: flex; gap: 8px; padding: 12px 14px; background: #19191b; border-bottom: 1px solid #262629; }
.window .bar i { width: 12px; height: 12px; border-radius: 50%; background: #3a3a3f; }
.window .bar i:nth-child(1) { background: #ff5f57; } .window .bar i:nth-child(2) { background: #febc2e; } .window .bar i:nth-child(3) { background: #28c840; }
.window img { display: block; width: 100%; height: auto; }
.desk-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.desk-cats div { background: var(--ink-2); border: 1px solid #242427; border-radius: 18px; padding: 18px 20px; }
.desk-cats b { display: block; color: var(--paper); font-size: 16px; margin-bottom: 4px; }
.desk-cats span { color: var(--paper-muted); font-size: 14px; line-height: 1.45; }

/* uninstall row: window + small phone */
.feature .media.combo { display: block; position: relative; padding: 0 70px 40px 0; }
.combo .window { width: 100%; }
.feature .media.combo .phone { position: absolute; right: 0; bottom: 0; width: 170px; border-radius: 30px; padding: 7px; z-index: 2; }
.combo .phone img { border-radius: 24px; }

/* ---------- privacy band ---------- */
.privacy-card { margin-top: 120px; border-radius: 32px; padding: 64px; background: radial-gradient(700px 360px at 100% 0%, var(--lime-glow), transparent 70%), var(--ink); color: var(--paper); }
.privacy-card h2 { color: var(--paper); }
.privacy-card p.lead { color: var(--paper-muted); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.pgrid div { background: var(--ink-2); border: 1px solid #242427; border-radius: 20px; padding: 22px; }
.pgrid svg { width: 28px; height: 28px; color: var(--lime); margin-bottom: 14px; }
.pgrid b { display: block; font-size: 17px; margin-bottom: 6px; }
.pgrid span { color: var(--paper-muted); font-size: 14px; line-height: 1.5; }
.privacy-card .more { margin-top: 28px; display: inline-block; color: var(--lime); font-weight: 600; }

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.dl-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; transition: transform .15s ease, border-color .15s ease; }
.dl-card:hover { transform: translateY(-3px); border-color: var(--text); }
.dl-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; }
.dl-card .ico svg { width: 24px; height: 24px; color: var(--lime); }
.dl-card b { font-size: 18px; }
.dl-card span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.dl-card .go { margin-top: auto; font-weight: 700; font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }

/* ---------- footer ---------- */
.foot { margin-top: 112px; border-top: 1px solid var(--border); padding: 32px 0 48px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; font-size: 14px; color: var(--muted); }
.foot .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); text-decoration: none; }
.foot .brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--text); }
.foot .fine { width: 100%; }

/* ---------- reveal on scroll (only when JS runs and motion is fine) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- dark theme tweaks for light sections ---------- */
@media (prefers-color-scheme: dark) {
  .stat b em { color: var(--lime); }
  :root:not([data-theme="light"]) { --blob: #1a2108; }
  .dl-card .ico { background: #000; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 72px; }
  .phones { height: 520px; max-width: 520px; width: 100%; margin: 8px auto 0; }
  .phone { width: 240px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .feature, .feature.rev { grid-template-columns: 1fr; gap: 40px; }
  .feature.rev .media { order: 0; }
  .feature + .feature { margin-top: 88px; }
  .desk-cats { grid-template-columns: 1fr 1fr; }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .privacy-card { padding: 40px 28px; }
}
@media (max-width: 640px) {
  .landing .wrap { padding: 0 16px; }
  .topbar nav a.hide-sm { display: none; }
  .topbar nav { gap: 14px; }
  .hero-grid { padding-top: 24px; }
  .phones { height: 430px; }
  .phone { width: 196px; border-radius: 36px; padding: 8px; }
  .phone img { border-radius: 29px; }
  .phones .p1 { left: 0; }
  .phones .p2 { right: 0; }
  .chip { padding: 10px 12px; font-size: 13px; }
  .chip b { font-size: 18px; }
  .phones .c2 { top: 30px; }
  .stat { padding: 20px 18px; }
  .stat b { font-size: 28px; }
  .section { padding-top: 80px; }
  .pgrid, .dl-grid { grid-template-columns: 1fr; }
  .desk-cats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .desk-cats div { padding: 14px; border-radius: 14px; }
  .desk-cats b { font-size: 14px; }
  .desk-cats span { font-size: 12.5px; }
  .feature .media.combo { padding: 0 44px 28px 0; }
  .feature .media.combo .phone { width: 116px; border-radius: 22px; padding: 5px; }
  .combo .phone img { border-radius: 18px; }
  .privacy-card { padding: 32px 20px; border-radius: 24px; }
}

/* overrides of styles.css inside dark areas */
.topbar { margin: 0; }
.band-dark p, .band-dark li, .privacy-card p { color: var(--paper-muted); }
.band-dark h1, .band-dark h2, .band-dark b, .privacy-card b { color: var(--paper); }
.band-dark .chip b, .band-dark .chip span { color: var(--ink); }

/* Vietnamese headlines run longer */
:lang(vi) .hero h1 { font-size: clamp(40px, 6.4vw, 72px); }

/* ---------- per-device buttons (classes set in <head>: is-mobile/is-desktop, os-*) ---------- */
/* Without JS, or on an unknown device, the store buttons show. */
.cta-desktop, .also-desktop { display: none; }
.is-desktop .cta-desktop { display: flex; }
.is-desktop .also-desktop { display: block; }
.is-desktop .cta-mobile, .is-desktop .also-mobile { display: none; }
/* A phone whose OS we know sees only its own store. */
.os-ios .cta-mobile [data-os="android"], .os-android .cta-mobile [data-os="ios"] { display: none; }
.os-android .cta-mobile [data-os="android"] { background: var(--lime); color: var(--ink) !important; border-color: transparent; }
/* On Windows, the Windows download comes first. */
.os-windows .cta-desktop [data-os="windows"] { order: -1; background: var(--lime); color: var(--ink) !important; border-color: transparent; }
.os-windows .cta-desktop [data-os="mac"] { background: rgba(255, 255, 255, 0.03); color: var(--paper) !important; border: 1px solid #38383d; }
/* Download section: mark the card for this device. */
.dl-card { position: relative; }
.dl-card .here { display: none; position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 700; background: var(--lime); color: var(--ink); border-radius: 999px; padding: 3px 10px; }
.os-ios .dl-card[data-os="ios"], .os-android .dl-card[data-os="android"],
.os-mac .dl-card[data-os="mac"], .os-windows .dl-card[data-os="windows"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.os-ios .dl-card[data-os="ios"] .here, .os-android .dl-card[data-os="android"] .here,
.os-mac .dl-card[data-os="mac"] .here, .os-windows .dl-card[data-os="windows"] .here { display: inline-block; }

/* ---------- pictures and section order per device ---------- */
/* Phones by default (and without JS); a computer sees the desktop app instead. */
.vis-desktop, .only-desktop { display: none; }
.is-desktop .vis-desktop, .is-desktop .only-desktop { display: block; }
.is-desktop .vis-mobile { display: none; }

.desk-hero { position: relative; height: 560px; }
.desk-hero .window { position: absolute; left: 0; top: 30px; width: 820px; max-width: none; border-radius: 14px;
  transform: perspective(1800px) rotateY(-9deg) rotateX(3deg); transform-origin: left center; }
.desk-hero .chip { position: absolute; z-index: 3; }
.desk-hero .c1 { left: -28px; bottom: 36px; }
.desk-hero .c2 { left: 300px; top: -6px; background: var(--lime); }

/* Section order: phone features first on phones; the computer sections first on a computer. */
.flow { display: flex; flex-direction: column; }
.f-stats { order: 1; } .f-phone { order: 2; } .f-desktop { order: 3; } .f-uninstall { order: 4; } .f-rest { order: 5; }
.is-desktop .f-desktop { order: 2; } .is-desktop .f-uninstall { order: 3; } .is-desktop .f-phone { order: 4; }
.phone-intro { text-align: center; max-width: 720px; margin: 0 auto; padding-top: 112px; }
.phone-intro p.lead { margin: 0 auto; }
.is-desktop .f-phone .section { padding-top: 72px; }

@media (max-width: 980px) {
  .desk-hero { height: auto; }
  .desk-hero .window { position: relative; top: 0; width: 100%; transform: none; }
  .desk-hero .c1 { left: -8px; bottom: -18px; }
  .desk-hero .c2 { left: auto; right: -8px; top: -18px; }
}
/* The hero already shows the desktop app on a computer, so the desktop band skips its screenshot there. */
.is-desktop .f-desktop .window { display: none; }
.is-desktop .f-desktop .head { margin-bottom: 32px; }

/* ---------- Linux ---------- */
/* The hero shows Linux packages only to Linux visitors; Mac and Windows visitors get those two. */
.cta-desktop .linux-only, .also-linux { display: none; }
.os-linux .cta-desktop .linux-only { display: inline-flex; }
.os-linux .cta-desktop [data-os="mac"], .os-linux .cta-desktop [data-os="windows"],
.os-linux .cta-desktop [data-os="linux-pick"] { display: none; }
/* The hero's Linux button on Mac/Windows jumps to the Linux card, where you pick .deb, .rpm or AppImage. */
.dl-card:target { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
#linux { scroll-margin-top: 140px; }
.os-linux.is-desktop .also-linux { display: block; }
.os-linux .also-desktop { display: none; }
.os-linux .dl-card[data-os="linux"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.os-linux .dl-card[data-os="linux"] .here { display: inline-block; }
@media (min-width: 981px) { .dl-grid { grid-template-columns: repeat(5, 1fr); } }
.dl-multi .go-row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.dl-multi .go-row a { font-weight: 700; font-size: 13px; text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.dl-multi .go-row a:hover { border-color: var(--text); }
.dl-multi:hover { transform: none; }
.landing code { font-size: 0.88em; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }

/* Type: Bricolage Grotesque for display, Be Vietnam Pro for text, JetBrains Mono for labels. */
.topbar .brand, .hero h1, .section h2, .band-dark h2, .privacy-card h2, .phone-intro h2,
.stat b, .chip b, .btn span, .dl-card b, .faq summary, .desk-cats b, .pgrid b, .foot .brand {
  font-family: var(--font-display); font-optical-sizing: auto;
}
.hero h1 { letter-spacing: -0.03em; }
.section h2, .band-dark h2, .privacy-card h2, .phone-intro h2 { letter-spacing: -0.025em; }
.kicker, .eyebrow, .btn small, .dl-card .here, .note code {
  font-family: var(--font-mono);
}
.kicker { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0; }
