/* ==========================================================================
   THE TAILSGATE MECHANICAL GUILD — 1978 MAIL-ORDER CATALOGUE
   styles/catalogue.css — Masthead, Interactive Diorama, Exhibit Spreads
   ========================================================================== */

/* 1. Masthead Spread */
.masthead {
  border-bottom: var(--rule-heavy);
  background:
    linear-gradient(90deg, rgba(27, 25, 23, 0.04) 1px, transparent 1px),
    var(--paper-manila);
  background-size: 48px 100%;
}

.masthead-meta-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: var(--rule-medium);
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--paper-cream);
  gap: 12px;
}

.masthead-meta-center {
  text-align: center;
  padding: 2px 14px;
  background: var(--ink-charcoal);
  color: var(--paper-cream);
  font-weight: 700;
}

.masthead-meta-right {
  text-align: right;
}

.masthead-hero-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: stretch;
}

.masthead-editorial {
  padding: 32px 28px;
  border-right: var(--rule-heavy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  position: relative;
}

.issue-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.catalogue-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.35rem, 4.1vw, 3.85rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: var(--ink-charcoal);
  text-transform: uppercase;
}

.catalogue-title .title-vermilion {
  color: var(--tin-vermilion);
  display: block;
  font-style: italic;
  font-weight: 800;
}

.catalogue-sublead {
  font-family: var(--font-editorial);
  font-size: 1.16rem;
  line-height: 1.5;
  color: var(--ink-warm);
  border-left: 4px solid var(--tin-vermilion);
  padding-left: 16px;
}

.guild-manifesto-box {
  background: var(--paper-butcher);
  border: var(--rule-medium);
  padding: 14px 16px;
  box-shadow: var(--shadow-litho-sm);
  position: relative;
}

.guild-manifesto-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--enamel-cobalt);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guild-manifesto-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-charcoal);
}

.guild-manifesto-list li::before {
  content: "▣ ";
  color: var(--tin-vermilion);
}

.masthead-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Interactive Workshop Cutaway Diorama Showcase */
.masthead-diorama-col {
  padding: 24px;
  background: var(--paper-butcher);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.diorama-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 8px;
  border-bottom: var(--rule-thin);
}

.diorama-stage {
  position: relative;
  border: var(--rule-heavy);
  background: var(--paper-cream);
  box-shadow: var(--shadow-litho);
  overflow: hidden;
}

.diorama-stage img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.03) saturate(1.04);
}

/* Interactive Hotspots on the Workshop Diorama */
.diorama-pin {
  position: absolute;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  background: var(--tin-vermilion);
  color: var(--paper-cream);
  border: 2.5px solid var(--ink-charcoal);
  box-shadow: 2px 2px 0 var(--ink-charcoal);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: transform 0.18s ease, background 0.18s ease;
}

.diorama-pin::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed var(--tin-vermilion);
  animation: spinSlow 12s linear infinite;
}

.diorama-pin:hover,
.diorama-pin:focus-visible {
  transform: scale(1.18);
  background: var(--enamel-cobalt);
  z-index: 10;
}

.diorama-pin-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink-charcoal);
  color: var(--paper-cream);
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  border: 1.5px solid var(--paper-cream);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.diorama-pin:hover .diorama-pin-label,
.diorama-pin:focus-visible .diorama-pin-label {
  opacity: 1;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.diorama-legend-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--paper-cream);
  border: var(--rule-thin);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: left;
  transition: background 0.15s ease, transform 0.15s ease;
}

.legend-chip:hover {
  background: var(--litho-marigold-soft);
  transform: translateY(-2px);
}

.legend-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--ink-charcoal);
  color: var(--paper-cream);
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 2. Catalogue Section Divider Banner */
.section-banner {
  border-bottom: var(--rule-heavy);
  padding: 18px 28px;
  background: var(--ink-charcoal);
  color: var(--paper-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-banner-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.section-banner-no {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--litho-marigold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.section-banner-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--paper-butcher);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* 3. Broken Editorial Spread for the 5 Featured Tin-Toy Exhibits */
.exhibits-wrapper {
  display: flex;
  flex-direction: column;
}

.exhibit-spread {
  border-bottom: var(--rule-heavy);
  display: grid;
  grid-template-columns: 12fr;
  position: relative;
  background: var(--paper-manila);
}

.exhibit-inner {
  display: grid;
  grid-template-columns: 5.5fr 6.5fr;
  align-items: stretch;
}

.exhibit-spread:nth-child(even) .exhibit-inner {
  grid-template-columns: 6.5fr 5.5fr;
}

.exhibit-spread:nth-child(even) .exhibit-art-col {
  order: 2;
  border-right: none;
  border-left: var(--rule-heavy);
}

.exhibit-spread:nth-child(even) .exhibit-spec-col {
  order: 1;
}

/* Toy Box Art Column */
.exhibit-art-col {
  padding: 28px;
  border-right: var(--rule-heavy);
  background:
    radial-gradient(circle at 50% 45%, rgba(232, 155, 30, 0.16), transparent 70%),
    var(--paper-butcher);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

.toy-box-card {
  border: var(--rule-heavy);
  background: var(--paper-cream);
  box-shadow: var(--shadow-litho);
  padding: 14px;
  position: relative;
  transition: transform 0.22s ease;
}

.toy-box-card:hover {
  transform: rotate(-0.6deg) translateY(-3px);
}

.toy-box-topstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--ink-charcoal);
  color: var(--paper-cream);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.toy-box-figure {
  position: relative;
  border: var(--rule-medium);
  overflow: hidden;
  background: #F7EFE0;
  aspect-ratio: 4 / 3;
}

.toy-box-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.toy-box-card:hover .toy-box-figure img {
  transform: scale(1.03);
}

/* Starburst Die-Cut Sticker on Toy Box */
.price-starburst {
  position: absolute;
  top: 22px;
  right: 22px;
  background: var(--litho-marigold);
  color: var(--ink-charcoal);
  border: 2.5px solid var(--ink-charcoal);
  box-shadow: 3px 3px 0 var(--ink-charcoal);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  transform: rotate(5deg);
  z-index: 4;
}

.price-starburst strong {
  display: block;
  font-size: 0.84rem;
  color: var(--tin-vermilion-dark);
}

.toy-box-caption-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  gap: 8px;
  flex-wrap: wrap;
}

/* Brass Serial Plate under Box Art */
.brass-plate {
  background: linear-gradient(135deg, #F5D996 0%, #E2AC48 50%, #F2D285 100%);
  border: var(--rule-medium);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-charcoal);
  box-shadow: inset 0 0 0 2px rgba(27, 25, 23, 0.2);
}

/* Editorial & Technical Spec Column */
.exhibit-spec-col {
  padding: 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.exhibit-header-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exhibit-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.exhibit-cat-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: var(--ink-charcoal);
  color: var(--litho-marigold);
}

.exhibit-automaton-nickname {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tin-vermilion);
}

.exhibit-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.exhibit-Deck {
  font-family: var(--font-editorial);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--ink-warm);
  line-height: 1.45;
}

.exhibit-story {
  font-size: 0.98rem;
  color: var(--ink-warm);
  line-height: 1.6;
}

/* Exploded Mechanical Apparatus Table */
.apparatus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: var(--rule-medium);
  border-bottom: var(--rule-medium);
  padding: 14px 0;
}

.apparatus-item {
  background: var(--paper-cream);
  border: var(--rule-thin);
  padding: 10px 12px;
}

.apparatus-part-no {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--enamel-cobalt);
  display: block;
  margin-bottom: 2px;
}

.apparatus-part-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.apparatus-part-desc {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* Mainspring Tier Ledger (Free to Start vs Pro — NO exact dollar figures) */
.mainspring-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--rule-medium);
  background: var(--paper-butcher);
}

.ledger-col {
  padding: 10px 14px;
}

.ledger-col:first-child {
  border-right: var(--rule-thin);
}

.ledger-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-charcoal);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-head-badge {
  padding: 1px 6px;
  background: var(--verdigris-mint);
  color: var(--paper-cream);
  font-size: 0.62rem;
}

.ledger-head-badge--pro {
  background: var(--tin-vermilion);
}

.ledger-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--ink-warm);
}

/* Perforated Tear-Off Mail-Order Coupon Action Footer */
.coupon-strip {
  border: var(--rule-dashed);
  background: var(--paper-cream);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.coupon-strip::before {
  content: "✂ TEAR ALONG PERFORATION TO DISPATCH";
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--paper-cream);
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.coupon-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.35;
}

.coupon-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 4. Curio Cabinet Shelf (Bonus Studio Creations: Critters, highl8te, Markee, HeaderLock, LinkPatrol) */
.curio-shelf-section {
  border-bottom: var(--rule-heavy);
  padding: 36px 28px;
  background:
    linear-gradient(180deg, var(--paper-butcher) 0%, var(--paper-manila) 100%);
}

.curio-featured-banner {
  display: grid;
  grid-template-columns: 4.5fr 7.5fr;
  gap: 24px;
  border: var(--rule-heavy);
  background: var(--paper-cream);
  box-shadow: var(--shadow-litho);
  padding: 22px;
  margin-bottom: 24px;
  align-items: center;
}

.curio-featured-img {
  border: var(--rule-medium);
  overflow: hidden;
  background: var(--paper-manila);
}

.curio-drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.curio-drawer-card {
  border: var(--rule-medium);
  background: var(--paper-cream);
  box-shadow: var(--shadow-litho-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.curio-drawer-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-litho);
}

.drawer-pull-handle {
  width: 48px;
  height: 10px;
  margin: 0 auto 4px;
  border: 2px solid var(--ink-charcoal);
  background: var(--litho-marigold);
  border-radius: 99px;
}

.curio-drawer-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tin-vermilion);
  text-transform: uppercase;
}

.curio-drawer-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.1;
}

.curio-drawer-desc {
  font-size: 0.88rem;
  color: var(--ink-warm);
  line-height: 1.45;
}

.curio-drawer-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--enamel-cobalt);
  border-top: var(--rule-thin);
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 5. Guild Charter & Colophon Footer */
.guild-colophon {
  padding: 36px 28px;
  background: var(--paper-butcher);
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 28px;
  align-items: start;
}

.charter-box {
  border: var(--rule-heavy);
  background: var(--paper-cream);
  padding: 24px;
  box-shadow: var(--shadow-litho);
}

.charter-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.charter-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.charter-pillar {
  border-left: 3px solid var(--enamel-cobalt);
  padding-left: 12px;
}

.charter-pillar h4 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.charter-pillar p {
  font-size: 0.86rem;
  color: var(--ink-warm);
}

.order-dispatch-card {
  border: var(--rule-heavy);
  background: var(--paper-manila);
  padding: 22px;
  box-shadow: var(--shadow-litho);
  position: relative;
}

/* Responsive Breakpoints (Tablet & 390px Phone) */
@media (max-width: 1040px) {
  .masthead-hero-grid,
  .exhibit-inner,
  .exhibit-spread:nth-child(even) .exhibit-inner,
  .curio-featured-banner,
  .guild-colophon {
    grid-template-columns: 1fr;
  }

  .masthead-editorial,
  .exhibit-art-col,
  .exhibit-spread:nth-child(even) .exhibit-art-col {
    border-right: none;
    border-left: none;
    border-bottom: var(--rule-heavy);
    order: 0;
  }

  .exhibit-spread:nth-child(even) .exhibit-spec-col {
    order: 1;
  }

  .curio-drawer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .catalogue-shell {
    margin: 8px auto 28px;
    padding: 0 8px;
  }

  .masthead-meta-strip {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 8px 12px;
  }

  .masthead-meta-right {
    text-align: center;
  }

  .top-ribbon {
    padding: 10px 12px;
  }

  .masthead-editorial,
  .masthead-diorama-col,
  .exhibit-art-col,
  .exhibit-spec-col,
  .curio-shelf-section,
  .guild-colophon {
    padding: 18px 14px;
  }

  .diorama-legend-bar,
  .apparatus-grid,
  .mainspring-ledger,
  .curio-drawer-grid,
  .charter-pillars,
  .guild-manifesto-list {
    grid-template-columns: 1fr;
  }

  .ledger-col:first-child {
    border-right: none;
    border-bottom: var(--rule-thin);
  }

  .diorama-pin {
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -14px;
    font-size: 0.66rem;
  }
}
