/* ==========================================================================
   Tilecraft Digital — risograph print studio
   --------------------------------------------------------------------------
   Type pairing (all from Google Fonts, self-hosted in /fonts so the site
   makes no requests to anyone else):

     Display   Bricolage Grotesque   chunky, expressive, wide weight range
     Body      Hanken Grotesk        clean, even-toned grotesque
     Mono      Space Mono            license codes, prices, and labels

   Color: warm uncoated paper, deep navy-black ink for every piece of running
   text, and two fluorescent inks — pink and teal — that multiply where they
   overlap to make a third color, the way two passes through a risograph do.
   The fluorescent inks are only ever used for graphics and large display
   type. Running text stays in the navy-black ink, or in the off-white ink on
   dark paper, so contrast always clears WCAG AA.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-latin-var.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/hanken-grotesk-latin-var.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/space-mono-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/space-mono-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --paper: #f7f2e8;
  --paper-raised: #fffaf0;
  --paper-sunk: #ece4d5;
  --paper-edge: #d9cfbb;

  --ink: #14172a;
  --ink-muted: #4c5165;
  --ink-faint: #5f6376;

  /* Fluorescent inks: graphics and large display type only. */
  --pink: #ef3c80;
  --teal: #00b2ad;
  /* Readable equivalents, for small colored text. */
  --pink-text: #b5195c;
  --teal-text: #00655f;

  --focus: #14172a;
  --focus-offset: #ffd23f;

  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', 'Consolas', monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.38vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.72vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.9vw, 4.2rem);
  --step-5: clamp(2.7rem, 1.6rem + 5vw, 6rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --measure: 62ch;
  --radius: 2px;
  --radius-lg: 4px;
  --header-height: 4.25rem;

  --blend: multiply;
  --grain-opacity: 0.5;
  --halftone-opacity: 0.22;
  --shadow: 0 1px 0 var(--paper-edge);
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --paper: #121020;
  --paper-raised: #1b1930;
  --paper-sunk: #0b0a16;
  --paper-edge: #322e4d;

  --ink: #f4efe3;
  --ink-muted: #b7b1c6;
  --ink-faint: #8e89a1;

  --pink: #ff5c9b;
  --teal: #2fe3d6;
  --pink-text: #ff8ab6;
  --teal-text: #5ceade;

  --focus: #f4efe3;
  --focus-offset: #ffd23f;

  --blend: screen;
  --grain-opacity: 0.3;
  --halftone-opacity: 0.16;
  --shadow: 0 1px 0 var(--paper-edge);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;

    --paper: #121020;
    --paper-raised: #1b1930;
    --paper-sunk: #0b0a16;
    --paper-edge: #322e4d;

    --ink: #f4efe3;
    --ink-muted: #b7b1c6;
    --ink-faint: #8e89a1;

    --pink: #ff5c9b;
    --teal: #2fe3d6;
    --pink-text: #ff8ab6;
    --teal-text: #5ceade;

    --focus: #f4efe3;
    --focus-offset: #ffd23f;

    --blend: screen;
    --grain-opacity: 0.3;
    --halftone-opacity: 0.16;
  }
}

/* The larger-interface setting, offered in the Studio and remembered here. */
:root[data-scale='large'] {
  --step--1: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --step-0: clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
  --step-1: clamp(1.4rem, 1.3rem + 0.45vw, 1.7rem);
  --step-2: clamp(1.7rem, 1.5rem + 0.85vw, 2.25rem);
  --step-3: clamp(2.05rem, 1.7rem + 1.6vw, 3.1rem);
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

/* The reset above would otherwise take away the centering a modal dialog
   gets from the browser's own stylesheet. */
dialog {
  margin: auto;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain. A fixed, non-interactive layer over the whole page. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.42'/%3E%3C/svg%3E");
  mix-blend-mode: var(--blend);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
li {
  text-wrap: pretty;
}

p {
  max-width: var(--measure);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

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

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 2px solid var(--ink);
  opacity: 0.15;
  margin: 2.5rem 0;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.4em;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 120ms ease;
}

.skip-link:focus {
  top: 0.5rem;
}

.wrap {
  width: min(100% - var(--gutter) * 2, 74rem);
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - var(--gutter) * 2, 48rem);
}

.stack > * + * {
  margin-top: var(--stack-gap, 1rem);
}

.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  font-weight: 700;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 44ch;
}

/* --------------------------------------------------------------------------
   Misregistered display type
   Two ink layers, a hair out of register, with a crisp readable layer on top.
   -------------------------------------------------------------------------- */

.overprint {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.overprint::before,
.overprint::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: var(--blend);
}

.overprint::before {
  color: var(--pink);
  transform: translate(0.055em, 0.035em);
}

.overprint::after {
  color: var(--teal);
  transform: translate(-0.04em, -0.03em);
}

@media (hover: hover) {
  .overprint:hover::before {
    transform: translate(0.09em, 0.06em);
  }
  .overprint:hover::after {
    transform: translate(-0.07em, -0.05em);
  }
  .overprint::before,
  .overprint::after {
    transition: transform 320ms cubic-bezier(0.2, 0.7, 0.3, 1);
  }
}

/* A halftone dot field, used behind and beside display type. */
.halftone {
  background-image: radial-gradient(var(--halftone-ink, var(--ink)) 28%, transparent 29%);
  background-size: 0.55rem 0.55rem;
  opacity: var(--halftone-opacity);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  width: min(100% - var(--gutter) * 2, 80rem);
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.logo__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
}

.logo__text {
  white-space: nowrap;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.4rem);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.4vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list li {
  margin: 0;
}

.nav__link {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav__link[aria-current='page'] {
  border-bottom-color: var(--pink);
}

@media (hover: hover) {
  .nav__link:hover {
    border-bottom-color: var(--teal);
  }
}

.nav__studio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.45rem 0.95rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
}

@media (hover: hover) {
  .nav__studio:hover {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
  }
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--ink);
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

@media (hover: hover) {
  .theme-toggle:hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.nav__toggle {
  display: none;
}

@media (max-width: 60rem) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    border: 2px solid var(--ink);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: var(--step--1);
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding: 0.5rem var(--gutter) 1rem;
  }

  .nav[data-open='true'] {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--paper-edge);
  }

  .nav__link[aria-current='page'] {
    border-bottom-color: var(--pink);
  }

  .nav__studio {
    margin-top: 0.85rem;
    justify-content: center;
  }

  .nav__extras {
    margin-top: 0.85rem;
    display: flex;
    justify-content: flex-start;
  }
}

.nav__extras {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* --------------------------------------------------------------------------
   Split-screen scroll layout
   On wide screens the left half is a sticky, full-height canvas of abstract
   riso compositions. On narrow screens the same canvas becomes a short band
   that stays at the top while the content scrolls past it.
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}

.split__canvas {
  position: sticky;
  top: var(--header-height);
  height: clamp(9rem, 26vh, 15rem);
  z-index: 2;
  background: var(--paper-sunk);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.split__canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.split__content {
  position: relative;
  z-index: 3;
  background: var(--paper);
}

.split__content > section {
  padding-block: clamp(3rem, 9vh, 6rem);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.split__content > section + section {
  border-top: 2px solid var(--paper-edge);
}

@media (min-width: 64rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split__canvas {
    top: var(--header-height);
    height: calc(100svh - var(--header-height));
    border-bottom: 0;
    border-right: 2px solid var(--ink);
    align-self: start;
  }

  .split__content {
    background: transparent;
  }

  .split__content > section {
    padding-inline: clamp(1.5rem, 4vw, 4rem);
    min-height: calc(100svh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* The decorative compositions are illustrations, not pattern previews. */
.canvas-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-top: 1px solid var(--paper-edge);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.hero__inks {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero__ink {
  position: absolute;
  inset: -12%;
  mix-blend-mode: var(--blend);
  will-change: transform;
}

.hero__ink canvas {
  width: 100%;
  height: 100%;
}

.hero__ink--a {
  animation: drift-a 34s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.hero__ink--b {
  animation: drift-b 27s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes drift-a {
  from {
    transform: translate3d(-2.5%, -1.5%, 0) scale(1.02) rotate(-1.2deg);
  }
  to {
    transform: translate3d(3%, 2.5%, 0) scale(1.07) rotate(1.4deg);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(2.5%, 2%, 0) scale(1.06) rotate(1.6deg);
  }
  to {
    transform: translate3d(-3%, -2%, 0) scale(1.01) rotate(-1.5deg);
  }
}

.hero__inner {
  width: min(100% - var(--gutter) * 2, 74rem);
  margin-inline: auto;
  padding-block: clamp(3.5rem, 13vh, 8rem);
  position: relative;
}

.hero__title {
  font-size: var(--step-5);
  max-width: 14ch;
}

.hero__lede {
  margin-top: 1.5rem;
  font-size: var(--step-1);
  max-width: 46ch;
  line-height: 1.45;
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__hint {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Real text, sitting over artwork, so it takes the muted ink rather than
     the faint one. */
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1.2;
  padding: 0.8rem 1.4rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}

@media (hover: hover) {
  .button:hover {
    transform: translateY(-2px);
  }
}

.button:active {
  transform: translateY(0);
}

.button--ghost {
  background: transparent;
  color: var(--ink);
}

@media (hover: hover) {
  .button--ghost:hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.button--ink {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

.button--small {
  font-size: var(--step--1);
  padding: 0.55rem 0.95rem;
}

.button--block {
  width: 100%;
}

.button[aria-disabled='true'],
.button:disabled {
  background: var(--paper-sunk);
  border-color: var(--paper-edge);
  color: var(--ink-faint);
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   Cards and product listings
   -------------------------------------------------------------------------- */

.tier {
  --stack-gap: 1.25rem;
}

.tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-grid li {
  margin: 0;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  padding: 1.25rem;
  text-decoration: none;
  position: relative;
  transition: transform 160ms ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translate(-2px, -2px);
  }

  .card:hover .card__title {
    text-decoration-thickness: 0.14em;
  }
}

.card__swatch {
  height: 4.5rem;
  margin: -1.25rem -1.25rem 1rem;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.card__swatch canvas,
.card__swatch svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

.card__short {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
  flex: 1 1 auto;
}

.card__foot {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--paper-edge);
}

.price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.03em;
}

.card__more {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Print shop section — the Studio Editions, in dark ink
   -------------------------------------------------------------------------- */

.printshop {
  background: #0d0b18;
  color: #f4efe3;
  border-block: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 10vh, 6.5rem);
}

.printshop::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#f4efe3 30%, transparent 31%);
  background-size: 0.7rem 0.7rem;
  opacity: 0.07;
}

.printshop__head {
  position: relative;
  margin-bottom: 2.5rem;
}

.printshop .eyebrow {
  color: #2fe3d6;
}

.printshop__lede {
  color: #cdc7dc;
  font-size: var(--step-1);
  max-width: 50ch;
  margin-top: 1rem;
  line-height: 1.45;
}

.printshop__panels {
  position: relative;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.printshop__panels li {
  margin: 0;
}

.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  border: 2px solid #3a3357;
  background: #141127;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

@media (hover: hover) {
  .panel:hover {
    transform: translateY(-3px);
    border-color: #2fe3d6;
  }
}

.panel--featured {
  border-color: #ff5c9b;
  background: #1a1430;
}

.panel__flag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #ff8ab6;
  margin-bottom: 0.65rem;
}

.panel__art {
  height: 6.5rem;
  margin-bottom: 1.1rem;
  border: 1px solid #3a3357;
  overflow: hidden;
}

.panel__art canvas {
  width: 100%;
  height: 100%;
}

.panel__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.panel__short {
  margin-top: 0.7rem;
  color: #cdc7dc;
  font-size: var(--step--1);
  flex: 1 1 auto;
}

.panel__foot {
  margin-top: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #3a3357;
}

.panel__foot .price {
  color: #2fe3d6;
}

.panel__more {
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  margin: 0;
  counter-increment: step;
  border-top: 3px solid var(--ink);
  padding-top: 0.9rem;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--pink);
  mix-blend-mode: var(--blend);
}

.steps h3 {
  font-size: var(--step-1);
  margin-top: 0.35rem;
}

.steps p {
  margin-top: 0.45rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Prose pages
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(2.5rem, 7vh, 4.5rem) clamp(1.5rem, 4vh, 2.5rem);
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}

.page-head__inner {
  position: relative;
}

.page-head .lede {
  margin-top: 1rem;
}

.updated {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.prose {
  padding-block: clamp(2rem, 6vh, 3.5rem) clamp(3rem, 9vh, 5rem);
}

.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--paper-edge);
}

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

.prose h3 {
  font-size: var(--step-1);
  margin-top: 1.75rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 0.9rem;
  max-width: var(--measure);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li::marker {
  color: var(--pink-text);
}

.prose dl {
  margin-top: 1rem;
  max-width: var(--measure);
}

.prose dt {
  font-weight: 700;
  margin-top: 1.1rem;
}

.prose dd {
  margin: 0.3rem 0 0;
}

.prose a {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
}

.data-table {
  min-width: 26rem;
  font-size: var(--step--1);
}

.data-table caption {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
  background: var(--paper-sunk);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  vertical-align: top;
  border-top: 1px solid var(--paper-edge);
}

.data-table thead th {
  border-top: 0;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.data-table tbody th {
  font-weight: 600;
  width: 46%;
}

/* --------------------------------------------------------------------------
   Allow / deny lists
   -------------------------------------------------------------------------- */

.terms-split {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-top: 1.5rem;
}

.terms-card {
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  padding: 1.25rem;
}

.terms-card h3 {
  font-size: var(--step-1);
}

.terms-card ul {
  list-style: none;
  padding: 0;
  margin-top: 0.9rem;
}

.terms-card li {
  position: relative;
  padding-left: 1.6rem;
  font-size: var(--step--1);
}

.terms-card li + li {
  margin-top: 0.65rem;
}

.terms-card li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 700;
}

.terms-card--yes li::before {
  content: '+';
  color: var(--teal-text);
}

.terms-card--no li::before {
  content: '\2013';
  color: var(--pink-text);
}

/* --------------------------------------------------------------------------
   Notes and callouts
   -------------------------------------------------------------------------- */

.note {
  border-left: 4px solid var(--teal);
  background: var(--paper-raised);
  padding: 1rem 1.15rem;
  margin-top: 1.5rem;
}

.note > * {
  max-width: 58ch;
}

.note h3 {
  font-size: var(--step-1);
}

.note p + p {
  margin-top: 0.7rem;
}

.note--pink {
  border-left-color: var(--pink);
}

.disclosure {
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  padding: clamp(1.1rem, 3vw, 1.75rem);
  margin-top: 2rem;
}

.disclosure h2,
.disclosure h3 {
  font-size: var(--step-1);
  margin: 0;
  border: 0;
  padding: 0;
}

.disclosure p {
  margin-top: 0.8rem;
  font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   Product page
   -------------------------------------------------------------------------- */

.product-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-block: clamp(2rem, 6vh, 3.5rem) clamp(3rem, 9vh, 5rem);
}

@media (min-width: 62rem) {
  .product-layout {
    grid-template-columns: minmax(0, 1fr) 21rem;
  }
}

.buybox {
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  padding: 1.25rem;
}

@media (min-width: 62rem) {
  .buybox {
    position: sticky;
    top: calc(var(--header-height) + 1.25rem);
  }
}

.buybox__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.04em;
}

.buybox__tier {
  margin-top: 0.4rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.buybox__facts {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  font-size: var(--step--1);
}

.buybox__facts li {
  position: relative;
  padding-left: 1.3rem;
  margin: 0;
}

.buybox__facts li + li {
  margin-top: 0.5rem;
}

.buybox__facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--teal);
  mix-blend-mode: var(--blend);
}

.agreement {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--paper-edge);
}

.agreement__row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.agreement input[type='checkbox'] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  accent-color: var(--pink);
  flex: 0 0 auto;
}

.agreement label {
  font-size: var(--step--1);
  line-height: 1.45;
}

.agreement__hint {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.buybox__buy {
  margin-top: 1rem;
}

.buybox__tax {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
  display: grid;
  gap: 0.7rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.65rem;
  margin: 0;
  font-size: var(--step--1);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--pink);
  mix-blend-mode: var(--blend);
}

.product-art {
  height: clamp(10rem, 28vh, 18rem);
  border: 2px solid var(--ink);
  overflow: hidden;
  position: relative;
  background: var(--paper-sunk);
}

.product-art canvas {
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------------------------------
   Confirmation page — the certificate slides out of a print tray
   -------------------------------------------------------------------------- */

.tray {
  position: relative;
  margin-top: 2rem;
  padding: 0 0 1.75rem;
}

.tray__slot {
  position: relative;
  border: 2px solid var(--ink);
  background: var(--paper-sunk);
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  z-index: 3;
}

/* The sheet and its stamp are visible by default and are hidden only while
   the reveal is being set up. Written the other way round, a browser that
   never ran the transition — a throttled background tab, for instance —
   would leave the buyer looking at an empty page. */
.sheet {
  position: relative;
  z-index: 2;
  border: 2px solid var(--ink);
  border-top: 0;
  background: var(--paper-raised);
  padding: clamp(1.25rem, 4vw, 2rem);
  transition: transform 900ms cubic-bezier(0.16, 0.84, 0.3, 1), opacity 600ms ease;
}

.sheet[data-printing='true'] {
  transform: translateY(-1.5rem);
  opacity: 0;
}

.sheet__stamp {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 3.5vw, 1.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  border: 3px solid var(--pink);
  padding: 0.3rem 0.75rem;
  transform: rotate(-9deg);
  /* Anchored to the corner it sits in, so the scale-in of the stamp grows
     inward and never pushes a narrow page sideways while it animates. */
  transform-origin: top right;
  mix-blend-mode: var(--blend);
  transition: transform 420ms cubic-bezier(0.2, 1.3, 0.4, 1), opacity 260ms ease;
}

.sheet__stamp[data-stamping='true'] {
  transform: rotate(-9deg) scale(1.6);
  opacity: 0;
}

.receipt {
  display: grid;
  gap: 0.85rem 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 34rem) {
  .receipt {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}

.receipt dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 0.25em;
}

.receipt dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.code-display {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1rem, 4.5vw, 1.5rem);
  letter-spacing: 0.02em;
  background: var(--paper-sunk);
  border: 2px solid var(--ink);
  padding: 0.6rem 0.85rem;
  display: inline-block;
  overflow-wrap: anywhere;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.field {
  margin-top: 1.5rem;
  max-width: 28rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: var(--step--1);
  margin-bottom: 0.4rem;
}

.field__help {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

input[type='text'],
input[type='search'],
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: var(--step-0);
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
}

input[type='text']::placeholder {
  color: var(--ink-faint);
}

.input-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.input-row input {
  flex: 1 1 14rem;
  min-width: 0;
}

.status {
  margin-top: 0.85rem;
  font-size: var(--step--1);
  font-weight: 600;
}

.status--ok {
  color: var(--teal-text);
}

.status--error {
  color: var(--pink-text);
}

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

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-sunk);
  padding-block: clamp(2rem, 6vh, 3.5rem);
  position: relative;
  z-index: 3;
}

.site-footer__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-footer h2 {
  font-size: var(--step-1);
}

.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--step--1);
}

.site-footer li + li {
  margin-top: 0.45rem;
}

.site-footer__legal {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--paper-edge);
  font-size: var(--step--1);
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__contact {
  font-size: var(--step--1);
  margin-top: 0.7rem;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
  padding-block: clamp(3rem, 12vh, 7rem);
  text-align: left;
}

.notfound__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .sheet[data-printing='true'],
  .sheet__stamp[data-stamping='true'] {
    transform: none;
    opacity: 1;
  }

  .hero__ink--a,
  .hero__ink--b {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Pieces added for the home page, product sections, and printing
   -------------------------------------------------------------------------- */

/* A button that reads as a link, for in-sentence controls. */
.link-button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  font-weight: 700;
}

@media (hover: hover) {
  .link-button:hover {
    text-decoration-thickness: 0.14em;
  }
}

/* The hero's top plate, nudged out of register by the cursor. The drifting
   animation lives on the parent, so the two transforms never fight. */
.hero__nudge {
  position: absolute;
  inset: 0;
  transform: translate3d(var(--nudge-x, 0px), var(--nudge-y, 0px), 0);
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}

.hero__nudge canvas {
  width: 100%;
  height: 100%;
}

/* One product per section, beside the sticky canvas. */
.product-section__title {
  font-size: var(--step-3);
  margin-top: 0.5rem;
}

.product-section .lede {
  margin-top: 1rem;
}

.product-section .feature-list {
  margin-top: 1.5rem;
}

.product-section__price {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
}

.product-section__tax {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.product-section__action {
  margin-top: 1.25rem;
}

/* Plain lists inside prose that should not pick up the marker color. */
.terms-plain {
  padding-left: 1.25em;
}

.terms-plain li::marker {
  color: var(--teal-text);
}

/* --------------------------------------------------------------------------
   Printing
   The confirmation page offers a Print button, so it has to print sensibly:
   ink on paper, no navigation, no decoration, and links written out.
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --paper: #fff;
    --paper-raised: #fff;
    --paper-sunk: #fff;
    --paper-edge: #bbb;
    --ink: #000;
    --ink-muted: #333;
    --ink-faint: #555;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  body::before,
  .site-header,
  .site-footer,
  .skip-link,
  .hero__inks,
  .split__canvas,
  .canvas-note,
  .product-art,
  .action-row,
  [data-licensee-form],
  .theme-toggle,
  .nav__toggle {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .wrap,
  .wrap--narrow {
    width: auto;
    max-width: none;
  }

  .sheet {
    transform: none;
    opacity: 1;
    border: 1pt solid #000;
    break-inside: avoid;
  }

  .sheet__stamp {
    transform: rotate(-9deg);
    opacity: 1;
    color: #000;
    border-color: #000;
    mix-blend-mode: normal;
  }

  .overprint::before,
  .overprint::after {
    display: none;
  }

  .note,
  .terms-card,
  .table-wrap {
    border: 1pt solid #999;
    break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }

  /* Write out the destination of links, so a printed page is still usable. */
  .prose a[href^='/']::after,
  .note a[href^='/']::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #444;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }
}

/* The hero plates sit beside the headline on wide screens, so the words are
   always on bare paper. On narrow screens they sit behind, well faded. */
.hero__inks {
  opacity: 0.55;
}

@media (min-width: 60rem) {
  .hero__inks {
    left: 36%;
    opacity: 1;
  }

  .hero__title,
  .hero__lede {
    max-width: 17ch;
  }

  .hero__lede {
    max-width: 38ch;
  }
}

/* Spacing inside the scrolling half of the split layout. */
.split__content > section > * + * {
  margin-top: 1rem;
}

.split__content > section > h2 + .lede,
.split__content > section > .eyebrow + h2 {
  margin-top: 0.5rem;
}

/* Paragraphs are measure-limited by default, which is right for prose and
   wrong for anything that is really a strip of interface. */
.tray__slot,
.canvas-note,
.site-footer__legal,
.buybox__tax,
.product-section__price,
.hero__hint {
  max-width: none;
}

/* License codes and URLs set in the monospace face have no spaces to break
   at, so they are allowed to break anywhere rather than pushing a narrow
   page sideways. */
.mono,
.code-display,
.prose a[href^='http'] {
  overflow-wrap: anywhere;
}
