/* Row Counter's website in the app's "Cozy studio" style (research/crochet/ui/style.md).
   Colors are the app's own (rowcounter/core/designsystem/.../Color.kt); the fonts are its bundled
   Fraunces and Figtree, cut down for the web by scripts/fonts.py. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paper and ink */
  --paper: #f5f0e8;
  --card: #fffcf7;
  --pill: #ede5d8;
  --ink: #2a2320;
  --soft: #6b6058;
  --line: #d9d0c2;
  --line-soft: #e4dbcd;
  /* Sage, the main action */
  --brand: #33503f;
  --on-brand: #ffffff;
  --brand-tint: #dce7dd;
  --brand-ink: #2c4a39;
  /* Terracotta, the +1 target and accents */
  --terra: #b4482f;
  --on-terra: #ffffff;
  --terra-tint: #f6ded5;
  --terra-ink: #8a3a26;
  /* Ochre, for the third panel */
  --plum-tint: #ecdce8;
  /* The reading line */
  --band: rgba(110, 150, 119, 0.32);
  --band-edge: #6e9677;
  /* Shadows: soft brown-black under cards, sage under the main action */
  --shadow: 42 35 32;
  --brand-shadow: 51 80 63;
  --bezel: #2a2320;
  --knit: rgba(255, 255, 255, 0.13);
  --closing: #33503f;
  --on-closing: #ffffff;
  --on-closing-soft: #dce7dd;

  --radius-card: 24px;
  --radius-hero: 30px;
  --radius-target: 36px;
  --wrap: 1160px;
  --gutter: 20px;
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17130f;
    --card: #221c17;
    --pill: #2c251f;
    --ink: #f3ece2;
    --soft: #b5a99b;
    --line: #3a322b;
    --line-soft: #2f2822;
    --brand: #9cc3a5;
    --on-brand: #10200f;
    --brand-tint: #23332a;
    --brand-ink: #9cc3a5;
    --terra: #d9694b;
    --on-terra: #1e0d07;
    --terra-tint: #3a221b;
    --terra-ink: #f0a58d;
    --plum-tint: #33222f;
    --band: rgba(156, 195, 165, 0.24);
    --band-edge: #9cc3a5;
    --shadow: 0 0 0;
    --brand-shadow: 0 0 0;
    --bezel: #0d0b09;
    --knit: rgba(0, 0, 0, 0.12);
    --closing: #23332a;
    --on-closing: #f3ece2;
    --on-closing-soft: #c5d3c8;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* Type */

.eyebrow {
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.eyebrow--accent {
  color: var(--terra-ink);
}

.hero__title,
.section-title,
.page-title,
.feature__title,
.plan__name,
.promise__card h3,
.glance__card h3,
.doc__section h2,
.purchase h2,
.topic__title,
.demo__number,
.brand__name {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  font-optical-sizing: auto;
}

/* German and Dutch compounds ("Datenschutzerklärung") are wider than a phone: long words in
   headings are hyphenated, and nothing anywhere is allowed to overflow. */
.hero__title,
.section-title,
.page-title,
.feature__title,
.plan__name,
.promise__card h3,
.glance__card h3,
.doc__section h2,
.purchase h2,
.topic__title {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
  /* Where the browser has no hyphenation for the language, break the word rather than overflow. */
  overflow-wrap: anywhere;
}

body {
  overflow-wrap: break-word;
}

.section-title {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.section-title--small {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
}

.page-title {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-head {
  max-width: 720px;
  display: grid;
  gap: 14px;
}

.section-head p:last-child:not(.eyebrow) {
  color: var(--soft);
  font-size: 1.125rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn--brand {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow:
    0 2px 4px rgb(var(--brand-shadow) / 0.18),
    0 10px 24px rgb(var(--brand-shadow) / 0.26);
}

.btn--brand:hover {
  box-shadow:
    0 2px 4px rgb(var(--brand-shadow) / 0.2),
    0 14px 30px rgb(var(--brand-shadow) / 0.32);
}

.btn--quiet {
  min-height: 48px;
  padding: 0 22px;
  background: var(--pill);
  color: var(--ink);
}

/* The main action on the sage closing band: cream on deep sage, the app's light sage in the dark. */
.btn--on-brand.btn--brand {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
}

@media (prefers-color-scheme: dark) {
  .btn--on-brand.btn--brand {
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: 0 10px 24px rgb(0 0 0 / 0.3);
  }
}

/* The line under a main action; before launch it starts with "Coming soon to Google Play". */
.hero__note,
.closing__note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.note__icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.hero__note {
  color: var(--soft);
}

.hero__note strong {
  color: var(--ink);
  font-weight: 700;
}

.closing__note strong {
  color: var(--on-closing);
  font-weight: 700;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.link-arrow .icon {
  width: 20px;
  height: 20px;
  transition: transform 180ms var(--ease-out);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.chip-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-ink);
}

.chip-icon--large {
  width: 56px;
  height: 56px;
}

/* Header */

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
}

.brand__ball {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand__name {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .site-header__inner {
    gap: 10px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand__ball {
    width: 32px;
    height: 32px;
  }

  .brand__name {
    font-size: 1.1rem;
  }

  .lang-menu summary {
    gap: 6px;
    padding: 0 12px;
  }
}

.site-nav {
  display: none;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--pill);
}

.site-nav a[aria-current="page"] {
  background: var(--pill);
}

@media (min-width: 720px) {
  .site-nav {
    display: flex;
  }
}

/* Language menu */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--pill);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu .icon {
  width: 20px;
  height: 20px;
}

.lang-menu__chevron {
  transition: transform 180ms var(--ease-out);
}

/* On a narrow phone the menu shows the language's code; screen readers still hear its name. */
.lang-menu__code {
  display: none;
}

@media (max-width: 420px) {
  .lang-menu__current {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .lang-menu__code {
    display: inline;
    letter-spacing: 0.04em;
  }
}

.lang-menu[open] .lang-menu__chevron {
  transform: rotate(180deg);
}

.lang-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  min-width: 220px;
  padding: 8px;
  border-radius: 20px;
  background: var(--card);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.08),
    0 18px 40px rgb(var(--shadow) / 0.16);
  border: 1px solid var(--line-soft);
}

.lang-menu__title {
  padding: 8px 12px 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.lang-menu__panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
}

.lang-menu__panel a:hover {
  background: var(--pill);
}

.lang-menu__panel a[aria-current="true"] {
  font-weight: 700;
}

.lang-menu__check {
  color: var(--brand-ink);
}

@media (prefers-reduced-motion: no-preference) {
  .lang-menu[open] .lang-menu__panel {
    animation: pop-in 180ms var(--ease-out);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

/* Hero */

.hero {
  padding: 24px 0 72px;
}

.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__copy {
  display: grid;
  gap: 20px;
  justify-items: start;
}

.hero__title {
  font-size: clamp(2.75rem, 1.55rem + 5.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* The app's reading line, laid over the words that matter. */
.line {
  position: relative;
  padding: 0 0.04em;
  white-space: nowrap;
  background-image: linear-gradient(var(--band), var(--band));
  background-repeat: no-repeat;
  background-size: 100% 0.62em;
  background-position: 0 72%;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__lead {
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--soft);
}

.hero__actions {
  padding-top: 6px;
}

.hero__art {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  aspect-ratio: 1 / 1.1;
}

.hero__art .sheet {
  position: absolute;
  left: 0;
  top: 14%;
  width: 64%;
  transform: rotate(-3deg);
}

.hero__art .hero__phone {
  position: absolute;
  right: 3%;
  top: 1%;
  width: 46%;
}

.hero__ball {
  position: absolute;
  left: 2%;
  bottom: 0;
  width: 30%;
  filter: drop-shadow(0 12px 18px rgb(var(--shadow) / 0.16));
}

/* On a phone the sheet keeps five rows, so it stays inside the drawing. */
@media (max-width: 640px) {
  .hero__art .sheet {
    padding: 16px 14px 18px;
  }

  .hero__art .sheet__head {
    padding-bottom: 10px;
  }

  .hero__art .sheet__row {
    padding: 5px 0;
    gap: 4px;
  }

  .hero__art .sheet__row:nth-child(n + 6) {
    display: none;
  }

  .hero__art .sheet__row.is-current::before {
    left: -14px;
    right: -14px;
  }

  .hero__ball {
    bottom: 2%;
    width: 27%;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 40px 0 96px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > *,
  .hero__art > * {
    animation: rise 700ms var(--ease-out) both;
  }

  .hero__copy > :nth-child(2) {
    animation-delay: 60ms;
  }

  .hero__copy > :nth-child(3) {
    animation-delay: 120ms;
  }

  .hero__copy > :nth-child(4),
  .hero__copy > :nth-child(5) {
    animation-delay: 180ms;
  }

  .hero__art .sheet {
    animation-name: rise-sheet;
    animation-delay: 120ms;
  }

  .hero__phone {
    animation-name: rise-phone;
    animation-delay: 220ms;
  }

  .hero__ball {
    animation-delay: 360ms;
  }

  .hero__title .line {
    animation: draw-line 900ms var(--ease-out) 420ms both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes rise-sheet {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-1deg);
  }
}

@keyframes rise-phone {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(0deg);
  }
}

@keyframes draw-line {
  from {
    background-size: 0% 0.62em;
  }
}

/* The phone around the app's screens */

.phone {
  position: relative;
  aspect-ratio: 616 / 1371;
  border: 9px solid var(--bezel);
  border-radius: 40px;
  background: var(--bezel);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.12),
    0 30px 60px rgb(var(--shadow) / 0.22);
  overflow: hidden;
}

.phone picture {
  display: block;
  height: 100%;
}

.phone img {
  width: 100%;
  height: 100%;
  border-radius: 31px;
  object-fit: cover;
}

@media (prefers-color-scheme: dark) {
  .phone {
    box-shadow:
      0 0 0 1px #3a322b,
      0 30px 60px rgb(0 0 0 / 0.5);
  }
}

/* The written pattern sheet */

.sheet {
  padding: 22px 20px 26px;
  border-radius: 18px;
  background: var(--card);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.08),
    0 22px 44px rgb(var(--shadow) / 0.14);
  overflow: hidden;
}

.sheet__head {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.sheet__rows {
  display: grid;
}

.sheet__row {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.sheet__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--soft);
  white-space: nowrap;
}

.sheet__bars {
  display: flex;
  gap: 6px;
}

.bar {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
}

.bar--title {
  height: 11px;
  background: var(--ink);
  opacity: 0.85;
}

.w18 { width: 18%; }
.w20 { width: 20%; }
.w30 { width: 30%; }
.w34 { width: 34%; }
.w38 { width: 38%; }
.w40 { width: 40%; }
.w46 { width: 46%; }
.w54 { width: 54%; }
.w58 { width: 58%; }
.w66 { width: 66%; }
.w72 { width: 72%; }
.w74 { width: 74%; }
.w80 { width: 80%; }

.sheet__row.is-current .sheet__label {
  color: var(--brand-ink);
}

.sheet__row.is-current .bar {
  background: var(--soft);
}

/* The reading line across the current row, from edge to edge of the sheet, with its handle. */
.sheet__row > * {
  position: relative;
  z-index: 1;
}

.sheet__row.is-current::before {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  top: 1px;
  bottom: 1px;
  background: var(--band);
  border-block: 2px solid var(--band-edge);
}

.sheet__row.is-current::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--band-edge);
  box-shadow: 0 0 0 4px var(--card);
  z-index: 2;
}

/* The mosaic chart */

.chart {
  position: relative;
  width: min(100%, 400px);
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.08),
    0 22px 44px rgb(var(--shadow) / 0.14);
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart__on {
  fill: var(--terra);
}

.chart__off {
  fill: var(--pill);
}

.chart__row-line {
  fill: var(--band);
  stroke: var(--band-edge);
  stroke-width: 2;
}

.chart__col-line {
  fill: var(--band);
  stroke: var(--band-edge);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.chart__num {
  font-size: 11px;
  font-weight: 700;
  fill: var(--soft);
  font-family: "Figtree", ui-sans-serif, system-ui, sans-serif;
}

.chart__chip {
  position: absolute;
  left: -12px;
  top: 34%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgb(var(--brand-shadow) / 0.25);
}

/* Features */

.features {
  padding: 24px 0 40px;
}

.features .wrap {
  display: grid;
  gap: 88px;
}

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
}

.feature__copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.feature__title {
  font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.feature__body {
  max-width: 34em;
  color: var(--soft);
  font-size: 1.125rem;
}

.facts {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}

.fact__icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--card);
  color: var(--brand-ink);
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.08);
}

.feature__art {
  display: grid;
  place-items: center;
  padding: 36px 24px;
  border-radius: var(--radius-hero);
}

.feature__art--counting {
  background: var(--terra-tint);
}

.feature__art--patterns {
  background: var(--brand-tint);
  padding: 48px 32px;
}

.feature__art--projects {
  background: var(--plum-tint);
}

.feature__art .phone {
  width: min(240px, 62vw);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }

  .feature--flip .feature__copy {
    order: 2;
  }

  .feature__art {
    padding: 44px;
  }
}

/* Try it */

.demo {
  padding: 72px 0;
}

.demo__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.demo__copy {
  display: grid;
  gap: 16px;
}

.demo__copy p:last-child {
  max-width: 30em;
  color: var(--soft);
  font-size: 1.125rem;
}

.demo__stage {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 28px 20px 22px;
  border-radius: var(--radius-hero);
  background: var(--card);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.06),
    0 24px 48px rgb(var(--shadow) / 0.1);
}

.demo__count {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.demo__number {
  font-size: clamp(4rem, 3rem + 4vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
  display: inline-block;
}

.demo__unit {
  font-weight: 600;
  color: var(--soft);
  font-size: 1.125rem;
}

.target {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: var(--radius-target);
  background-color: var(--terra);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28'%3E%3Cpath d='M3 3C5 12 9 18 12 25M21 3C19 12 15 18 12 25' stroke='white' stroke-opacity='0.13' stroke-width='3.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-size: 24px 28px;
  color: var(--on-terra);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}

@media (prefers-color-scheme: dark) {
  .target {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28'%3E%3Cpath d='M3 3C5 12 9 18 12 25M21 3C19 12 15 18 12 25' stroke='black' stroke-opacity='0.12' stroke-width='3.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  }
}

.target::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(0 0 0 / 0.12);
  opacity: 0;
  transition: opacity 120ms linear;
}

.target:active {
  transform: scale(0.985);
}

.target:active::after {
  opacity: 1;
}

.target__plus {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  font-size: 5rem;
  line-height: 1;
  font-variation-settings: "opsz" 84;
}

.target__hint {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--terra);
  font-weight: 600;
  font-size: 1rem;
}

.demo__number.is-bumping {
  animation: count-rise 420ms var(--ease-spring);
}

@keyframes count-rise {
  from {
    transform: translateY(0.25em);
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo__number.is-bumping {
    animation: none;
  }
}

@media (min-width: 900px) {
  .demo {
    padding: 104px 0;
  }

  .demo__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }

  .demo__stage {
    padding: 36px 32px 26px;
  }

  .target {
    min-height: 300px;
  }
}

/* Free and Pro */

.plans {
  padding: 56px 0 72px;
}

.plans__grid {
  display: grid;
  gap: 20px;
  margin-top: 36px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 30px 26px 28px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow:
    0 1px 2px rgb(var(--shadow) / 0.06),
    0 12px 30px rgb(var(--shadow) / 0.07);
}

.plan--pro {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  box-shadow:
    0 2px 6px rgb(var(--brand-shadow) / 0.12),
    0 24px 50px rgb(var(--brand-shadow) / 0.18);
}

.plan__name {
  font-size: 2.1rem;
  line-height: 1.1;
}

.plan__sub {
  font-weight: 700;
  color: var(--terra-ink);
}

.checks {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checks__icon {
  margin-top: 2px;
  color: var(--brand-ink);
}

.plan .checks {
  margin-bottom: 24px;
}

.plan__footer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--brand-ink);
  font-weight: 700;
}

.plans__ads {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 760px;
  margin-top: 28px;
  color: var(--soft);
}

.plans__ads-icon {
  margin-top: 2px;
  color: var(--soft);
}

@media (min-width: 760px) {
  .plans__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .plan {
    padding: 36px 34px 34px;
  }

  .plan--pro {
    transform: translateY(-12px);
  }
}

/* Privacy promise */

.promise {
  padding: 56px 0 72px;
}

.promise__grid {
  display: grid;
  gap: 18px;
  margin: 36px 0 24px;
}

.promise__card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 28px 26px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow:
    0 1px 2px rgb(var(--shadow) / 0.06),
    0 12px 30px rgb(var(--shadow) / 0.07);
}

.promise__card h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin-top: 6px;
}

.promise__card p {
  color: var(--soft);
}

/* The cards' drawings (art.mjs, illustration): paper, ink and tint follow the theme. */
.ill {
  width: 120px;
  height: 90px;
}

.glance__card .ill {
  width: 96px;
  height: 72px;
}

.ill-paper {
  fill: var(--card);
}

.ill-line {
  stroke: var(--ink);
}

.ill-tint {
  fill: var(--brand-tint);
}

.ill-ink {
  fill: var(--ink);
}

.ill-strand-sage {
  stroke: #6e9677;
}

@media (min-width: 720px) {
  .promise__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* Languages */

.langs {
  padding: 24px 0 72px;
}

/* Closing */

.closing {
  padding: 24px 0 88px;
}

.closing__card {
  position: relative;
  display: grid;
  gap: 24px;
  padding: 40px 20px 36px;
  border-radius: var(--radius-hero);
  background-color: var(--closing);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28'%3E%3Cpath d='M3 3C5 12 9 18 12 25M21 3C19 12 15 18 12 25' stroke='white' stroke-opacity='0.06' stroke-width='3.2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-size: 24px 28px;
  color: var(--on-closing);
  overflow: hidden;
}

.closing__copy {
  display: grid;
  gap: 20px;
  justify-items: start;
  position: relative;
  z-index: 1;
}

.closing__copy p {
  color: var(--on-closing-soft);
}

/* The sage focus ring would vanish on the sage card. */
.closing :focus-visible {
  outline-color: var(--on-closing);
}

.closing__art {
  position: relative;
  height: 150px;
}

.closing__ball {
  position: absolute;
  filter: drop-shadow(0 12px 18px rgb(0 0 0 / 0.25));
}

.closing__ball--1 {
  width: 140px;
  left: 0;
  bottom: -10px;
}

.closing__ball--2 {
  width: 120px;
  left: 120px;
  bottom: 18px;
}

.closing__ball--3 {
  width: 92px;
  left: 222px;
  bottom: -6px;
}

@media (min-width: 900px) {
  .closing__card {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 64px 64px;
  }

  .closing__art {
    height: 220px;
  }

  .closing__ball--1 {
    width: 190px;
    left: 10px;
  }

  .closing__ball--2 {
    width: 160px;
    left: 170px;
    bottom: 40px;
  }

  .closing__ball--3 {
    width: 120px;
    left: 300px;
  }
}

/* Footer */

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  gap: 32px;
}

.site-footer__brand {
  display: grid;
  gap: 10px;
  max-width: 340px;
}

.site-footer__brand p {
  color: var(--soft);
}

.site-footer__title {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.site-footer__col ul {
  display: grid;
}

.site-footer__col a,
.site-footer__col span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.site-footer__col span {
  color: var(--soft);
}

.site-footer__col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__col a[aria-current="true"] {
  font-weight: 700;
  color: var(--brand-ink);
}

.site-footer__langs {
  grid-template-columns: repeat(2, minmax(0, max-content));
  column-gap: 24px;
}

.site-footer__legal {
  display: grid;
  gap: 4px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--soft);
  font-size: 0.875rem;
}

@media (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__legal {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 1000px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
    gap: 40px;
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

/* Privacy policy */

.doc {
  padding-top: 24px;
  padding-bottom: 88px;
}

.doc__head {
  display: grid;
  gap: 16px;
  max-width: 820px;
}

.doc__meta {
  font-weight: 600;
  color: var(--soft);
}

.doc__intro {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--soft);
  max-width: 40em;
}

.glance {
  margin-top: 44px;
}

.glance__grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.glance__card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow:
    0 1px 2px rgb(var(--shadow) / 0.06),
    0 12px 30px rgb(var(--shadow) / 0.07);
}

.glance__card h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-top: 4px;
}

.glance__card p {
  color: var(--soft);
  font-size: 1rem;
}

@media (min-width: 640px) {
  .glance__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .glance__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.doc__layout {
  display: grid;
  gap: 40px;
  margin-top: 56px;
}

.toc {
  padding: 22px 22px 18px;
  border-radius: var(--radius-card);
  background: var(--card);
  align-self: start;
}

.toc__title {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.toc ol {
  display: grid;
}

.toc a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  min-height: 40px;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.35;
}

.toc a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.toc__num {
  min-width: 1.4em;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  color: var(--brand-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

@media (min-width: 960px) {
  .doc__layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 64px;
  }

  .toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
}

.prose {
  max-width: 37rem;
}

.doc__section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.doc__section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.doc__section h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.9rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.doc__num {
  color: var(--brand-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 14px;
}

.prose ul {
  display: grid;
  gap: 10px;
}

.prose li {
  position: relative;
  padding-left: 22px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--band-edge);
}

.prose a {
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.prose code {
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--pill);
  overflow-wrap: anywhere;
}

.prose strong {
  font-weight: 700;
}

/* Contact */

.contact {
  padding-top: 24px;
  padding-bottom: 88px;
}

.contact__head {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.contact__lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--soft);
}

.mail-card {
  display: grid;
  gap: 18px;
  align-items: center;
  justify-items: start;
  margin-top: 40px;
  padding: 28px 26px;
  border-radius: var(--radius-hero);
  background: var(--card);
  box-shadow:
    0 2px 6px rgb(var(--shadow) / 0.06),
    0 24px 48px rgb(var(--shadow) / 0.1);
}

.mail-card__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.mail-card__address {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mail-card__address a {
  text-decoration: none;
}

.mail-card__address a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

@media (min-width: 760px) {
  .mail-card {
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    padding: 32px 36px;
  }
}

.topics {
  margin-top: 64px;
}

.topics__list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.topic {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  height: 100%;
  padding: 20px 20px;
  border-radius: var(--radius-card);
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.06);
  border: 1px solid transparent;
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.topic:hover {
  border-color: var(--line);
  box-shadow: 0 14px 30px rgb(var(--shadow) / 0.1);
}

.topic:active {
  transform: scale(0.985);
}

.topic__text {
  display: grid;
  gap: 4px;
  flex: 1;
}

.topic__title {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
}

.topic__body {
  color: var(--soft);
  font-size: 0.9688rem;
  line-height: 1.5;
}

.topic__arrow {
  margin-top: 4px;
  color: var(--soft);
}

@media (min-width: 760px) {
  .topics__list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* An odd number of topics: the last one runs across both columns. */
  .topics__list > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.purchase {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-top: 56px;
  padding: 24px 22px;
  border-radius: var(--radius-card);
  background: var(--terra-tint);
}

@media (min-width: 640px) {
  .purchase {
    flex-direction: row;
    gap: 18px;
    padding: 26px;
  }
}

.purchase .chip-icon {
  background: var(--card);
  color: var(--terra-ink);
}

.purchase h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.purchase p {
  max-width: 44em;
}

.purchase a {
  color: var(--terra-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* The 404 page */

.nf {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 96px;
}

.nf__ball {
  width: min(300px, 72vw);
  margin-bottom: 8px;
}

.nf__focus {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 640px;
}

.nf__focus[hidden] {
  display: none;
}

.nf__body {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--soft);
}

.nf__focus .btn {
  margin-top: 8px;
}

.nf__langs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin-top: 20px;
}

.nf__langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* The share image (scripts/shots.mjs share): a 1200 by 630 card, never shown on the site. */
.share {
  width: 1200px;
  height: 630px;
  overflow: hidden;
}

.share__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 24px;
  align-items: center;
  height: 630px;
  padding: 0 0 0 80px;
}

.share__brand {
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  font-size: 32px;
}

.share__ball {
  width: 56px;
  height: 56px;
}

.share__title {
  margin-top: 40px;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 600;
  font-size: 78px;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.share__sub {
  margin-top: 28px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra-ink);
}

.share__art {
  position: relative;
  height: 630px;
}

.share__art .sheet {
  position: absolute;
  left: 0;
  top: 140px;
  width: 300px;
  transform: rotate(-3deg);
}

.share__art .sheet__row:nth-child(n + 6) {
  display: none;
}

.share__phone {
  position: absolute;
  right: 40px;
  top: 52px;
  width: 260px;
}
