/* Catree's promo page. Dark only, in the colours of the app's own dark
   theme (Catppuccin Mocha), with trails of paw prints behind the whole
   page, as the graph has them. Nothing here is shared with other apps. */

:root {
  --crust: #11111b;
  --mantle: #181825;
  --base: #1e1e2e;
  --surface: #313244;
  --overlay: #6c7086;
  --subtext: #a6adc8;
  --text: #cdd6f4;
  --mauve: #cba6f7;
  --sapphire: #74c7ec;
  --green: #a6e3a1;
  --peach: #fab387;
  --pink: #f5c2e7;
  --blue: #89b4fa;
  --wide: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--crust);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Noto Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:lang(zh-Hant) body, body:lang(zh-Hant) { line-height: 1.75; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--mauve); text-underline-offset: 3px; }
a:hover { color: var(--pink); }

code { font: 0.92em ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.wrap { width: min(var(--wide), 100% - 48px); margin: 0 auto; position: relative; }

/* The trails: fixed behind the page from top to foot, two of them, one up
   each side, which promo.js fills with paw prints. */
.trails {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--base) 0%, var(--mantle) 38%, var(--crust) 100%);
}
.trails use { opacity: 0.26; }
@media (max-width: 900px) { .trails use { opacity: 0.12; } }

header, main, footer { position: relative; z-index: 1; }

/* The top bar. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a, .langs summary { color: var(--subtext); text-decoration: none; cursor: pointer; }
.topbar nav a:hover, .langs summary:hover { color: var(--text); }
.langs { position: relative; }
.langs summary { list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; font-size: 0.8em; }
.langs ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 150px;
  background: var(--base);
  border: 1px solid var(--surface);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  z-index: 5;
}
.langs li a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--text); }
.langs li a:hover { background: var(--surface); }
.langs li a[aria-current] { color: var(--mauve); }

/* The hero. */
.hero { text-align: center; padding-bottom: 72px; }
.hero .icon { margin: 44px auto 18px; filter: drop-shadow(0 14px 30px rgb(0 0 0 / 0.5)); }
h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 750;
}
h1 span { color: var(--mauve); }
h1, h2, .pitch, .intro { text-wrap: pretty; }
.pitch { max-width: 640px; margin: 22px auto 0; font-size: 20px; color: var(--subtext); }
/* The downloads: one for each system, and the visitor's own filled, which
   promo.js tells. Linux has several files, and opens a list of them. */
.platforms { display: flex; gap: 14px; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin-top: 30px; }
.get {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid var(--surface);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.get:hover { border-color: var(--overlay); color: var(--text); transform: translateY(-1px); }
.mine.get, .mine > .get { background: var(--mauve); border-color: var(--mauve); color: var(--crust); }
.mine.get:hover, .mine > .get:hover { background: var(--pink); border-color: var(--pink); color: var(--crust); }
.get-more { position: relative; }
.get-more summary { list-style: none; }
.get-more summary::-webkit-details-marker { display: none; }
.get-more summary::after { content: " ▾"; font-size: 0.8em; }
.get-more ul {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--base);
  border: 1px solid var(--surface);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  z-index: 5;
  text-align: left;
  white-space: nowrap;
}
.get-more li { display: flex; align-items: center; gap: 4px; }
.get-more li span { width: 62px; padding-left: 8px; font-size: 14px; color: var(--subtext); }
.get-more li a { padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font: 0.92em ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.get-more li a:hover { background: var(--surface); }
.fineprint a { color: var(--subtext); }
.fineprint a:hover { color: var(--text); }
.fineprint { margin: 16px 0 0; font-size: 14px; color: var(--overlay); }

/* A picture of the app: no box around it, only its own edge and a shadow. */
.shot {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgb(205 214 244 / 0.1);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.55);
}
.hero-shot { margin-top: 56px; }

/* The sections. */
section { padding: 96px 0; }
section.alt { background: linear-gradient(180deg, rgb(24 24 37 / 0.72), rgb(17 17 27 / 0.72)); }

/* What a section is of, as the app names a branch in its graph. */
.kicker { margin: 0 0 14px; }
.ref {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font: 600 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: rgb(17 17 27 / 0.6);
}
.c-mauve { color: var(--mauve); }
.c-sapphire { color: var(--sapphire); }
.c-green { color: var(--green); }
.ref.ai { background: var(--sapphire); color: var(--crust); border-color: var(--sapphire); }

h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 720;
}
.intro { max-width: 680px; margin: 16px 0 0; font-size: 19px; color: var(--subtext); }
h3 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }

/* Paw prints or dots: two pictures, one over the other, and which shows. */
.swap { margin-top: 36px; }
.swap input { position: absolute; opacity: 0; pointer-events: none; }
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 10px;
  background: var(--surface);
}
.seg label {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--subtext);
  cursor: pointer;
}
.seg label:hover { color: var(--text); }
#look-paws:checked ~ .seg label[for="look-paws"],
#look-dots:checked ~ .seg label[for="look-dots"] { background: var(--base); color: var(--text); }
#look-paws:focus-visible ~ .seg label[for="look-paws"],
#look-dots:focus-visible ~ .seg label[for="look-dots"] { outline: 2px solid var(--mauve); outline-offset: 2px; }
.frames { display: grid; margin-top: 22px; }
.frames img { grid-area: 1 / 1; transition: opacity 0.25s ease; }
#look-paws:checked ~ .frames .dots,
#look-dots:checked ~ .frames .paws { opacity: 0; }

/* The steps of a comparison, each with its picture. */
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 56px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 1.55fr 1fr; gap: 36px; align-items: center; counter-increment: step; }
.steps li:nth-child(even) { grid-template-columns: 1fr 1.55fr; }
.steps li:nth-child(even) .shot { order: 2; }
.steps .text h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--sapphire);
  color: var(--crust);
  font-size: 14px;
  font-weight: 700;
  vertical-align: 2px;
}
.steps .text p { margin: 0; color: var(--subtext); }

/* What else it does: a few words each, no boxes. */
.grid {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 36px;
}
.grid p { margin: 0; color: var(--subtext); font-size: 16px; }
section > .wrap > .shot { margin-top: 36px; }
.note { margin: 32px 0 0; font-size: 15px; color: var(--overlay); max-width: 680px; }

/* Three things it keeps to: a mark, a line, a few words. */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card svg { width: 30px; height: 30px; color: var(--mauve); margin-bottom: 12px; }
.card p { margin: 0; color: var(--subtext); font-size: 16px; }

/* The end: the app again, and how to have it. */
.closing { text-align: center; }
.closing img { margin: 0 auto 10px; }
.closing .intro { margin: 14px auto 28px; text-wrap: balance; }
.closing .intro a { white-space: nowrap; }
.cmds { display: grid; gap: 18px; justify-items: center; margin-top: 40px; }
.brew-cmd p { margin: 0 0 8px; font-size: 14px; color: var(--subtext); }
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 12px 12px 12px 18px;
  border-radius: 10px;
  background: var(--crust);
  border: 1px solid var(--surface);
  text-align: left;
}
.cmd code { color: var(--text); overflow-wrap: anywhere; }
.cmd code span { color: var(--green); user-select: none; }
.copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  color: var(--subtext);
  cursor: pointer;
}
.copy:hover { color: var(--text); background: var(--overlay); }
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.copy .ok { display: none; color: var(--green); }
.copy.done .clip { display: none; }
.copy.done .ok { display: block; }
.tip { margin: 48px 0 14px; color: var(--subtext); font-size: 16px; }
.tip span { white-space: nowrap; } /* the coffee phrase holds together, in the same colour as the line, like Alphade and Ciscrux */
.kofi { display: inline-block; transition: transform 0.15s ease; }
.kofi:hover { transform: translateY(-1px); }

footer { padding: 34px 0 44px; font-size: 14px; color: var(--overlay); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--subtext); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Coming into view. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  section { padding: 68px 0; }
  .steps li, .steps li:nth-child(even) { grid-template-columns: 1fr; gap: 18px; }
  .steps li:nth-child(even) .shot { order: 0; }
  .grid, .trio { grid-template-columns: 1fr; gap: 26px; }
  .topbar nav { gap: 14px; }
  .pitch, .intro { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .frames img, .get, .kofi { transition: none; }
}
