/* Wrangleword. Print shop: black, ochre and green ink on cotton paper. */
@font-face { font-family: "Alfa Slab One"; src: url(fonts/alfa-slab-one.woff2) format("woff2"); font-weight: 400; font-display: swap }
@font-face { font-family: "Libre Franklin"; src: url(fonts/libre-franklin.woff2) format("woff2"); font-weight: 100 900; font-display: swap }

:root {
  --paper: #f3eee0;
  --paper-light: #f8f4e9;
  --ink: #15171a;
  --ink-soft: #46463f;
  --green: #14795a;
  --green-deep: #0f5f47;
  --ochre: #eb9d12;
  --ochre-deep: #7a4d00;
  --rule: rgb(21 23 26 / .3);
  --slab: "Alfa Slab One", Rockwell, "Roboto Slab", serif;
  --text: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --page: 72rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink) var(--paper) }
body { margin: 0; background: var(--paper) url(img/paper.webp) 0 0 / 420px; color: var(--ink); font: 400 1.0625rem/1.6 var(--text); font-variant-numeric: lining-nums; overflow-wrap: break-word }
::selection { background: var(--ochre); color: var(--ink) }
img { max-width: 100%; height: auto; display: block }
a { color: var(--green-deep); text-decoration-thickness: .09em; text-underline-offset: .18em }
a:hover { color: var(--ink); text-decoration-thickness: .16em }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 2px }
h1, h2 { font-family: var(--slab); font-weight: 400; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; margin: 0 }
p, ul, ol, dl, figure, pre, table { margin: 0 }
strong { font-weight: 700 }

.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--ink); color: var(--paper-light); padding: .6rem 1rem; z-index: 5 }
.skip:focus, .skip:hover { top: .5rem; color: var(--paper-light) }

/* Masthead and colophon */
.masthead, main, .colophon { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto }
.masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.1rem 0 .9rem; border-bottom: 3px double var(--ink) }
.mark { font-family: var(--slab); font-size: 1.25rem; line-height: 1; color: var(--ink); text-decoration: none; letter-spacing: -.01em }
.mark span + span { color: var(--green) }
.mark:hover { color: var(--ink) }
.masthead nav { display: flex; gap: clamp(.9rem, 3vw, 1.8rem) }
.masthead nav a, .colophon nav a { color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent }
.masthead nav a:hover, .colophon nav a:hover, .masthead nav a[aria-current] { border-bottom-color: var(--ochre) }
.home .masthead .mark { visibility: hidden }

.colophon { margin-top: clamp(4rem, 10vw, 7rem); padding: 1.6rem 0 2.5rem; border-top: 3px double var(--ink); display: grid; gap: 1rem }
.colophon .imprint .mark { font-size: 1.1rem }
.colophon nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem }
.colophon .small { font-size: .82rem; color: var(--ink-soft); max-width: 70ch }

/* Tiles: an inked block, the letter left as bare paper, the value a numeral */
.tile { position: relative; display: inline-grid; place-items: center; width: 1em; height: 1em; flex: none; border-radius: .08em; background: #c9cbcc url(img/metal.webp) center / 220%; color: var(--ink); font-family: var(--slab); line-height: 1; vertical-align: middle; box-shadow: inset 0 0 0 .025em rgb(21 23 26 / .7), inset .03em .04em 0 .02em rgb(255 255 255 / .55), 0 .04em .07em rgb(21 23 26 / .35) }
.tile > span { font-size: .6em; transform: translate(-.06em, -.05em) }
.tile > b { position: absolute; right: .09em; bottom: .07em; font: 700 .24em/1 var(--text) }
.tile.wild { background-position: 20% 80% }
.tile.wild::after { content: ""; width: .16em; height: .16em; border-radius: 50%; border: .035em solid var(--green) }
.rack { display: flex; gap: .09em; font-size: clamp(2.2rem, 6vw, 3.4rem) }

/* Bonus squares */
.c { position: relative; display: grid; place-items: center; aspect-ratio: 1; font-style: normal }
.c > u { display: grid; place-items: center; width: 78%; height: 78%; font: 700 .26em/1 var(--text); text-decoration: none; letter-spacing: -.02em }
.l2 > u { border-radius: 50%; border: .07em solid var(--green); color: var(--green-deep); font-size: .24em; border-width: .28em }
.l3 > u { border-radius: 50%; background: var(--green) url(img/ink-green.webp) center / 300%; color: var(--paper-light) }
.w2 > u { border: .28em solid var(--ochre); color: var(--ochre-deep); font-size: .24em; background: repeating-linear-gradient(135deg, transparent 0 .32em, rgb(235 157 18 / .3) 0 .5em) }
.w3 > u { background: var(--ochre) url(img/ink-ochre.webp) center / 300%; color: var(--ink); width: 84%; height: 84% }
.bp { isolation: isolate }
.bp > u { position: relative; color: var(--ink); font-size: .25em }
.bp > u::before { content: ""; position: absolute; inset: 9%; z-index: -1; transform: rotate(45deg); background: var(--ochre) url(img/ink-ochre.webp) center / 300%; border: .2em solid var(--ink) }
.st > u { font: 700 .7em/1 Georgia, "Times New Roman", serif; color: var(--ink) }

.board { container-type: inline-size; display: grid; grid-template-columns: repeat(15, 1fr); background: var(--paper-light) url(img/paper.webp) 0 0 / 300px; border: 2px solid var(--ink); box-shadow: 0 1.2rem 2.2rem -1.4rem rgb(21 23 26 / .55) }
.board .c { font-size: calc(100cqw / 15); width: 1em; height: 1em; box-shadow: inset 0 0 0 .5px var(--rule) }
.board .tile { width: .94em; height: .94em }
.board.quiet .c > u { color: transparent }
.board.quiet .st > u { color: var(--ink) }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem) }
.wordmark { font-size: clamp(3.4rem, 11.5vw, 6rem); line-height: .86; letter-spacing: -.02em; display: grid; justify-items: start }
.wordmark span:first-child { text-shadow: .035em .03em 0 rgb(235 157 18 / .85) }
.wordmark span + span { color: var(--green) }
.wordmark::after { content: ""; display: block; width: 62%; height: .11em; margin-top: .2em; background: var(--ink) url(img/ink-black.webp) center / 400% }
.lede { font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.3; font-weight: 600; margin-top: 1.4rem; max-width: 26ch }
.pitch > p:not(.lede):not(.store) { margin-top: .9rem; max-width: 46ch; color: var(--ink-soft) }
.store { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-top: 1.8rem }
.soon { display: inline-block; padding: .85rem 1.2rem; background: var(--ochre) url(img/ink-ochre.webp) center / cover; color: var(--ink); font-family: var(--slab); font-size: 1.05rem; line-height: 1.1; transform: rotate(-1.2deg) }
.badge { display: inline-block; line-height: 0 }
.badge img { height: 3.4rem; width: auto }
.terms { font-weight: 600; font-size: .98rem }

.proof { position: relative; padding-bottom: 1.6rem }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid var(--ink); background: var(--paper-light); box-shadow: 0 1.6rem 2.6rem -1.6rem rgb(21 23 26 / .6) }
.proof .rack { position: absolute; left: -1.2rem; bottom: 0; transform: rotate(-3deg); font-size: clamp(2rem, 4.6vw, 3.1rem) }
.proof .rack .tile { animation: press .7s cubic-bezier(.16, 1, .3, 1) backwards }
.proof .rack .tile:nth-child(2) { animation-delay: .07s }
.proof .rack .tile:nth-child(3) { animation-delay: .14s }
.proof .rack .tile:nth-child(4) { animation-delay: .21s }
.proof .rack .tile:nth-child(5) { animation-delay: .28s }
.proof .rack .tile:nth-child(6) { animation-delay: .35s }
.proof .rack .tile:nth-child(7) { animation-delay: .42s }
@keyframes press { from { transform: translateY(-.35em) rotate(-5deg); box-shadow: 0 .4em .5em rgb(21 23 26 / .25) } }

section > h2, .say h2 { font-size: clamp(1.9rem, 4.6vw, 3rem) }
.intro { margin-top: .9rem; max-width: 58ch; font-size: 1.12rem; color: var(--ink-soft) }
.fold, .also { padding: clamp(2.5rem, 7vw, 5rem) 0; border-top: 1px solid var(--ink) }
.pair { display: flex; align-items: flex-end; justify-content: center; gap: clamp(1rem, 4vw, 3rem); margin-top: clamp(1.8rem, 5vw, 3rem) }
.device { min-width: 0 }
.device .shot { width: 100%; border: clamp(4px, .7vw, 9px) solid var(--ink); border-radius: clamp(12px, 2vw, 26px); background: var(--paper-light); box-shadow: 0 1.6rem 2.6rem -1.6rem rgb(21 23 26 / .6) }
.device figcaption { margin-top: .9rem; font-size: .98rem; max-width: 34ch }
.pair .folded { flex: 0 1 15.5rem }
.pair .open { flex: 0 1 32rem }
.pair .phone { flex: 0 1 12rem }
.pair .tablet { flex: 0 1 21rem }
.also figcaption { font-weight: 600 }

.reasons { border-top: 1px solid var(--ink) }
.reason { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding: clamp(2.5rem, 7vw, 4.5rem) 0 }
.reason + .reason { border-top: 1px solid var(--rule) }
.reason.flip .say { order: 2 }
.say > * + * { margin-top: 1rem }
.say p { max-width: 50ch }
.levels { display: grid; border-top: 2px solid var(--ink) }
.levels > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--rule); align-items: baseline }
.levels dt { font-family: var(--slab); font-size: 1.05rem }
.levels dd { margin: 0; font-size: .98rem }
.entry { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1rem 0; border-block: 2px solid var(--ink); font-size: 1rem; line-height: 1.45 }
.entry .head { display: flex; gap: .08em; font-size: 2.6rem }
.nots { list-style: none; padding: 0; border-top: 2px solid var(--ink) }
.nots li { padding: .55rem 0; border-bottom: 1px solid var(--rule); font-weight: 600 }
.nots li:not(:last-child) { font-family: var(--slab); font-weight: 400; font-size: 1.35rem; line-height: 1.2 }

.strip { display: grid; gap: 1.1rem; justify-items: center; padding: clamp(2rem, 6vw, 3.5rem) 1rem; border-block: 3px double var(--ink); color: var(--ink); text-decoration: none; text-align: center }
.squares { display: flex; flex-wrap: wrap; justify-content: center; gap: .14em; font-size: clamp(2.6rem, 7vw, 4.2rem) }
.squares .c { width: 1em; height: 1em; background: var(--paper-light); box-shadow: inset 0 0 0 1px var(--rule) }
.strip .go { font-family: var(--slab); font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 1.2; border-bottom: .12em solid var(--ochre); padding-bottom: .15em }
.strip:hover .go { border-bottom-color: var(--green) }
.strip:hover .tile { transform: translateY(-.05em) }
.strip .tile { transition: transform .3s cubic-bezier(.16, 1, .3, 1) }

/* Reading pages */
.doc { max-width: 44rem; padding-top: clamp(2rem, 6vw, 4rem) }
.doc h1 { font-size: clamp(2.6rem, 8vw, 4.5rem) }
.doc h1::after { content: ""; display: block; width: 5.5rem; height: .5rem; margin-top: 1rem; background: var(--ochre) url(img/ink-ochre.webp) center / cover }
.doc .lede { max-width: 36ch }
.doc h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--ink) }
.doc > p, .doc > ul, .doc > ol, .doc > dl, .doc > pre, .doc > figure, .doc > .tables { margin-top: 1rem }
.doc > p, .doc li, .faq dd { max-width: 68ch }
.doc ul { padding-left: 1.15rem }
.doc li + li { margin-top: .45rem }
.doc li::marker { color: var(--green) }
.dated { color: var(--ink-soft); font-size: .92rem }
.diagram { max-width: 34rem }
.diagram figcaption { margin-top: .8rem; font-size: .92rem; color: var(--ink-soft) }
.doc ul.legend { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .8rem 1.6rem; margin-top: 1.6rem }
.legend li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; margin: 0 }
.legend .c { font-size: 3.2rem; width: 1em; height: 1em; background: var(--paper-light); box-shadow: inset 0 0 0 1px var(--rule) }
.legend span { font-size: .98rem; line-height: 1.4 }
.tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 2.5rem; max-width: 36rem }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums lining-nums }
th, td { text-align: left; padding: .35rem .6rem .35rem 0; border-bottom: 1px solid var(--rule) }
thead th { font-size: .82rem; font-weight: 700; border-bottom: 2px solid var(--ink); vertical-align: bottom }
tbody th { font-size: 2rem; line-height: 0; width: 4rem }
.wildnote { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; font-size: .98rem }
.wildnote .tile { font-size: 2rem }
.faq > div { padding: 1.1rem 0; border-bottom: 1px solid var(--rule) }
.faq dt { font-family: var(--slab); font-size: 1.2rem; line-height: 1.25 }
.faq dd { margin: .5rem 0 0 }
pre { font: 400 .8rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; padding: 1rem 1.1rem; background: rgb(248 244 233 / .8); border: 1px solid var(--rule) }
.lost .rack { margin-top: 2rem }

@media (max-width: 52rem) {
  .hero, .reason { grid-template-columns: minmax(0, 1fr) }
  .reason.flip .say { order: 0 }
  .proof .rack { left: -.3rem }
  .home .masthead { justify-content: flex-end }
}
@media (max-width: 34rem) {
  body { font-size: 1rem }
  .levels > div { grid-template-columns: 4.9rem 1fr; gap: .7rem }
  .levels dt { font-size: .95rem }
  .pair { gap: .8rem }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .proof .rack .tile { animation: none }
  .strip .tile { transition: none }
}
@media print {
  body { background: #fff }
  .masthead nav, .colophon nav, .skip { display: none }
}
@container (max-width: 26rem) {
  .board .c:not(.st) > u { color: transparent }
}
