/* ─── Craft Page ─── */
/* Loaded after style.css and cv.css on craft.html only; reuses their tokens
   and the .cv-back link. Three columns, one per runtime. */

.craft-page .container {
  max-width: 880px;
}

/* ─── Craft Header ─── */

.craft-page .craft-header {
  margin-bottom: 44px;
  padding-bottom: 0;
  border-bottom: 0;
}

.craft-header h1 {
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.craft-header p {
  max-width: 60ch;
  margin-bottom: 0;
  text-wrap: pretty;
}

/* ─── Clip strip ─── */
/* Four of the entries, moving, in one level row. Each figure grows by its own
   aspect ratio (--ar), so widths differ and heights come out equal without a
   single fixed dimension. */

.clip-strip {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 64px;
}

.clip-strip figure {
  flex: var(--ar, 1) 1 0;
  min-width: 0;
  margin: 0;
}

.clip-strip figcaption {
  display: grid;
  gap: 1px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}

.clip-app {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ─── Columns ─── */

.craft-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 36px;
  align-items: start;
}

.craft-col h2 {
  font-size: 19px;
  margin-bottom: 4px;
}

.craft-col h2::after {
  display: none;
}

.craft-count {
  display: block;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.craft-list {
  list-style: none;
  display: grid;
  gap: 22px;
}

.craft-item {
  display: grid;
  gap: 3px;
}

.craft-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.craft-note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.craft-where {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.craft-where a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.craft-where a:hover {
  color: var(--text-secondary);
  text-decoration-color: var(--accent);
}

/* ─── Entrance ─── */

.fade-in.visible .craft-col {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) calc(0.1s + var(--i, 0) * 0.09s) both;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in .craft-col {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── Responsive ─── */

@media (max-width: 760px) {
  .craft-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .craft-header h1 {
    font-size: 38px;
  }

  /* Too narrow for four across: the strip becomes a film you swipe, bleeding
     to the screen edge, each frame 300px tall and as wide as its ratio makes it */
  .clip-strip {
    margin-inline: -16px;
    padding-inline: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    margin-bottom: 48px;
  }

  .clip-strip::-webkit-scrollbar {
    display: none;
  }

  .clip-strip figure {
    flex: 0 0 auto;
    width: calc(300px * var(--ar, 1));
    scroll-snap-align: start;
  }
}

/* ─── Print ─── */

@media print {
  .fade-in .craft-col {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .craft-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
