/* ============================================================
   Tool Preview Landing — shared premium SEO landing styles
   Location: assets/css/pages/tool-preview-landing.css

   Used by tool pages whose full workspace is being prepared, so they
   present polished informational content (hero, benefits, how-it-works,
   use cases, related tools, FAQ, soft CTA) instead of an empty/partial
   UI. Namespaced `.tpl-*`, token-driven (light + dark), responsive,
   and reuses the platform's design language. Kept out of style.css.
   ============================================================ */

.tpl-page { max-width: 1080px; margin: 0 auto; padding: 0 16px 8px; }

/* ---- Hero ---- */
.tpl-hero {
  position: relative;
  margin-top: 8px;
  padding: 30px 28px;
  border-radius: 22px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(120% 130% at 100% 100%, rgba(236, 72, 153, 0.10), transparent 55%),
    var(--bg-card, #fff);
  box-shadow: 0 16px 44px rgba(99, 102, 241, 0.12);
}
.tpl-hero__top { display: flex; align-items: flex-start; gap: 16px; }
.tpl-hero__icon {
  flex-shrink: 0;
  width: 60px; height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.32);
}
.tpl-hero__copy { min-width: 0; }
.tpl-status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.22);
}
.tpl-status-pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.tpl-hero__copy h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 800; letter-spacing: -0.015em; line-height: 1.15;
  color: var(--text, #0f172a);
}
.tpl-hero__lead {
  margin: 0; max-width: 64ch;
  font-size: 14.5px; line-height: 1.6;
  color: var(--text-secondary, #475569);
}
.tpl-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 18px 0 0; padding: 0; list-style: none;
}
.tpl-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text, #0f172a);
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}

/* ---- "Workspace being prepared" notice ---- */
.tpl-notice {
  display: flex; align-items: flex-start; gap: 14px;
  margin-top: 18px; padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: var(--bg-secondary, #f8fafc);
}
.tpl-notice__icon {
  flex-shrink: 0; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; border-radius: 11px;
  background: rgba(99, 102, 241, 0.12);
}
.tpl-notice__body { min-width: 0; }
.tpl-notice__body strong { display: block; font-size: 14.5px; color: var(--text, #0f172a); margin-bottom: 3px; }
.tpl-notice__body p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary, #475569); }

/* ---- Generic section ---- */
.tpl-section { margin-top: 34px; }
.tpl-section__title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 800; letter-spacing: -0.01em;
  color: var(--text, #0f172a);
}
.tpl-section__lead {
  margin: 0 0 16px; max-width: 70ch;
  font-size: 14px; line-height: 1.65; color: var(--text-secondary, #475569);
}
.tpl-prose p { margin: 0 0 12px; max-width: 72ch; font-size: 14px; line-height: 1.7; color: var(--text-secondary, #475569); }
.tpl-prose p:last-child { margin-bottom: 0; }

/* ---- Card grids (benefits, use cases) ---- */
.tpl-cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 16px;
}
.tpl-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-card, #fff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(99, 102, 241, 0.16); border-color: rgba(99, 102, 241, 0.4); }
.tpl-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(236, 72, 153, 0.10));
}
.tpl-card h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text, #0f172a); }
.tpl-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-secondary, #475569); }

/* ---- How it works steps ---- */
.tpl-steps {
  display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.tpl-step {
  position: relative; padding: 18px 16px; border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0); background: var(--bg-card, #fff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.tpl-step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px; margin-bottom: 10px;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}
.tpl-step h3 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--text, #0f172a); }
.tpl-step p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary, #475569); }

/* ---- Related tools ---- */
.tpl-related-grid {
  display: grid; gap: 14px; margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tpl-related-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 18px; border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0); background: var(--bg-card, #fff);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tpl-related-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(99, 102, 241, 0.16); border-color: rgba(99, 102, 241, 0.4); color: inherit; }
.tpl-related-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(236, 72, 153, 0.10));
}
.tpl-related-card__name { font-size: 15px; font-weight: 700; color: var(--text, #0f172a); }
.tpl-related-card__desc { flex: 1 1 auto; margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary, #475569); }
.tpl-related-card__action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #6366f1; }
.tpl-related-card__action::after { content: "\2192"; transition: transform .18s ease; }
.tpl-related-card:hover .tpl-related-card__action::after { transform: translateX(3px); }

/* ---- FAQ accordion ---- */
.tpl-faq { display: grid; gap: 12px; margin-top: 16px; }
.tpl-faq__item {
  border-radius: 14px; border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-card, #fff); overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.tpl-faq__item[open] { border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 8px 22px rgba(99, 102, 241, 0.12); }
.tpl-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 700; color: var(--text, #0f172a);
}
.tpl-faq__q::-webkit-details-marker { display: none; }
.tpl-faq__q::after {
  content: "+"; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center; font-size: 17px; font-weight: 700;
  color: #6366f1; background: rgba(99, 102, 241, 0.10);
}
.tpl-faq__item[open] .tpl-faq__q::after { content: "\2212"; }
.tpl-faq__a { padding: 0 20px 18px; }
.tpl-faq__a p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-secondary, #475569); }

/* ---- Soft CTA ---- */
.tpl-cta {
  margin-top: 34px; padding: 28px 26px; border-radius: 20px; text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.24);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(236, 72, 153, 0.10), transparent 55%),
    var(--bg-card, #fff);
}
.tpl-cta h2 { margin: 0 0 8px; font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 800; color: var(--text, #0f172a); }
.tpl-cta p { margin: 0 auto 18px; max-width: 56ch; font-size: 14px; line-height: 1.6; color: var(--text-secondary, #475569); }
.tpl-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .tpl-hero { padding: 22px 18px; }
  .tpl-hero__top { gap: 13px; }
  .tpl-hero__icon { width: 52px; height: 52px; font-size: 26px; }
  .tpl-cta { padding: 22px 16px; }
  .tpl-cta__actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-card, .tpl-related-card, .tpl-related-card__action::after, .tpl-faq__item { transition: none; }
}

/* ---- Dark mode ---- */
[data-theme="dark"] .tpl-hero {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(120% 130% at 100% 100%, rgba(236, 72, 153, 0.16), transparent 55%),
    var(--bg-card);
  border-color: rgba(129, 140, 248, 0.4); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .tpl-hero__copy h1,
[data-theme="dark"] .tpl-section__title,
[data-theme="dark"] .tpl-card h3,
[data-theme="dark"] .tpl-step h3,
[data-theme="dark"] .tpl-related-card__name,
[data-theme="dark"] .tpl-faq__q,
[data-theme="dark"] .tpl-cta h2,
[data-theme="dark"] .tpl-notice__body strong { color: var(--text); }
[data-theme="dark"] .tpl-hero__lead,
[data-theme="dark"] .tpl-section__lead,
[data-theme="dark"] .tpl-prose p,
[data-theme="dark"] .tpl-card p,
[data-theme="dark"] .tpl-step p,
[data-theme="dark"] .tpl-related-card__desc,
[data-theme="dark"] .tpl-faq__a p,
[data-theme="dark"] .tpl-cta p,
[data-theme="dark"] .tpl-notice__body p { color: #cbd5e1; }
[data-theme="dark"] .tpl-badge {
  background: rgba(148, 163, 184, 0.10); border-color: rgba(148, 163, 184, 0.22); color: var(--text);
}
[data-theme="dark"] .tpl-card,
[data-theme="dark"] .tpl-step,
[data-theme="dark"] .tpl-related-card,
[data-theme="dark"] .tpl-faq__item { background: var(--bg-card); border-color: rgba(148, 163, 184, 0.22); box-shadow: none; }
[data-theme="dark"] .tpl-card:hover,
[data-theme="dark"] .tpl-related-card:hover { border-color: rgba(129, 140, 248, 0.55); background: var(--bg-secondary); }
[data-theme="dark"] .tpl-status-pill,
[data-theme="dark"] .tpl-related-card__action { color: #c4b5fd; }
[data-theme="dark"] .tpl-notice,
[data-theme="dark"] .tpl-cta { background: var(--bg-card); border-color: rgba(129, 140, 248, 0.35); }
[data-theme="dark"] .tpl-faq__item[open] { border-color: rgba(129, 140, 248, 0.5); box-shadow: none; }
