:root {
  color-scheme: light;
  --paper: #f7f4ea;
  --ink: #273a2e;
  --deep: #24382e;
  --light-ink: #46564a;
  --lime: #e3ed9e;
  --line: #cccfc0;
  --display: Georgia, 'Times New Roman', serif;
  --body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(1.2rem, 5.2vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .42; }
:focus-visible { outline: 2px solid #a34e25; outline-offset: 5px; }
::selection { background: var(--lime); color: var(--ink); }
[hidden] { display: none !important; }

.wrap { width: min(calc(100% - var(--gutter) * 2), 83rem); margin-inline: auto; }
.skip-link, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { z-index: 10; top: .75rem; left: .75rem; width: auto; height: auto; padding: .7rem; clip-path: none; background: var(--lime); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.7rem; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--display); font-size: 1.33rem; letter-spacing: -.045em; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.9rem); }
.site-header nav a { font-size: .91rem; text-underline-offset: .4em; text-decoration-thickness: 1px; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.site-header nav a:hover { text-decoration-color: currentColor; }

.hero { display: grid; grid-template-columns: 1fr 1.09fr; align-items: center; gap: clamp(1.65rem, 5vw, 5rem); padding-block: clamp(3rem, 5.7vw, 5.6rem) clamp(3.25rem, 5.8vw, 6rem); }
.eyebrow { display: flex; align-items: center; gap: .62rem; margin: 0; font-size: .8125rem; line-height: 1.4; letter-spacing: .13em; font-weight: 650; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 1.9rem; height: 2px; background: currentColor; }
.hero h1, h2 { font-family: var(--display); font-weight: 400; }
.hero h1 { margin: 1.4rem 0 1.45rem; font-size: clamp(3.25rem, 8.05vw, 8rem); line-height: .88; letter-spacing: -.057em; }
.hero-line { display: block; width: max-content; white-space: nowrap; }
.hero-line em, h2 em { font-weight: 400; }
.letter { display: inline-block; white-space: pre; transform: translateY(var(--lift, 0px)) rotate(var(--tilt, 0deg)); transition: transform .22s cubic-bezier(.2,.7,.2,1); }
.intro { max-width: 24ch; margin: 0; color: var(--light-ink); font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.52; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.45rem; margin-top: 2rem; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .68rem 1.25rem; border-radius: 999px; font-weight: 620; font-size: .9rem; text-decoration: none; }
.primary { background: var(--deep); color: var(--paper); transition: background .2s, color .2s; }
.primary:hover { background: var(--lime); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; font-weight: 600; text-underline-offset: .34em; }

.hero-art { background: var(--lime); margin: 0; position: relative; padding-bottom: 2.1rem; border: 1px solid #cdd685; isolation: isolate; }
.hero-artwork { position: relative; aspect-ratio: 1.34; background-image: radial-gradient(#37482b32 .9px, transparent .9px); background-size: 17px 17px; mask-image: linear-gradient(#000 94%, transparent); }
.hero-art figcaption { position: absolute; bottom: .85rem; left: 1.05rem; font-family: var(--display); font-style: italic; font-size: .95rem; }
.hero-sheet { position: absolute; padding: 1.2%; background: #fcf8ea; box-shadow: 3px 8px 16px #252a203b, 0 0 0 1px #26312018; }
.hero-sheet img { width: 100%; }
.hero-cheetah { width: 31%; left: 10%; top: 20%; transform: rotate(-12deg); }
.hero-rouen { width: 28%; left: 35%; top: 15%; transform: rotate(-4deg); }
.hero-giraffe { width: 36%; left: 56%; top: 7%; transform: rotate(10deg); }
.hero-crab { width: 36%; left: 37%; top: 63%; transform: rotate(-8deg); }

.work-section { background: var(--deep); color: var(--paper); padding-block: clamp(3.25rem, 6vw, 5.8rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.section-heading h2, .about-inner h2 { margin: .6rem 0 0; font-size: clamp(2.75rem, 6vw, 6rem); letter-spacing: -.06em; line-height: .92; }
.work-heading .eyebrow { color: var(--lime); }
.work-heading > p { margin: 0; max-width: 33ch; color: #e1e6d8; font-size: .98rem; line-height: 1.5; }
.workbench { border: 1px solid #677b6a; margin-top: 2rem; }
.board {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(24rem, 45vw, 39rem);
  background-color: #2c4236;
  background-image: radial-gradient(#d4e1c440 1px, transparent 1px);
  background-size: 20px 20px;
}
.piece {
  position: absolute;
  top: var(--y, var(--start-y));
  left: var(--x, var(--start-x));
  width: var(--width);
  transform: translate(-50%, -50%) rotate(var(--angle, var(--start-angle))) scale(var(--scale, 1));
  z-index: var(--layer, 1);
}
.piece-cheetah { --start-x: 18%; --start-y: 47%; --start-angle: -13deg; --width: 22%; }
.piece-rouen { --start-x: 39%; --start-y: 45%; --start-angle: 9deg; --width: 21%; }
.piece-giraffe { --start-x: 59%; --start-y: 49%; --start-angle: -6deg; --width: 23%; }
.piece-crab { --start-x: 78%; --start-y: 60%; --start-angle: 9deg; --width: 31%; }
.art-card {
  display: block;
  width: 100%;
  padding: clamp(.36rem, .75vw, .7rem) clamp(.36rem, .75vw, .7rem) 0;
  border: 0;
  background: #fdf8eb;
  color: var(--ink);
  box-shadow: 3px 8px 20px #101b1473;
  touch-action: none;
  user-select: none;
}
.art-card:not(:disabled) { cursor: grab; }
.board[data-dragging] .art-card { cursor: grabbing; }
.art-card img { width: 100%; pointer-events: none; }
.art-card span { display: block; padding: .55rem .1rem .6rem; text-align: left; font-size: clamp(.75rem, 1.08vw, .93rem); line-height: 1.15; }
.piece.is-selected .art-card { outline: 2px dashed var(--lime); outline-offset: 3px; }
.work-section :focus-visible { outline-color: var(--lime); }
.piece-handle {
  display: none;
  position: absolute;
  right: -.9rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-size: 1.1rem;
  user-select: none;
  touch-action: none;
}
.is-selected .piece-handle { display: grid; }
.rotate-handle { top: -.9rem; cursor: grab; }
.resize-handle { bottom: -.9rem; cursor: nwse-resize; }
.workbench-tools { display: grid; grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr); gap: .5rem 1rem; align-items: center; padding: .72rem 1rem; background: #23362c; }
#selection-status { font-size: .88rem; color: #e1e6d8; }
.tool-buttons, .tool-group { display: flex; align-items: center; gap: .35rem; }
.tool-group + .tool-group { margin-inline-start: .35rem; }
.tool-buttons button, .tool-text { min-width: 2.55rem; min-height: 2.55rem; border: 1px solid #778878; border-radius: .25rem; padding: .35rem .55rem; background: transparent; }
.tool-group button { font-size: 1.19rem; line-height: 1; }
.tool-text { font-size: .875rem; white-space: nowrap; }
.tool-buttons button:not(:disabled):hover, .reset:hover { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.reset { justify-self: end; }
.keyboard-hint { margin: .75rem 0 0; color: #c9d6c9; font-size: .8125rem; }

.shop-section { padding-block: clamp(3.5rem, 7vw, 7rem); }
.shop-heading { margin-bottom: clamp(1.7rem, 4vw, 3rem); }
.filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.filters button { border: 1px solid #bbc3af; background: transparent; border-radius: 999px; min-height: 2.65rem; padding: .55rem .9rem; font-size: .875rem; }
.filters button:hover { background: #edf0d8; }
.filters [aria-pressed="true"] { background: var(--deep); color: var(--paper); border-color: var(--deep); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.7rem, 2vw, 1.7rem); }
.product-link { display: block; width: 100%; border: 0; padding: 0; background: transparent; text-align: left; }
.product-image { display: grid; place-items: center; grid-template: minmax(0, 1fr) / minmax(0, 1fr); aspect-ratio: .93; padding: 13%; overflow: hidden; }
.product-image img { width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; box-shadow: 2px 6px 11px #33403037; transition: transform .25s ease-out; }
.product-link:hover img { transform: scale(1.055); }
.product-cheetah { background: #eae4b8; }
.product-rouen { background: #ead9d7; }
.product-crab { background: #d7e6e6; }
.product-giraffe { background: #ead8c2; }
.product-info { display: flex; justify-content: space-between; align-items: end; gap: .35rem; border-bottom: 1px solid var(--line); padding: .9rem 0 .95rem; }
.product-type { display: block; color: var(--light-ink); font-size: .785rem; margin-bottom: .25rem; }
.product-name { display: block; font-family: var(--display); font-size: clamp(1.1rem, 1.75vw, 1.65rem); line-height: 1.1; letter-spacing: -.035em; }
.product-icon { flex: 0 0 auto; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid #a7b19f; border-radius: 50%; line-height: 1; transition: background .2s; }
.product-link:hover .product-icon { background: var(--lime); }
.shop-note { font-size: .875rem; color: var(--light-ink); line-height: 1.5; margin: 1.3rem 0 0; }

.about-section { background: var(--lime); padding-block: clamp(2.5rem, 5vw, 4.7rem); }
.about-inner { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: clamp(1rem, 4vw, 3rem); }
.about-inner img { width: clamp(3.4rem, 7vw, 6.2rem); }
.about-inner h2 { margin: 0; }
.about-inner p { max-width: 38ch; margin: 0; font-size: clamp(1rem, 1.5vw, 1.17rem); line-height: 1.55; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 5rem; font-size: .875rem; }

.detail-dialog {
  position: fixed;
  padding: 0;
  width: min(46rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  border: 1px solid #9da591;
  background: var(--paper);
  color: var(--ink);
}
.detail-dialog[open] { display: grid; grid-template-columns: 1fr .91fr; }
.detail-dialog::backdrop { background: #14251cd9; }
.close-detail { position: absolute; z-index: 1; top: .75rem; right: .75rem; width: 2.75rem; height: 2.75rem; border: 1px solid #a7b19f; border-radius: 50%; background: var(--paper); font-size: 1.4rem; }
.close-detail:hover { background: var(--lime); }
.detail-art { background: #e6e8d9; padding: 1.35rem; display: grid; place-items: center; }
.detail-art img { max-height: min(30rem, 60vh); width: auto; box-shadow: 1px 5px 10px #37402c35; }
.detail-copy { padding: 3.6rem 1.5rem 2rem; align-self: center; }
.detail-copy h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: .95; letter-spacing: -.062em; margin: .75rem 0 1rem; }
.detail-copy p { line-height: 1.55; }
.detail-note { font-size: .875rem; color: var(--light-ink); }

.custom-cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .has-custom-cursor, .has-custom-cursor * { cursor: none !important; }
  .has-custom-cursor .custom-cursor {
    position: fixed;
    z-index: 30;
    display: grid;
    place-items: center;
    top: 0;
    left: 0;
    width: 1.3rem;
    height: 1.3rem;
    transform: translate(var(--cursor-x), var(--cursor-y)) translate(-50%, -50%);
    border: 1px solid #fff9ea;
    border-radius: 50%;
    color: #fff9ea;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: width .16s, height .16s;
  }
  .custom-cursor::after { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
  .has-custom-cursor .custom-cursor.is-interactive { width: 2.3rem; height: 2.3rem; }
  .has-custom-cursor .custom-cursor.is-grabbing { width: .9rem; height: .9rem; }
}

@media (max-width: 54rem) {
  .hero h1 { font-size: clamp(3rem, 8.75vw, 5rem); }
  .hero { gap: 2rem; }
  .board { height: clamp(23rem, 59vw, 32rem); }
  .piece-cheetah { --width: 24%; }
  .piece-rouen { --width: 23%; }
  .piece-giraffe { --width: 25%; }
}
@media (max-width: 40rem) {
  .header-inner { min-height: 4.1rem; }
  .wordmark { font-size: 1.13rem; gap: .4rem; }
  .wordmark img { width: 1.45rem; }
  .site-header nav { gap: .8rem; }
  .site-header nav a { font-size: .84rem; }
  .hero { grid-template-columns: 1fr; padding-top: 2.65rem; }
  .hero h1 { font-size: clamp(3.4rem, 14vw, 6.1rem); }
  .hero-actions { margin-top: 1.3rem; }
  .hero-art { max-width: 32rem; }
  .board { height: clamp(23rem, 109vw, 32rem); }
  .piece-cheetah { --start-x: 28%; --start-y: 29%; --width: 39%; }
  .piece-rouen { --start-x: 67%; --start-y: 31%; --width: 38%; }
  .piece-giraffe { --start-x: 36%; --start-y: 69%; --width: 40%; }
  .piece-crab { --start-x: 69%; --start-y: 68%; --width: 45%; }
  .workbench-tools { grid-template-columns: minmax(0, 1fr) auto; padding-inline: .55rem; }
  .tool-buttons { grid-row: 2; grid-column: 1 / -1; }
  .reset { grid-row: 1; grid-column: 2; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.6rem; }
  .about-inner { grid-template-columns: auto 1fr; }
  .about-inner p { grid-column: 1 / -1; }
}
@media (max-width: 25rem) {
  .wordmark { font-size: 1rem; }
  .site-header nav { gap: .55rem; }
  .site-header nav a { font-size: .8rem; }
  .detail-dialog[open] { grid-template-columns: 1fr; }
  .detail-art img { max-height: 46vh; }
  .detail-copy { padding: 1rem 1.4rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
