/* Parkie landing page. Colours and type follow the app (design/tokens.css). */

/* Self-hosted (Latin subset of the app's fonts, SIL OFL), so no visitor data goes to a font CDN. */
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-VF.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-Italic-VF.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/IBMPlexSans-VF.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
:root {
  --paper: #ffffff;
  --paper-raised: #fbf8f9;
  --ink: #192127;
  --ink-muted: #525e67;
  --ink-faint: #7b868e;
  --rule: #e3dde0;
  --hairline: #ece7ea;
  --beck: #1b6a86;
  --beck-tint: #d3e5ec;
  --ochre-tint: #f1e1cc;
  --pink: #fde4ec;
  --pink-strong: #f8bbd0;
  --pink-ink: #7b4a62;
  --badge: #111;
  --badge-ink: #fff;
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-cjk: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei";
  --wrap: 1120px;
  --gutter: 16px;
  color-scheme: light;
}
/* Traditional Chinese (/zh/): Latin words keep the site's fonts, Chinese uses the system's CJK fonts. */
:root:lang(zh-Hant) {
  --font-serif: "Newsreader", "Iowan Old Style", Georgia, var(--font-cjk), serif;
  --font-sans: "IBM Plex Sans", -apple-system, system-ui, var(--font-cjk), sans-serif;
}
:lang(zh-Hant) body { line-height: 1.7; }
/* Chinese has no italics: the browser would only slant the glyphs. */
:lang(zh-Hant) .eyebrow, :lang(zh-Hant) .lede, :lang(zh-Hant) .thought,
:lang(zh-Hant) .card > p:not(.label), :lang(zh-Hant) em { font-style: normal; }
:lang(zh-Hant) .label { letter-spacing: 0.04em; }
/* German (/de/): long compound words like "Datenschutzerklärung" break with a hyphen on small phones. */
:lang(de) :is(h1, h2, h3) { hyphens: auto; overflow-wrap: break-word; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--beck); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--beck); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper-raised); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.label {
  font: 600 13px/1.3 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow { font: italic 400 19px/1.4 var(--font-serif); color: var(--ink-muted); }

section, .top, .foot { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
section { padding-block: 72px; }
section + section { border-top: 2px solid var(--rule); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 24px/1 var(--font-serif); color: var(--ink); text-decoration: none; }
.top .brand { margin-right: auto; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--ink-muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.top nav a.nav-insights { color: var(--ink); font-weight: 500; background: var(--beck-tint); border: 1px solid var(--beck); border-radius: 999px; padding: 4px 14px; margin-block: -5px; }
.top nav a.nav-insights:hover { background: #bfd9e3; }
.top nav { align-items: center; }
/* Language: a quiet pull-down (globe, current language, arrow), room for more
   languages later. Stays visible on phones, unlike the section links. */
.top nav.lang, .notfound .lang { display: block; flex-shrink: 0; position: relative; white-space: nowrap; }
.lang details { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; list-style: none; cursor: pointer; color: var(--ink-muted); font-size: 15px; border-radius: 8px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang details[open] summary { color: var(--ink); }
.lang summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang .caret { transition: transform .15s; }
.lang details[open] .caret { transform: rotate(180deg); }
.lang ul { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 160px; margin: 0; padding: 6px; list-style: none; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
.top nav.lang ul a, .notfound .lang ul a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--ink); text-decoration: none; }
.lang ul a:hover, .lang ul a:focus-visible { background: var(--paper); }
.lang ul a[aria-current] { font-weight: 600; }
.lang ul a[aria-current]::after { content: "✓"; color: var(--ink-muted); }
.lang [lang="zh-Hant"] { font-family: "IBM Plex Sans", var(--font-cjk), sans-serif; }
@media (prefers-reduced-motion: reduce) { .lang .caret { transition: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 40px; border-top: 0; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.06; letter-spacing: -0.015em; margin: 12px 0 20px; }
.hero h1 .name { font-weight: 600; color: var(--pink-ink); }
.lede { font: italic 400 21px/1.5 var(--font-serif); color: var(--ink-muted); max-width: 34em; }
.fineprint { margin-top: 14px; font-size: 12px; color: var(--ink-faint); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  /* The same box as the Google Play badge next to it (188 × 56), with its
     rounded corners and thin grey edge. */
  box-sizing: border-box; width: 188px; height: 56px; justify-content: center; padding: 6px 12px;
  background: var(--badge); color: var(--badge-ink);
  border: 1px solid #a6a6a6; border-radius: 7px; text-decoration: none;
  font: 600 19px/1.1 var(--font-sans);
  transition: transform .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0.02em; }
/* Google's official badge, the same size as the App Store button. */
.store-badge { display: inline-flex; border-radius: 7px; transition: transform .15s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { display: block; width: 188px; height: 56px; }
@media (prefers-reduced-motion: reduce) { .store, .store-badge { transition: none; } }

.hero-parkie { position: relative; display: grid; justify-items: center; }
.hero-parkie::before {
  content: ""; position: absolute; inset: 8% 4% 18%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--pink) 30%, transparent 100%);
  filter: blur(24px);
}
.thought {
  min-height: 2.6em; text-align: center;
  font: italic 400 22px/1.3 var(--font-serif); color: var(--ink-muted);
  transition: opacity .4s ease;
}
.thought::after { content: "• • •"; display: block; font-size: 10px; letter-spacing: 4px; color: var(--ink-faint); opacity: .6; }
.thought.fading { opacity: 0; }
.caption { margin-top: 8px; font-size: 12px; color: var(--ink-faint); text-align: center; }

/* Parkie in front, Buddy half hidden behind her right side. The pair is
   shifted left a little so it stays centred while he peeks out. */
.duo { position: relative; width: min(380px, 60vw); aspect-ratio: 1; transform: translateX(-17%); }
/* Two columns: sized to the column, so Buddy's wave stays on screen at every width. */
@media (min-width: 901px) { .duo { width: min(340px, 28vw); } }
.parkie { position: relative; z-index: 1; border: 0; padding: 0; background: none; cursor: pointer; width: 100%; aspect-ratio: 1; border-radius: 50%; }
.buddy { position: absolute; z-index: 0; width: 84%; aspect-ratio: 1; right: -24%; bottom: 2%; pointer-events: none; }
.buddy-body { position: relative; display: block; width: 100%; height: 100%; transform-origin: 30% 100%; animation: sneak 9s ease-in-out infinite; }
.buddy .frame.wave { opacity: 0; animation: sneak-wave 9s steps(1) infinite; }
.buddy .frame.blink { animation-duration: 6.1s; }
/* Mostly hidden and leaning, then out for a wave, then back behind her. */
@keyframes sneak {
  0%, 18% { transform: translateX(-11%) rotate(9deg); }
  30%, 56% { transform: translateX(21%) rotate(3deg); }
  68%, 100% { transform: translateX(-11%) rotate(9deg); }
}
@keyframes sneak-wave {
  0%, 33% { opacity: 0; }
  34%, 37% { opacity: 1; }
  38%, 41% { opacity: 0; }
  42%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
.parkie-body { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 100%; animation: bob 4.8s ease-in-out infinite; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.frame.blink { opacity: 0; animation: blink 5.2s steps(1) infinite; }
.frame.happy { opacity: 0; transition: opacity .12s ease; }
.parkie.is-happy .frame.happy { opacity: 1; }
.parkie.is-happy .frame.open, .parkie.is-happy .frame.blink { opacity: 0; animation: none; }
.parkie.is-happy .parkie-body { animation: hop .6s ease-out; }

/* Same rhythm as the app: a slow bob with a little tilt and squash. */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
  25% { transform: translateY(-2%) rotate(2.5deg) scale(.985, 1.015); }
  50% { transform: translateY(0) rotate(0deg) scale(1.015, .985); }
  75% { transform: translateY(-2%) rotate(-2.5deg) scale(.985, 1.015); }
}
@keyframes blink { 0%, 93% { opacity: 0; } 94%, 96% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-8%) scale(1.03, .97); } 100% { transform: translateY(0); } }

/* Highlighted feature words: ink, semibold, with a soft pink marker. */
.hl {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(transparent 58%, var(--pink-strong) 58%, var(--pink-strong) 92%, transparent 92%);
  padding: 0 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* What it does */
.what .steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps h3 { font-size: 26px; margin: 12px 0 8px; }
.steps p { color: var(--ink-muted); }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--pink); color: var(--pink-ink); font: 500 18px/1 var(--font-mono);
  border: 2px solid var(--pink-strong);
}

/* Patient & Partner */
.together h2 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 32px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 20px; padding: 32px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; }
.card.patient::before { background: var(--pink-strong); }
.card.partner::before { background: var(--beck); }
.card h3 { font-size: 38px; margin: 6px 0 10px; }
.card > p:not(.label) { font: italic 400 19px/1.45 var(--font-serif); color: var(--ink-muted); }
.card ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.card li { padding-left: 28px; position: relative; }
.card li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--pink-strong); }
.card.partner li::before { background: var(--beck); }

/* Screenshots */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 24px;
  margin-top: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.phone { border-radius: 34px; padding: 10px; background: #0d1114; box-shadow: 0 18px 40px rgba(25, 33, 39, .18); }
.phone img { border-radius: 26px; width: 100%; }
.shots figcaption { margin-top: 12px; text-align: center; font-size: 15px; color: var(--ink-muted); }

/* Features */
.features h2 { font-size: clamp(30px, 4vw, 44px); }

/* Insights: the web page in a browser window, next to the phone */
.insights h2 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 16px; max-width: 22em; }
.insights-lede { max-width: 42em; font-size: 19px; line-height: 1.55; }
.insights-look { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 32px; align-items: start; margin-top: 40px; }
.insights-look figure { margin: 0; min-width: 0; }
.insights-look figcaption { margin-top: 12px; text-align: center; font-size: 15px; color: var(--ink-muted); }
.browser { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(25, 33, 39, .18); }
.browser img { display: block; width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--paper-raised); border-bottom: 1px solid var(--hairline); }
.browser-dots { display: flex; gap: 6px; flex-shrink: 0; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.browser-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--hairline); color: var(--ink-muted); font-size: 13px; }
.insights-open { margin: 40px 0 0; text-align: center; }
.insights-open a { display: inline-block; padding: 10px 22px; border: 1px solid var(--beck); border-radius: 999px; background: var(--beck-tint); color: var(--ink); font-weight: 500; text-decoration: none; }
.insights-open a:hover { background: #bfd9e3; }
.grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
.grid li { background: var(--paper-raised); padding: 24px; }
.grid h3 { font-size: 22px; margin-bottom: 6px; }
.grid p { font-size: 15px; color: var(--ink-muted); }

/* Call to action */

/* Legal pages (privacy, terms) */
.top nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.legal { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: 32px 72px; }
.legal h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.08; margin-top: 8px; }
.legal .updated { margin-top: 8px; color: var(--ink-faint); font-size: 15px; }
.legal section { width: auto; padding-block: 28px 0; border-top: 0; }
.legal h2 { font-size: 28px; line-height: 1.2; margin-bottom: 12px; }
.legal h3 { font: 600 17px/1.4 var(--font-sans); margin: 20px 0 6px; }
.legal p + p, .legal ul + p, .legal p + ul, .legal address + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; margin: 8px 0 0; }
.legal li + li { margin-top: 6px; }
.legal address { font-style: normal; margin-top: 10px; padding: 14px 18px; background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 12px; }
.legal .summary { margin-top: 28px; padding: 22px 24px; border-radius: 16px; background: var(--pink); border: 1px solid var(--pink-strong); }
.legal .summary.warning { background: var(--ochre-tint); border-color: var(--rule); }
.legal .summary h2 { font-size: 24px; margin-bottom: 8px; }
.legal .note { margin-top: 40px; padding-top: 20px; border-top: 2px solid var(--rule); color: var(--ink-muted); font-size: 15px; }
mark.todo { background: #ffe58a; color: #3b2f00; padding: 0 4px; border-radius: 4px; }

/* Contact */
.contact article { text-align: left; }
.contact-parkie { width: 140px; margin-bottom: 8px; }
.contact .lede { margin-top: 12px; }
.contact-mail {
  display: inline-grid; gap: 4px; margin-top: 28px; padding: 18px 26px;
  border-radius: 16px; background: var(--pink); border: 1px solid var(--pink-strong);
  color: var(--ink); text-decoration: none; transition: transform .15s ease;
}
.contact-mail:hover { transform: translateY(-2px); }
.contact-mail .address { font: 600 clamp(22px, 5vw, 30px)/1.2 var(--font-serif); color: var(--pink-ink); }
.contact .summary { margin-top: 36px; }

/* Account email links (verify, reset) */
.account-parkie { width: 140px; margin-bottom: 8px; }
.account .lede { margin-top: 12px; }
.account-retry {
  margin-top: 20px; padding: 12px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--badge); color: var(--badge-ink); font: 600 17px/1.2 var(--font-sans);
}
.account-app { margin-top: 40px; border-top: 2px solid var(--rule); }
.account-app .stores { margin-top: 20px; }
.account-code {
  display: inline-grid; gap: 6px; margin-top: 28px; padding: 20px 28px;
  border-radius: 16px; background: var(--pink); border: 1px solid var(--pink-strong);
}
.account-code[hidden] { display: none; }
.account-code .digits { font: 500 clamp(40px, 12vw, 64px)/1.1 var(--font-mono); letter-spacing: .18em; color: var(--pink-ink); }
.account-code .for { font-size: 15px; color: var(--ink-muted); overflow-wrap: anywhere; }
.account-hint { margin-top: 20px; color: var(--ink-muted); }
.account-hint + .account-hint { margin-top: 10px; }

/* About us: the family behind Parkie */
.about { display: grid; justify-items: center; text-align: center; }
.about-family { width: min(100%, 560px); height: auto; }
.about h2 { font-size: clamp(30px, 4vw, 44px); margin: 6px 0 16px; max-width: 18em; }
.about-text { max-width: 34em; font-size: 19px; line-height: 1.6; }

/* 404 */
.notfound { min-height: 80vh; align-content: center; }
.notfound img { width: 200px; }
.notfound h1 { font-size: 40px; margin-top: 8px; }
.notfound .lede { margin-top: 12px; }
.notfound .home { margin-top: 24px; }
.notfound .lang { margin-top: 16px; justify-self: center; }
.notfound .lang ul { right: auto; left: 50%; transform: translateX(-50%); }

/* Disclaimer */
.disclaimer { padding-block: 40px; }
.disclaimer p { margin-top: 10px; font-size: 16px; color: var(--ink-muted); }
.disclaimer p strong { color: var(--ink); }

/* Footer */
.foot { display: flex; justify-content: space-between; gap: 16px; padding-block: 28px 40px; border-top: 2px solid var(--rule); color: var(--ink-faint); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--ink-muted); }
.foot .social { display: inline-flex; align-items: center; gap: 6px; }
.foot .social svg { flex: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-parkie { order: -1; }
  .what .steps, .cards { grid-template-columns: 1fr; }
  .insights-look { grid-template-columns: 1fr; justify-items: center; }
  .insights-look figure:last-child { width: min(62%, 280px); }
  .grid { grid-template-columns: 1fr 1fr; }
  .shots { grid-auto-columns: 62%; }
}
@media (max-width: 560px) {
  section { padding-block: 48px; }
  /* Phones: a smaller pair, clipped at the screen edge so the page never scrolls sideways. */
  .hero-parkie { overflow-x: clip; }
  .duo { width: 58vw; transform: translateX(-24%); }
  .top nav { display: none; }
  .top nav.lang { display: block; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .shots { grid-auto-columns: 78%; }
  .foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parkie-body, .frame.blink, .parkie.is-happy .parkie-body, .buddy .frame.wave { animation: none; }
  .buddy-body { animation: none; transform: translateX(3%) rotate(7deg); }
  .thought { transition: none; }
}

.nowrap { white-space: nowrap; }
