/* ============================================================
   HigherStack Forms — public templates pages
   Depends on landing.css tokens + .browser frame.
   ============================================================ */

/* ---------- gallery ---------- */
.tpl-gallery { padding-top: 92px; }
.tpl-tabs { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 0 0 30px; }
.tpl-tab { font-size: 13px; font-weight: 600; padding: 7px 15px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: .15s; }
.tpl-tab:hover { border-color: var(--line-strong); color: var(--text); }
.tpl-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tpl-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.tpl-card-cov { height: 132px; background-size: cover; background-position: center; position: relative; background-color: var(--panel); }
.tpl-badge { position: absolute; top: 11px; left: 11px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(10,10,11,.72); backdrop-filter: blur(4px); padding: 4px 10px; border-radius: var(--r-pill); }
.tpl-card-b { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 5px; }
.tpl-card-t { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.tpl-card-d { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.tpl-card-m { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---------- detail ---------- */
.tpl-detail { padding-top: 92px; }
.tpl-detail-grid { display: grid; grid-template-columns: 0.82fr 1fr; gap: 48px; align-items: start; }
.tpl-info { position: sticky; top: 96px; }
.tpl-crumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.tpl-crumb a { color: var(--text-2); text-decoration: none; }
.tpl-crumb a:hover { color: var(--text); }
.tpl-crumb span { margin: 0 5px; }
.tpl-chip { display: inline-block; font-size: 12px; font-weight: 700; color: var(--c, var(--accent));
  background: color-mix(in oklab, var(--c, var(--accent)) 12%, var(--surface)); padding: 4px 11px; border-radius: var(--r-pill); }
.tpl-info h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.07; margin: 12px 0 0; }
.tpl-desc { font-size: 16.5px; color: var(--text-2); margin-top: 14px; line-height: 1.55; }
.tpl-feats { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 11px; }
.tpl-feats li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--text); }
.tpl-feats .ck { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: color-mix(in oklab, var(--ok) 15%, transparent); color: var(--ok); }
.tpl-info .btn.lg { width: 100%; }
.tpl-secondary { margin-top: 9px; }

/* Browser-chrome frame for the live preview. `.browser`/`.bbar`/`.url` in
   landing.css are scoped to `.hero-demo`, so the frame is styled here. It is
   intentionally theme-INDEPENDENT (always light): the form preview should read
   like a screenshot of the deployed form regardless of the marketing page theme.
   The embed renderer's `:host { all: initial }` wipes any background on the mount
   itself, so the light surface lives on `.tpl-preview-body` behind the transparent
   shadow host. */
.tpl-preview .browser { background: #fff; border: 1px solid #e7e9ee; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.tpl-preview .bbar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid #eef0f3; }
.tpl-preview .url { flex: 1; height: 24px; border-radius: 99px; background: #f4f5f7; display: flex; align-items: center; gap: 7px; padding: 0 12px; font-size: 12px; color: #99a0ad; }
.tpl-preview-body { background: #fff; padding: 18px 18px 22px; }
.tpl-preview-note { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 12px; }

.tpl-more { margin-top: 64px; padding-top: 34px; border-top: 1px solid var(--line); }
.tpl-more h3 { font-size: 16px; margin-bottom: 14px; }
.tpl-more-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.tpl-more-row a { font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--r-pill); transition: .15s; }
.tpl-more-row a:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .tpl-detail-grid { grid-template-columns: 1fr; gap: 30px; }
  .tpl-info { position: static; }
}
@media (max-width: 560px) {
  .tpl-grid { grid-template-columns: 1fr; }
}
