/* ------------------------------------------------------------------
   Seasonal carousel — All In House

   The covers of the latest posts stand on a cylinder and turn past
   the visitor, the way a carousel turns. One number, --deg, is written
   on the ring by season.js; every card sits at its own angle on the
   drum and the drum's rotation carries it round. Sits on the same ink
   as the orbit rings, in the same vocabulary.
   ------------------------------------------------------------------ */

.season {
  --deg: 0deg;
  --card: min(62vw, 240px);
  --radius: calc(var(--card) * var(--k, 1.42));   /* --k is set by season.js from the number of covers */

  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: clamp(72px, 12vw, 128px) 0 clamp(64px, 10vw, 112px);
  text-align: center;
}

.season__eyebrow {
  margin: 0 24px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* full white (Logan: no grey text); rank is size and tracking */
}

.season__heading {
  margin: 0.4em 24px 0;
  font-family: Perandory, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 7.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.season__lede {
  margin: 1em auto 0;
  max-width: 24rem;
  padding: 0 24px;
  font-size: 1.0625rem;
  line-height: 1.55;
  /* full white (Logan: no grey text) */
  text-wrap: balance;
}

/* ---- the drum ---- */

.season__stage {
  position: relative;
  height: calc(var(--card) * 1.25 + 24px);
  margin: clamp(36px, 6vw, 56px) 0 0;
  perspective: 1100px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.season__stage.is-dragging { cursor: grabbing; }

.season__ring {
  position: absolute;
  left: 50%;
  top: 12px;
  width: var(--card);
  aspect-ratio: 4 / 5;
  margin-left: calc(var(--card) / -2);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--radius) * -1)) rotateY(var(--deg));
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.season__stage.is-dragging .season__ring { transition: none; }

.season__card {
  --a: 0deg;                       /* this card's place on the drum */
  --d: 1;                          /* 0 = facing us, 1 = round the back */
  position: absolute;
  inset: 0;
  display: block;
  background: #161616;
  transform: rotateY(var(--a)) translateZ(var(--radius));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: calc(1 - var(--d) * 0.8);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}
.season__stage.is-dragging .season__card { transition: none; }

.season__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(calc(1.02 - var(--d) * 0.45));
  transition: filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.season__stage.is-dragging .season__card img { transition: none; }

.season__card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* ---- the caption under the drum: the card in front ---- */

.season__caption {
  min-height: 3.6em;
  margin: clamp(20px, 4vw, 32px) 24px 0;
}
.season__title {
  margin: 0;
  font-family: Perandory, Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 5.4vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.season__when {
  margin: 0.5em 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* full white (Logan: no grey text) */
}

/* ---- the two arrows ---- */

.season__nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: clamp(22px, 4vw, 30px) 0 0;
}
.season__nav button {
  width: 52px;
  height: 52px;
  border: 1px solid #ffffff59;
  border-radius: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.season__nav button:hover { border-color: #fff; }
.season__nav button:active { background: #ffffff1f; }
.season__nav button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.season__nav svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---- the way out ---- */

.season__more {
  display: inline-block;
  margin: clamp(30px, 5vw, 44px) 24px 0;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid #ffffff73;
  padding-bottom: 6px;
}
.season__more:hover { border-color: #fff; }

/* ---- narrow screens ---- */

@media (max-width: 700px) {
  .season__stage { perspective: 800px; }
}

/* ---- reduced motion: the drum still turns on request, but jumps ---- */

@media (prefers-reduced-motion: reduce) {
  .season__ring, .season__card, .season__card img { transition: none; }
}
