/* =========================================================
   effects.css: motion pieces (own versions of two ideas)
   1. Recent Saturdays as a fanned deck that rotates (desktop)
   2. "Join" CTA: rolling headline + photo marquee + host card
   ========================================================= */

/* ---------- 1. Fan deck (#past) ---------- */
#past { overflow-x: clip; }
@media (max-width: 1199px) { .q-strip.is-fan { --step: 190px; } }
.fan-wrap { position: relative; }
.fan-ui { display: none; }

@media (min-width: 900px) {
  .q-strip.is-fan {
    position: relative;
    display: block;
    height: 600px;
    margin: 8px auto 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .q-strip.is-fan .q-card {
    position: absolute;
    left: 50%;
    top: 24px;
    width: 300px;
    margin-left: -150px;
    transform-origin: 50% 120%;
    transform:
      translateX(calc(var(--o, 0) * var(--step, 250px)))
      translateY(calc(var(--a, 0) * 36px))
      rotate(calc(var(--o, 0) * 8deg))
      scale(calc(1 - var(--a, 0) * 0.06));
    z-index: calc(10 - var(--a, 0));
    transition: transform 0.8s var(--ease), opacity 0.6s var(--ease), box-shadow 0.6s var(--ease);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(22, 38, 78, 0.06), 0 16px 40px rgba(22, 38, 78, 0.10);
  }
  .q-strip.is-fan .q-card:hover { transform:
      translateX(calc(var(--o, 0) * var(--step, 250px)))
      translateY(calc(var(--a, 0) * 36px - 8px))
      rotate(calc(var(--o, 0) * 8deg))
      scale(calc(1 - var(--a, 0) * 0.06)); }
  .q-strip.is-fan .q-card[data-a="2"] { opacity: 0.55; }
  .q-strip.is-fan .q-card[data-a="0"] {
    cursor: default;
    box-shadow: 0 4px 8px rgba(22, 38, 78, 0.08), 0 28px 60px rgba(22, 38, 78, 0.18);
  }
  .q-strip.is-fan .q-card[data-a="0"] .q-question { color: var(--navy); }

  .fan-ui {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--container);
    margin: -40px auto 0;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 20;
  }
  .fan-count { margin: 0; color: var(--navy); font-family: var(--display); font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .fan-count small { color: var(--muted); font-size: 18px; font-weight: 600; letter-spacing: 0; }
  .fan-controls { display: flex; align-items: center; gap: 8px; }
  .fan-hint { margin-right: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
  .fan-btn {
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--card); color: var(--navy);
    font: inherit; font-size: 20px; cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
  }
  .fan-btn:hover { background: var(--navy); color: #fff; }
  .fan-btn:active { transform: scale(0.94); }
  .fan-btn:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
}

/* ---------- 2. Join CTA (#join) ---------- */
.join { position: relative; padding: clamp(64px, 9vw, 112px) 0 clamp(72px, 9vw, 120px); overflow: hidden; background: var(--paper); }
.join-label {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 0 auto; padding: 0 var(--gutter);
  color: var(--navy); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.join-label::before, .join-label::after { content: ""; width: min(110px, 14vw); height: 1px; background: var(--line-strong); }

.join-title { margin: clamp(32px, 5vw, 56px) 0 0; text-align: center; }
.roll {
  position: relative;
  display: block;
  height: 1.2em;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  perspective: 800px;
}
.roll-line {
  position: absolute; inset: 0;
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(70%) rotateX(-80deg);
  transform-origin: 50% 50% -0.4em;
  transition: transform 0.75s var(--ease), opacity 0.5s var(--ease);
}
.roll-line.is-on { opacity: 1; transform: none; }
.roll-line.is-off { opacity: 0; transform: translateY(-70%) rotateX(80deg); }
.roll-line em { color: var(--crimson); font-style: normal; }
.roll-ghost {
  display: block; margin-top: 4px;
  color: var(--navy); opacity: 0.07;
  font-family: var(--display); font-size: clamp(30px, 6vw, 76px); font-weight: 700; line-height: 1.2; letter-spacing: -0.035em;
  transform: scaleY(-1); white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 10%, #000 100%);
  pointer-events: none; user-select: none;
}
.join-sub { max-width: 520px; margin: 16px auto 0; padding: 0 var(--gutter); color: var(--muted); font-size: 16px; line-height: 1.55; text-align: center; }

.join-stage { position: relative; margin-top: clamp(140px, 14vw, 170px); margin-bottom: clamp(110px, 10vw, 140px); }
.marquee {
  display: flex; gap: 12px; width: max-content;
  animation: marquee 48s linear infinite;
}
.join-stage:hover .marquee { animation-play-state: paused; }
.marquee img {
  width: 200px; height: 200px; flex: none;
  object-fit: cover; border-radius: 6px; background: var(--mint);
}
.join-stage::before, .join-stage::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 2; width: 12vw; pointer-events: none;
}
.join-stage::before { left: 0; background: linear-gradient(to right, var(--paper), transparent); }
.join-stage::after { right: 0; background: linear-gradient(to left, var(--paper), transparent); }
@keyframes marquee { to { transform: translateX(-50%); } }

.host-card {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 280px; margin: 0;
  padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 4px 10px rgba(22, 38, 78, 0.08), 0 30px 70px rgba(22, 38, 78, 0.20);
  transform: translate(-50%, -50%) rotate(-2deg);
  transition: transform 0.5s var(--spring);
}
.host-card:hover { transform: translate(-50%, -52%) rotate(0deg); }
.host-card > img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 6px; }
.host-pill {
  position: absolute; left: 50%; bottom: 14px;
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 20px); padding: 6px 6px 6px 6px;
  background: var(--card); border: 0; border-radius: 999px;
  color: var(--navy); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 6px 20px rgba(22, 38, 78, 0.18);
  transform: translateX(-50%);
}
.host-pill img { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.host-pill span { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.host-pill strong { font-size: 14px; font-weight: 700; }
.host-pill small { color: var(--muted); font-size: 12px; font-weight: 500; }
.host-pill i {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--crimson); color: #fff; font-style: normal; font-size: 18px;
  transition: transform 0.3s var(--spring);
}
.host-pill:hover i { transform: translateX(3px); }
.host-pill:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

@media (max-width: 680px) {
  .marquee img { width: 140px; height: 140px; }
  .marquee { gap: 8px; }
  .host-card { width: 200px; }
  .join-label { gap: 12px; font-size: 11px; letter-spacing: 0.14em; }
  .roll, .roll-ghost { font-size: clamp(24px, 7.6vw, 34px); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .roll-line { transition: none; }
  .q-strip.is-fan .q-card { transition: none; }
}

#join .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  .join-label::before, .join-label::after { display: none; }
  .join-stage { margin-top: 110px; margin-bottom: 100px; }
  .host-card { width: 230px; }
  .host-pill { gap: 8px; bottom: 10px; width: calc(100% - 16px); }
  .host-pill img { width: 30px; height: 30px; }
  .host-pill strong { font-size: 13px; white-space: nowrap; }
  .host-pill small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .host-pill i { width: 32px; height: 32px; font-size: 16px; }
}

/* ---------- Host story ---------- */
.host-feature .host-lede { margin-top: 12px; color: var(--navy); font-family: var(--display); font-size: clamp(18px, 2vw, 22px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.host-feature p.host-bio + p.host-bio { margin-top: 12px; }
.host-path { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; max-width: 36rem; }
.host-path li { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 10px 0 10px 20px; border-left: 2px solid var(--line); color: var(--navy-2); font-size: 15px; line-height: 1.45; }
.host-path li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--crimson); }
.host-path li:last-child::before { background: var(--crimson); }
.host-path span { color: var(--crimson); font-size: 13px; font-weight: 700; padding-top: 1px; }
@media (max-width: 520px) { .host-path li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
