/* purrly.design: the app's colours (apps/viewer/src/app.css), a knitted band and the cats on every
   plan. It follows the system's light or dark mode. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #16181d;
  --muted: #5b6170;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --hairline: rgba(22, 24, 29, 0.08);
  --accent: #17807a;
  --warn: #a35a00;
  --warn-bg: #fdf3e6;
  --cu1: #17807a;
  --cu2: #d0621b;
  --cu3: #6c4fc4;
  --cu4: #c03a78;
  --cu5: #2b6cd4;
  --cu6: #5e8a1e;
  --cu7: #b07d00;
  /* How much of a yarn colour tints a tile. */
  --tint: 12%;
  --sans: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --muted: #a3a9b6;
    --surface: #1a1e25;
    --surface-2: #232830;
    --hairline: rgba(255, 255, 255, 0.08);
    --accent: #5cc8c0;
    --warn: #f0a54a;
    --warn-bg: rgba(240, 165, 74, 0.12);
    --cu1: #4fb8b0;
    --cu2: #e8874a;
    --cu3: #9a83e8;
    --cu4: #e06fa2;
    --cu5: #6f9ff0;
    --cu6: #9cc455;
    --cu7: #e0b23f;
    --tint: 16%;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Header */
.head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  padding-bottom: 18px;
}

.head .sp {
  flex: 1;
}

.lockup img {
  height: 36px;
  width: auto;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
}

.seg a {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}

.seg a[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn .ico {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.open-s {
  display: none;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding-block: 36px 56px;
}

.hero-text {
  position: relative;
  z-index: 1;
  min-width: 0;
}

h1 {
  font-size: clamp(44px, 7.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 900;
}

h1 em {
  font-style: normal;
  color: var(--accent);
  text-decoration: underline wavy var(--cu2);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: none;
}

.sub {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 32em;
  margin-top: 22px;
}

.soon {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 28px;
  padding: 10px 18px 10px 10px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--cu2) var(--tint), var(--surface));
}

.soon b {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cu2);
  color: var(--surface);
  font-size: 14px;
  white-space: nowrap;
}

.soon span {
  font-size: 15px;
}

.blob {
  position: relative;
  justify-self: center;
  width: min(460px, 100%);
  aspect-ratio: 1;
}

.blob::before {
  content: '';
  position: absolute;
  inset: 4%;
  background: color-mix(in srgb, var(--cu1) var(--tint), var(--surface));
  border-radius: 58% 42% 47% 53% / 49% 56% 44% 51%;
  animation: wobble 14s ease-in-out infinite alternate;
}

.blob picture {
  position: relative;
  display: block;
  width: 88%;
  margin: 6% auto 0;
}

.strand {
  position: absolute;
  left: -22%;
  bottom: 3%;
  width: 70%;
  height: 40%;
  overflow: visible;
}

.strand path {
  fill: none;
  stroke: var(--cu1);
  stroke-width: 5;
  stroke-linecap: round;
}

@keyframes wobble {
  to {
    border-radius: 44% 56% 58% 42% / 55% 45% 55% 45%;
  }
}

/* Rows of stockinette: a V per stitch, every other row offset by half a stitch. */
.knit-band {
  --v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Cpath d='M9 19.5C4.2 16.8 1.6 10.6 2.2 1.2 6.3 4.6 8.6 11 9 19.5ZM9 19.5c4.8-2.7 7.4-8.9 6.8-18.3C11.7 4.6 9.4 11 9 19.5Z' fill='%23000'/%3E%3C/svg%3E");
}

.knit-row {
  height: 20px;
  background: var(--c);
  -webkit-mask: var(--v) 0 0 / 18px 20px repeat-x;
  mask: var(--v) 0 0 / 18px 20px repeat-x;
}

.knit-row:nth-child(even) {
  -webkit-mask-position: 9px 0;
  mask-position: 9px 0;
}

/* Sections */
.sec {
  padding-block: 56px 16px;
}

h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 900;
}

.h2sub {
  color: var(--muted);
  margin-top: 10px;
  max-width: 36em;
  font-size: 17px;
}

/* Platforms */
.plats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.plat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px 16px 16px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--c) var(--tint), var(--surface));
  text-decoration: none;
}

a.plat {
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.6, 1);
}

a.plat:hover {
  transform: translateY(-4px) rotate(-1.5deg);
}

.plat .ico {
  width: 30px;
  height: 30px;
  color: var(--c);
}

.plat b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.plat small {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.plat em {
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--c);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
}

/* Plans */
.wip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  max-width: 44em;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--warn-bg);
  border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent);
  font-size: 14px;
  line-height: 1.45;
}

.wip b {
  flex: none;
  padding-top: 2px;
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.wip span {
  flex: 1 1 16em;
  min-width: 0;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 96px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 64px 22px 24px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--c) var(--tint), var(--surface));
}

.plan-cat {
  position: absolute;
  top: -78px;
  left: 14px;
  width: 128px;
  height: 128px;
  pointer-events: none;
}

.plan-cat img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.plan h3 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--c);
}

.tag {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.price {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.soon-price {
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--c);
}

.price-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.plus {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.feats {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feats li {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.check {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  fill: none;
  stroke: var(--c);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alpha {
  display: inline-block;
  vertical-align: 1px;
  margin-left: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.note {
  font-size: 13px;
  color: var(--muted);
}

/* Footer */
.foot-band {
  margin-top: 64px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--muted);
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

@media (max-width: 980px) {
  .plats {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 100px;
  }
}

@media (max-width: 760px) {
  .open-l {
    display: none;
  }

  .open-s {
    display: inline;
  }

  .btn {
    gap: 6px;
    padding: 8px 12px;
  }

  .seg a {
    padding: 5px 9px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-block: 8px 40px;
  }

  .blob {
    order: -1;
    width: min(300px, 82%);
  }

  .plats {
    grid-template-columns: repeat(2, 1fr);
  }

  .plat:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob::before {
    animation: none;
  }

  a.plat {
    transition: none;
  }
}
