/* SignaturePulse — shared styles */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --accent: #7c3aed;
  --good: #059669;
  --warn: #d97706;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .06), 0 24px 48px -16px rgba(15, 23, 42, .18);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; }
a { color: var(--brand); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.brand svg { display: block; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.4); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: #e0e7ff; }
.btn-lg { font-size: 16.5px; padding: 13px 26px; border-radius: 12px; }
.btn-sm { font-size: 13.5px; padding: 7px 12px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn:active { transform: translateY(0); }

/* ---------- hero ---------- */
.hero {
  padding: 84px 0 56px;
  background:
    radial-gradient(1000px 420px at 80% -10%, rgba(124, 58, 237, .10), transparent 60%),
    radial-gradient(900px 400px at 10% -20%, rgba(79, 70, 229, .12), transparent 60%),
    var(--bg);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08; letter-spacing: -.035em; font-weight: 800;
  margin: 0 0 18px;
}
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #e0e7ff;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}

/* ---------- live demo card ---------- */
.demo-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.demo-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.demo-chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.demo-chrome i:nth-child(1) { background: #fda4af; }
.demo-chrome i:nth-child(2) { background: #fcd34d; }
.demo-chrome i:nth-child(3) { background: #86efac; }
.demo-chrome span { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.demo-body { padding: 26px 26px 18px; min-height: 190px; overflow-x: auto; }
.demo-body > div { animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 16px; }
.demo-tabs button {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer;
}
.demo-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- sections ---------- */
section.block { padding: 72px 0; }
section.block.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; margin: 0 0 12px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.feature .icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--brand);
}
.feature h3 { margin: 0 0 8px; font-size: 17.5px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 24px; justify-content: center; }
@media (max-width: 820px) { .pricing { grid-template-columns: minmax(0, 420px); } }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 30px; box-shadow: var(--shadow); position: relative;
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.plan .tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .blurb { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan li { padding: 7px 0 7px 28px; font-size: 14.5px; color: var(--ink-2); position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px;
  background: var(--brand-soft); border-radius: 50%;
}
.plan li::after {
  content: ""; position: absolute; left: 4.5px; top: 14.5px; width: 7px; height: 4.5px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg);
}

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
details.qa {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 0 20px; margin-bottom: 12px; box-shadow: var(--shadow);
}
details.qa summary {
  cursor: pointer; font-weight: 600; font-size: 15.5px; padding: 16px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-size: 20px; color: var(--faint); font-weight: 400; }
details.qa[open] summary::after { content: "–"; }
details.qa p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; background: var(--bg-soft); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13.5px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer nav a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }

/* ---------- app layout ---------- */
.app-main { padding: 32px 0 80px; }
.app-grid { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }
@media (max-width: 980px) { .app-grid { grid-template-columns: 1fr; } }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 24px;
}
.panel h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; }
.panel .hint { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="tel"] {
  width: 100%; font-family: var(--font); font-size: 14.5px; color: var(--ink);
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.field .sub { font-size: 12px; color: var(--faint); margin-top: 4px; }

.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; }

.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] {
  width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer;
}
.color-row code { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.fieldset-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line);
}
.fieldset-label:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* preview side */
.preview-sticky { position: sticky; top: 84px; }
.design-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.design-tabs button {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; transition: all .12s;
}
.design-tabs button:hover { border-color: var(--faint); }
.design-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.preview-frame {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  overflow: hidden;
}
.preview-frame .mail-chrome {
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  padding: 12px 18px; font-size: 13px; color: var(--muted);
}
.preview-frame .mail-chrome b { color: var(--ink-2); font-weight: 600; }
.preview-body { padding: 26px 24px; overflow-x: auto; }
.preview-body .sig-slot { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 14px; }
.preview-body .fake-text { color: var(--ink-2); font-size: 14px; margin: 0 0 4px; }

.actions-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.copied-flash { color: var(--good); font-size: 13.5px; font-weight: 600; align-self: center; }

.install-block { margin-top: 26px; }
.install-block h3 { font-size: 16px; margin: 0 0 12px; }
details.install {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 0 16px; margin-bottom: 10px;
}
details.install summary {
  cursor: pointer; font-weight: 600; font-size: 14px; padding: 12px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details.install summary::-webkit-details-marker { display: none; }
details.install summary::after { content: "+"; color: var(--faint); }
details.install[open] summary::after { content: "–"; }
details.install ol { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; }
details.install li { margin-bottom: 6px; }

/* team page */
.member-row { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr auto; gap: 10px; margin-bottom: 10px; align-items: center; }
@media (max-width: 640px) { .member-row { grid-template-columns: 1fr; } }
.member-row input {
  font-family: var(--font); font-size: 14px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 8px; width: 100%;
}
.member-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.member-row .remove {
  background: none; border: none; color: var(--faint); cursor: pointer; font-size: 18px; padding: 4px 8px;
}
.member-row .remove:hover { color: #dc2626; }

.nudge {
  background: linear-gradient(100deg, var(--brand-soft), #f5f3ff);
  border: 1px solid #e0e7ff; border-radius: var(--radius);
  padding: 16px 18px; margin: 14px 0; font-size: 14px; color: var(--ink-2);
}
.nudge b { color: var(--brand-dark); }
.nudge .btn { margin-top: 10px; }

.result-links { margin-top: 18px; }
.result-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--bg-soft);
}
.result-link .who { font-size: 14px; font-weight: 600; }
.result-link .who small { display: block; font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 12px; word-break: break-all; }

/* member page */
.member-hero { max-width: 720px; margin: 48px auto 0; text-align: center; padding: 0 24px; }
.member-hero h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; margin: 0 0 10px; }
.member-hero p { color: var(--muted); margin: 0 0 28px; }
.member-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; }

/* toast + modal */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 80; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 60;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  max-width: 440px; width: 100%; padding: 28px;
}
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal p { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.modal .field { margin-bottom: 12px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.modal .ok-msg { color: var(--good); font-weight: 600; font-size: 14.5px; }

.spin {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px;
}
.btn-ghost .spin, .btn-soft .spin { border-color: rgba(79,70,229,.3); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.badge-free {
  font-size: 11px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft);
  border-radius: 999px; padding: 2px 9px; vertical-align: middle; margin-left: 8px;
}
