/*
 * keepworth.app: the app's "loud catalogue" look (docs/DESIGN.md) on the web.
 * Paper, ink and yellow; Archivo capitals for the masthead and headlines; Libre Caslon italic
 * for asides; Caveat on the manila dealer's tag; the system face for body text.
 */

@font-face {
  font-family: 'Archivo Masthead';
  src: url('/fonts/Archivo-W62-Black.ttf') format('truetype');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Name';
  src: url('/fonts/Archivo-W74-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Label';
  src: url('/fonts/Archivo-W90-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('/fonts/Caveat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Caslon Text';
  src: url('/fonts/LibreCaslonText-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #17150f;
  --paper: #f3eee2;
  --yellow: #ffd60a;
  --manila: #e6cf9d;
  --red: #b8281c;
  --line: #d6cdb8;
  --muted: #4f4838;
  --gain: #2f6b4a;
  --stock: #ede5d2;
  --stock-line: #cfc4ab;
  --midnight: #1c2746;
  --sky: #8fb1ff;
  --coral: #ff8e70;
  --mint: #6ccfa2;
  --pink: #ff9bc4;
  --spot-yellow: #ffd20a;

  --display: 'Archivo Masthead', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --name: 'Archivo Name', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --label: 'Archivo Label', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;
  --body:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, Roboto, Helvetica,
    Arial, sans-serif;

  --gutter: 16px;
  --max: 1160px;
  --shadow-object: drop-shadow(0 18px 18px rgba(23, 21, 15, 0.28))
    drop-shadow(0 3px 3px rgba(23, 21, 15, 0.22));
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.ground-yellow .hero :focus-visible,
.closing :focus-visible {
  outline-color: var(--ink);
}
.closing :focus-visible {
  outline-color: var(--yellow);
}

p {
  margin: 0 0 1em;
}

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

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font: 700 14px/1 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus {
  top: 8px;
}

/* ---------- type ---------- */

.masthead {
  font: 900 30px/1 var(--display);
  letter-spacing: -0.015em;
  text-decoration: none;
  text-transform: uppercase;
  margin: 0;
}
.masthead-small {
  font-size: 24px;
}

.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(64px, 12.5vw, 150px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
.display-m {
  font-size: clamp(44px, 8vw, 88px);
  line-height: 0.9;
}
/* Archivo's own space is 0.11 em: open word spaces in the condensed capitals. */
.ws {
  word-spacing: 0.12em;
}

.aside {
  font: italic 400 clamp(19px, 2.2vw, 24px) / 1.35 var(--serif);
  margin: 0 0 14px;
}
.aside-s {
  font-size: 18px;
  margin-bottom: 8px;
}

.lede {
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.45;
  max-width: 34em;
  margin-bottom: 28px;
}
.lede-s {
  font-size: 19px;
}

.label {
  font: 700 12px/1.3 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 14px;
}
.meta {
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

/* ---------- header and footer ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--stock-line);
}
.ground-yellow .bar {
  background: var(--yellow);
  border-bottom-color: transparent;
}
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.bar nav {
  display: flex;
  gap: 28px;
}
.bar nav a {
  font: 700 13px/1 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 14px 0;
}
.bar nav a:hover,
.bar nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
@media (max-width: 639px) {
  .wide-only {
    display: none;
  }
}

.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 56px;
}
.foot-inner {
  display: grid;
  gap: 20px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.foot nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: 16px;
}
.foot .meta {
  color: #c9c1ad;
  max-width: 60em;
}
.foot :focus-visible {
  outline-color: var(--yellow);
}

/* ---------- buttons and the store block ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 30px;
  border-radius: 999px;
  font: 700 15px/1.1 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  margin: 0;
}
.pill-ink {
  background: var(--ink);
  color: var(--paper);
}
.pill-paper {
  background: var(--paper);
  color: var(--ink);
}
a.pill:hover {
  text-decoration: none;
  filter: brightness(1.15);
}
.pill-static {
  cursor: default;
}
.nowrap {
  white-space: nowrap;
}
@media (max-width: 479px) {
  .pill {
    min-height: 56px;
    padding: 0 20px;
    font-size: 13px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
  .store {
    gap: 12px;
  }
  .store-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  .store-seal {
    width: 48px;
    height: 48px;
  }
  .tag-hero {
    left: 100%;
  }
}

.store {
  display: flex;
  align-items: center;
  gap: 16px;
}
.store-icon {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: var(--yellow);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px rgba(23, 21, 15, 0.16),
    0 10px 18px -8px rgba(23, 21, 15, 0.45);
}
.store-seal {
  width: 62px;
  height: 62px;
}
.store-text .meta {
  margin-top: 10px;
  color: var(--ink);
}
.closing .store-text .meta {
  color: var(--paper);
}

/* ---------- hero ---------- */

.hero {
  background: var(--yellow);
  padding: 24px 0 72px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
.hero-copy {
  order: 2;
}
.hero-art {
  order: 1;
}
@media (min-width: 900px) {
  .hero {
    padding: 48px 0 104px;
  }
  .hero-grid {
    grid-template-columns: 1.08fr 1fr;
    gap: 40px;
  }
  .hero-copy {
    order: 1;
  }
  .hero-art {
    order: 2;
  }
}

/* An object photographed with its shadow, a tag tied on with string. */
.object {
  position: relative;
  margin: 0;
}
.cutout {
  filter: var(--shadow-object);
}
.object-hero {
  width: min(66%, 440px);
  margin-left: 2%;
}
@media (min-width: 900px) {
  .object-hero {
    width: 66%;
    margin-left: 6%;
  }
}
.object-hero .string {
  position: absolute;
  left: 95%;
  top: 30%;
  width: 14%;
  border-top: 2px dashed rgba(23, 21, 15, 0.55);
  transform: rotate(4deg);
  transform-origin: left center;
}

.tag {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 46px 18px 18px 20px;
  background: var(--manila);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%, 0 22px);
  filter: drop-shadow(0 8px 6px rgba(23, 21, 15, 0.35));
  transform: rotate(4deg);
}
.tag::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(23, 21, 15, 0.62);
  box-shadow: 0 0 0 5px #f6ecd4;
}
.tag-label {
  font: 700 12px/1 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5d4c2f;
}
.tag-figure {
  font: 700 64px/0.9 var(--hand);
  transform: rotate(-2deg);
  white-space: nowrap;
}
.tag-hero {
  left: 106%;
  top: 25%;
  width: clamp(104px, 28vw, 170px);
}

/* ---------- sections ---------- */

.section {
  padding: 72px 0;
}
@media (min-width: 900px) {
  .section {
    padding: 112px 0;
  }
}

/* How it works: three catalogue entries. */
.beats {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 56px;
}
@media (min-width: 980px) {
  .beats {
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 40px;
  }
}
.beat-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.lot-n {
  font: 900 64px/0.8 var(--display);
}
.beat h3 {
  font: 800 27px/1.05 var(--name);
  margin: 4px 0 0;
}
.beat > p {
  max-width: 28em;
}

.slots {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 380px;
}
.slot {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.slot-n {
  font: 900 20px/1 var(--display);
}
.slot-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  background: #b9a57c;
  box-shadow: inset 0 0 0 1px rgba(23, 21, 15, 0.2);
}
.slot-photo .crop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slot-find .crop {
  object-fit: contain;
  padding: 8px;
}
.slot-base .crop {
  transform: scale(2.4);
  transform-origin: 46% 98%;
}
.slot-mark .crop {
  transform: scale(2.8);
  transform-origin: 40% 62%;
}
.slot-word {
  font-size: 15px;
  font-weight: 600;
}

.card {
  margin-top: 20px;
  background: var(--stock);
  border: 1px solid var(--stock-line);
  border-radius: 3px;
  padding: 20px;
}
.ident-name {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font: 800 24px/1.08 var(--name);
  margin-bottom: 8px;
}
.ident-lot {
  font: 900 52px/0.82 var(--display);
}
.ident .meta strong {
  color: var(--ink);
}

.sold {
  padding: 0 0 6px;
  overflow: hidden;
}
.band {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 12px;
  background: var(--yellow);
  padding: 16px 20px;
}
.band .label {
  margin: 0;
}
.band-figure {
  grid-row: span 2;
  font: 900 clamp(30px, 3.4vw, 38px) / 1 var(--display);
  white-space: nowrap;
}
.band .meta {
  color: var(--ink);
}
.sold-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 4px;
}
.sold-head .label {
  margin: 0;
}
.stamp {
  display: inline-block;
  font: 700 17px/1 var(--hand);
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  border: 3px solid var(--red);
  border-radius: 3px;
  padding: 4px 8px 3px;
  transform: rotate(-6deg);
  opacity: 0.92;
}
.results {
  list-style: none;
  margin: 0;
  padding: 0 20px;
}
.result {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
}
.result + .result {
  border-top: 1px solid var(--line);
}
.source-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--paper);
  border: 1px solid var(--stock-line);
  border-radius: 3px;
  font: 900 18px/1 var(--display);
}
.result-title {
  display: block;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}
.result-price {
  font: 900 22px/1.1 var(--display);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.note {
  margin: 56px 0 0;
  padding-top: 20px;
  border-top: 3px solid var(--ink);
  max-width: 46em;
  font-size: 16px;
  color: var(--muted);
}
.note strong {
  color: var(--ink);
}

/* Screens. */
.screens {
  background: var(--midnight);
  color: var(--paper);
}
.screens .meta {
  color: #c9cfe0;
}
.phones {
  scroll-padding-inline: var(--gutter);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 24px;
  margin-top: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
}
.phone-fig {
  margin: 0;
  scroll-snap-align: start;
}
.phone {
  border-radius: 36px;
  padding: 8px;
  background: #0b0a07;
  box-shadow:
    0 0 0 1px rgba(243, 238, 226, 0.12),
    0 30px 40px -20px rgba(0, 0, 0, 0.6);
}
.phone img {
  border-radius: 28px;
  width: 100%;
}
.phone-fig figcaption {
  margin-top: 14px;
}
.screens :focus-visible {
  outline-color: var(--yellow);
}

/* Collection. */
.collection {
  background: var(--manila);
}
.collection-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .collection-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
  }
}
.summary {
  margin-top: 32px;
}
.summary .label {
  margin-bottom: 10px;
}
.total {
  margin: 0 0 12px;
}
.total span {
  display: inline-block;
  background: var(--yellow);
  padding: 4px 14px 0;
  font: 900 clamp(56px, 7vw, 80px) / 1 var(--display);
  transform: rotate(-2deg);
}
.gain {
  color: var(--gain);
  font-size: 18px;
  margin: 0;
}
.gain strong {
  font: 800 24px/1 var(--name);
}

.shelf-wrap {
  --art-h: clamp(120px, 24vw, 170px);
  display: grid;
  gap: 40px;
}
.shelf {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
/* The wooden plank the lots stand on, under the art and above the words. */
.shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: var(--art-h);
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(#93704a, #6f5234);
  border-top: 1px solid #b8946a;
  box-shadow: 0 10px 12px -5px rgba(23, 21, 15, 0.45);
}
.shelf-lot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.shelf-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: var(--art-h);
}
.shelf-art::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--spot, var(--spot-yellow));
}
.spot-sky {
  --spot: var(--sky);
}
.spot-coral {
  --spot: var(--coral);
}
.spot-mint {
  --spot: var(--mint);
}
.spot-pink {
  --spot: var(--pink);
}
.spot-yellow {
  --spot: var(--spot-yellow);
}
.shelf-art img {
  position: relative;
  max-height: 96%;
  width: auto;
  max-width: 86%;
  filter: drop-shadow(0 10px 8px rgba(23, 21, 15, 0.3));
}
.shelf-lot .meta {
  margin-top: 26px;
}
.shelf-name {
  font: 800 16px/1.15 var(--name);
}
.shelf-value {
  font: 900 20px/1.2 var(--display);
}

/* Pricing. */
.plans {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 900px) {
  .plans {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
  }
}
.plan {
  border-radius: 3px;
  padding: 24px;
  background: var(--stock);
  border: 1px solid var(--stock-line);
}
.plan h3 {
  font: 800 27px/1.05 var(--name);
  margin: 0 0 10px;
}
.plan p:last-child {
  margin-bottom: 0;
}
.plan-free {
  background: transparent;
  border-style: dashed;
  border-color: var(--muted);
}
.places {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.place {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
}
.plan-yearly {
  background: var(--yellow);
  border: 2px solid var(--ink);
}
.price {
  font: 900 clamp(48px, 5vw, 60px) / 1 var(--display);
  margin: 0 0 12px;
}
.price span {
  font: 600 18px/1 var(--body);
}
.fine {
  margin-top: 28px;
  font-size: 15px;
  color: var(--muted);
  max-width: 52em;
}

/* Closing. */
.closing {
  background: var(--ink);
  color: var(--paper);
}
.closing-inner {
  display: grid;
  justify-items: start;
  gap: 8px;
}
.closing-seal {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}
.closing .store-icon {
  display: none;
}

/* ---------- documents: legal and support ---------- */

.doc {
  max-width: calc(760px + 2 * var(--gutter));
  padding-top: 48px;
  padding-bottom: 96px;
}
.legal h1 {
  font: 900 clamp(40px, 7vw, 64px) / 0.92 var(--display);
  word-spacing: 0.12em;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.legal h1 + p {
  font: italic 400 19px/1.4 var(--serif);
  margin-bottom: 32px;
}
.legal h2 {
  font: 800 25px/1.15 var(--name);
  margin: 48px 0 12px;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
.table {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border-top: 2px solid var(--ink);
}
.table table {
  border-collapse: collapse;
  min-width: 600px;
  width: 100%;
  font-size: 15px;
}
.table th {
  text-align: left;
  font: 700 12px/1.3 var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 12px 10px 0;
}
.table td {
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--line);
}
code {
  font-size: 0.92em;
}

.contact {
  margin: 8px 0 56px;
  max-width: 40em;
}
.contact .pill {
  margin-top: 8px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 16px;
}
.label-section {
  padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 0;
}
.faq {
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--line);
}
.faq:last-child {
  border-bottom: 0;
}
.faq h3 {
  font: 800 23px/1.15 var(--name);
  margin: 0 0 12px;
}

/* 404 */
.lost {
  padding-top: 48px;
}
.object-lost {
  width: min(70%, 380px);
}
.tag-lost {
  left: 78%;
  top: 58%;
  width: 150px;
}
.tag-lost .tag-figure {
  font-size: 52px;
}

@media (prefers-reduced-motion: no-preference) {
  .tag {
    animation: swing 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transform-origin: 29px 23px;
  }
  @keyframes swing {
    from {
      transform: rotate(-14deg);
    }
    to {
      transform: rotate(4deg);
    }
  }
}
