/* Theme inspiration pages (/themes/*.html) — sits on top of home.css and
   games.css. Only what these pages add: the kit gallery, palette swatches,
   the type sample, inspo columns, the buy box, the hub tiles. The preview
   stage itself comes from home.css. */

.theme-hero .hero-desc { max-width: 40em; }

.theme-stage[data-pt="rodeo"] .ps-brand { font-family: var(--p-display); font-style: italic; }
/* the pages use the real ground behind the stage; the stage keeps the theme's own edge */
.theme-demo .theme-stage .ps-motif { height: 110px; }
.theme-stage[data-pt="lace"] .ps-motif { height: 72px; }
.theme-stage[data-pt="victorian"] .ps-motif,
.theme-stage[data-pt="unwind"] .ps-motif { height: 150px; }

/* the kit */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1.5rem;
}
.kit-piece { margin: 0; }
.kit-art {
  --kit-bg: var(--bg-card);
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: var(--kit-bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.kit-art img { position: absolute; inset: 1.5rem; width: calc(100% - 3rem); height: calc(100% - 3rem); object-fit: contain; }
.kit-piece[data-pt="rodeo"] .kit-art { --kit-bg: #ffffff; }
.kit-piece[data-pt="lace"] .kit-art { --kit-bg: #fbf8f2; }
.kit-piece[data-pt="victorian"] .kit-art { --kit-bg: #fdf9f5; }
.kit-piece[data-pt="unwind"] .kit-art { --kit-bg: #f9f7f1; }
.kit-piece figcaption { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.2rem; }
.kit-piece figcaption strong { font-family: var(--font-display); font-weight: 400; font-size: 1.125rem; }
.kit-piece figcaption span { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.45; }

/* palette & type */
.palette {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.25rem;
  margin: 0 0 2.5rem;
  padding: 0;
}
.palette li { display: flex; flex-direction: column; gap: 0.35rem; }
.palette .swatch { display: block; height: 4.5rem; background: var(--sw); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 2px; }
.palette strong { font-weight: 500; font-size: 0.875rem; }
.palette code { font-family: 'Courier Prime', ui-monospace, monospace; font-size: 0.75rem; color: var(--ink-soft); }

.type-sample { border-top: 1px solid var(--rule); padding-top: 2rem; max-width: 42rem; }
.type-display { font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.05; font-style: italic; margin: 0 0 0.25rem; }
.type-script { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; margin: 0 0 0.75rem; color: var(--ink-soft); }
.type-sample[data-pt="rodeo"] .type-display { font-style: normal; text-transform: uppercase; letter-spacing: 0.06em; font-size: clamp(1.75rem, 4.5vw, 3rem); }

/* inspo */
.inspo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0 3rem;
  border-top: 1px solid var(--rule);
}
.inspo-block { padding: 1.75rem 0; border-bottom: 1px solid var(--rule); }
.inspo-block h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin: 0 0 0.75rem; }
.inspo-block ul { list-style: none; margin: 0; padding: 0; }
.inspo-block li { position: relative; padding: 0.4rem 0 0.4rem 1.5rem; color: var(--ink-soft); line-height: 1.55; }
.inspo-block li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* the buy box */
.buy-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem 3rem;
  align-items: center;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--rule-dark);
  background: var(--bg-card);
}
.buy-box .price-amount { margin: 0.5rem 0 1rem; }
.buy-box p:last-child { color: var(--ink-soft); }
.buy-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
@media (max-width: 40rem) { .buy-box { grid-template-columns: 1fr; } }

/* other themes: the circle swatch (home.css) in place of the number */
.theme-card-link .t-swatch { margin-bottom: 0.25rem; }

/* the hub: a collection, browsed like a lookbook */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.theme-tile {
  display: flex; flex-direction: column; gap: 0;
  padding: 1.75rem;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
a.theme-tile:hover { background: var(--bg); }
.theme-tile-art {
  aspect-ratio: 4 / 3;
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  background: var(--tile-bg, var(--bg-card));
  margin-bottom: 1.5rem;
}
.theme-tile-art img { position: absolute; inset: 1.25rem; width: calc(100% - 2.5rem); height: calc(100% - 2.5rem); object-fit: contain; }
.theme-tile-art[data-pt="rodeo"] { --tile-bg: #ffffff; }
.theme-tile-art[data-pt="lace"] { --tile-bg: url('/themes/lace/tile.jpg') center / 420px auto; }
.theme-tile-art[data-pt="victorian"] { --tile-bg: url('/themes/victorian/doily.jpg') center / cover; }
.theme-tile-art[data-pt="unwind"] { --tile-bg: url('/themes/unwind/tile.jpg') center / 420px auto; }
/* themes without a kit yet: a typographic mark on the theme's own ground */
.tile-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 9em;
}
.theme-tile-art[data-pt="garden"] { --tile-bg: #eef0e4; color: #41552f; font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif; }
.theme-tile-art[data-pt="garden"] .tile-mark { font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif; font-weight: 500; }
.theme-tile-art[data-pt="riviera"] {
  --tile-bg: repeating-linear-gradient(90deg, #e3ecf0 0 22px, #f6f1e6 22px 44px);
  color: #b3552e;
}
.theme-tile-art[data-pt="riviera"] .tile-mark { background: rgba(246, 241, 230, 0.85); padding: 0.5rem 1.25rem; font-style: normal; letter-spacing: 0.02em; }
.theme-tile h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.625rem; line-height: 1.15; margin: 0 0 0.6rem; }
.theme-tagline { font-family: var(--font-body); font-weight: 600; font-size: 0.9375rem; line-height: 1.4; margin: 0 0 0.6rem; color: var(--ink); }
.theme-tile p { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.55; margin: 0; }
.theme-tile p:not(.theme-tagline) { flex: 1; margin-bottom: 1.5rem; }
.theme-tile .text-link { align-self: flex-start; }
.theme-tile.is-soon .theme-tile-art { opacity: 0.85; }
.theme-soon { align-self: flex-start; color: var(--ink-soft); }
