/* Desktoad product pages (Pasteup, Callback, Undercut). Loaded after site.css,
   which holds the house rule, the hairline and type tokens, the nav and the footer. */

.page--product {
  --accent: var(--verm);
  --accent-ink: var(--verm-deep);
  --accent-wash: var(--verm-3);
}
.page--undercut {
  --accent: var(--uc);
  --accent-ink: #175a38;
  --accent-wash: var(--uc-3);
}
.page--callback {
  --accent: var(--cb);
  --accent-ink: var(--cb-deep);
  --accent-wash: var(--cb-3);
}

.page--product kbd.kbd { cursor: default; }

/* ---------- hero: the product's own shortcut keys and its headline, with the film right under it ---------- */
.p-hero { padding-block: clamp(10px, 1.8vw, 22px) 0; }
.p-hero__head {
  display: grid;
  justify-items: center;
  align-content: center;
  max-width: 860px;
  margin-inline: auto;
  padding-block: 24px 40px;
  text-align: center;
}
/* Sized to its content, so on a laptop screen the top third of the film shows underneath */
@media (min-width: 641px) {
  .p-hero__head { padding-block: clamp(32px, 6vh, 64px) clamp(32px, 5vh, 52px); }
}

.p-keys { display: flex; justify-content: center; gap: 14px; margin-bottom: clamp(28px, 4.5vh, 44px); }
.p-keys .key { --w: 112px; --h: 104px; --depth: 13px; }
.p-keys .key__label { font-size: 44px; }
/* Off a Mac the modifiers are words (Ctrl, Shift, Alt), so those keys are wider with smaller legends */
html:not([data-platform="mac"]) .p-keys .key:has(.key__label:is([data-mod], [data-shift], [data-alt])) { --w: 150px; }
html:not([data-platform="mac"]) .p-keys .key__label:is([data-mod], [data-shift], [data-alt]) { font-size: 30px; }

.p-hero h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.035em; max-width: 15ch; }
.page--callback .p-hero h1 { max-width: none; }
.p-hero h1 em {
  position: relative;
  display: inline-block;
  font-style: normal;
  color: var(--accent-ink);
}
.p-hero h1 em::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.06em;
  height: 0.14em;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.page--pasteup .p-hero h1 em { color: var(--verm); }
.page--pasteup .p-hero h1 em::after { background: color-mix(in srgb, var(--verm) 20%, transparent); }
.page--undercut .p-hero h1 em { color: var(--uc-vivid); }
.page--undercut .p-hero h1 em::after { background: color-mix(in srgb, var(--uc) 24%, transparent); }

.p-hero__lede { margin-top: 22px; font-size: var(--fs-lede); line-height: 1.55; color: var(--ink-2); max-width: 48ch; text-wrap: balance; }
.p-hero__lede .kbd { font-size: 14px; }
.p-hero .actions { justify-content: center; margin-top: 18px; gap: 8px 28px; }

/* ---------- Add to Chrome: always in the sticky nav, once more at the end ---------- */
.page--pasteup .btn--verm { --lift: 2px; }
.nav__cta svg { width: 15px; height: 15px; }
.nav__cta { gap: 7px; }
@media (max-width: 600px) {
  .nav__cta { padding: 0 12px; }
  .nav__cta svg { display: none; }
}
/* Narrow phones: the product's name and Add to Chrome matter more than the toad, which the menu links to */
@media (max-width: 420px) {
  .page--product .crumb .brand { display: none; }
}
@media (max-width: 350px) {
  .page--product .crumb__product { font-size: 0; gap: 0; }
}

@media (max-width: 640px) {
  .p-hero { padding-block: 10px 0; }
  .p-keys { gap: 10px; }
  .p-keys .key { --w: 74px; --h: 68px; --depth: 9px; }
  .p-keys .key::before,
  .p-keys .key__cap { border-radius: 15px; }
  .p-keys .key__cap::after { inset: 6px 7px 8px; border-radius: 9px; }
  .p-keys .key__label { font-size: 28px; }
  html:not([data-platform="mac"]) .p-keys .key:has(.key__label:is([data-mod], [data-shift], [data-alt])) { --w: 96px; }
  html:not([data-platform="mac"]) .p-keys .key__label:is([data-mod], [data-shift], [data-alt]) { font-size: 19px; }
}

/* ---------- film ---------- */
.film { padding-bottom: var(--section); }
.film__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--hair), var(--sh-lg);
}
.film__frame video,
.film__frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(16px, 2.4vw, 32px);
  border: 0;
  background: linear-gradient(to top, rgb(33 32 24 / 0.26), transparent 42%);
  cursor: pointer;
}
.film__play:focus-visible { outline: 3px solid var(--paper); outline-offset: -8px; border-radius: var(--r-lg); }
.film__pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 22px 0 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  font: 600 16px/1 var(--body);
  color: var(--ink);
  transition: transform .4s var(--spring), box-shadow .4s var(--spring);
}
.film__dot {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
}
.film__dot svg { width: 16px; height: 16px; margin-left: 2px; }
.film__play:hover .film__pill { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.film__play:active .film__pill { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); transition-duration: .07s; }
@media (max-width: 560px) {
  .film__play { padding: 12px; }
  .film__pill { gap: 8px; height: 40px; padding: 0 14px 0 4px; font-size: 14px; }
  .film__dot { width: 30px; height: 30px; }
  .film__dot svg { width: 12px; height: 12px; }
}
.film__cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 32px;
  margin-top: 20px;
}
.page--product .film__cap h2 { font: 600 16px/1.4 var(--body); letter-spacing: 0; }
.film__cap p { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 64ch; }

/* ---------- sections ---------- */
.sect { padding-bottom: var(--section); }
.sect__head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: end;
  gap: 20px clamp(32px, 6vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--hair-2);
}
.sect__head h2,
.qa__head h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -0.03em; max-width: 14ch; }
.sect__head p { justify-self: end; max-width: 44ch; font-size: var(--fs-lede); line-height: 1.55; color: var(--ink-2); }
@media (max-width: 860px) {
  .sect__head { grid-template-columns: minmax(0, 1fr); }
  .sect__head p { justify-self: start; }
}
.sect__fine { max-width: 72ch; margin-top: 24px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* Formats table, inside Pasteup's "What can it attach?" answer */
.fmt-card {
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--hair), var(--sh-lg);
}
.fmt-card table { width: 100%; border-collapse: collapse; }
.fmt-card th,
.fmt-card td { padding: 12px 20px; border-top: 1px solid var(--hair); text-align: left; vertical-align: baseline; }
.fmt-card thead th { border-top: 0; background: var(--cream); font: 500 13px/1.3 var(--body); color: var(--muted); }
.fmt-card tbody th { width: 52%; font: 600 15px/1.35 var(--body); color: var(--ink); }
.fmt-card td { font: 500 13px/1.5 var(--mono); color: var(--ink-2); }
.fmt-card td b { font-weight: 600; color: var(--verm-deep); }
.qa__item .fmt-card { margin-top: 16px; box-shadow: 0 0 0 1px var(--hair); }
@media (max-width: 560px) {
  .fmt-card th,
  .fmt-card td { padding: 10px 14px; }
  .fmt-card tbody th { font-size: 14px; }
}

/* ---------- questions ---------- */
.qa {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 6vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--hair-2);
}
.qa__head { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.qa__head p { margin-top: 16px; font-size: 16px; color: var(--ink-2); }
.qa__head p a { color: var(--ink); text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.qa__head p a:hover { text-decoration-color: currentColor; }
.qa__head .link { margin-top: 8px; font-size: 16px; }
.qa__list { display: grid; margin: 0; }
.qa__item { padding: 24px 0; border-top: 1px solid var(--hair); }
.qa__item:first-child { padding-top: 4px; border-top: 0; }
.qa__item dt { font: 600 18px/1.4 var(--body); color: var(--ink); }
.qa__item dd { max-width: 60ch; margin: 8px 0 0; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.qa__item code { font: 500 .9em/1 var(--mono); color: var(--ink); }
@media (max-width: 860px) {
  .qa { grid-template-columns: minmax(0, 1fr); }
  .qa__head { position: static; }
}

/* ---------- install ---------- */
.last { padding-bottom: clamp(40px, 5vw, 72px); }
.last__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px clamp(24px, 4vw, 56px);
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 4vw, 56px);
  border-radius: var(--r-lg);
  background: var(--cream-2);
}
.last h2 { font-size: var(--fs-h3); line-height: 1.05; letter-spacing: -0.03em; white-space: nowrap; }
.last__fine { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.last .actions { flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 860px) {
  .last__card { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .last .actions { align-items: flex-start; }
}
@media (max-width: 400px) {
  .last h2 { white-space: normal; }
}
