/* NeatifAI: small software, neatly made.
   Plain CSS, no build step. Colors and type live in the tokens below. */

/* Fonts (self-hosted, SIL Open Font License; see /fonts) ------------------ */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  color-scheme: light dark;

  --paper: #f6f5f1;
  --paper-2: #efede7;
  --surface: #fbfaf7;
  --ink: #151613;
  --ink-2: #3b3d38;
  --muted: #676a63;
  --line: rgb(21 22 19 / 0.1);
  --line-2: rgb(21 22 19 / 0.2);
  --accent: #1e6b4e;
  --accent-soft: #dce9e0;
  --band: #1b6147;

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --radius: 22px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);

  --shadow-sm: 0 1px 2px rgb(21 22 19 / 0.06), 0 2px 8px rgb(21 22 19 / 0.04);
  --shadow-md: 0 2px 4px rgb(21 22 19 / 0.05), 0 14px 32px -10px rgb(21 22 19 / 0.18);
  --shadow-lg: 0 4px 10px rgb(21 22 19 / 0.05), 0 30px 60px -18px rgb(21 22 19 / 0.28);
  --tile-rest: 0 1px 1px rgb(21 22 19 / 0.05), 0 12px 22px -14px rgb(21 22 19 / 0.34);
  --tile-lift: 0 2px 6px rgb(21 22 19 / 0.06), 0 30px 50px -16px rgb(21 22 19 / 0.42);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10120f;
    --paper-2: #171915;
    --surface: #191b17;
    --ink: #edebe4;
    --ink-2: #c9c7bf;
    --muted: #9b9d95;
    --line: rgb(237 235 228 / 0.1);
    --line-2: rgb(237 235 228 / 0.2);
    --accent: #7fcca2;
    --accent-soft: #1d3428;
    --band: #173f2f;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 2px 4px rgb(0 0 0 / 0.3), 0 14px 32px -10px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 4px 10px rgb(0 0 0 / 0.3), 0 30px 60px -18px rgb(0 0 0 / 0.75);
    --tile-rest: 0 1px 1px rgb(0 0 0 / 0.3), 0 12px 22px -14px rgb(0 0 0 / 0.8);
    --tile-lift: 0 2px 6px rgb(0 0 0 / 0.35), 0 30px 50px -16px rgb(0 0 0 / 0.9);
  }
}

/* Base -------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

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

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

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

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

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 550;
  text-decoration: none;
  translate: 0 -200%;
  transition: translate 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  translate: 0 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  overflow: visible;
}

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

/* The last tile sits askew until you point at the logo. */
.mark-accent {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(1.5px, 1.5px) rotate(14deg);
  transition: transform 0.6s var(--ease-spring);
}

.brand:hover .mark-accent,
.brand:focus-visible .mark-accent {
  transform: none;
}

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

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  font-size: 0.95rem;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}

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

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(40px, 7vw, 104px) clamp(80px, 10vw, 144px);
}

/* Faint drafting-table grid behind the tiles. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 74% 46%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 65% at 74% 46%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 1.9rem + 5.6vw, 6.9rem);
  line-height: 0.93;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero-title em {
  padding-right: 0.03em;
  color: var(--accent);
}

.hero-lede {
  max-width: 33ch;
  margin-top: 28px;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.34rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease;
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.button--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button--primary:hover svg {
  transform: translateY(2px);
}

.button--ghost {
  border-color: var(--line-2);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* Hero tiles: a pile of everyday things, tidied into a grid. */

.hero-art {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
  width: min(100%, 468px);
}

.tile {
  --bg: var(--ink);
  --fg: var(--paper);
  --cell: #fffefb;
  position: relative;
  aspect-ratio: 1;
  border-radius: 24%;
  background: var(--bg);
  box-shadow: var(--tile-rest);
  transition:
    transform 0.95s var(--ease-spring),
    box-shadow 0.95s var(--ease-out),
    translate 0.4s var(--ease-out);
}

.tile svg {
  width: 100%;
  height: 100%;
}

.tile.is-lifted {
  box-shadow: var(--tile-lift);
}

.tile:hover {
  translate: 0 -4px;
}

.tile--ink { --bg: #151613; --fg: #f6f5f1; }
.tile--paper { --bg: #fffefb; --fg: #151613; }
.tile--sand { --bg: #e8dfcd; --fg: #151613; }
.tile--sage { --bg: #c9dccf; --fg: #151613; --cell: #fffefb; }
.tile--green { --bg: #1e6b4e; --fg: #f4f8f5; }
.tile--clay { --bg: #d9714d; --fg: #fff6ee; }

.tile--paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .tile--ink { --bg: #edebe4; --fg: #10120f; }
  .tile--paper { --bg: #1e201c; --fg: #edebe4; }
  .tile--sand { --bg: #3b3529; --fg: #efe6d3; }
  .tile--sage { --bg: #253a2d; --fg: #cfe2d4; --cell: #121410; }
  .tile--green { --bg: #2c8660; --fg: #eef7f1; }
}

.g-fill { fill: var(--fg); }
.g-cell { fill: var(--cell); }
.g-accent { fill: var(--accent); }

.g-stroke {
  fill: none;
  stroke: var(--fg);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.g-ring {
  fill: none;
  stroke: var(--fg);
  stroke-width: 8;
}

/* Where each tile starts in the pile (in tile widths), before it settles. */
.tile:nth-child(1) { --x: 78%; --y: 62%; --r: -16deg; --i: 8; }
.tile:nth-child(2) { --x: -8%; --y: 96%; --r: 11deg; --i: 7; }
.tile:nth-child(3) { --x: -92%; --y: 70%; --r: 24deg; --i: 6; }
.tile:nth-child(4) { --x: 96%; --y: -6%; --r: 8deg; --i: 5; }
.tile:nth-child(5) { --x: 4%; --y: 10%; --r: -24deg; --i: 4; }
.tile:nth-child(6) { --x: -84%; --y: 14%; --r: -9deg; --i: 3; }
.tile:nth-child(7) { --x: 70%; --y: -78%; --r: 19deg; --i: 2; }
.tile:nth-child(8) { --x: -14%; --y: -90%; --r: -6deg; --i: 1; }
.tile:nth-child(9) { --x: -100%; --y: -64%; --r: 15deg; --i: 0; }

@keyframes tile-settle {
  from {
    transform: translate(var(--x), var(--y)) rotate(var(--r));
    box-shadow: var(--tile-lift);
  }
}

.mess-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.mess-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mess-button:hover {
  background: var(--paper-2);
  color: var(--ink);
}

html:not(.js) .mess-button {
  visibility: hidden;
}

/* Sections ---------------------------------------------------------------- */

.section {
  padding-block: clamp(88px, 11vw, 160px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 28px 48px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-num {
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.7rem + 3.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.section-intro {
  justify-self: end;
  max-width: 38ch;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Products ---------------------------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.product {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s ease;
}

.product:has(.product-link):hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-lg);
}

.product:has(.product-link:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.product-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  container-type: inline-size;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(24px, 2.4vw, 32px);
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.status--beta::before {
  background: #2f9d68;
  box-shadow: 0 0 0 3px rgb(47 157 104 / 0.2);
}

.status--soon::before {
  background: #d99a2b;
  box-shadow: 0 0 0 3px rgb(217 154 43 / 0.2);
}

.product-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.15rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.product-aside {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0;
  white-space: nowrap;
}

.product-kind {
  color: var(--muted);
  font-size: 0.92rem;
}

.product-desc {
  margin-top: 6px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.product-link,
.product-soon {
  margin-top: auto;
  padding-top: 20px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

/* The whole card is the link's hit area. */
.product-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.product-link:focus-visible {
  outline: none;
}

.product-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.product:hover .product-link svg {
  transform: translate(2px, -2px);
}

.product-soon {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Pocklo cover: a My Day card and a reminder, in Pocklo's own colors. */

.product--pocklo .product-cover {
  background:
    radial-gradient(90% 70% at 85% 0%, rgb(65 98 239 / 0.75), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgb(65 98 239 / 0.3), transparent 70%),
    #0a0f1c;
}

.pk {
  display: grid;
  gap: 3.2cqi;
  width: 74%;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 3.4cqi;
  line-height: 1.3;
}

.pk-notice {
  display: flex;
  align-items: flex-start;
  gap: 2.8cqi;
  padding: 2.8cqi 3.4cqi;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 4.4cqi;
  background: rgb(246 248 255 / 0.12);
  color: #eef2fa;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.pk-notice img {
  width: 7.4cqi;
  height: 7.4cqi;
  flex: none;
  border-radius: 1.8cqi;
}

.pk-notice > div {
  flex: 1;
}

.pk-notice-head {
  display: flex;
  justify-content: space-between;
  color: rgb(238 242 250 / 0.7);
  font-size: 2.8cqi;
}

.pk-notice-head b {
  color: rgb(238 242 250 / 0.85);
  font-weight: 600;
}

.pk-notice-title {
  font-weight: 600;
}

.pk-notice-sub {
  color: rgb(238 242 250 / 0.7);
  font-size: 3cqi;
}

.pk-card {
  padding: 3.8cqi 4.4cqi 2.4cqi;
  border-radius: 5cqi;
  background: #f6f8ff;
  color: #0a0f1c;
  box-shadow: 0 24px 40px -18px rgb(0 0 0 / 0.7);
}

.pk-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.4cqi;
}

.pk-card-head b {
  font-size: 4.2cqi;
  font-weight: 700;
}

.pk-card-head span {
  color: #5b6478;
  font-size: 2.9cqi;
}

.pk-card li {
  display: flex;
  align-items: center;
  gap: 2.8cqi;
  padding: 2cqi 0;
  border-top: 1px solid #e2e7f4;
}

.pk-card li:first-child {
  border-top: 0;
}

.pk-card i {
  position: relative;
  width: 4.4cqi;
  height: 4.4cqi;
  flex: none;
  border: 1.5px solid #9aa6c7;
  border-radius: 50%;
}

.pk-card .is-done {
  color: #8a93a8;
  text-decoration: line-through;
}

.pk-card .is-done i {
  border-color: #4162ef;
  background: #4162ef;
}

.pk-card .is-done i::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 34%;
  width: 26%;
  height: 46%;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Namesake cover: a personalized crossword and one of its clues. */

.product--namesake .product-cover {
  background:
    radial-gradient(80% 70% at 15% 10%, #fffaf0, transparent 70%),
    #efe8da;
}

.np {
  position: relative;
  width: 66%;
  margin-bottom: 6%;
  color: #1c2230;
  font-family: Spectral, Georgia, "Times New Roman", serif;
}

.np-sheet {
  padding: 5cqi 5cqi 5.4cqi;
  border-radius: 1.4cqi;
  background: #fffdf8;
  box-shadow: 0 1px 2px rgb(28 34 48 / 0.12), 0 22px 40px -20px rgb(28 34 48 / 0.45);
  transform: rotate(-3deg);
}

.np-kicker {
  color: #1e4b6b;
  font-family: var(--font-sans);
  font-size: 2.1cqi;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.np-names {
  margin: 0.6cqi 0 3.4cqi;
  font-family: var(--font-display);
  font-size: 5.8cqi;
  line-height: 1.1;
  text-align: center;
}

.np-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border: 1.5px solid #1c2230;
  background: #1c2230;
}

.np-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #fffdf8;
  color: #1e4b6b;
  font-size: 4.6cqi;
  font-weight: 700;
  line-height: 1;
}

.np-cell.is-block {
  background: #1c2230;
}

.np-cell.is-active {
  background: #f6e6c4;
}

.np-cell small {
  position: absolute;
  top: 0.5cqi;
  left: 0.8cqi;
  color: #1c2230;
  font-family: var(--font-sans);
  font-size: 1.7cqi;
  font-weight: 600;
}

.np-clue {
  position: absolute;
  right: -16%;
  bottom: -11%;
  width: 64%;
  padding: 2.8cqi 3.4cqi;
  border: 1px solid #e6dcc6;
  border-left: 3px solid #c98a2e;
  border-radius: 1.6cqi;
  background: #fffdf8;
  box-shadow: 0 16px 30px -16px rgb(28 34 48 / 0.5);
  transform: rotate(2.5deg);
}

.np-clue-label {
  color: #9a6a22;
  font-family: var(--font-sans);
  font-size: 2cqi;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.np-clue-text {
  margin-top: 0.8cqi;
  font-size: 3.1cqi;
  font-style: italic;
  line-height: 1.3;
}

/* Spinehand cover: scene pins on a timeline and a page with a reader note. */

.product--spinehand .product-cover {
  background:
    radial-gradient(80% 60% at 100% 0%, rgb(242 182 90 / 0.16), transparent 70%),
    #1c1917;
}

.sh {
  display: grid;
  gap: 4.4cqi;
  width: 80%;
  margin-right: 6%;
  color: #fafaf9;
}

.sh-timeline {
  position: relative;
  height: 15cqi;
}

.sh-line {
  position: absolute;
  inset: 34% 0 auto;
  height: 2px;
  border-radius: 2px;
  background: rgb(250 250 249 / 0.32);
}

.sh-pin {
  position: absolute;
  top: 34%;
  width: 3.6cqi;
  height: 3.6cqi;
  border-radius: 50%;
  background: #fafaf9;
  transform: translate(-50%, calc(-50% + 1px));
}

.sh-pin:nth-of-type(2) { left: 5%; }
.sh-pin:nth-of-type(3) { left: 21%; width: 2.6cqi; height: 2.6cqi; }
.sh-pin:nth-of-type(4) { left: 38%; }
.sh-pin:nth-of-type(5) { left: 57%; }
.sh-pin:nth-of-type(6) { left: 76%; width: 2.6cqi; height: 2.6cqi; }
.sh-pin:nth-of-type(7) { left: 94%; }

.sh-pin.is-active {
  background: #f2b65a;
  box-shadow: 0 0 0 1.4cqi rgb(242 182 90 / 0.22);
}

.sh-bracket {
  position: absolute;
  top: 56%;
  padding-top: 3.8cqi;
  color: rgb(250 250 249 / 0.6);
  font-family: var(--font-mono);
  font-size: 2cqi;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.sh-bracket::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2.4cqi;
  border: 1.5px solid rgb(250 250 249 / 0.3);
  border-top: 0;
  border-radius: 0 0 1cqi 1cqi;
}

.sh-bracket--one { left: 3%; width: 44%; }
.sh-bracket--two { left: 53%; width: 44%; }

.sh-page {
  position: relative;
  padding: 4.4cqi 5cqi 5cqi;
  border-radius: 2.4cqi;
  background: #fafaf9;
  color: #1c1917;
  box-shadow: 0 24px 40px -20px rgb(0 0 0 / 0.8);
}

.sh-kicker {
  color: #78716c;
  font-family: var(--font-mono);
  font-size: 2.1cqi;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sh-title {
  margin: 1cqi 0 2.4cqi;
  font-family: var(--font-display);
  font-size: 5.4cqi;
  line-height: 1.1;
}

.sh-text {
  display: block;
  width: 64%;
  height: 1.5cqi;
  margin-top: 1.9cqi;
  border-radius: 1cqi;
  background: #e7e5e4;
}

.sh-text--short {
  width: 40%;
}

.sh-note {
  position: absolute;
  top: 34%;
  right: -10%;
  width: 46%;
  padding: 2.4cqi 2.8cqi;
  border: 1px solid #f0d9a8;
  border-radius: 1.6cqi;
  background: #fff7e6;
  box-shadow: 0 14px 28px -14px rgb(0 0 0 / 0.6);
  color: #44403c;
  font-size: 2.6cqi;
  line-height: 1.35;
  transform: rotate(2deg);
}

.sh-note b {
  display: block;
  margin-bottom: 0.8cqi;
  color: #a86b16;
  font-family: var(--font-mono);
  font-size: 1.9cqi;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Approach ---------------------------------------------------------------- */

#approach > .container > .section-label {
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.statement {
  max-width: 21em;
  margin-bottom: clamp(72px, 9vw, 128px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 1.3rem + 3.3vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}

.statement span {
  color: var(--muted);
}

.rules-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 48px;
  margin-bottom: 36px;
}

.rules-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.rules-intro {
  max-width: 40ch;
  color: var(--ink-2);
}

.rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 40px);
}

.rule {
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}

.rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.rule-num {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.rule-icon {
  width: 44px;
  height: 44px;
}

.rule-icon--sand { --t: #e8dfcd; --g: #151613; }
.rule-icon--sage { --t: #c9dccf; --g: #151613; }
.rule-icon--paper { --t: #fffefb; --g: #151613; }
.rule-icon--green { --t: #1e6b4e; --g: #f4f8f5; }

@media (prefers-color-scheme: dark) {
  .rule-icon--sand { --t: #3b3529; --g: #efe6d3; }
  .rule-icon--sage { --t: #253a2d; --g: #cfe2d4; }
  .rule-icon--paper { --t: #1e201c; --g: #edebe4; }
  .rule-icon--green { --t: #2c8660; --g: #eef7f1; }
}

.ri-tile {
  fill: var(--t);
  stroke: var(--line);
}

.ri-glyph {
  fill: var(--g);
}

.ri-check {
  fill: none;
  stroke: var(--g);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rule-title {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.rule p {
  color: var(--ink-2);
  font-size: 1rem;
  text-wrap: pretty;
}

/* Contact ----------------------------------------------------------------- */

.section--contact {
  --ink: #f6f5f1;
  --ink-2: rgb(246 245 241 / 0.9);
  --muted: rgb(246 245 241 / 0.8);
  --line: rgb(246 245 241 / 0.22);
  --accent: #bfe3cf;
  border-top: 0;
  background: var(--band);
  color: var(--ink);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: 48px clamp(48px, 6vw, 96px);
}

.contact-grid .section-label {
  margin-bottom: 28px;
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.25rem, 2rem + 8vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.contact-body {
  display: grid;
  gap: 28px;
  padding-bottom: 12px;
}

.contact-lede {
  max-width: 36ch;
  color: var(--ink-2);
  font-size: 1.15rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.contact-email svg {
  width: 0.7em;
  height: 0.7em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease-out);
}

.contact-email:hover {
  border-bottom-color: var(--ink);
}

.contact-email:hover svg {
  transform: translateX(4px);
}

.contact-support {
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-support a {
  color: var(--ink);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.contact-support a:hover {
  text-decoration-color: currentColor;
}

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

.site-footer {
  padding-block: clamp(56px, 7vw, 96px) 28px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: clamp(48px, 8vw, 112px);
}

.footer-nav h3 {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nav li + li {
  margin-top: 8px;
}

.footer-nav a,
.footer-nav span {
  color: var(--ink-2);
  font-size: 0.98rem;
  text-decoration: none;
}

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

.footer-nav small {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* Sized against the footer's own width so the wordmark runs edge to edge. */
.site-footer > .container {
  container-type: inline-size;
}

.footer-wordmark {
  margin-top: clamp(56px, 9vw, 120px);
  font-family: var(--font-display);
  font-size: 41.6cqi;
  line-height: 0.74;
  letter-spacing: -0.045em;
  white-space: nowrap;
  user-select: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

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

.hero--404 {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
}

.tile--missing {
  background: transparent;
  box-shadow: none;
  border: 2px dashed var(--line-2);
}

.tile.tile--missing {
  animation: none;
  translate: none;
}

/* Motion ------------------------------------------------------------------ */

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tile {
    animation: tile-settle 1.1s var(--ease-spring) backwards;
    animation-delay: calc(var(--i) * 70ms + 450ms);
  }

  .hero-copy > * {
    animation: rise 0.9s var(--ease-out) backwards;
  }

  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-copy > :nth-child(4) { animation-delay: 210ms; }

  html.js [data-reveal],
  html.js [data-reveal-group] > * {
    opacity: 0;
    translate: 0 18px;
    transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out);
  }

  html.js [data-reveal-group] > :nth-child(2) { transition-delay: 90ms; }
  html.js [data-reveal-group] > :nth-child(3) { transition-delay: 180ms; }
  html.js [data-reveal-group] > :nth-child(4) { transition-delay: 270ms; }

  html.js [data-reveal].is-in,
  html.js [data-reveal-group].is-in > * {
    opacity: 1;
    translate: 0 0;
  }

  /* Cards also lift on hover, so keep that transition alongside the reveal. */
  html.js .products > .product {
    transition:
      opacity 0.8s var(--ease-out),
      translate 0.8s var(--ease-out),
      transform 0.45s var(--ease-out),
      box-shadow 0.45s var(--ease-out),
      border-color 0.45s ease;
  }
}

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

  .mess-button {
    display: none;
  }

  .mark-accent,
  .tile {
    transition: none;
  }
}

/* Layout breakpoints ------------------------------------------------------ */

@media (max-width: 1020px) {
  .products {
    grid-template-columns: minmax(0, 1fr);
  }

  .product {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: none;
  }

  .product-cover {
    aspect-ratio: auto;
    min-height: 340px;
  }

  .rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px clamp(24px, 4vw, 40px);
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    justify-items: start;
    margin-top: 8px;
  }

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

@media (max-width: 760px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-intro {
    justify-self: start;
  }

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

  .product-cover {
    aspect-ratio: 5 / 4;
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .rules {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-nav {
    gap: 16px;
    font-size: 0.9rem;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .button {
    height: 50px;
    padding: 0 20px;
  }

  .footer-nav {
    gap: 40px;
  }
}

@media (max-width: 380px) {
  .site-nav a:first-child {
    display: none;
  }
}
