/* ============================================================
   Release Calendar — Cardstock theme

   Sibling stylesheet to genre_home.css and year_detail_cardstock.css.
   Reuses tokens from product_detail.css (--paper/--ink/--accent/...)
   and the .panel + .ck-shelf-head + .ck-tile-* primitives from
   genre_home.css. This file only adds calendar-specific chrome:
     • painted-ink page header
     • Upcoming / All segmented paper toggle
     • flexible grid that holds release tiles
     • future-release ETA banner over the image
     • muted "no product page yet" tile state
     • dashed empty-state callout

   All rules scoped under .cardstock so they only fire on this page.
   ============================================================ */

.cardstock.cardstock-release-calendar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.0em 1.4em 3em;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

/* ===================================================================
   PAGE HEADER — matches year_detail's painted-ink hero. Title is the
   page anchor; subhead is forced to one line. The Upcoming / All
   toggle floats right of the header on desktop, wraps below on narrow.
   =================================================================== */
.cardstock .rc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2em;
  flex-wrap: wrap;
  margin: 0 0 0.3em;
}
.cardstock .rc-header-text {
  min-width: 0;
  flex: 1 1 auto;
}
.cardstock .rc-title {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 60px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.0;
  text-transform: uppercase;
  color: #1a1a1a;
  opacity: 0.55;
  -webkit-text-stroke: 1px rgba(120, 120, 118, 0.55);
          text-stroke: 1px rgba(120, 120, 118, 0.55);
  paint-order: stroke fill;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.28);
}

/* ===================================================================
   RC-TOGGLE — segmented paper control (Upcoming / All). Same
   pressed-into-paper language as the country-switch in base.html
   so the active state reads tactile, not just colored.
   =================================================================== */
.cardstock .rc-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--paper-edge);
  border-radius: 5px;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: var(--paper);
  box-shadow:
    inset 0 2px 3px rgba(15, 15, 15, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.30);
  flex: 0 0 auto;
}
.cardstock .rc-toggle a {
  padding: 0.42em 0.95em;
  color: var(--ink-2);
  background: transparent;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}
.cardstock .rc-toggle a.active {
  background: var(--paper-hi);
  color: var(--accent-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.60);
  box-shadow:
    0 2px 4px -1px rgba(15, 15, 15, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
}
.cardstock .rc-toggle a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.22);
  color: var(--accent);
  text-decoration: none;
}

/* ===================================================================
   GRID — flexible-width tiles that fill the panel. The recent strip
   caps at 5 columns max to mirror the year_detail card-grid feel;
   upcoming grows past that on wide screens.
   =================================================================== */
.cardstock .rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.1em;
  margin-top: 0.4em;
}
.cardstock .rc-grid.rc-grid-recent {
  /* Recent strip is short by design (≤5 items) — cap columns so a
     single-item strip doesn't sprawl to full width. */
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
}

/* ===================================================================
   RC-CARD — release tile. Inherits the .ck-tile-image / -body / etc.
   primitives from genre_home.css for the inner markup. This rule
   only owns the outer wrapper (hover lift + muted state).
   =================================================================== */
.cardstock .rc-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  transition: transform 160ms ease;
}
.cardstock a.rc-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.cardstock a.rc-card:hover .ck-tile-image img {
  transform: scale(1.04);
}
.cardstock a.rc-card:hover .ck-tile-title {
  color: var(--accent-deep);
}
/* Non-link card (release not yet in our products table) reads as
   muted reference data — no hover lift, dimmer ink. */
.cardstock .rc-card.is-noproduct {
  cursor: default;
  opacity: 0.78;
}
.cardstock .rc-card.is-noproduct .ck-tile-image img {
  filter:
    drop-shadow(0 0 1px rgba(15, 15, 15, 0.30))
    drop-shadow(0 2px 3px rgba(15, 15, 15, 0.14))
    saturate(0.85);
}

/* ===================================================================
   ETA BANNER — bright pencil-crayon strip across the top of future
   releases. Same vocabulary as the home page's .ck-tile-eta but
   anchored to the top (the calendar's date is the headline) and
   colored in the burnt-orange accent rather than slate.
   =================================================================== */
.cardstock .rc-eta {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 0.34em 0.5em;
  font-family: "Roboto Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 1px 3px rgba(15, 15, 15, 0.20);
  z-index: 3;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}
.cardstock .rc-eta.is-soon {
  /* "Today" / "Tomorrow" — louder, in case the operator is scanning. */
  background: linear-gradient(180deg, #d8842a 0%, var(--accent) 100%);
}

/* ===================================================================
   META — date + delta line beneath the title. Inherits .ck-tile-meta
   layout from genre_home.css. We only style the two chips.
   =================================================================== */
.cardstock .rc-date {
  font-family: "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-num);
  white-space: nowrap;
}
.cardstock .rc-delta {
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.1em 0.45em;
  background: rgba(40, 40, 40, 0.06);
  border-radius: 2px;
  white-space: nowrap;
}
.cardstock .rc-card.is-future .rc-delta {
  color: var(--accent-deep);
  background: rgba(160, 68, 37, 0.10);
}

/* ===================================================================
   EMPTY STATES — for the recent strip + the "no upcoming" panel.
   =================================================================== */
.cardstock .rc-empty {
  margin-top: 0.4em;
  padding: 1.6em 1.4em;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.92em;
  border: 1px dashed var(--rule);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
}
.cardstock .rc-empty a { color: var(--accent); font-weight: 700; }
.cardstock .rc-empty a:hover { color: var(--accent-deep); }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 880px) {
  .cardstock.cardstock-release-calendar {
    padding: 0.8em 1em 2em;
    gap: 1em;
  }
  .cardstock .rc-title { font-size: 45px; line-height: 1.0; }
  .cardstock .rc-grid,
  .cardstock .rc-grid.rc-grid-recent {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8em;
  }
}
@media (max-width: 560px) {
  .cardstock .rc-title { font-size: 34px; letter-spacing: 0; line-height: 0.95; }
  .cardstock .rc-header { align-items: flex-start; }
  .cardstock .rc-grid,
  .cardstock .rc-grid.rc-grid-recent {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6em;
  }
}
@media (max-width: 380px) {
  .cardstock .rc-grid,
  .cardstock .rc-grid.rc-grid-recent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
