/* =========================================================
   SnapTik — dark theme, purple primary, rounded "node card"
   layout inspired by n8n's canvas/panel aesthetic.
   ========================================================= */

:root {
  --bg:            #0d0b16;
  --bg-soft:       #121020;
  --panel:         #171325;
  --panel-2:       #1e1930;
  --border:        #2c2542;
  --border-soft:   #231d38;

  --purple-900:    #3b1d78;
  --purple-700:    #6d28d9;
  --purple-600:    #7c3aed;
  --purple-500:    #8b5cf6;
  --purple-400:    #a78bfa;
  --pink-400:      #e879f9;

  --text:          #f2eefb;
  --text-dim:      #b7aed1;
  --text-faint:    #7e759b;

  --success:       #34d399;
  --danger:        #f87171;

  --radius-xl:      28px;
  --radius-lg:      22px;
  --radius-md:      16px;
  --radius-sm:      10px;

  --shadow-glow:   0 0 0 1px var(--border), 0 20px 60px -20px rgba(124, 58, 237, 0.45);
  --shadow-card:   0 1px 0 rgba(255,255,255,0.03) inset, 0 10px 30px -18px rgba(0,0,0,0.6);

  --font-head: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(124,58,237,0.20), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, rgba(232,121,249,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { color: var(--text-dim); margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- node-grid background used behind hero ---------- */
.node-canvas {
  position: relative;
  overflow: hidden;
}
.node-canvas::before {
  content: "";
  position: absolute;
  inset: -1px;
  background-image:
    radial-gradient(circle, rgba(139,92,246,0.35) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 85%);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(13, 11, 22, 0.75);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-500), var(--pink-400));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 6px 18px -6px rgba(139,92,246,0.7);
}
.nav-links {
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 999px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--panel-2); }
.nav-links a.active { color: var(--text); background: var(--purple-600); }
.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px -8px rgba(139,92,246,0.8);
}
.nav-toggle { display: none; }

@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
}

/* ---------- hero / tool panel ---------- */
.hero {
  padding: 64px 0 40px;
}
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--purple-400);
  font-size: 0.82rem;
  margin-bottom: 20px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(52,211,153,0.15); }

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  max-width: 15ch;
}
.hero .lede {
  max-width: 56ch;
  font-size: 1.08rem;
  color: var(--text-dim);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.tool-card {
  margin-top: 32px;
  padding: 10px;
  border-radius: calc(var(--radius-xl) + 8px);
  background: linear-gradient(160deg, rgba(139,92,246,0.35), rgba(232,121,249,0.08));
}
.tool-card-inner {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.download-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.download-form input[type="url"] {
  flex: 1 1 320px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.download-form input[type="url"]::placeholder { color: var(--text-faint); }
.download-form input[type="url"]:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.25);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  padding: 16px 26px;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(139,92,246,0.75);
}
.btn-primary:hover { box-shadow: 0 14px 32px -8px rgba(139,92,246,0.9); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--panel); }
.btn-sm { padding: 10px 16px; font-size: 0.88rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.form-hint { font-size: 0.85rem; color: var(--text-faint); margin-top: 10px; }

/* ---------- result card ---------- */
#result { margin-top: 22px; }
.result-card {
  display: none;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  gap: 20px;
  animation: pop-in 0.25s ease;
}
.result-card.is-visible { display: flex; }
@media (max-width: 640px) { .result-card { flex-direction: column; } }

.result-thumb {
  flex: 0 0 150px;
  width: 150px;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }

.result-body { flex: 1; min-width: 0; }
.result-title { font-weight: 600; margin-bottom: 4px; }
.result-meta { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 16px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.status-msg {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}
.status-msg.is-visible { display: block; }
.status-msg.loading { background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.35); color: var(--purple-400); }
.status-msg.error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.35); color: var(--danger); }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- generic section ---------- */
.section { padding: 56px 0; }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head .kicker {
  color: var(--purple-400);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---------- steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 780px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.step-num {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  color: var(--purple-400);
  font-weight: 700;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 1.05rem; }
.step-card p { font-size: 0.93rem; margin: 0; }

/* connector line between step cards on desktop */
.steps-grid .step-card:not(:last-child)::after {
  content: "";
  display: none;
}
@media (min-width: 781px) {
  .steps-grid { position: relative; }
}

/* ---------- feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature-card:hover { border-color: var(--purple-500); transform: translateY(-2px); }
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(232,121,249,0.15));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 1.1rem;
}
.feature-card h3 { font-size: 1rem; }
.feature-card p { font-size: 0.9rem; margin: 0; }

/* ---------- FAQ accordion ---------- */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
}
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron {
  color: var(--purple-400);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item[open] summary .chevron { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--text-dim); font-size: 0.92rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  background: linear-gradient(135deg, var(--purple-900), var(--purple-700) 60%, #a21caf);
  box-shadow: var(--shadow-glow);
}
.cta-banner h2 { margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 46ch; margin: 0 auto 24px; }
.cta-banner .btn-ghost { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); color: #fff; }
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* ---------- simple content pages (about/contact/privacy) ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose ul { color: var(--text-dim); padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.86rem; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.field textarea { resize: vertical; min-height: 130px; }

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; }
.info-list .ico {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 28px;
}
.footer-col h4 { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 12px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.92rem; margin-bottom: 9px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 20px; border-top: 1px solid var(--border-soft);
  color: var(--text-faint); font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(52,211,153,0.12);
  color: var(--success);
  border: 1px solid rgba(52,211,153,0.3);
}
