/* FatCat GEO. Black ground, light as material, two type families. */

:root {
  color-scheme: dark;

  --black: #000;
  --white: #fff;
  --coral: #dc6f52;
  --blue: #bed8f3;
  --grey: #9c9d9f;

  --text: var(--white);
  --text-quiet: rgb(255 255 255 / .72);
  --edge: rgb(255 255 255 / .42);

  --serif: "Hedvig Letters Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  accent-color: var(--coral);
}

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

html {
  background: var(--black);
  scrollbar-color: var(--grey) var(--black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-block-size: 100svh;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-size-adjust: from-font;
  line-height: 1.5;
}

::selection { background: var(--coral); color: var(--black); }

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

a { color: inherit; }

p { margin: 0; }

.skip {
  position: absolute;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  z-index: 10;
  padding: .5rem .875rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -200%;
}
.skip:focus-visible { translate: 0 0; }

/* ---- header ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
}

.brand-mark {
  inline-size: 2rem;
  block-size: 2rem;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.25rem, 1.5vw, 1rem);
}

.site-nav a {
  padding: .5rem .875rem;
  border-radius: 999px;
  color: var(--text-quiet);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  /* "How to use" stays on one line whatever font is showing: a wider fallback font once folded it in two on a
     phone and made the header taller (the owner, 2026-11-30: "这个感觉得修"; error log D35) */
  white-space: nowrap;
  transition: color .2s var(--ease-out);
}

.site-nav a:hover { color: var(--white); }

/* on a touch screen every link in the header (and the footer) is at least a finger tall and wide */
@media (pointer: coarse) {
  .brand, .site-nav a, .footer-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
  }
}

/* the narrowest phones: the three links stay on one line */
@media (max-width: 22.5rem) {
  .site-header { padding-inline: 1rem; }
  .site-nav { gap: 0; }
  .site-nav a { padding-inline: .5rem; font-size: .875rem; white-space: nowrap; }
}

/* the narrowest phones (320px): the three links ran to the very edge of the screen, and past it in a wider
   fallback font, so the logo and the links stand a little closer (mobile check, 2026-11-30) */
@media (max-width: 21rem) {
  .site-header { gap: .5rem; }
  .site-nav a { padding-inline: .375rem; }
}

/* the page you are on is lit from below */
.site-nav a[aria-current="page"] {
  color: var(--white);
  background: radial-gradient(120% 150% at 50% 130%, rgb(220 111 82 / .7), rgb(220 111 82 / 0) 72%);
  box-shadow: inset 0 0 0 1px var(--edge);
}

/* ---- footer: slim, everything in the middle, no logo (the owner, 2026-11-30: "这个页脚有些太宽了，应该很窄，然后
   所有信息都在中间", then "logo去掉，然后剩下内容居中"). Two centred rows: the header's three links, and under them
   the copyright line. The markup is written by .claude/site_footer.py.

   Spaces between the words are whole multiples of 8px: 24 from the footer's top edge to the links' text, 16 from
   there to the copyright line, 24 below it. The links are 44px tall boxes at every pointer (the size a finger
   needs), so the same numbers hold with a mouse and on a touch screen; that is why the paddings below are 14
   and 6 and not 24 and 16. The footer is 112px tall at every width. ---- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: .375rem;
  padding: .875rem var(--gutter) 1.5rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.25rem, 1.5vw, 1rem);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding: 0 .875rem;
  border-radius: 999px;
  color: var(--text-quiet);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease-out);
}

/* quieter than the header: the page you are on is only white here */
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--white); }

.footer-note {
  margin: 0;
  color: var(--text-quiet);
  font-size: .875rem;
  line-height: 1.5rem;
  text-align: center;
}

/* the narrowest phones: the three links stay on one row, as in the header */
@media (max-width: 22.5rem) {
  .footer-nav { gap: 0; }
  .footer-nav a { padding-inline: .5rem; font-size: .875rem; }
}

/* ---- home: first screen ---- */

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

/* light in the four corners of the first screen */
.home::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  block-size: 100svh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(44rem 28rem at 0% 0%, rgb(220 111 82 / .42), transparent 70%),
    radial-gradient(38rem 26rem at 100% 0%, rgb(190 216 243 / .24), transparent 70%),
    radial-gradient(30rem 20rem at 0% 100%, rgb(190 216 243 / .14), transparent 70%),
    radial-gradient(34rem 22rem at 100% 100%, rgb(220 111 82 / .2), transparent 70%);
}

.hero {
  /* the gap between the purpose line and the form, and the same gap between the small print and
     the top of the cat's tail (the owner, 2026-11-29: "行间距要合理，最好和字体行间距一样") */
  --hero-gap: clamp(1.5rem, 4.5vh, 2.75rem);
  display: flex;
  flex-direction: column;
  min-block-size: calc(100svh - 4.6875rem);
}

/* The text sits one --hero-gap above the cat at every window height ("也保持一样"). Spare height
   goes above the headline, up to 12rem; what is left stays below the scroll cue, so that in a very
   tall window (a tablet held upright, a large monitor) the headline is not pushed into the lower
   half. (A grid row of minmax(0, 12rem) took its 12rem even with no spare height.) */
.hero::before {
  content: "";
  flex: 1 1 0;
  max-block-size: 12rem;
}

.hero-copy {
  align-self: center;
  inline-size: min(100% - 2 * var(--gutter), 60rem);
  padding-block: clamp(1rem, 4vh, 3rem) 0;
  text-align: center;
}

.hero h1 {
  margin: 0 auto;
  max-inline-size: 12em;
  font-family: var(--serif);
  font-size: clamp(2.125rem, min(1rem + 5.4vw, 11.5vh), 5.25rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.purpose {
  margin-block-start: clamp(.875rem, 2.2vh, 1.5rem);
  font-size: clamp(1.0625rem, .95rem + .6vw, 1.375rem);
  line-height: 1.4;
  text-wrap: balance;
}

/* ---- the check form ---- */

.check {
  inline-size: min(100%, 40rem);
  margin: var(--hero-gap) auto 0;
  text-align: start;
}

.check-lead {
  margin-block-end: 1.25rem;
  color: var(--text-quiet);
  text-align: center;
  text-wrap: pretty;
}

.check label {
  display: block;
  margin-block-end: .5rem;
  padding-inline-start: 1.25rem;
  font-size: .9375rem;
  font-weight: 500;
}

.field {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .375rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgb(0 0 0 / .6);
  transition: border-color .2s var(--ease-out);
}

.field:hover { border-color: rgb(255 255 255 / .62); }
.field:focus-within { border-color: var(--white); }

.field input {
  flex: 1;
  min-inline-size: 0;
  padding: .75rem .5rem .75rem 1.125rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--white);
  caret-color: var(--coral);
  font: inherit;
  font-size: 1.0625rem;
}

.field input::placeholder { color: rgb(255 255 255 / .56); opacity: 1; }
.field input:focus-visible { outline: none; }
.field:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }

.field button {
  flex: none;
  padding: .75rem 1.375rem;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease-out), scale .2s var(--ease-out);
}

.field button:hover { background: var(--blue); }
.field button:active { scale: .97; }
.field button:disabled { background: var(--grey); cursor: progress; }

.field:has(input:user-invalid) { border-color: var(--coral); }

.field-error {
  display: none;
  align-items: start;
  gap: .5rem;
  margin-block-start: .625rem;
  padding-inline-start: 1.25rem;
  color: #f0957c;
  font-size: .9375rem;
}

.field-error svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  margin-block-start: .2rem;
}

.field:has(input:user-invalid) + .field-error { display: flex; }

/* Quick check does not answer: the same line, shown by home.js; the field keeps its colour */
.check-offline:not([hidden]) { display: flex; }
/* Quick check's own sentence when it does not start a check; the field turns coral only when the address is what
   has to change (home.js sets data-refused on the form) */
.check-server:not([hidden]) { display: flex; }
.check[data-refused="field"] .field { border-color: var(--coral); }

.check-note {
  margin-block-start: .875rem;
  color: var(--text-quiet);
  font-size: .875rem;
  text-align: center;
}

/* ---- the cat on the floor ---- */

/* the cat's viewBox starts at the top of its tail, so this padding is the whole gap above it */
.scene {
  padding-block-start: var(--hero-gap);
}

.scroll-cue {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  margin-block: clamp(.5rem, 2vh, 1.25rem);
  padding: .5rem .875rem;
  border-radius: 999px;
  color: var(--text-quiet);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease-out);
}

.scroll-cue:hover { color: var(--white); }
.scroll-cue svg { inline-size: 1rem; block-size: 1rem; }

/* The cue is an arrow alone since 2026-11-29 (the owner: the line "FatCat is watching you… try moving your mouse
   left and right" is deleted); on a touch screen it is still a finger wide and tall. */
@media (pointer: coarse) {
  .scroll-cue { justify-content: center; min-inline-size: 2.75rem; min-block-size: 2.75rem; }
}

.floor {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: end;
}

.floor::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 16%, var(--edge) 84%, transparent);
}

/* light rises behind the cat and stops at the floor, like a horizon */
.light {
  position: absolute;
  inset: -110% 0 0;
  pointer-events: none;
  transform-origin: 50% 100%;
  background:
    radial-gradient(ellipse 24rem 92% at calc(50% - 8rem) 100%, rgb(220 111 82) 0%, rgb(220 111 82 / .5) 42%, transparent 100%),
    radial-gradient(ellipse 24rem 92% at calc(50% + 9rem) 100%, rgb(190 216 243 / .92) 0%, rgb(190 216 243 / .4) 42%, transparent 100%);
  filter: blur(22px);
  clip-path: inset(-40px -40px 0);
}

.cat {
  position: relative;
  display: block;
  inline-size: clamp(14rem, min(30vw, 36vh), 23rem);
  block-size: auto;
  overflow: visible;
  filter: drop-shadow(0 0 1px rgb(255 255 255 / .35));
}

.cat-body { fill: #000; stroke: #000; stroke-width: 6; stroke-linejoin: round; }
.cat-tail path { fill: none; stroke: #000; stroke-width: 20; stroke-linecap: round; }
.cat-white { fill: #fff; }
.cat-pupils { fill: #000; }
.cat-toes { fill: none; stroke: #fff; stroke-width: 2.25; stroke-linecap: round; }

/* the rolling cat on the second screen: one black shape, white line-work on top */
.cat-solid { fill: #000; }
.cat-line { fill: #fff; }
/* short white strokes drawn on the big cat: its toes and the fold of an ear */
.cat-ink { fill: none; stroke: #fff; stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; }

.cat-pupils {
  transform: translate(calc(var(--look-x, 1.4) * 1px), calc(var(--look-y, -1.8) * 1px));
  transition: transform .22s var(--ease-out);
}

/* The first screen's cat is the owner's wireframe drawing, traced (2026-11-29): its whiskers are
   drawn as strokes, and its pupils move less, so they stay inside its round eyes. */
.cat-whisker { fill: none; stroke: #fff; stroke-width: 1.1; stroke-linecap: round; }
/* with the logo cat's face: a white line in each rounded ear */
.cat-ear { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }.cat-lie .cat-pupils { transform: translate(calc(var(--look-x, .8) * 1px), calc(var(--look-y, -1) * 1px)); }
/* about a quarter of the page's width, as in the wireframe; it is flatter than the cat before it */
.cat-lie, .floor-shine-cat { inline-size: clamp(16rem, min(34vw, 42vh), 26rem); }

/* the floor shines: the light, and the cat upside down in it, fading away under the floor line */
.floor-shine {
  position: absolute;
  inset-block-start: 100%;
  inset-inline: 0;
  z-index: -1;
  block-size: 7rem;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(#000, rgb(0 0 0 / .35) 30%, transparent 80%);
}

.floor-shine-light {
  position: absolute;
  inset: 0 0 -60%;
  background:
    radial-gradient(ellipse 24rem 70% at calc(50% - 8rem) 0%, rgb(220 111 82 / .55), transparent 100%),
    radial-gradient(ellipse 24rem 70% at calc(50% + 9rem) 0%, rgb(190 216 243 / .45), transparent 100%);
  filter: blur(22px);
}

.floor-shine-cat {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  translate: -50% 0;
  scale: 1 -1;
  opacity: .32;
}

/* What AI reads: this page's own source, faint, at the two sides of the first screen; where the
   pointer is, it shows clearly (home.js sets --mx and --my). Only where the sides have room. */
.hero {
  position: relative;
  isolation: isolate;
}

.ai-source {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  justify-content: space-between;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
  pointer-events: none;
  color: rgb(255 255 255 / .62);
  font: 400 .75rem/1.9 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre;
  mask-image: radial-gradient(circle 15rem at var(--mx, -50%) var(--my, -50%), #000, rgb(0 0 0 / .1) 70%, rgb(0 0 0 / .1));
}

.ai-source pre {
  margin: 0;
  inline-size: min(22vw, 22rem);
  overflow: hidden;
  font: inherit;
}

.ai-source pre:last-child { text-align: end; }

@media (max-width: 75rem) {
  .ai-source { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .light { animation: light-up 1.6s var(--ease-out) both; }

  .cat-eyes {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: wake .55s .7s var(--ease-out) backwards, blink 6.2s 2.4s infinite;
  }

  .cat-tail {
    transform-box: fill-box;
    transform-origin: 0% 100%;
    animation: sway 3.8s ease-in-out infinite alternate;
  }
}

/* ---- home: second screen ---- */

.what {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 10fr);
  align-items: end;
  min-block-size: 100svh;
  padding-block-start: clamp(3rem, 9vh, 6rem);
}

.what::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 12%, var(--edge));
}

/* the cat from the wireframe, seen from above on its back, filling the left side */
.what-scene {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: grid;
  place-items: center;
  padding-block-end: clamp(1rem, 4vh, 2.5rem);
  pointer-events: none;
}

/* a pool of light on the floor under the cat, wide enough that the black cat stands clear of the
   dark page from its ears to the tip of its tail */
.what-scene .light {
  inset: -3% 0 -1% -6%;
  animation: none;
  background: radial-gradient(ellipse 56% 54% at 50% 50%, rgb(220 111 82) 0%, rgb(220 111 82 / .86) 48%, rgb(220 111 82 / .42) 80%, transparent 100%);
  filter: blur(34px);
  clip-path: none;
}

/* The drawing's frame holds the three poses the cat rests in, with a little room round them.
   The frame is a little taller than wide: the last limit keeps it inside one screen. */
.cat-big {
  inline-size: min(102%, 52rem, 79svh);
  filter: none; /* it lies in its own pool of light, and a filter over a drawing that changes every frame is slow */
}

/* a field of colour standing on the floor, running off the right edge */
.what-field {
  --ink: #000;
  --ink-quiet: rgb(0 0 0 / .78);

  position: relative;
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* The text sits in the middle of the field, and every space in it is a whole multiple of one
     unit: four units between the heading, the paragraph, the two tools and the links, and one
     unit between a tool's name and its line. The owner's rule: spaces are equal or multiples. */
  --unit: clamp(.625rem, 1.7vh, 1rem);
  align-content: center;
  gap: calc(4 * var(--unit));
  padding: clamp(2.5rem, 9vh, 5.5rem) clamp(2rem, 5vw, 4.5rem);
  padding-inline-end: max(var(--gutter), 5vw);
  border-start-start-radius: clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(90% 70% at 100% 100%, rgb(220 111 82 / .95), rgb(220 111 82 / 0) 68%),
    linear-gradient(165deg, #d3e5f8, var(--blue) 46%, #c7c0cc);
  color: var(--ink);
}

.what-field ::selection { background: var(--black); color: var(--white); }
.what-field :focus-visible { outline-color: var(--black); }

.what-field h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.375rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.what-intro {
  max-inline-size: 34rem;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.what-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: calc(4 * var(--unit)) clamp(1.5rem, 3vw, 3rem);
  max-inline-size: 52rem;
}

.what-tools h3 {
  margin: 0 0 var(--unit);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.15;
}

.what-tools p {
  color: var(--ink-quiet);
  line-height: 1.5;
  text-wrap: pretty;
}

/* the two links stand on the same two columns as the tools: one under each (the owner's wish) */
.what-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  justify-items: start;
  gap: var(--unit) clamp(1.5rem, 3vw, 3rem);
  max-inline-size: 52rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8125rem 1.5rem;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), scale .2s var(--ease-out);
}

.button:hover { background: rgb(0 0 0 / .78); }
.button:active { scale: .97; }

.button-quiet {
  background: none;
  color: var(--black);
  box-shadow: inset 0 0 0 1.5px var(--black);
}

.button-quiet:hover { background: var(--black); color: var(--white); }

/* The big cat is drawn and rolled by roll-cat.js. With reduced motion it is drawn once, lying still. */

@keyframes light-up {
  from { opacity: .3; scale: .9; }
  to { opacity: 1; scale: 1; }
}

@keyframes wake {
  from { transform: scaleY(.08); }
  to { transform: scaleY(1); }
}

@keyframes blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(.08); }
}

@keyframes sway {
  from { transform: rotate(-3deg); }
  to { transform: rotate(5deg); }
}

/* ---- narrow screens ---- */

@media (max-width: 34rem) {
  .brand-name {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav a { padding-inline: .625rem; }

  .field {
    flex-direction: column;
    align-items: stretch;
    padding: .5rem;
    border-radius: 1.5rem;
  }

  .field input { padding: .75rem .875rem; text-align: start; }
  .check label, .field-error { padding-inline-start: .875rem; }
}

@media (max-width: 60rem) {
  .what {
    grid-template-columns: minmax(0, 1fr);
    min-block-size: 0;
  }

  .what-scene { order: 2; }
  .what::after { background: linear-gradient(90deg, transparent, var(--edge) 16%, var(--edge) 84%, transparent); }

  .what-field {
    margin-inline-start: var(--gutter);
    padding-block: calc(4 * var(--unit)); /* the same space above and below the text as between its blocks */
    border-end-start-radius: clamp(2rem, 4vw, 3.5rem);
  }

  .what-scene { padding-block: clamp(2rem, 8vw, 4rem); }
  .cat-big { inline-size: min(90%, 26rem); }
  .what-scene .light { inset: 4% 4%; }
}

/* Windows high contrast and other forced palettes */
@media (forced-colors: active) {
  .field { border-color: CanvasText; }
  .field button { border: 1px solid ButtonText; }
  .floor::after, .what::after { background: CanvasText; }
  .light, .home::before, .floor-shine, .ai-source { display: none; }
  .what-field { border: 1px solid CanvasText; }
  .button, .button-quiet { border: 1px solid ButtonText; }
}

/* ---- pieces shared from the product page on ---- */

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* buttons on the dark ground: the main one white, the other an outline */
.button-white { background: var(--white); color: var(--black); }
.button-white:hover { background: var(--blue); }
.button-white-quiet { background: none; color: var(--white); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .7); }
.button-white-quiet:hover { background: var(--white); color: var(--black); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* words that must not be split across two lines, such as "open-source" */
.nowrap { white-space: nowrap; }

/* ---- product ---- */

.product {
  --inset: clamp(1.25rem, 5.5vw, 5rem);
  --corner: clamp(1.5rem, 3vw, 2.5rem);
  /* the four steps run from coral to light blue */
  --step-1: #dc6f52;
  --step-2: #d8958a;
  --step-3: #ceb7be;
  --step-4: #bed8f3;
}

/* light in the two upper corners of the first screen */
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  block-size: 100svh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(44rem 28rem at 0% 0%, rgb(220 111 82 / .42), transparent 70%),
    radial-gradient(38rem 26rem at 100% 0%, rgb(190 216 243 / .24), transparent 70%);
}

/* The first screen holds the pitch and the whole row of steps; the top of the next part shows under it. */
.first-screen {
  display: grid;
  grid-template-rows: 1fr auto;
  min-block-size: calc(100svh - 4.6875rem - 6rem);
}

.pitch {
  position: relative; /* stays in front of the light that rises behind the cat */
  z-index: 1;
  align-self: center;
  justify-self: center;
  inline-size: min(100% - 2 * var(--inset), 62rem);
  padding-block-start: clamp(1rem, 3vh, 2.5rem);
  text-align: center;
}

.pitch h1 {
  margin: 0 auto;
  max-inline-size: 14.5em;
  font-family: var(--serif);
  font-size: clamp(2.125rem, min(1rem + 4.2vw, 9.4vh), 4.25rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.pitch-lead {
  margin-block-start: clamp(.875rem, 2.2vh, 1.25rem);
  color: var(--text-quiet);
  font-size: clamp(1.0625rem, .95rem + .5vw, 1.3125rem);
  line-height: 1.4;
  text-wrap: balance;
}

.pitch .actions {
  justify-content: center;
  margin-block-start: clamp(1.25rem, 3.4vh, 1.875rem);
}

/* While the four steps stand in one row, each button stands over the middle of a step: the first
   over step 2, the second over step 3 (the owner's wish). A column here is as wide as one step. */
@media (min-width: 60.0625rem) {
  .first-screen { container-type: inline-size; }

  .pitch .actions {
    display: grid;
    grid-template-columns: repeat(2, calc((100cqi - 2 * var(--inset)) / 4));
    justify-items: center;
    gap: 0;
    /* the two columns together are wider than the text above on narrow screens: keep them centred */
    margin-inline: calc(50% - (100cqi - 2 * var(--inset)) / 4);
  }
}

/* ---- the four steps, standing in a row like a wall ---- */

.steps {
  position: relative;
  padding-block-start: clamp(7rem, 15vh, 9.5rem); /* room above the wall for the cat's head */
  overflow-x: clip; /* the light behind the cat is wider than the wall */
}

/* the floor the wall stands on */
.steps::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--edge) 12%, var(--edge) 88%, transparent);
}

.steps-wall {
  --at: 3; /* the step the cat stands behind, counted from 0 */
  position: relative;
  margin-inline: var(--inset);
}

.steps-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--black);
}

.steps-row > li {
  min-block-size: clamp(14rem, 33svh, 20rem);
  padding: clamp(1.5rem, 2.6vw, 2.375rem) clamp(1.25rem, 2.2vw, 2rem) clamp(1.75rem, 3vw, 2.5rem);
}

.steps-row > li:nth-child(1) { background: var(--step-1); border-start-start-radius: var(--corner); }
.steps-row > li:nth-child(2) { background: var(--step-2); }
.steps-row > li:nth-child(3) { background: var(--step-3); }
.steps-row > li:nth-child(4) { background: var(--step-4); border-start-end-radius: var(--corner); }

.steps-row ::selection, .proof ::selection { background: var(--black); color: var(--white); }

.steps-row h3, .improve-steps h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.875rem, 1.3rem + 1.7vw, 2.625rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.steps-row h3 span, .improve-steps h3 span { margin-inline-end: .12em; }
.steps-row h3 span { color: rgb(0 0 0 / .55); }
.improve-steps h3 span { color: rgb(255 255 255 / .5); }

.step-ask {
  margin-block-start: clamp(.75rem, 1.6vw, 1.125rem);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.step-ask + p {
  margin-block-start: .5rem;
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.steps-row .step-ask + p { color: rgb(0 0 0 / .8); }

/* ---- the cat behind the wall ---- */

.peek-head, .peek-paws, .peek-light {
  position: absolute;
  inset-inline-start: calc((var(--at) + .66) * 25%);
  pointer-events: none;
}

.peek-head, .peek-paws {
  inline-size: clamp(8.5rem, 13vw, 11.75rem);
  block-size: auto;
  overflow: visible;
}

/* The head stands on the wall's top edge and is drawn behind the wall, which hides whatever of it is below the edge. */
.peek-head {
  z-index: 1;
  inset-block-end: 100%;
  translate: -50% 0;
}

/* The paws hang over the edge, in front of the wall; the drawing starts a little above the edge. */
.peek-paws {
  z-index: 3;
  inset-block-start: 0;
  translate: -50% -19.2%;
}

/* light rises behind the cat, as it does on the home page */
.peek-light {
  z-index: 0;
  inset-block-end: 100%;
  inline-size: clamp(18rem, 40vw, 36rem);
  block-size: clamp(8rem, 16vw, 14rem);
  translate: -50% 0;
  background:
    radial-gradient(ellipse 34% 100% at 42% 100%, rgb(220 111 82) 0%, rgb(220 111 82 / .5) 42%, transparent 100%),
    radial-gradient(ellipse 34% 100% at 66% 100%, rgb(190 216 243 / .92) 0%, rgb(190 216 243 / .4) 42%, transparent 100%);
  filter: blur(22px);
}

/* how much of the cat shows: up (down to its nose), low (down to its eyes), down (behind the wall) */
.peek-grip { transform-box: view-box; transform-origin: 50% 19.2%; }
[data-peek="low"] .peek-rise { translate: 0 44px; }
[data-peek="down"] .peek-rise { translate: 0 150px; }
[data-peek="down"] .peek-grip { scale: 1 0; }
[data-peek="down"] .peek-light { opacity: .5; }

/* its pupils slide toward the pointer */
.peek-pupils { transform: translate(calc(var(--look-x, .3) * 12.7px), calc(var(--look-y, -.2) * 7.3px)); }

@media (prefers-reduced-motion: no-preference) {
  /* it comes up with a little bounce, takes hold of the edge, and blinks once */
  .peek-rise { transition: translate .34s cubic-bezier(.3, 1.45, .55, 1); }
  .peek-grip { transition: scale .2s var(--ease-out) .14s; }
  .peek-light { transition: opacity .2s var(--ease-out); }
  .peek-pupils { transition: transform .22s var(--ease-out); }
  [data-peek="up"] .peek-eyes {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: blink-once .3s .32s ease-in-out;
  }

  /* it sinks slowly to watch, and drops fast to change place */
  [data-peek="low"] .peek-rise { transition: translate .5s var(--ease-out); }
  [data-peek="down"] .peek-rise { transition: translate .16s cubic-bezier(.5, 0, .9, .5); }
  [data-peek="down"] .peek-grip { transition: scale .1s ease-in; }
}

@keyframes blink-once {
  50% { transform: scaleY(.1); }
}

/* ---- then improve ---- */

.improve {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  row-gap: 1.5rem;
  align-items: start;
  padding: clamp(3rem, 7vh, 4.5rem) var(--inset) 0;
}

.improve h2, .closing h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.improve h2 { font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.5rem); }

.improve-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.improve-steps .step-ask + p { max-inline-size: 30em; color: var(--text-quiet); }

/* ---- sample numbers, on a field of colour that runs off the right edge ---- */

/* a small heading that says what the field under it is */
.proof-title {
  margin: clamp(3.5rem, 10vh, 6rem) var(--inset) 0;
  padding-inline-start: clamp(1.5rem, 5vw, 4.5rem); /* lines up with the text inside the field */
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.proof-title + .proof { margin-block-start: 1.25rem; }

.proof {
  --ink: #000;
  --ink-quiet: rgb(0 0 0 / .78);

  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 5.5vw, 5rem);
  row-gap: 2rem;
  align-items: center;
  margin: clamp(3.5rem, 10vh, 6rem) var(--inset) 0;
  padding: clamp(2rem, 4.4vw, 3.75rem) clamp(1.5rem, 5vw, 4.5rem);
  border-radius: clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(90% 70% at 100% 100%, rgb(220 111 82 / .95), rgb(220 111 82 / 0) 68%),
    linear-gradient(165deg, #d3e5f8, var(--blue) 46%, #c7c0cc);
  color: var(--ink);
}

.sample {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}

.sample caption {
  caption-side: bottom;
  padding-block-start: 1rem;
  color: var(--ink-quiet);
  font-size: .9375rem;
  text-align: start;
}

.sample th {
  padding: .375rem 1.25rem .375rem 0;
  font-weight: 600;
  text-align: start;
  white-space: nowrap;
}

.sample td { padding: .375rem 0; }
.sample td:last-child { padding-inline-start: 1.25rem; white-space: nowrap; }

/* each figure is a share of a whole: a thin bar on a track of the same ink, round at the end that carries the number */
.sample .bar { inline-size: 100%; min-inline-size: 4rem; }
.sample .bar span { display: block; block-size: .625rem; border-radius: 0 4px 4px 0; background: rgb(0 0 0 / .14); }
.sample .bar span::before { content: ""; display: block; inline-size: var(--share); block-size: 100%; border-radius: 0 4px 4px 0; background: #000; }

.sample .by th { padding-block: .625rem .125rem; color: var(--ink-quiet); font-size: .9375rem; font-weight: 400; }
.sample .part th { padding-inline-start: 1.25rem; font-weight: 400; }
.sample .part .bar span { block-size: .375rem; }
.sample .apart th, .sample .apart td { padding-block-start: 1.125rem; }

.measured {
  max-inline-size: 26em;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.1875rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* the full report opens under the sample numbers, across the whole field */
.full-report { grid-column: 1 / -1; }

.full-report summary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-block-size: 2.75rem;
  padding: .5rem 1.25rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--black);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.full-report summary::-webkit-details-marker { display: none; }

/* the arrow points down, and up once the report is open */
.full-report summary::after {
  content: "";
  inline-size: .5rem;
  block-size: .5rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  translate: 0 -2px;
}

.full-report[open] summary::after { rotate: -135deg; translate: 0 2px; }
.full-report summary:hover { background: var(--black); color: var(--white); }
.full-report summary:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.full-report iframe {
  display: block;
  inline-size: 100%;
  block-size: min(80svh, 52rem);
  margin-block-start: 1.25rem;
  border: 0;
  border-radius: 1rem;
  background: #fff;
}

/* ---- the close ---- */

.closing {
  padding: clamp(4rem, 12vh, 6.5rem) var(--inset) clamp(5rem, 14vh, 7.75rem);
  text-align: center;
}

.closing h2 { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 2.75rem); }
.closing .actions { justify-content: center; margin-block-start: 1.75rem; }

/* ---- product on narrower screens: the steps go two to a row, then one ---- */

@media (max-width: 60rem) {
  .first-screen { min-block-size: 0; }
  .steps { padding-block-start: clamp(7.5rem, 22vw, 10rem); }
  .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-row > li { min-block-size: 0; }
  .steps-row > li:nth-child(2) { border-start-end-radius: var(--corner); }
  .steps-row > li:nth-child(4) { border-start-end-radius: 0; }
  .peek-head, .peek-paws, .peek-light { inset-inline-start: 75%; }
  .improve, .proof { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  /* the sample table: each bar drops under its name and figure */
  .sample { display: flex; flex-direction: column; }
  .sample tbody { display: block; }
  .sample caption { display: block; order: 1; }
  .sample tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: baseline; }
  .sample th { padding-inline-end: 0; white-space: normal; }
  .sample td:last-child { grid-area: 1 / 2; padding-inline-start: 0; }
  .sample .bar { grid-area: 2 / 1 / auto / -1; min-inline-size: 0; padding-block: .125rem .625rem; }
  .sample .by th { grid-column: 1 / -1; }
  .sample .apart .bar { padding-block-start: .125rem; }

  .steps-row, .improve-steps { grid-template-columns: minmax(0, 1fr); }
  .steps-row > li:nth-child(1) { border-start-end-radius: var(--corner); }
  .steps-row > li:nth-child(2) { border-start-end-radius: 0; }
  .peek-head, .peek-paws, .peek-light { inset-inline-start: 70%; }
}

@media (forced-colors: active) {
  .steps-row > li, .proof { border: 1px solid CanvasText; }
  .steps::after { background: CanvasText; }
  .peek-light, .product::before { display: none; }
  .sample .bar span { border: 1px solid CanvasText; }
  .sample .bar span::before { background: CanvasText; }
}
