/* Catch website. One 528px column on black, set in the app's own Inter 3.19 with the app's feature profile,
   with the app's pieces dropped in: the LCD clock, the card labels, the glass orb, a tilted card. */

@font-face {
  font-family: "Inter Catch";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Catch";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Catch";
  src: url("fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* The app header's clock faces (C04): 7-segment digits, 14-segment date. */
@font-face {
  font-family: "DSEG7 Catch";
  src: url("fonts/DSEG7ClassicMini.woff2") format("woff2");
  font-display: block;
}
@font-face {
  font-family: "DSEG14 Catch";
  src: url("fonts/DSEG14ClassicMini.woff2") format("woff2");
  font-display: block;
}

/* Layout: a letter-width column (528px of text inside 24px gutters), fixed on desktop, fluid below it. */
:root {
  /* The app's colour roles (CatchColor): white ink at set opacities on black, #1E1E1E card paper. */
  --bg: #000000;
  --ink: #ffffff;
  --ink-strong: rgba(255, 255, 255, 0.8);   /* emphasis */
  --text: rgba(255, 255, 255, 0.6);         /* secondary: running text */
  --muted: rgba(255, 255, 255, 0.5);        /* muted: dates, meta */
  --card: #1e1e1e;                          /* card paper */
  --lcd: #272727;                           /* clock cells */
  --outline: rgba(64, 64, 64, 0.5);         /* #404040 at 50% */
  --divider: rgba(255, 255, 255, 0.1);
  --dashed: rgba(255, 255, 255, 0.3);       /* the card's dashed rule */
  --pill: rgba(255, 255, 255, 0.1);
  --pill-hover: rgba(255, 255, 255, 0.16);
  --button: #ffffff;
  --button-ink: #000000;
  --film-ground: #e2e2e5;                   /* the film's studio grey, shown until the poster paints */

  --font: "Inter Catch", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* Same OpenType profile as the app (CatchTypography.featureTags): single-storey a, curved r, slashed zero… */
  --features: "kern", "liga", "dlig", "calt", "case", "lnum", "frac", "zero", "salt",
    "ss01", "ss02", "ss03", "ss04",
    "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv07", "cv08", "cv09", "cv10", "cv11";

  --size: 15px;
  --leading: 28px;
  --size-small: 14px;
  --size-meta: 13px;

  --column: 528px;
  --gutter: 24px;
  --radius: 16px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size);
  line-height: var(--leading);
  font-feature-settings: var(--features);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 255, 255, 0.9);
  color: #000000;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--ink);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin: 0 auto;
  padding-block: 72px 80px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Nav: the brand, and the app header's clock ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--outline);
}

.clock {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--ink);
  user-select: none;
}
.clock-date {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-family: "DSEG14 Catch", ui-monospace, monospace;
  font-size: 8px;
  line-height: 10px;
  letter-spacing: 0.04em;
}
.clock-date .dot {
  font-family: var(--font);
  font-size: 10px;
}
.clock-time {
  display: flex;
  align-items: center;
  gap: 1px;
}
.lcd {
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 25px;
  padding: 0 2px;
  border-radius: 4px;
  background: var(--lcd);
  font-family: "DSEG7 Catch", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1;
}
.clock-colon {
  width: 5px;
  text-align: center;
  font-family: "DSEG7 Catch", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1;
  animation: blink 2s steps(1, end) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Film ---------- */

.film {
  position: relative;
  margin: 40px 0 0;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--film-ground);
  box-shadow: 0 0 0 1px var(--outline);
}
.film video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.film-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.film-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.film-button:hover {
  background: rgba(0, 0, 0, 0.68);
}
.film-button:active {
  transform: scale(0.94);
}
.film-button svg {
  width: 16px;
  height: 16px;
}
.film-button [data-when] {
  display: none;
}
.film-button[aria-pressed="true"] [data-when="on"],
.film-button[aria-pressed="false"] [data-when="off"] {
  display: block;
}

/* ---------- Writing ---------- */

.letter {
  margin-top: 40px;
}
.letter > * + * {
  margin-top: 16px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--size);
  line-height: var(--leading);
  font-weight: 500;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

strong {
  color: var(--ink);
  font-weight: 500;
}

.letter h2 {
  margin-top: 40px;
}
.letter h2 + * {
  margin-top: 12px;
}

/* Words float up out of a blur, one at a time, as the app's tips do. */
.rise {
  display: inline-block;
  animation: rise 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms + 120ms);
}
@keyframes rise {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(5px);
  }
}

/* What it does: the app's own icons, a lead in white, the rest in grey. */
.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 14px;
}
.features li > svg {
  width: 16px;
  height: 16px;
  margin-top: 6px;
  color: var(--ink-strong);
}

/* A card label, as on the app's cards: icon and kind on card paper. */
.kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px 0 6px;
  margin-inline: 1px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--outline);
  color: var(--ink-strong);
  font-size: var(--size-meta);
  line-height: 24px;
  vertical-align: 1px;
  white-space: nowrap;
}
.kind svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* Policy-style lists with a small dot. */
.dots {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.dots li {
  position: relative;
  padding-left: 18px;
}
.dots li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

/* The card's dashed rule (CatchDivider: 4 on, 4 off). */
.rule {
  height: 1px;
  background-image: linear-gradient(to right, var(--dashed) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

/* ---------- Try the orb ---------- */

.try {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.orb {
  position: relative;
  flex: none;
  width: 88px;
  height: 88px;
  margin: -8px 0 -8px -10px;     /* the glass sits on the column edge; the cut-out has a soft rim */
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.orb img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.45s var(--spring);
  animation: breathe 4.8s ease-in-out infinite;
}
/* Voice glow while held. */
.orb::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  transition: box-shadow 0.4s ease;
  pointer-events: none;
}
/* Release fog. */
.orb::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12) 55%, transparent);
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}
.orb.is-holding img {
  animation: none;
  transform: scale(1.12);
}
.orb.is-holding::after {
  box-shadow: 0 0 28px 6px rgba(190, 200, 255, 0.22);
}
.orb.is-caught img {
  animation: gulp 0.7s var(--ease-out);
}
.orb.is-caught::before {
  animation: fog 1.1s var(--ease-out);
}
.orb:focus-visible {
  outline-offset: -6px;
  border-radius: 50%;
}
@keyframes breathe {
  50% { transform: scale(1.035); }
}
@keyframes gulp {
  0% { transform: scale(1.12); }
  35% { transform: scale(0.9); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes fog {
  0% { opacity: 0.9; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(1.5); }
}

.try-stage {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.try-hint {
  color: var(--muted);
}
.try-words {
  color: var(--ink);
}
.try-words .word {
  display: inline-block;
  transition: opacity 0.4s ease-in, filter 0.4s ease-in, transform 0.4s ease-in;
}
.try-words .word.is-new {
  animation: rise 0.5s var(--ease-out) both;
}
.try-words.is-absorbed .word {
  opacity: 0;
  filter: blur(6px);
  transform: translateX(-28px) scale(0.7);
}

/* The card that lands: label, title, time, on card paper. */
.mini-card {
  align-self: flex-start;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  max-width: 100%;
  padding: 6px 12px 6px 8px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--outline);
  line-height: 22px;
  animation: land 0.6s var(--spring) both;
}
.mini-card .kind {
  height: 22px;
  padding: 0;
  margin: 0;
  background: none;
  box-shadow: none;
  color: var(--text);
  line-height: 22px;
}
.mini-title {
  color: var(--ink);
  font-weight: 600;
}
.mini-time {
  padding: 0 7px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: var(--ink-strong);
  font-size: var(--size-meta);
  line-height: 20px;
  font-feature-settings: var(--features), "tnum";
}
.try-relief {
  color: var(--text);
}
@keyframes land {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translate(-18px, 4px) scale(0.92) rotate(-2deg);
  }
}

/* ---------- Get it ---------- */

.get {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  font-size: var(--size);
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.pill svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.pill-primary {
  background: var(--button);
  color: var(--button-ink);
}
.pill-soon {
  cursor: default;
}
.pill-secondary {
  background: var(--pill);
  color: var(--ink);
  transition: background-color 0.15s ease;
}
.pill-secondary:hover {
  background: var(--pill-hover);
}

.meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  color: var(--muted);
  font-size: var(--size-meta);
  line-height: 20px;
}
.meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.meta svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.footnote {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--size-meta);
  line-height: 20px;
}

/* ---------- The maker, as a Catch card ---------- */

.catch-card {
  margin-top: 56px;
  padding: 16px 20px 20px;
  border-radius: 28px;
  /* Card paper under a soft gradient, like the app's moving-gradient cards (palette: cyan, blue, lilac). */
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(77, 133, 255, 0.22), transparent 62%),
    radial-gradient(80% 90% at 0% 100%, rgba(199, 168, 255, 0.16), transparent 60%),
    radial-gradient(60% 60% at 18% 12%, rgba(135, 237, 245, 0.1), transparent 60%),
    var(--card);
  box-shadow: inset 0 0 0 1px var(--outline);
  transform: rotate(-1.2deg);
  transition: transform 0.6s var(--spring);
}
.catch-card:hover {
  transform: rotate(0deg) scale(1.01);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-strong);
  font-size: var(--size-meta);
  line-height: 20px;
}
.card-head .card-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-head svg {
  width: 16px;
  height: 16px;
}
.card-tag {
  color: var(--muted);
}
.catch-card .rule {
  margin: 12px 0 14px;
}
.card-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-body {
  margin-top: 6px;
}
.card-foot {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--size-small);
  line-height: 20px;
}
.card-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-strong);
  text-decoration: none;
}
.card-foot a:hover {
  color: var(--ink);
}
.card-foot svg {
  width: 14px;
  height: 14px;
}

/* ---------- Pages (privacy, support) ---------- */

.doc {
  margin-top: 40px;
}
.doc .updated {
  color: var(--muted);
  font-size: var(--size-small);
  line-height: 20px;
}
.doc > * + * {
  margin-top: 16px;
}
.doc h1 + .updated {
  margin-top: 0;
}
.doc > .rule {
  margin-top: 20px;
}
.doc h2 {
  margin-top: 40px;
}
.doc h2 + * {
  margin-top: 8px;
}
.doc .lede {
  margin-top: 20px;
}
.doc .contact-line {
  color: var(--ink);
}

/* ---------- Guides (2026-10-29): use-case pages, the FAQ and the Traditional Chinese pages ---------- */

/* Numbered steps: the count sits on card paper, like the app's chips. */
.doc ol.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 10px;
}
.doc ol.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
}
.doc ol.steps li::before {
  content: counter(step);
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--outline);
  color: var(--ink-strong);
  font-size: 12px;
  line-height: 22px;
  font-weight: 500;
  text-align: center;
}

/* Tables: quiet rules, the column names in grey, scroll sideways inside their own box on a phone. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--size-small);
  line-height: 22px;
}
.doc th,
.doc td {
  padding: 10px 16px 10px 0;
  border-top: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}
.doc th:last-child,
.doc td:last-child {
  padding-right: 0;
}
.doc thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: var(--size-meta);
  font-weight: 400;
}
.doc tbody th {
  min-width: 6.5em; /* a five-character Chinese label stays on one line */
  color: var(--ink-strong);
  font-weight: 500;
}
.doc td .kind {
  margin: 0 4px 0 0;
}
/* What someone says out loud. */
.doc .say {
  color: var(--ink-strong);
}
.doc .note {
  color: var(--muted);
  font-size: var(--size-small);
  line-height: 22px;
}

/* More about Catch: the links between the pages. */
.related {
  margin-top: 56px;
}
.related ul {
  margin-top: 12px;
}

/* Traditional Chinese: Inter for Latin, then the system's Traditional Chinese face; no Latin-only alternates. */
html:lang(zh-Hant) {
  --font: "Inter Catch", "Inter", "PingFang TC", "PingFang HK", -apple-system, BlinkMacSystemFont, "Hiragino Sans CNS",
    "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --features: "kern", "liga", "calt", "case", "lnum", "zero", "ss01", "ss02", "ss03", "ss04",
    "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv07", "cv08", "cv09", "cv10", "cv11";
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  font-size: var(--size-small);
  line-height: 20px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer a {
  color: var(--text);
  text-decoration: none;
}
.footer a:hover,
.footer a[aria-current="page"] {
  color: var(--ink);
}
.footer small {
  color: var(--muted);
  font-size: inherit;
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
  .page {
    padding-block: 48px 56px;
    --gutter: 20px;
  }
  .film {
    margin-top: 32px;
    border-radius: 12px;
  }
  .letter,
  .doc {
    margin-top: 32px;
  }
  .catch-card {
    padding: 14px 16px 18px;
    border-radius: 24px;
    transform: rotate(-1deg);
  }
  .orb {
    width: 76px;
    height: 76px;
    margin-left: -6px;
  }
}

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