/* GlycoLog landing. Hand-designed; tokens in three layers (palette -> semantic -> components).
   Asset URLs are written as /GlycoLog/assets/... here and fingerprinted (?v=<sha8>) by scripts/compose_site.mjs. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/GlycoLog/assets/fonts/plusjakarta-latin.woff2?v=153fc85b") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* palette */
  --palette-green-950: #022c22;
  --palette-green-900: #064e3b;
  --palette-green-800: #065f46;
  --palette-green-700: #047857;
  --palette-green-600: #059669;
  --palette-green-300: #6ee7b7;
  --palette-green-100: #d1fae5;
  --palette-green-50: #ecfdf5;
  --palette-ink: #0f172a;
  --palette-slate-700: #334155;
  --palette-slate-600: #475569;
  --palette-slate-200: #e2e8f0;
  --palette-slate-100: #f1f5f9;
  --palette-slate-50: #f8fafc;
  --palette-white: #ffffff;
  --palette-sky-500: #0ea5e9;
  --palette-amber-100: #fef3c7;
  --palette-amber-800: #92400e;

  /* semantic */
  --color-bg: var(--palette-white);
  --color-bg-soft: var(--palette-slate-50);
  --color-bg-tint: var(--palette-green-50);
  --color-bg-deep: var(--palette-green-900);
  --color-text: var(--palette-ink);
  --color-muted: var(--palette-slate-600);
  --color-line: var(--palette-slate-200);
  --color-brand: var(--palette-green-700);
  --color-brand-strong: var(--palette-green-800);
  --color-on-brand: var(--palette-white);
  --color-accent: var(--palette-green-600);
  --color-chart: var(--palette-sky-500);
  --color-on-deep: var(--palette-green-50);
  --color-on-deep-muted: var(--palette-green-100);
  --color-focus: var(--palette-sky-500);

  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --radius-s: 0.625rem;
  --radius-m: 1rem;
  --radius-l: 1.75rem;
  --shadow-card: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.07);
  --shadow-phone: 0 24px 48px -12px rgb(6 78 59 / 0.35), 0 8px 16px rgb(15 23 42 / 0.12);
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-brand); text-underline-offset: 0.2em; }
a:hover { color: var(--color-brand-strong); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
/* Chinese has no spaces: strict kinsoku (no line starts with punctuation); pretty avoids one-character last lines */
.lede, .section-head p, .card p, .step p, .ticks span, .faq p, .deep-card p, .closing p { line-break: strict; overflow-wrap: break-word; text-wrap: pretty; }
.lede { text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: 0.6rem 1rem; background: var(--color-brand-strong); color: var(--color-on-brand);
  border-radius: var(--radius-s); text-decoration: none; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.5rem; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-primary { background: var(--color-brand); color: var(--color-on-brand); box-shadow: 0 6px 16px rgb(4 120 87 / 0.28); }
.btn-primary:hover { background: var(--color-brand-strong); color: var(--color-on-brand); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--color-brand-strong); border-color: var(--palette-green-300); }
.btn-ghost:hover { background: var(--color-bg-tint); color: var(--color-brand-strong); }
.btn-outline-light { background: transparent; color: var(--palette-white); border-color: rgb(255 255 255 / 0.6); }
.btn-outline-light:hover { background: rgb(255 255 255 / 0.12); color: var(--palette-white); transform: translateY(-1px); }
.play-ico { flex: none; }
.btn-sm { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; }
.btn-sm { white-space: nowrap; }
@media (max-width: 22.5rem) { .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; gap: 0.35rem; } }
.btn-light { background: var(--palette-white); color: var(--palette-green-900); }
.btn-light:hover { background: var(--palette-green-50); color: var(--palette-green-900); transform: translateY(-1px); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-line); }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--color-text); font-weight: 800; font-size: 1.15rem; }
.brand img { width: 2.25rem; height: 2.25rem; flex: none; }
.brand small { font-weight: 600; font-size: 0.8rem; color: var(--color-muted); margin-left: 0.15rem; }
.top-nav { display: none; gap: 1.5rem; }
.top-nav a { color: var(--color-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.35rem 0; }
.top-nav a:hover { color: var(--color-brand-strong); }
@media (min-width: 56rem) { .top-nav { display: flex; } }
@media (max-width: 22.5rem) { .brand small { display: none; } }
/* the language link (rendered from landing/content.json): a plain link to the other language's page, labelled in that language */
.top-actions { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.lang-switch { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.4rem 0.2rem; font-weight: 700; font-size: 0.95rem; color: var(--color-brand-strong); text-decoration: underline; text-decoration-thickness: 1px; }
/* phones: below 480px the brand drops its sub-label and the header row tightens, so the labelled "Google Play" button still
   fits at 390px; only below 384px (320/360 phones) the header button shows the play glyph alone, keeping its name for screen
   readers (the hero right below carries the full Google Play button) */
@media (max-width: 30rem) {
  .brand small { display: none; }
  .top-bar { gap: 0.6rem; }
  .top-actions { gap: 0.5rem; }
  .top .btn-sm { padding: 0.4rem 0.8rem; gap: 0.35rem; }
}
@media (max-width: 23.99rem) {
  .top .btn-sm { padding: 0.4rem 0.75rem; min-width: 2.75rem; }
  .top .play-txt { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}

/* ---- hero ---- */
.hero { position: relative; background: linear-gradient(180deg, var(--palette-green-50) 0%, var(--palette-white) 100%); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 38rem; height: 38rem; right: -12rem; top: -10rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(16 185 129 / 0.22), rgb(16 185 129 / 0));
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 3rem; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 2rem; } }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem;font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; color: var(--color-brand-strong); background: var(--palette-green-100); padding: 0.3rem 0.85rem; border-radius: 999px; }
.hero h1 { font-size: clamp(2.25rem, 6.2vw, 4rem); font-weight: 800; margin-top: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--color-brand); }
.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--color-muted); margin-top: 1.25rem; max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }
.chips li { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--palette-white); border: 1px solid var(--color-line); font-size: 0.92rem; font-weight: 600; box-shadow: 0 1px 2px rgb(15 23 42 / 0.05); }
.chips li::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--color-accent); }

.stage { position: relative; display: grid; place-items: center; min-height: 30rem; padding-bottom: 2.75rem; }
.phone {
  position: relative; margin: 0; width: min(100%, 17rem);
  border: 0.5rem solid var(--palette-ink); border-radius: 2.4rem; background: var(--palette-ink);
  overflow: hidden; box-shadow: var(--shadow-phone);
}
.phone img { width: 100%; height: auto; }
.phone-main { z-index: 2; }
.phone-back { position: absolute; z-index: 1; width: min(60%, 12.5rem); right: 2%; bottom: 3%; transform: rotate(7deg); opacity: 1; }
.sticker {
  position: absolute; z-index: 3; left: 0; top: 10%; padding: 0.6rem 1rem; border-radius: var(--radius-m);
  background: var(--palette-white); box-shadow: var(--shadow-card); font-weight: 800; line-height: 1.25; font-size: 0.95rem;
}
.sticker b { display: block; font-size: 1.6rem; color: var(--color-brand); }
.stage-note { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; text-align: center; font-size: 0.8rem; color: var(--color-muted); }
@media (max-width: 55.99rem) {
  .stage { min-height: 28rem; }
  /* one column: the badge sits low on the stage so it never covers the dashboard numbers at the top of the phone */
  .sticker { left: 4%; top: auto; bottom: 16%; }
}
@media (max-width: 26rem) {
  .phone { width: min(100%, 14.5rem); }
  .phone-back { width: min(52%, 9.5rem); right: 0; }
  .sticker { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
  .sticker b { font-size: 1.3rem; }
}

/* ---- facts strip ---- */
.facts { background: var(--palette-white); border-block: 1px solid var(--color-line); }
.facts ul { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48rem) { .facts ul { grid-template-columns: repeat(4, 1fr); } }
.facts li { padding: 1.5rem 1rem; border-inline-start: 1px solid var(--color-line); }
.facts li:nth-child(odd) { border-inline-start: 0; }
@media (min-width: 48rem) { .facts li:nth-child(odd) { border-inline-start: 1px solid var(--color-line); } .facts li:first-child { border-inline-start: 0; } }
.facts li:nth-child(n+3) { border-top: 1px solid var(--color-line); }
@media (min-width: 48rem) { .facts li:nth-child(n+3) { border-top: 0; } }
.facts b { display: block; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; color: var(--color-brand); line-height: 1.1; }
.facts span { display: block; margin-top: 0.35rem; font-size: 0.95rem; color: var(--color-muted); }

/* ---- generic sections ---- */
.section { padding-block: var(--section); }
.section-soft { background: var(--color-bg-soft); }
.section-head { max-width: 40rem; }
.kicker { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; color: var(--color-brand); }
.section h2 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); font-weight: 800; margin-top: 0.6rem; }
.section-head p { margin-top: 1rem; color: var(--color-muted); }
[id] { scroll-margin-top: 5.5rem; }

/* problem cards */
.cards { display: grid; gap: 1.1rem; margin-top: 2.5rem; }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; } }
.card { background: var(--palette-white); border: 1px solid var(--color-line); border-radius: var(--radius-m); padding: 1.6rem; box-shadow: var(--shadow-card); }
.card h3 { font-size: 1.15rem; font-weight: 800; }
.card p { margin-top: 0.7rem; color: var(--color-muted); font-size: 1rem; }
.card .mark { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; background: var(--palette-amber-100); color: var(--palette-amber-800); font-weight: 800; margin-bottom: 1rem; }

/* how it works */
.steps { display: grid; gap: 1.4rem; margin-top: 3rem; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; } }
.step { display: flex; flex-direction: column; background: var(--palette-white); border: 1px solid var(--color-line); border-radius: var(--radius-l); padding: 1.75rem 1.75rem 0; overflow: hidden; box-shadow: var(--shadow-card); }
.step-no { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em; color: var(--color-brand); }
.step h3 { font-size: 1.35rem; font-weight: 800; margin-top: 0.4rem; }
.step p { margin: 0.7rem 0 1.75rem; color: var(--color-muted); font-size: 1rem; }
.step .shot { margin: auto auto 0; width: min(100%, 15rem); border: 0.45rem solid var(--palette-ink); border-bottom: 0; border-radius: 2rem 2rem 0 0; overflow: hidden; background: var(--palette-ink); }
.step .shot img { width: 100%; height: auto; }

/* split sections */
.split { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } .split.flip .split-media { order: -1; } }
.ticks { margin-top: 1.75rem; display: grid; gap: 0.95rem; }
.ticks li { position: relative; padding-inline-start: 2rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--palette-green-100); box-shadow: inset 0 0 0 0.3rem var(--color-accent); }
.ticks b { font-weight: 800; }
.ticks span { display: block; color: var(--color-muted); font-size: 0.97rem; }
.split-media { position: relative; display: grid; place-items: center; min-height: 26rem; }
.split-media .phone { width: min(100%, 15.5rem); }
.split-media .phone-back { width: min(55%, 11.5rem); right: 4%; bottom: 2%; }
.split-media::before { content: ""; position: absolute; inset: 8% 6%; border-radius: 2.5rem; background: var(--palette-green-100); transform: rotate(-3deg); z-index: 0; }
.split-media .phone { z-index: 2; }

/* privacy (deep) */
.deep { background: var(--color-bg-deep); color: var(--color-on-deep); }
.deep .kicker { color: var(--palette-green-300); }
.deep .section-head p { color: var(--color-on-deep-muted); }
.deep a { color: var(--palette-green-300); }
.deep a:hover { color: var(--palette-white); }
.deep-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.deep-card { background: rgb(255 255 255 / 0.07); border: 1px solid rgb(255 255 255 / 0.16); border-radius: var(--radius-m); padding: 1.6rem; }
.deep-card h3 { font-size: 1.15rem; font-weight: 800; }
.deep .more { margin-top: 1.5rem; }
.deep-card p { margin-top: 0.7rem; color: var(--color-on-deep-muted); font-size: 1rem; }
.deep .split-media::before { background: rgb(255 255 255 / 0.08); }

/* FAQ */
.faq-grid { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .faq-grid { grid-template-columns: 0.8fr 1.6fr; gap: 4rem; align-items: start; } .faq-grid .section-head { position: sticky; top: 6rem; } }
.faq { margin-top: 2.5rem; border-top: 1px solid var(--color-line); }
@media (min-width: 56rem) { .faq { margin-top: 0.5rem; } }
.faq details { border-bottom: 1px solid var(--color-line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1rem; font-size: 1.6rem; font-weight: 400; color: var(--color-brand); line-height: 1.2; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 2.5rem 1.35rem 0; color: var(--color-muted); }

/* closing CTA */
.closing { background: linear-gradient(135deg, var(--palette-green-800), var(--palette-green-600)); color: var(--palette-white); text-align: center; }
.closing h2 { color: var(--palette-white); font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
.closing p { margin: 1rem auto 0; max-width: 32rem; color: var(--palette-green-50); }
.closing .cta-row { justify-content: center; }

/* privacy policy (landing/privacy/page.html): one readable column */
.legal { padding-block: clamp(2rem, 6vw, 4rem); }
.legal-in { max-width: 46rem; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); font-weight: 800; }
.legal-updated { margin-top: 0.6rem; font-size: 0.9rem; color: var(--color-muted); }
.legal-lede { margin-top: 1.25rem; font-size: 1.1rem; color: var(--color-text); }
.legal h2 { margin-top: 2.25rem; font-size: 1.3rem; font-weight: 800; }
.legal p { margin-top: 0.75rem; color: var(--color-muted); }
.legal a { overflow-wrap: anywhere; }
.legal-summary { margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-m); background: var(--color-bg-tint); border: 1px solid var(--color-line); }
.legal-summary h2 { margin-top: 0; font-size: 1.1rem; }
.legal-summary ul { margin-top: 0.75rem; display: grid; gap: 0.5rem; padding-inline-start: 1.2rem; list-style: disc; color: var(--color-text); }
.legal-back { margin-top: 2.5rem; }

/* footer */
.foot { background: var(--palette-slate-100); border-top: 1px solid var(--color-line); padding-block: 2rem; font-size: 0.92rem; color: var(--color-muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; }
.foot a { color: var(--palette-slate-700); }
.foot-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--color-text); }
.foot-brand img { width: 1.5rem; height: 1.5rem; flex: none; }
.foot-links {display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot-note { flex-basis: 100%; margin: 0; font-size: 0.82rem; }

/* 404 page shares this sheet */
.nf { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: 1.1rem; padding-block: 3rem; }
.nf h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 800; color: var(--color-brand); }
.nf p { color: var(--color-muted); max-width: 30rem; }

/* motion only for visitors who allow it */
@media (prefers-reduced-motion: no-preference) {
  .sticker { animation: bob 5s ease-in-out infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  .phone-main { animation: rise 0.7s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
@media (forced-colors: active) { .btn-primary, .btn-light { border-color: ButtonText; } }
