/* cueapp.net. Colours, radii and type come from design/tokens.json (light and dark Material
   roles, the brand gradient, the pin yellow, the expiring colour). */

@font-face { font-family: "Cue Display"; font-weight: 600; font-display: swap; src: url("../fonts/cue-display-semibold.woff2?v=8eecd8f85d") format("woff2"); }
@font-face { font-family: "Cue Display"; font-weight: 700; font-display: swap; src: url("../fonts/cue-display-bold.woff2?v=366bc97199") format("woff2"); }
@font-face { font-family: "Cue Display"; font-weight: 800; font-display: swap; src: url("../fonts/cue-display-extrabold.woff2?v=79fed2089d") format("woff2"); }

:root {
  --paper: #fcf8ff;
  --card: #ffffff;
  --tint: #f0ecf9;
  --tint-2: #eae6f4;
  --ink: #1b1b24;
  --ink-2: #464555;
  --ink-3: #777587;
  --line: #c7c4d8;
  --accent: #3525cd;
  --code: #5b4de9;
  --brand-a: #4f46e5;
  --brand-b: #8b5cf6;
  --pin: #f9a825;
  --expiring: #ba1a1a;
  --on-brand: #ffffff;
  --frame: #0e0d16;
  --shadow: rgba(53, 37, 205, 0.28);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
  --display: "Cue Display", var(--sans);
  --wrap: 1120px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13121b;
    --card: #1b1b24;
    --tint: #1f1f28;
    --tint-2: #2a2933;
    --ink: #e4e1ee;
    --ink-2: #c7c4d8;
    --ink-3: #918fa1;
    --line: #464555;
    --accent: #c3c0ff;
    --code: #c3c0ff;
    --expiring: #ffb4ab;
    --frame: #000000;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand-a); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; }
:lang(en) h1, :lang(en) h2 { letter-spacing: -0.02em; }
/* Chinese headings break at punctuation, not inside a phrase */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) .statement { word-break: keep-all; overflow-wrap: anywhere; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 22px/1 var(--display); }
.brand svg { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav .lang { color: var(--accent); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 var(--display); text-decoration: none;
  color: var(--accent); background: var(--tint); border: 0;
}
.btn:hover { background: var(--tint-2); }
.btn-primary { background: var(--brand-a); color: var(--on-brand); }
.btn-primary:hover { background: #3f37cf; }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-weight: 800; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.2; }
.hero h1 .line { white-space: nowrap; }
:lang(en) .hero h1 { font-size: clamp(36px, 4.2vw, 56px); }
:lang(en) .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
:lang(en) .hero h1 { line-height: 1.04; }
.lede { margin-top: 24px; font-size: 19px; color: var(--ink-2); max-width: 34em; }
:lang(en) .lede { max-width: 30em; }
.hero .actions { margin-top: 32px; }
.req { margin-top: 20px; font-size: 14px; color: var(--ink-3); }

.stage {
  position: relative;
  border-radius: 28px;
  padding: 56px 40px 40px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  overflow: hidden;
}
.stage-ring { position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; opacity: 0.16; }
.stage .entry + .entry { margin-top: 14px; }
.stage-note { position: relative; margin-top: 22px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.86); }

/* The entry card, drawn as the app draws it */
.entry {
  position: relative; display: block; width: 100%;
  padding: 22px 26px 22px 30px; border-radius: 16px;
  background: var(--card); color: var(--ink);
  text-align: left; font: inherit; border: 0;
  box-shadow: 0 24px 48px -28px rgba(20, 10, 90, 0.55);
}
.entry::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 16px 0 0 16px; background: var(--pin); }
button.entry { cursor: pointer; }
.entry-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.entry-head img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.entry-issuer { font: 700 18px/1.2 var(--display); }
.entry-name { color: var(--ink-2); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.entry-code { font: 700 clamp(44px, 5.4vw, 64px)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; color: var(--code); white-space: nowrap; transition: opacity 0.2s; }
.entry-code.dots { color: var(--line); letter-spacing: 0.08em; }
.entry-small { padding-top: 16px; padding-bottom: 16px; opacity: 0.94; }
.entry-small .entry-row { margin-top: 0; position: absolute; right: 26px; top: 50%; transform: translateY(-50%); }
.entry-small .entry-code { font-size: 26px; }
.ring { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-track { stroke: var(--tint-2); }
.ring-fill { stroke: var(--code); stroke-linecap: round; }
.entry.expiring .entry-code, .entry.expiring .ring-fill { color: var(--expiring); stroke: var(--expiring); }
.copied { position: absolute; right: 22px; top: 18px; font-size: 14px; font-weight: 600; color: var(--accent); opacity: 0; transition: opacity 0.2s; }
.entry.is-copied .copied { opacity: 1; }

/* Sections */
.section { padding: 104px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 40em; }
.section-head h2, .split h2 { font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.section-head p { margin-top: 16px; font-size: 19px; color: var(--ink-2); }

/* Where codes go */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; align-items: start; }
.place-visual { height: 560px; display: flex; align-items: center; justify-content: center; }
.place h3 { margin-top: 28px; font-size: 22px; font-weight: 800; line-height: 1.3; }
.place p { margin-top: 10px; color: var(--ink-2); }
.tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tag { font: 600 13px/1 var(--display); padding: 6px 10px; border-radius: 8px; background: var(--card); color: var(--ink-2); }
.section-tint .tag { background: var(--paper); }
.home { width: 100%; border-radius: 28px; padding: 28px 18px; background: linear-gradient(160deg, #2b2670, #4f46e5 55%, #7c5cf0); }
.home img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(10, 6, 60, 0.45)); }

/* Phones */
.phone { width: 100%; max-width: 270px; padding: 7px; border-radius: 38px; background: var(--frame); box-shadow: 0 40px 60px -36px var(--shadow); }
.phone img { width: 100%; height: auto; border-radius: 31px; }
.phone-lg { max-width: 320px; padding: 8px; border-radius: 44px; }
.phone-lg img { border-radius: 36px; }

/* Split sections */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 72px; align-items: center; }
.split-visual { display: flex; justify-content: center; gap: 24px; }
.split-flip .split-visual { order: 2; }
.points { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.points li { padding-left: 22px; position: relative; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-a); }
.points strong { color: var(--ink); font-weight: 600; }

/* Privacy statement */
.statement { font: 800 clamp(40px, 7vw, 88px)/1.08 var(--display); color: var(--ink); max-width: 13em; }
:lang(en) .statement { letter-spacing: -0.03em; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; margin: 56px 0 0; }
.facts dt { font: 700 20px/1.35 var(--display); color: var(--ink); }
.facts dd { margin: 8px 0 0; color: var(--ink-2); }
.after-facts { margin-top: 48px; }

/* Source + download */
.source { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.source p + p { margin-top: 16px; }
.source .actions { margin-top: 28px; }
.source-copy p { color: var(--ink-2); }
.download { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.get { padding: 32px; border-radius: 28px; background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.get h3 { font-size: 26px; font-weight: 800; }
.get .req { margin-top: 6px; }
.get .status { margin-top: 20px; font-weight: 600; }
.get p + p { margin-top: 8px; }
.get .note { color: var(--ink-2); }
.get .actions { margin-top: 24px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 24px; }

/* Footer */
.foot { padding: 48px 0 56px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 15px; color: var(--ink-3); }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.foot .brand { font-size: 18px; }
.foot .brand svg { width: 26px; height: 26px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot p { margin-top: 16px; max-width: 40em; }

/* Documents (privacy, support, 404) */
.doc { max-width: 760px; margin: 0 auto; padding: 64px var(--gutter) 96px; }
.doc h1 { font-weight: 800; font-size: clamp(34px, 5vw, 48px); line-height: 1.2; }
.doc h2 { font-weight: 800; font-size: 26px; line-height: 1.3; margin-top: 56px; }
.doc h3 { font-weight: 700; font-size: 19px; line-height: 1.4; margin-top: 32px; }
.doc .date { margin-top: 10px; color: var(--ink-3); font-size: 15px; }
.doc .lead { margin-top: 28px; font-size: 19px; font-weight: 600; }
.doc p { margin-top: 14px; color: var(--ink-2); }
.doc ul { padding-left: 20px; margin: 16px 0 0; }
.doc li { margin: 12px 0; color: var(--ink-2); }
.doc li strong { color: var(--ink); }
.doc .switch { margin-top: 14px; font-size: 15px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 72px 0 0; }
.doc .box { margin-top: 20px; padding: 20px 24px; border-radius: 16px; background: var(--tint); }
.doc .box p:first-child { margin-top: 0; }

@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid, .split, .source { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split-flip .split-visual { order: 0; }
  .places { grid-template-columns: minmax(0, 1fr); gap: 64px; max-width: 520px; }
  .place-visual { height: auto; }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav a:not(.lang) { display: none; }
  .lede, .section-head p { font-size: 17px; }
  .stage { padding: 40px 18px 22px; border-radius: 24px; }
  .entry { padding: 18px 18px 18px 22px; }
  .entry-small .entry-row { right: 18px; }
  .entry-small .entry-code { font-size: 20px; }
  .facts, .download { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split-visual .phone:nth-child(2) { display: none; }
  .get { padding: 24px; }
  .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
