/* thock.lh3k.dev. Colours and shapes come from the app icon: a cream keycap
   with a plum outline on lavender. Buttons are keycaps and travel when pressed. */

:root {
  --lav: #c4aee9;
  --lav-pale: #e6dbf7;
  --cream: #fff7e6;
  --face: #fef0d5;
  --tan: #e4cda9;
  --plum: #4b1043;
  --plum-soft: #75446e;
  --line: 2.5px;
  --round: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Varela Round', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font: 500 1.0625rem/1.65 var(--round);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lav); }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
b { font-weight: 800; }

/* ── Keycaps ─────────────────────────────────────────────────────────────── */

.cap {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .72em 1.25em .95em;
  font: 800 1.05rem/1.2 var(--round);
  color: var(--plum); text-decoration: none; white-space: nowrap;
  background: var(--face);
  border: var(--line) solid var(--plum);
  border-radius: 14px;
  box-shadow: inset 0 -7px 0 var(--tan), 0 6px 0 var(--plum);
  transition: transform .07s ease-out, box-shadow .07s ease-out;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cap:hover { transform: translateY(1px); box-shadow: inset 0 -7px 0 var(--tan), 0 5px 0 var(--plum); }
.cap:active { transform: translateY(5px); box-shadow: inset 0 -4px 0 var(--tan), 0 1px 0 var(--plum); }
.cap.big { font-size: 1.2rem; padding: .85em 1.5em 1.1em; border-radius: 16px; }

/* A square keycap with a legend, used as an icon and as a step number. */
.glyph {
  display: grid; place-items: center;
  width: 62px; height: 62px; padding-bottom: 7px;
  font: 500 1.05rem/1 var(--mono); letter-spacing: -.02em;
  background: var(--face);
  border: var(--line) solid var(--plum);
  border-radius: 13px;
  box-shadow: inset 0 -7px 0 var(--tan), 0 5px 0 var(--plum);
}
.glyph.small { width: 46px; height: 46px; border-radius: 11px; flex: none; box-shadow: inset 0 -6px 0 var(--tan), 0 4px 0 var(--plum); }

.kicker { font: 500 .8rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.meta { font: 400 .86rem/1.5 var(--mono); color: var(--plum-soft); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--lav);
  padding: 0 16px 56px;
  margin-bottom: 24px;
}
/* Gingham, fading out before the scalloped edge. */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .14) 50%, transparent 0) 0 0 / 64px 64px,
    linear-gradient(rgba(255, 255, 255, .14) 50%, transparent 0) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(#000 30%, transparent 85%);
  mask-image: linear-gradient(#000 30%, transparent 85%);
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 24px; pointer-events: none;
  background: radial-gradient(circle at 24px 0, var(--lav) 23.5px, transparent 24px) 50% 0 / 48px 24px repeat-x;
}
.hero > * { position: relative; }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1080px; margin: 0 auto; padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; text-decoration: none; }
.brand img { border-radius: 11px; border: 2px solid var(--plum); }
.nav nav { display: flex; gap: clamp(14px, 3vw, 28px); font-weight: 700; font-size: .98rem; }
.nav nav a { text-decoration: none; padding: 6px 0; }
.nav nav a:hover { text-decoration: underline; text-decoration-color: var(--plum); }

.intro { max-width: 800px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) 0 clamp(32px, 5vw, 48px); text-align: center; }
h1 {
  margin-top: 14px;
  font-weight: 800; font-size: clamp(2.3rem, 7.4vw, 4.6rem); line-height: 1.08; letter-spacing: -.02em;
  text-wrap: balance;
}
/* Cut-out lettering, like a sticker: cream fill, plum edge, plum shadow. */
.sticker {
  display: inline-block;
  color: var(--face);
  -webkit-text-stroke: .11em var(--plum);
  paint-order: stroke fill;
  text-shadow: 0 .075em 0 var(--plum);
}
.lede { max-width: 620px; margin: 22px auto 0; font-size: clamp(1.05rem, 2.2vw, 1.22rem); line-height: 1.6; text-wrap: pretty; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 30px; }
.cta .meta { color: var(--plum); }

/* Loose keycaps in the margins, on screens with margins to spare. */
.deco { display: none; }
@media (min-width: 1180px) {
  .deco { display: block; position: absolute; inset: 0; pointer-events: none; }
  .cap-toy {
    position: absolute; display: grid; place-items: center;
    width: 76px; height: 76px; padding-bottom: 9px;
    font: 500 1.5rem/1 var(--mono);
    background: var(--face); border: var(--line) solid var(--plum); border-radius: 15px;
    box-shadow: inset 0 -9px 0 var(--tan), 0 7px 0 var(--plum);
    animation: bob 5s ease-in-out infinite;
  }
  .t1 { left: calc(50% - 560px); top: 150px; --tilt: -14deg; }
  .t2 { left: calc(50% - 500px); top: 330px; --tilt: 9deg; animation-delay: -1.2s; }
  .t3 { left: calc(50% + 470px); top: 130px; --tilt: 12deg; animation-delay: -2.1s; }
  .t4 { left: calc(50% + 430px); top: 300px; --tilt: -8deg; animation-delay: -3.3s; }
  .t5 { left: calc(50% + 520px); top: 440px; --tilt: 16deg; animation-delay: -.6s; }
}
@keyframes bob {
  0%, 100% { transform: rotate(var(--tilt)) translateY(0); }
  50% { transform: rotate(var(--tilt)) translateY(-9px); }
}

/* ── Live demo ───────────────────────────────────────────────────────────── */

.try { max-width: 980px; margin: 0 auto; }
.phone {
  padding: clamp(6px, 1.3vw, 13px);
  background: #2a0b26;
  border-radius: clamp(14px, 3.4vw, 36px);
  box-shadow: 0 clamp(6px, 1.2vw, 12px) 0 rgba(75, 16, 67, .32);
}
.screen { aspect-ratio: 844 / 390; overflow: hidden; border-radius: clamp(9px, 2.2vw, 24px); background: #7b6fa0; }
.screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.hint { margin-top: 26px; text-align: center; font: 400 .88rem/1.5 var(--mono); }

.picker { display: grid; gap: 14px; margin-top: 22px; justify-content: center; }
.pick { display: flex; align-items: center; gap: 14px; }
.pick-label { flex: none; width: 5.2em; font: 500 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .42em .8em .62em;
  font: 700 .9rem/1.2 var(--round); color: var(--plum);
  background: var(--face); border: 2px solid var(--plum); border-radius: 10px;
  box-shadow: inset 0 -4px 0 var(--tan), 0 3px 0 var(--plum);
  transition: transform .07s ease-out, box-shadow .07s ease-out, background-color .12s;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chip:active, .chip[aria-pressed='true'] { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(75, 16, 67, .25), 0 0 0 var(--plum); }
.chip[aria-pressed='true'] { background: var(--plum); color: var(--face); }
.dot {
  width: 38px; height: 38px; padding: 0;
  background: conic-gradient(var(--a) 0 33.3%, var(--b) 0 66.6%, var(--c) 0);
  border: 2px solid var(--plum); border-radius: 50%;
  box-shadow: 0 3px 0 var(--plum);
  transition: transform .07s ease-out, box-shadow .07s ease-out;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dot:active { transform: translateY(3px); box-shadow: 0 0 0 var(--plum); }
.dot[aria-pressed='true'] { outline: 3px solid var(--face); outline-offset: 2px; }
.dot[aria-pressed='true']:focus-visible { outline-color: var(--plum); }

@media (max-width: 640px) {
  /* Give the keyboard every pixel on a phone. */
  .try .phone { margin: 0 -10px; }
  .pick { flex-direction: column; align-items: flex-start; gap: 8px; }
  .picker { justify-content: stretch; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main > section { padding: clamp(48px, 8vw, 88px) 0 0; }
.title { font-weight: 800; font-size: clamp(1.7rem, 4.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.015em; text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 72px); }
.features h2 { font-weight: 800; font-size: 1.32rem; line-height: 1.25; margin: 20px 0 8px; }
.features p { color: var(--plum-soft); max-width: 46ch; }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }

.shot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.shot-grid a { display: block; overflow: hidden; border: var(--line) solid var(--plum); border-radius: 16px; box-shadow: 0 6px 0 var(--tan); background: #222; }
figcaption { margin-top: 16px; text-align: center; font: 400 .84rem/1.5 var(--mono); color: var(--plum-soft); }
@media (max-width: 700px) { .shot-grid { grid-template-columns: 1fr; gap: 28px; } }

.steps { list-style: none; padding: 0; max-width: 620px; margin: 0 auto; display: grid; gap: 22px; }
.steps li { display: flex; gap: 20px; align-items: flex-start; }
.steps p { padding-top: 6px; }
.after { max-width: 620px; margin: 30px auto 0; color: var(--plum-soft); font-size: .98rem; }

.release {
  display: flex; gap: 28px; align-items: flex-start; justify-content: space-between;
  max-width: 820px; margin: 0 auto; padding: clamp(20px, 4vw, 32px);
  background: var(--face); border: var(--line) solid var(--plum); border-radius: 20px;
  box-shadow: 0 8px 0 var(--tan);
}
.release-main { min-width: 0; }
.release h3 { font-weight: 800; font-size: 1.6rem; line-height: 1.2; margin: 6px 0 4px; }
.release-side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 4px; }
.quiet { font: 400 .82rem/1.4 var(--mono); color: var(--plum-soft); }
.notes { margin-top: 14px; font-size: .98rem; overflow-wrap: anywhere; }
.notes > * + * { margin-top: 10px; }
.notes ul { padding-left: 1.2em; }
.notes li + li { margin-top: 4px; }
.notes code, .steps code { font: 400 .9em var(--mono); background: rgba(75, 16, 67, .08); padding: .1em .35em; border-radius: 5px; }
@media (max-width: 700px) {
  .release { flex-direction: column; }
  .release-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

.older { list-style: none; padding: 0; max-width: 820px; margin: 22px auto 0; }
.older li { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; padding: 12px 4px; border-bottom: 2px dashed var(--tan); }
.older .name { font-weight: 700; }
.older .meta { flex: 1; }
.releases .after { max-width: 820px; margin-top: 18px; text-align: center; }

.ios { max-width: 820px; margin: 0 auto; }
.ios h2 { font-weight: 800; font-size: 1.25rem; margin-bottom: 6px; }
.ios p { color: var(--plum-soft); }
main > .ios { margin-top: clamp(48px, 8vw, 88px); padding: clamp(20px, 4vw, 28px); background: var(--lav-pale); border-radius: 18px; }

footer { margin-top: clamp(56px, 9vw, 96px); padding: 28px 16px 40px; text-align: center; font: 400 .82rem/1.9 var(--mono); color: var(--plum-soft); border-top: 2px dashed var(--tan); }

/* ── Arrival ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .intro > *, .try { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
  .intro h1 { animation-delay: .06s; }
  .intro .lede { animation-delay: .12s; }
  .intro .cta { animation-delay: .18s; }
  .try { animation-delay: .26s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cap-toy { animation: none; transform: rotate(var(--tilt)); }
}
