/*
 * tp-shared.css — Shared design system for all Ticpoi web-html page blocks.
 *
 * Usage: add <link rel="stylesheet" href="../tp-shared.css"> (adjust path per
 * subfolder depth) to every HTML fragment. Then add class="tp-page-root" to
 * the root <div>.  Each page only needs to declare its own CSS variables and
 * any page-specific component styles inside its own <style> block.
 *
 * Prefixes:
 *   CSS variables  : --tp-*
 *   CSS classes    : .tp-*
 *   Root class     : .tp-page-root
 */

/* =========================================================
   RESET
   ========================================================= */
.tp-page-root,
.tp-page-root *,
.tp-page-root *::before,
.tp-page-root *::after {
  box-sizing: border-box;
}

/* =========================================================
   DESIGN TOKENS — LIGHT MODE (defaults)
   ========================================================= */
.tp-page-root {
  /* Brand colours */
  --tp-primary:       #6366f1;
  --tp-primary-2:     #7c3aed;
  --tp-accent:        #0ea5e9;
  --tp-green:         #059669;
  --tp-amber:         #d97706;
  --tp-red:           #dc2626;

  /* Text */
  --tp-text:          #0f172a;
  --tp-muted:         #475569;
  --tp-dim:           #64748b;

  /* Surfaces */
  --tp-surface:       rgba(255,255,255,0.82);
  --tp-surface-solid: #ffffff;
  --tp-surface-2:     #eef2ff;
  --tp-surface-3:     #e2e8f0;

  /* Borders */
  --tp-border:        rgba(15,23,42,0.08);
  --tp-border-strong: rgba(99,102,241,0.18);

  /* Soft tints */
  --tp-primary-soft:   rgba(99,102,241,0.10);
  --tp-primary-2-soft: rgba(124,58,237,0.10);
  --tp-cyan-soft:      rgba(14,165,233,0.10);
  --tp-green-soft:     rgba(5,150,105,0.10);
  --tp-amber-soft:     rgba(217,119,6,0.10);
  --tp-red-soft:       rgba(220,38,38,0.10);

  /* Shadows */
  --tp-shadow:        0 28px 80px rgba(15,23,42,0.12);
  --tp-shadow-soft:   0 16px 40px rgba(15,23,42,0.08);

  /* Typography */
  font-family: 'Space Grotesk','Segoe UI','Inter',Roboto,sans-serif;
  color: var(--tp-text);

  /* Default page background */
  background:
    radial-gradient(circle at top left,  rgba(99,102,241,0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(14,165,233,0.12), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 32%, #eef2ff 100%);
}

/* =========================================================
   DESIGN TOKENS — DARK MODE
   ========================================================= */
html[data-theme="dark"] .tp-page-root {
  --tp-surface:       rgba(15,23,42,0.80);
  --tp-surface-solid: #0f172a;
  --tp-surface-2:     #111c34;
  --tp-surface-3:     #1e293b;
  --tp-border:        rgba(255,255,255,0.08);
  --tp-border-strong: rgba(129,140,248,0.26);
  --tp-text:          #f8fafc;
  --tp-muted:         #cbd5e1;
  --tp-dim:           #94a3b8;
  --tp-primary:       #818cf8;
  --tp-primary-2:     #a855f7;
  --tp-accent:        #38bdf8;
  --tp-green:         #34d399;
  --tp-amber:         #fbbf24;
  --tp-red:           #f87171;
  --tp-primary-soft:   rgba(129,140,248,0.14);
  --tp-primary-2-soft: rgba(168,85,247,0.14);
  --tp-cyan-soft:      rgba(56,189,248,0.14);
  --tp-green-soft:     rgba(52,211,153,0.12);
  --tp-amber-soft:     rgba(251,191,36,0.12);
  --tp-red-soft:       rgba(248,113,113,0.12);
  --tp-shadow:        0 28px 80px rgba(2,6,23,0.52);
  --tp-shadow-soft:   0 16px 40px rgba(2,6,23,0.36);
  background:
    radial-gradient(circle at top left,  rgba(99,102,241,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(59,130,246,0.16), transparent 22%),
    linear-gradient(180deg, #020617 0%, #070b14 34%, #0b1120 100%);
}

/* =========================================================
   BASE
   ========================================================= */
.tp-page-root a       { color: inherit; text-decoration: none; }
.tp-page-root section { position: relative; }

/* =========================================================
   LAYOUT
   ========================================================= */
.tp-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 28px;
}

.tp-section { padding: 88px 0; }

.tp-hero {
  padding: 52px 0 72px;
  overflow: hidden;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(420px,0.92fr);
  align-items: center;
  gap: 44px;
}

.tp-grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.tp-grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.tp-grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.tp-eyebrow,
.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--tp-primary-soft);
  color: var(--tp-primary);
}
.tp-eyebrow::before,
.tp-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
}

/* Pill — three colour variants */
.tp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--tp-cyan-soft);
  color: var(--tp-accent);
}
.tp-pill.green  { background: var(--tp-green-soft);     color: var(--tp-green); }
.tp-pill.purple { background: var(--tp-primary-2-soft); color: var(--tp-primary-2); }

.tp-title {
  font-size: clamp(2.2rem,4vw,4.7rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 18px 0;
  max-width: 820px;
}

.tp-section-title {
  font-size: clamp(1.9rem,2.8vw,3.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 18px 0;
}

.tp-title span,
.tp-section-title span {
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-2) 60%, var(--tp-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tp-lead {
  max-width: 720px;
  font-size: 1.06rem;
  color: var(--tp-muted);
  line-height: 1.76;
}

.tp-copy {
  color: var(--tp-muted);
  font-size: 1rem;
  line-height: 1.76;
  margin: 0;
}

/* =========================================================
   ACTIONS / BUTTONS
   ========================================================= */
.tp-actions,
.tp-proof,
.tp-anchor-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.tp-actions      { margin-top: 28px; }
.tp-proof        { margin-top: 22px; }
.tp-anchor-list  { margin-top: 18px; }

.tp-btn-primary,
.tp-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tp-btn-primary:hover,
.tp-btn-secondary:hover { transform: translateY(-2px); }

.tp-btn-primary {
  padding: 15px 22px;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-2) 100%);
  box-shadow: 0 16px 30px rgba(99,102,241,0.24);
}

.tp-btn-secondary {
  padding: 14px 20px;
  color: var(--tp-text);
  border: 1px solid var(--tp-border);
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .tp-btn-secondary { background: rgba(15,23,42,0.72); }

.tp-proof span,
.tp-anchor-list a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--tp-border);
  color: var(--tp-dim);
  font-size: 0.88rem;
  font-weight: 700;
}
html[data-theme="dark"] .tp-proof span,
html[data-theme="dark"] .tp-anchor-list a { background: rgba(15,23,42,0.72); }

/* =========================================================
   COMPONENTS — PANEL
   ========================================================= */
.tp-panel,
.tp-card,
.tp-stat,
.tp-step,
.tp-faq {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 24px;
  box-shadow: var(--tp-shadow-soft);
  backdrop-filter: blur(14px);
}

.tp-panel {
  position: relative;
  padding: 28px;
  border-color: var(--tp-border-strong);
  box-shadow: var(--tp-shadow);
  overflow: hidden;
}
.tp-panel::before {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.44;
  background: rgba(99,102,241,0.18);
  right: -32px; top: -38px;
}
.tp-panel::after {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0.44;
  background: rgba(14,165,233,0.18);
  left: -22px; bottom: -38px;
}

/* =========================================================
   COMPONENTS — WINDOW (mock browser/app frame)
   ========================================================= */
.tp-window {
  position: relative;
  z-index: 1;
  padding: 18px;
  background: var(--tp-surface-solid);
  border: 1px solid var(--tp-border);
  border-radius: 22px;
}

.tp-window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--tp-border);
}

.tp-dots { display: flex; gap: 6px; }
.tp-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--tp-surface-2);
}

.tp-window-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tp-dim);
}

/* =========================================================
   COMPONENTS — CARDS / STATS / STEPS / FAQ
   ========================================================= */
.tp-stat,
.tp-card,
.tp-step,
.tp-faq { padding: 24px; }

.tp-stat:hover,
.tp-card:hover,
.tp-step:hover { transform: translateY(-2px); transition: transform 0.2s ease; }

.tp-stat-value {
  font-size: clamp(1.8rem,2.4vw,2.7rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}
.tp-stat-value span {
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tp-stat-label {
  margin-top: 8px;
  color: var(--tp-dim);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99,102,241,0.14), rgba(14,165,233,0.14));
  color: var(--tp-primary);
  font-size: 1.1rem;
  font-weight: 900;
}

.tp-card h3 { margin: 14px 0 10px; font-size: 1.15rem; line-height: 1.22; letter-spacing: -0.03em; }
.tp-card p,
.tp-step p  { margin: 0; }

.tp-step { position: relative; overflow: hidden; }
.tp-step::after {
  content: '';
  position: absolute;
  inset: auto 24px 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tp-primary), var(--tp-accent));
  opacity: 0.5;
}

.tp-step-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--tp-primary-soft);
  color: var(--tp-primary);
  margin-bottom: 14px;
}
.tp-step-index::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
}
.tp-step h3 { margin: 0 0 10px; font-size: 1.12rem; letter-spacing: -0.02em; }

.tp-faq { display: grid; gap: 12px; }
.tp-faq h3 { margin: 0 0 8px; font-size: 1.1rem; letter-spacing: -0.02em; }
.tp-faq p  { margin: 0; color: var(--tp-muted); line-height: 1.72; }
.tp-faq-num {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tp-dim);
}

/* =========================================================
   COMPONENTS — CTA BAND
   ========================================================= */
.tp-cta { padding: 0 0 96px; }

.tp-cta-band {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 32%),
    linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 28px 70px rgba(79,70,229,0.32);
}
.tp-cta-band::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  width: 220px; height: 220px;
  top: -70px; right: -40px;
}
.tp-cta-band::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  width: 180px; height: 180px;
  bottom: -70px; left: 12%;
}

.tp-cta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
}

.tp-cta-title {
  font-size: clamp(1.9rem,3vw,3rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 14px 0;
}
.tp-cta-title span {
  background: linear-gradient(135deg, #c7d2fe, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tp-cta-copy {
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  max-width: 580px;
}

.tp-cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.tp-cta .tp-btn-primary  { background: #ffffff; color: #312e81 !important; box-shadow: none; }
.tp-cta .tp-btn-secondary {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
  color: #ffffff;
  box-shadow: none;
}

/* =========================================================
   COMPONENTS — SECTION HEADER BLOCK
   ========================================================= */
.tp-section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

/* Muted paragraph variants — all share .tp-copy behaviour */
.tp-section-copy,
.tp-card-copy,
.tp-quote,
.tp-step-copy {
  color: var(--tp-muted);
  font-size: 1rem;
  line-height: 1.72;
}

/* =========================================================
   COMPONENTS — PROOF INLINE (horizontal trust bar)
   ========================================================= */
.tp-proof-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tp-proof-inline strong { color: var(--tp-text); font-size: 0.95rem; }
.tp-proof-inline span  { color: var(--tp-dim);  font-size: 0.92rem; }

/* =========================================================
   COMPONENTS — METRIC CARDS
   ========================================================= */
.tp-metric-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 20px;
  box-shadow: var(--tp-shadow-soft);
  padding: 22px;
}

.tp-metric-value {
  font-size: clamp(1.8rem,3vw,2.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.tp-metric-label {
  color: var(--tp-dim);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================================
   COMPONENTS — LOGO CHIPS / LOGO ROW
   ========================================================= */
.tp-logo-row {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 18px;
  margin-top: 20px;
}

.tp-logo-chip {
  border: 1px solid var(--tp-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.95) 100%);
  box-shadow: var(--tp-shadow-soft);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  text-align: center;
  color: var(--tp-dim);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[data-theme="dark"] .tp-logo-chip {
  background: linear-gradient(180deg, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0.95) 100%);
}

/* =========================================================
   COMPONENTS — SCREENSHOT PLACEHOLDER
   ========================================================= */
.tp-screenshot {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--tp-border-strong);
  box-shadow: var(--tp-shadow);
  background: var(--tp-surface-2);
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--tp-dim);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 28px;
}
.tp-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.tp-screenshot-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--tp-primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tp-primary);
  font-size: 1.8rem;
}
.tp-screenshot-label {
  color: var(--tp-dim);
  font-size: 0.85rem;
  max-width: 240px;
  text-align: center;
  line-height: 1.5;
}
.tp-screenshot-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tp-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tp-screen-full { aspect-ratio: 16/8; border-radius: 28px; margin-top: 32px; }

/* =========================================================
   COMPONENTS — BULLET LIST / MINI LIST
   ========================================================= */
.tp-bullet-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}
.tp-mini-list { display: grid; gap: 10px; }

.tp-bullet-list li,
.tp-mini-list li {
  list-style: none;
  position: relative;
  padding-left: 18px;
  color: var(--tp-muted);
  font-size: 1rem;
  line-height: 1.72;
}
.tp-bullet-list li::before,
.tp-mini-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.74em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-primary-2) 100%);
  transform: translateY(-50%);
}

/* =========================================================
   COMPONENTS — GRID EXTRAS
   ========================================================= */
/* 6-item section — 3 col (same breakpoints as grid-3) */
.tp-grid-6 {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
}

/* Spot / feature highlight — 2-col side-by-side cards */
.tp-spot-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

/* =========================================================
   ANIMATIONS — SCROLL REVEAL (animation variant)
   ========================================================= */
.tp-reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: tpReveal 0.7s ease forwards;
}
.tp-reveal:nth-child(2) { animation-delay: 0.08s; }
.tp-reveal:nth-child(3) { animation-delay: 0.16s; }
.tp-reveal:nth-child(4) { animation-delay: 0.24s; }

@keyframes tpReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .tp-hero-grid,
  .tp-grid-4,
  .tp-grid-3,
  .tp-grid-6   { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tp-hero-grid { grid-template-columns: 1fr; }
  .tp-logo-row  { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .tp-shell        { padding: 0 18px; }
  .tp-section      { padding: 72px 0; }
  .tp-grid-2,
  .tp-grid-3,
  .tp-grid-4,
  .tp-grid-6,
  .tp-spot-grid,
  .tp-logo-row     { grid-template-columns: 1fr; }
  .tp-cta-grid     { grid-template-columns: 1fr; }
  .tp-cta-band     { padding: 28px; }
}
