/* Previous Designs: a badge and a centred heading, then the twelve emails in soft rounded cards on an endless
   loop that fades out at both sides (owner, 06.11), with the two round arrows under it. js/designs.js runs the
   loop. A click opens the full email in the lightbox. */
.designs { padding: clamp(80px, 10vw, 128px) 0 clamp(80px, 10vw, 120px); }
.designs-head { text-align: center; padding: 0 var(--gutter); }
.designs-head h2 {
  margin-top: 20px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: var(--t-headline);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--fg);
}

.designs-strip {
  --fade: clamp(48px, 9vw, 128px);
  position: relative;
  margin-top: 56px;
  padding: 4px 0 8px;
  overflow: hidden;
  overflow: clip;
  touch-action: pan-y pinch-zoom;
  /* the fade at both sides is an opacity mask, not a colour: the cards melt into the page. Only the mask's
     opacity counts, so its solid stop simply borrows a token */
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--black) var(--fade), var(--black) calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, var(--black) var(--fade), var(--black) calc(100% - var(--fade)), transparent);
}
.designs-track {
  position: relative;
  display: flex;
  gap: 20px;
  width: max-content;
  padding-left: max(var(--gutter), calc((100vw - var(--page)) / 2));
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}
.designs-strip.is-dragging, .designs-strip.is-dragging .design-card { cursor: grabbing; }

.design-card {
  flex: none;
  width: 300px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color var(--hover) ease;
}
.design-card .shot { display: block; height: 420px; overflow: hidden; border-radius: var(--radius-md); background: var(--white); }
.design-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; -webkit-user-drag: none; }
.design-card:hover, .design-card:focus-visible { border-color: var(--accent); }
.design-card:focus-visible { outline: none; }

.designs-arrows { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }
.designs-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--fg);
  transition: background-color var(--hover) ease, color var(--hover) ease;
}
.designs-arrow svg { width: 18px; height: 18px; }
.designs-arrow:hover { background: var(--press); color: var(--on-press); }

/* Lightbox: the full email scrolls inside a white frame. Esc, the backdrop or the close button shuts it. */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; overflow: hidden; background: var(--scrim); }
.lightbox.is-open { display: flex; }
.lb-stage { position: relative; padding-top: 54px; }
.lb-frame { position: relative; width: min(440px, 92vw); aspect-ratio: 3 / 5; max-height: 80vh; overflow: hidden; padding: 10px; border-radius: var(--radius-lg); background: var(--white); }
.lb-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: var(--radius-md); }
.lb-frame img { display: block; width: 100%; height: auto; }
.has-motion .lightbox.is-open .lb-frame { animation: lb-in 300ms var(--ease-out) both; }
@keyframes lb-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lb-close { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--pill); background: var(--white); color: var(--fg); transition: background-color var(--hover) ease, color var(--hover) ease; }
.lb-close svg { width: 14px; height: 14px; }
.lb-close:hover { background: var(--press); color: var(--on-press); }

@media (max-width: 860px) {
  .design-card { width: 260px; padding: 10px; }
  .design-card .shot { height: 360px; }
}
