/* Little Itches hub: neutral paper table, the app worlds laid on top of it. */
:root {
  --paper: #f1eee8;
  --ink: #17141a;
  --muted: #5d5850;
  --art: 112px;
}

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Bricolage Grotesque", -apple-system, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }

/* Hero */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px) 0;
  display: grid;
  grid-template-columns: 1fr minmax(170px, 230px);
  align-items: end;
  gap: 24px;
}
.wordmark {
  position: relative;
  margin: 0;
  width: fit-content;
  font-size: clamp(62px, 11.5vw, 160px);
  font-weight: 800;
  font-stretch: 80%;
  line-height: .86;
  letter-spacing: -.012em;
}
.wordmark span { display: flex; align-items: flex-start; }
.wordmark span + span { margin-left: .42em; }
.scratch {
  flex: none;
  width: .74em;
  height: .62em;
  margin: .04em 0 0 .1em;
  stroke-width: 7;
}
.scratch path {
  stroke-dasharray: 1;
  animation: scratch .34s cubic-bezier(.5, 0, .3, 1) backwards;
}
.scratch path:nth-child(1) { animation-delay: .25s; }
.scratch path:nth-child(2) { animation-delay: .5s; }
.scratch path:nth-child(3) { animation-delay: .75s; }
.scratch path:nth-child(4) { animation-delay: 1s; }
@keyframes scratch { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.lede {
  margin: 0 0 .6em;
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

/* Cards */
.cards {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 48px) clamp(20px, 4vw, 48px) 72px;
  display: grid;
  /* Three on top, two centred below: six tracks, two per card. */
  grid-template-columns: repeat(6, minmax(0, 132px));
  justify-content: center;
  gap: clamp(16px, 2vw, 24px);
}
.card {
  --drop: 0px;
  --tilt: 0deg;
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  rotate: var(--tilt);
  translate: 0 var(--drop);
  transition: rotate .35s cubic-bezier(.2, .8, .2, 1), translate .35s cubic-bezier(.2, .8, .2, 1);
  animation: land .7s cubic-bezier(.2, .8, .2, 1) backwards;
}
.card:nth-child(2) { animation-delay: .1s; }
.card:nth-child(3) { animation-delay: .2s; }
.card:nth-child(4) { grid-column: 2 / span 2; animation-delay: .3s; }
.card:nth-child(5) { animation-delay: .4s; }
@keyframes land { from { opacity: 0; translate: 0 70px; rotate: 0deg; } }
.card:hover, .card:focus-within { rotate: 0deg; translate: 0 calc(var(--drop) - 6px); }

.card__art { position: relative; height: var(--art); flex: none; overflow: hidden; }
.card__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgb(0 0 0 / .28);
}
.card__body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.card__itch { margin: 0 0 16px; font-size: 14px; line-height: 1.35; }
.card__itch b { display: block; margin-bottom: 4px; }
.card h2 { margin: 0; line-height: 1; }
.card__title { text-decoration: none; }
/* The whole card opens the app's page; the links below sit above this layer. */
.card__title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__desc { margin: 8px 0 18px; line-height: 1.4; }
.card__links {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card__links a, .soon { display: inline-block; padding: 7px 10px; line-height: 1.1; white-space: nowrap; }
.card__links a { transition: background-color .15s, color .15s; }
.card a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.card__title:focus-visible { outline: none; }
.card__title:focus-visible::after { outline: 3px solid currentColor; outline-offset: -8px; }

/* BumpLapse: warm arch, Fraunces */
.card--bump { --tilt: -1.1deg; font-family: "Fraunces", Georgia, serif; color: #faf3e7; }
.card--bump .card__art, .card--bump .card__body { background: #8b523b; }
.card--bump .card__art { border-radius: 999px 999px 0 0; background: linear-gradient(#ebddc3 75%, #8b523b 75%); }
.hills { position: absolute; inset: 0; width: 100%; height: 100%; }
.card--bump .card__body { border-radius: 0 0 30px 30px; }
.card--bump .card__itch b { font-style: italic; font-weight: 400; color: #ebddc3; }
.card--bump h2 { font-size: 33px; font-weight: 500; letter-spacing: -.02em; }
.card--bump .card__desc { font-size: 15.5px; }
.card--bump .card__links { gap: 5px; }
.card--bump .card__links a { padding-inline: 8px; font-size: 13px; border-radius: 99px; background: #faf3e7; color: #5e3423; text-decoration: none; }
.card--bump .card__links a:hover { background: #ebddc3; }

/* Muro: navy panel with chamfered corners, real hexagons, Jost */
.card--muro { --tilt: -.7deg; --drop: 6px; font-family: "Jost", "Futura", sans-serif; color: #ede8e0; }
.card--muro .card__art { background: #ede8e0; clip-path: polygon(38px 0, calc(100% - 38px) 0, 100% 66px, 100% 100%, 0 100%, 0 66px); }
.card--muro .card__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card--muro .card__icon { border: 4px solid #ede8e0; box-shadow: 0 10px 26px rgb(47 62 92 / .4); }
.card--muro .card__body { background: #2f3e5c; }
.card--muro .card__itch b { font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; color: #d9a441; }
.card--muro .card__itch { font-size: 15px; }
.card--muro h2 { font-size: 33px; font-weight: 500; letter-spacing: .01em; }
.card--muro .card__desc { font-size: 16px; }
.card--muro .card__links a, .card--muro .soon { font-size: 14px; border: 1.5px solid #ede8e0; }
.card--muro .card__links a { background: #ede8e0; color: #2f3e5c; text-decoration: none; }
.card--muro .card__links a:hover { background: #d9a441; border-color: #d9a441; }
.card--muro .soon { border-style: dashed; border-color: #a9b1c0; color: #d8dbe2; }

/* PasteUp: coupon, notched at the cut line, Oswald + Courier Prime */
.card--paste {
  --tilt: .8deg;
  --drop: 22px;
  font-family: "Courier Prime", "Courier New", monospace;
  color: #1b1033;
}
.card--paste::before {
  /* the ticket itself, so the notches cut through both halves */
  content: "";
  position: absolute;
  inset: 0;
  background: #ffd23f;
  --notch: radial-gradient(circle 13px at 0 var(--art), #0000 97%, #000);
  --notch2: radial-gradient(circle 13px at 100% var(--art), #0000 97%, #000);
  -webkit-mask: var(--notch), var(--notch2);
  -webkit-mask-composite: source-in;
  mask: var(--notch), var(--notch2);
  mask-composite: intersect;
}
.card--paste .card__art, .card--paste .card__body { position: relative; }
.card--paste .card__art { overflow: visible; }
.card--paste .card__icon { border-radius: 18px; box-shadow: 4px 4px 0 #1b1033; rotate: -4deg; }
.cutline { position: absolute; left: 20px; right: 20px; bottom: -2px; border-top: 3px dashed #ff5ca8; color: #1b1033; }
.cutline svg { position: absolute; left: 12px; top: -11px; width: 20px; height: 20px; background: #ffd23f; rotate: 180deg; }
.card--paste .card__itch b { font-weight: 700; text-transform: uppercase; }
.card--paste h2 { font: 700 38px/1 "Oswald", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: 0; }
.card--paste .card__desc { font-size: 14.5px; }
.card--paste .card__links a, .card--paste .soon { font-size: 13px; font-weight: 700; }
.card--paste .card__links a { background: #1b1033; color: #ffd23f; text-decoration: none; }
.card--paste .card__links a:hover { background: #ff5ca8; color: #1b1033; }
.card--paste .soon { outline: 2px dashed #1b1033; outline-offset: -2px; }

/* Clock It: gradient sky, chunky ink outline, Fredoka */
.card--clock { --tilt: .9deg; --drop: 26px; font-family: "Fredoka", ui-rounded, sans-serif; color: #2b2d42; border: 3px solid #2b2d42; border-radius: 22px; background: #fffaeb; box-shadow: 0 5px 0 rgb(43 45 66 / .35); }
.card--clock .card__art { border-radius: 18px 18px 0 0; background: linear-gradient(135deg, #4cc9f0, #7b6cf6 55%, #9b5de5); border-bottom: 3px solid #2b2d42; }
.bubbles { position: absolute; inset: 0; width: 100%; height: 100%; }
.card--clock .card__icon { border: 3px solid #2b2d42; box-shadow: 0 4px 0 rgb(43 45 66 / .4); }
.card--clock .card__itch b { font-weight: 600; color: #5a49d6; }
.card--clock h2 { font-size: 33px; font-weight: 600; font-synthesis: none; }
.card--clock .card__desc { font-size: 15.5px; }
.card--clock .card__links a, .card--clock .soon { font-size: 13.5px; font-weight: 600; border-radius: 99px; border: 2px solid #2b2d42; }
.card--clock .card__links a { background: #ffc93c; color: #2b2d42; text-decoration: none; box-shadow: 0 2px 0 #2b2d42; }
.card--clock .card__links a:hover { background: #ff4fa3; }
.card--clock .soon { border-style: dashed; }

/* BarRemote: a lit TV in a dark room, Unbounded */
.card--bar { --tilt: .5deg; --drop: 12px; color: #eaf4ff; border-radius: 20px; background: #0e1b3d; box-shadow: 0 12px 26px rgb(14 27 61 / .3); }
.card--bar .card__art { margin: 10px 10px 0; height: calc(var(--art) - 10px); border: 7px solid #33466e; border-radius: 13px; background: linear-gradient(135deg, #0a9bf0, #35dcc4); }
.card--bar .card__icon { box-shadow: 0 8px 20px rgb(8 17 41 / .45); }
.card--bar .card__itch b { font-weight: 700; color: #35dcc4; }
.card--bar h2 { font: 700 27px/1 "Unbounded", sans-serif; letter-spacing: -.03em; }
.card--bar .card__desc { font-size: 15.5px; }
.card--bar .card__links a { font-size: 13.5px; font-weight: 600; border-radius: 8px; background: #1f6aa3; color: #fff; text-decoration: none; }
.card--bar .card__links a:hover { background: #ff6a55; color: #081129; }

/* Bottom call to action */
.own-itch { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px) 40px; }
.own-itch { scroll-margin-top: 16px; }
.own-itch__box { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.35fr); align-items: start; gap: clamp(14px, 2vw, 24px); padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 32px); border-radius: 22px; background: var(--ink); color: var(--paper); rotate: -.3deg; }
.own-itch__mark { flex: none; width: 58px; height: 49px; }
.own-itch h2 { margin: 0 0 2px; font-size: clamp(23px, 2.4vw, 30px); font-weight: 800; font-stretch: 85%; line-height: 1.08; text-wrap: balance; }
.own-itch p { margin: 0; font-size: 16px; line-height: 1.35; }
.own-itch__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.own-itch__form label { display: grid; gap: 5px; min-width: 0; font-size: 14px; font-weight: 600; }
.own-itch__wide { grid-column: 1 / -1; }
.own-itch__form input:not([type="checkbox"]), .own-itch__form textarea { width: 100%; padding: 9px 12px; border: 2px solid #5f5a66; border-radius: 12px; background: #26222b; color: var(--paper); font: 400 16px/1.35 "Bricolage Grotesque", -apple-system, sans-serif; transition: border-color .15s; }
.own-itch__form textarea { display: block; resize: vertical; min-height: 96px; }
.own-itch__form input:focus, .own-itch__form textarea:focus { outline: none; border-color: #ffd23f; }
.own-itch__trap { position: absolute; left: -9999px; }
.own-itch__send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.own-itch .own-itch__status { flex: 1 1 200px; color: #bdb8c2; font-size: 13.5px; }
.own-itch__status.is-sent { color: #ffd23f; font-weight: 600; }
.own-itch__status.is-error { color: #ff9ac8; font-weight: 600; }
.own-itch__cta { flex: none; padding: 9px 15px; border: 0; border-radius: 99px; background: #ffd23f; color: var(--ink); font: 600 14.5px "Bricolage Grotesque", -apple-system, sans-serif; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.own-itch__cta:hover { background: #ff5ca8; }
.own-itch__cta:disabled { background: #8d8895; cursor: default; }
.own-itch__cta:focus-visible { outline: 3px solid #ffd23f; outline-offset: 3px; }

/* Footer */
.foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}
.foot p { margin: 0; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .lede { max-width: 22em; margin-top: 18px; }
}
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 136px)); justify-content: center; gap: 26px; padding-bottom: 64px; }
  .card { --drop: 0px; }
  .card:nth-child(4) { grid-column: span 2; }
  .card:nth-child(5) { grid-column: 2 / span 2; }
}
@media (max-width: 900px) {
  .own-itch__box { grid-template-columns: auto minmax(0, 1fr); }
  .own-itch__form { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .cards { grid-template-columns: minmax(0, 295px); }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 480px) {
  .own-itch__form { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Overlap the two halves so a tilted card shows no hairline between them. */
.card--bump .card__art, .card--muro .card__art { margin-bottom: -1px; }
