/* clingfish.app. System fonts only; nothing is loaded from anywhere else. */

:root {
  color-scheme: light dark;
  --page: #f6f5f1;
  --text: #1c1c1e;
  --muted: #5c5c61;
  --faint: #646469;
  /* Paragraph text in the feature tiles, the cards and the facts row: 7:1 on --tile. */
  --soft: #4a4a4f;
  --rule: #e3e1da;
  --tile: #eeece5;
  --pill: #1c1c1e;
  --pill-text: #ffffff;
  --sea: #2f6f97;
  --note: #ffd454;
  /* The file's text beside its sticky, on the desktop panel. */
  --file-text: #1c1c1e;
  --file-bg: rgba(255, 255, 255, 0.6);
  /* The desktop panel echoes the icon's tile: rgb(158,214,238) to rgb(92,166,208). In dark
     mode it is a deep blue of the same hue, under the dark set of stickies. */
  --desk-top: rgb(158, 214, 238);
  --desk-bottom: rgb(92, 166, 208);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111113;
    --text: #f2f1ed;
    --muted: #9c9ca2;
    --soft: #a8a8ae;
    --faint: #8a8a90;
    --rule: #26262a;
    --tile: #1b1b1e;
    --pill: #f2f1ed;
    --pill-text: #111113;
    --sea: #7cc0e6;
    --desk-top: rgb(36, 66, 88);
    --desk-bottom: rgb(16, 36, 54);
    --file-text: #f2f1ed;
    --file-bg: rgba(0, 0, 0, 0.35);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

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

/* ---------- First screen ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  min-height: min(100vh, 900px);
}

.hero-text {
  padding-bottom: 8px;
}

.hero-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 0 28px -6px;
}

.headline {
  margin: 0;
  font-size: clamp(36px, 3.6vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
}

.headline .name {
  display: block;
}

.headline .tagline {
  display: block;
  color: var(--muted);
}

.job {
  margin: 22px 0 32px;
  max-width: 30em;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.download {
  display: inline-block;
  padding: 12px 24px 13px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.download:hover {
  opacity: 0.86;
}

.terms {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* The desktop: a panel the colour of the icon's tile, with real stickies on it. */
.desktop {
  position: relative;
  aspect-ratio: 820 / 560;
  border-radius: 18px;
  background: linear-gradient(165deg, var(--desk-top), var(--desk-bottom));
  overflow: hidden;
  /* Sticky sizes below are fractions of an 820 pt panel, so they keep their layout as it scales. */
  container-type: inline-size;
}

.sticky {
  position: absolute;
  display: block;
  height: auto;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 12px 28px rgba(20, 50, 70, 0.22);
}

/* Places and widths in points of an 820 x 560 pt desktop, so the layout scales with the
   panel. No sticky covers another. */
.sticky.design {
  left: calc(24 / 820 * 100%);
  top: calc(52 / 560 * 100%);
  width: calc(262 / 820 * 100%);
}

.sticky.today {
  left: calc(306 / 820 * 100%);
  top: calc(100 / 560 * 100%);
  width: calc(250 / 820 * 100%);
}

.sticky.packing {
  left: calc(574 / 820 * 100%);
  top: calc(37 / 560 * 100%);
  width: calc(226 / 820 * 100%);
}

.sticky.sunday {
  left: calc(540 / 820 * 100%);
  top: calc(336 / 560 * 100%);
  width: calc(256 / 820 * 100%);
}

.sticky.recipes {
  left: calc(262 / 820 * 100%);
  top: calc(452 / 560 * 100%);
  width: calc(220 / 820 * 100%);
}

/* ---------- Pages with a top bar (changelog, privacy) ---------- */

.topbar {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 40px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 40px) 96px;
}

.page-head {
  margin-left: var(--margin-col, 0);
  margin-bottom: 56px;
}

.page-head h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.draft-note {
  color: var(--faint);
  font-size: 13px;
  margin: 0 0 14px;
}

.prose {
  max-width: 34em;
}

.prose p {
  margin: 0 0 1em;
}

/* ---------- Changelog ---------- */

.changelog {
  --margin-col: 200px;
}

.release {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, 1fr);
  padding: 0 0 48px;
  scroll-margin-top: 24px;
}

.release + .release {
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.release-date {
  margin: 0;
  padding-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-variant-caps: all-small-caps;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.release-body {
  max-width: 40em;
}

.release h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.release h2 a {
  text-decoration: none;
}

.release h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.release h2 .build {
  margin-left: 6px;
  color: var(--faint);
  font-weight: 400;
}

.release-body > p {
  margin: 0 0 4px;
  color: var(--muted);
}

.release h3 {
  margin: 22px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entries li {
  position: relative;
  padding-left: 20px;
  margin: 0 0 6px;
  color: var(--muted);
}

.entries li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--faint);
}

.entries strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

.feed-link {
  color: var(--sea);
  text-decoration: none;
}

.feed-link:hover {
  text-decoration: underline;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  /* Centre, not baseline: the studio link is a flex row with its mark. */
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px clamp(28px, 4vw, 48px) 28px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* The studio's name and mark, a link to its site, at the end of the row. */
.site-footer .studio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--faint);
}

.site-footer .studio:hover {
  color: var(--text);
}

.site-footer .mark,
.site-footer .mark img {
  display: block;
  width: 18px;
  height: 18px;
}

/* A link that has no destination yet. */
.placeholder-link {
  color: var(--faint);
  cursor: default;
}

/* ---------- Home page sections below the first screen ---------- */

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

.features,
.more,
.license,
.closing {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(28px, 4vw, 48px);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.feature {
  padding-bottom: 32px;
  border-radius: 18px;
  background: var(--tile);
  overflow: hidden;
}

/* The desktop of the first screen: light stickies on a light panel, dark ones on a dark panel. */
.feature .shot {
  display: flex;
  align-items: center;
  justify-content: center;
  /* One height for every tile's picture, so the captions line up. */
  height: 460px;
  gap: 20px;
  padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(165deg, var(--desk-top), var(--desk-bottom));
}

.feature .shot picture {
  display: contents;
}

/* Shown at the width its width attribute gives (points), smaller only when the tile is. */
.feature .shot img {
  display: block;
  min-width: 0;
  height: auto;
  max-width: 100%;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 12px 28px rgba(20, 50, 70, 0.22);
}

/* A note's file beside its sticky: the file's text as plain text, no window. */
.feature .file-text {
  flex: 0 1 230px;
  min-width: 0;
  color: var(--file-text);
}

.feature .file-name {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--file-text);
}

.feature .file-text pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--file-bg);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feature .pair img {
  flex: 0 1 240px;
  min-width: 0;
}

.feature h2 {
  margin: 28px 32px 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.feature p {
  margin: 0 32px;
  max-width: 30em;
  color: var(--soft);
}

.more {
  margin-top: clamp(72px, 10vw, 128px);
}

/* Three picture cards: smaller relatives of the feature tiles above. */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  padding-bottom: 26px;
  border-radius: 18px;
  background: var(--tile);
  overflow: hidden;
}

.card .shot {
  display: flex;
  align-items: center;
  justify-content: center;
  /* The tallest render (180 pt) with 20 px of panel above and below. */
  height: 220px;
  padding: 20px;
  background: linear-gradient(165deg, var(--desk-top), var(--desk-bottom));
}

.card .shot picture {
  display: contents;
}

.card .shot img {
  display: block;
  min-width: 0;
  max-width: 100%;
  height: auto;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.1),
    0 10px 22px rgba(20, 50, 70, 0.2);
}

/* The colours card spans the row: six strips at their own size, one scheme a row. */
.card.wide {
  grid-column: 1 / -1;
}

.card .strips {
  flex-direction: column;
  gap: 14px;
  height: auto;
  padding: 24px 28px;
}

.strip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.card .strips img {
  flex: none;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(20, 50, 70, 0.18);
}

.card h3 {
  margin: 22px 28px 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card p {
  margin: 0 28px;
  max-width: 34em;
  color: var(--soft);
  font-size: 16px;
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85em;
  line-height: 1.45;
  white-space: nowrap;
}

/* Three facts without pictures, under the cards. */
.small-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 48px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.small-features h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.small-features p {
  margin: 0;
  color: var(--soft);
  font-size: 15px;
}

.license {
  margin-top: clamp(80px, 11vw, 144px);
  text-align: center;
}

.license h2,
.closing h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.license-card {
  max-width: 560px;
  margin: 28px auto 0;
  padding: 36px 40px 32px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--tile);
}

.license-card p {
  margin: 0;
}

.license-card .price {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
}

.license-card .amount {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.license-card .once {
  color: var(--muted);
  font-size: 16px;
}

.license-card .no-strings {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
}

.license-facts {
  display: inline-block;
  margin: 24px auto 28px;
  padding: 0;
  list-style: none;
  font-size: 16px;
  text-align: left;
}

.license-facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
}

.license-facts .tick {
  flex: none;
  margin-top: 0.2em;
  color: var(--sea);
}

/* The buy button: the download pill's family, one size up. Still a placeholder in
   the markup, but drawn as the real button. */
.license .buy,
.license .buy.placeholder-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 15px 40px 16px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.license .buy:hover {
  opacity: 0.86;
}

.license .buy:active {
  transform: translateY(1px);
}

.license .buy:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
}

.license-card .fine-print {
  max-width: 30em;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.license-card .fine-print a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.license-card .fine-print a:hover {
  color: var(--text);
}

.closing {
  /* A tile as wide as the content of the sections above it. */
  width: calc(100% - 2 * clamp(28px, 4vw, 48px));
  max-width: calc(1320px - 96px);
  margin-top: clamp(80px, 11vw, 144px);
  margin-bottom: clamp(56px, 8vw, 96px);
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
  border-radius: 18px;
  background: var(--tile);
  text-align: center;
}

.closing-icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

.closing .latest {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.closing .latest a {
  color: var(--muted);
}

/* ---------- Privacy and other prose pages ---------- */

.prose h2 {
  margin: 36px 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--text);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    min-height: 0;
    padding-top: 40px;
  }

  .changelog {
    --margin-col: 0px;
  }

  .release {
    grid-template-columns: minmax(0, 1fr);
  }

  .release-date {
    padding: 0 0 2px;
  }

  .features,
  .cards,
  .small-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature .shot {
    height: auto;
  }

  .feature .pair {
    flex-direction: column;
    align-items: stretch;
  }

  .feature .pair .file-text,
  .feature .pair img {
    flex: none;
    align-self: center;
    width: min(100%, 300px);
  }
}

@media (min-width: 621px) and (max-width: 900px) {
  .cards,
  .small-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 32px 20px 28px;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 22px;
  }

  .headline {
    font-size: 34px;
  }

  .job {
    font-size: 17px;
  }

  .desktop {
    aspect-ratio: 340 / 470;
    border-radius: 14px;
  }

  /* On a phone the panel is too small for every note at its own size: two, larger, apart. */
  .sticky.design,
  .sticky.packing,
  .sticky.recipes {
    display: none;
  }

  .sticky.today {
    left: 7%;
    top: 6.5%;
    width: 64%;
  }

  .sticky.sunday {
    left: 29%;
    top: 56.5%;
    width: 64%;
  }

  .site-footer nav {
    padding: 20px;
  }

  .features,
  .more,
  .license,
  .closing {
    padding-left: 20px;
    padding-right: 20px;
  }

  .license-card {
    padding: 28px 20px 24px;
  }

  .card .shot {
    height: auto;
    padding: 20px;
  }

  .card h3,
  .card p {
    margin-left: 20px;
    margin-right: 20px;
  }

  /* Three strips a line: each scheme takes two lines, a wider gap between schemes. */
  .card .strips {
    gap: 18px;
  }

  .strip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* A grid cell per picture: display: contents would make each <source> a cell too. */
  .card .strip-row picture {
    display: block;
  }

  .card .strips img {
    width: 100%;
    height: auto;
  }

  .license .buy,
  .license .buy.placeholder-link {
    width: auto;
  }

  .closing {
    width: calc(100% - 40px);
    padding-left: 24px;
    padding-right: 24px;
  }

  .feature h2,
  .feature p {
    margin-left: 24px;
    margin-right: 24px;
  }
}

/* Pages with a top bar line their footer up with their content. */
.site-footer.narrow nav {
  max-width: 1100px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}
