/* Swipe warm-up: intro on the left, the card deck in the middle, taste bars on the right. */

.swipe {
  min-height: calc(100vh - var(--header));
  min-height: calc(100dvh - var(--header));
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: 48px;
  padding: 24px 64px 40px;
  overflow: hidden;            /* cards fly off the edge without making the page scroll sideways */
}

.swipe-intro { display: flex; flex-direction: column; gap: 20px; }
.swipe-intro h1 {
  margin: 0;
  font-size: clamp(38px, 3.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 500;
}
.swipe-intro h1 .serif { font-size: 1.1em; }
.swipe-intro p { margin: 0; }
.swipe-lede { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.swipe-count { font-family: var(--mono); font-size: 13px; }

/* ---------- The deck ---------- */

.deck-area { display: flex; flex-direction: column; align-items: center; gap: 20px; min-width: 0; }
.deck {
  position: relative;
  height: min(520px, calc(100dvh - var(--header) - 230px), calc((100vw - 32px) * 520 / 380));
  aspect-ratio: 380 / 520;
  max-width: 100%;
}
.deck-back { position: absolute; inset: 0; border-radius: 18px; }
.deck-back.back-2 { background: var(--chip); transform: translate(16px, 14px) rotate(3deg); }
.deck-back.back-1 { background: #EFEEEA; transform: translate(8px, 7px) rotate(1.5deg); }

.swipe-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 34px 60px -34px rgba(18, 18, 18, .45);
  cursor: grab;
  touch-action: pan-y;         /* phones can still scroll the page up and down over the card */
  user-select: none;
  -webkit-user-select: none;
  animation: card-in .5s var(--ease) backwards;
}
.swipe-card.dragging { cursor: grabbing; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.swipe-photo { position: relative; overflow: hidden; background: var(--chip); }
.swipe-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.swipe-caption { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 18px; }
.swipe-name { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }

.stamp {
  position: absolute;
  top: 22px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}
.stamp-like { left: 20px; transform: rotate(-8deg); }
.stamp-pass { right: 20px; transform: rotate(8deg); }

.swipe-done {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 40px;
  border-radius: 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  animation: card-in .5s var(--ease) backwards;
}
.swipe-done[hidden] { display: none; }
.swipe-done p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.swipe-done .done-title { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; font-weight: 500; color: var(--ink); }
.done-title .serif { font-size: 38px; }
.swipe-done .pill { align-self: flex-start; }

/* ---------- Buttons under the deck ---------- */

.deck-actions { display: flex; gap: 14px; }
.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .35s var(--ease), opacity .3s ease;
}
.act:hover:not(:disabled) { transform: translateY(-2px); }
.act:disabled { opacity: .35; cursor: default; }
.act-pass { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.act-like { background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); }

.deck-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; }
.link-button {
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:disabled { opacity: .4; cursor: default; text-decoration: none; }

/* ---------- Taste bars ---------- */

.taste { display: flex; flex-direction: column; gap: 16px; }
.taste p { margin: 0; }
.taste-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.taste-row { display: flex; flex-direction: column; gap: 6px; }
.taste-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.taste-pct { font-family: var(--mono); font-size: 12px; }
.taste-track { height: 4px; overflow: hidden; border-radius: 999px; background: var(--line); }
.taste-fill { width: 0; height: 100%; border-radius: 999px; background: var(--ink); transition: width .6s var(--ease); }
.taste-note { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.taste-skip { font-size: 14px; font-weight: 500; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1179px) {
  .swipe {
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
    align-items: start;
    gap: 32px 40px;
    padding: 28px 40px 40px;
  }
  .swipe-intro { grid-column: 1 / -1; }
  .deck { height: min(520px, calc(100dvh - var(--header) - 200px), calc((100vw - 32px) * 520 / 380)); }
}

@media (max-width: 720px) {
  .swipe { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px var(--gutter) 40px; }
  .swipe-intro { gap: 12px; }
  .swipe-intro h1 { font-size: 36px; }
  .swipe-lede { font-size: 15px; }
  /* Small enough that the Pass / I'd wear it buttons fit on screen without scrolling */
  .deck { height: min(440px, 50dvh, calc((100vw - 32px) * 520 / 380)); }
  .act { height: 50px; padding: 0 20px; }
}
