/* ============ Spellro marketing site — shared styles ============ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #14132b;
  --canvas: #fafaff;
  --panel: #f1f0fc;
  --panel-deep: #e7e4fb;
  --primary: #4f48ff;
  --primary-deep: #332db8;
  --accent: #00d9a3;
  --muted: #6b6893;
  --border: #e3e1fa;
  --radius: 14px;
  --max: 1120px;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

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

p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.brand img { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-deep); transform: translateY(-1px); }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 72, 255, 0.28);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-deep); }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero-sub {
  font-size: 17.5px;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 30px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-trust span::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* ---------- Signature: live correction demo ---------- */

.demo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(20, 19, 43, 0.1);
  padding: 26px;
  position: relative;
}

.demo-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.demo-card-head span:last-child {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.demo-field {
  background: var(--panel);
  border-radius: 12px;
  padding: 20px 20px 18px;
  min-height: 92px;
  font-family: var(--font-mono);
  font-size: 15px;
  position: relative;
  display: flex;
  align-items: center;
}

.demo-text-before, .demo-text-after {
  grid-area: 1 / 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-text-stack {
  display: grid;
  width: 100%;
}

.demo-text-before { color: #a09df2; }
.demo-text-after { color: var(--ink); font-weight: 500; }

.demo-icon {
  position: absolute;
  bottom: -10px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(79, 72, 255, 0.35);
}
.demo-icon img { width: 20px; height: 20px; }

.demo-dots {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  justify-content: center;
}
.demo-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--panel-deep);
  animation: spellro-pulse 1.6s ease-in-out infinite;
}
.demo-dots span:nth-child(2) { animation-delay: 0.18s; }
.demo-dots span:nth-child(3) { animation-delay: 0.36s; }
.demo-dots span:nth-child(4) { animation-delay: 0.54s; }
.demo-dots span:nth-child(5) { animation-delay: 0.72s; }

@keyframes spellro-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); background: var(--panel-deep); }
  50% { opacity: 1; transform: scale(1.3); background: var(--primary); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-dots span { animation: none; opacity: 0.6; }
  .demo-text-before, .demo-text-after { transition: none; }
}

/* ---------- Sections ---------- */

.section { padding: 76px 0; }
.section-alt { background: var(--panel); }
.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.section-alt .feature-card { background: #fff; }

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 18px;
}

.feature-card h3 { font-size: 18.5px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14.5px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

.shortcut-demo {
  font-family: var(--font-mono);
  background: var(--ink);
  color: #e4e3ff;
  border-radius: 12px;
  padding: 22px 24px;
  font-size: 14.5px;
  overflow-x: auto;
}
.shortcut-demo .k { color: #8f8cff; }
.shortcut-demo .arrow { color: var(--accent); }

.cta-band {
  background: linear-gradient(135deg, var(--primary), #6f68ff);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  color: #fff;
  margin: 0 24px;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 28px; font-size: 15.5px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-deep); box-shadow: none; }
.cta-band .btn-primary:hover { background: #f1f0ff; }

/* ---------- Simple content pages (privacy/terms/contact) ---------- */

.page-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: clamp(28px, 3.6vw, 40px); }
.page-header .updated { color: var(--muted); font-size: 13.5px; margin-top: 10px; font-family: var(--font-mono); }

.prose { max-width: 760px; margin: 0 auto; padding: 52px 24px 90px; }
.prose h2 { font-size: 20px; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #322f57; font-size: 15.5px; margin-bottom: 14px; }
.prose ul { padding-left: 22px; margin: 0 0 14px; }
.prose a { color: var(--primary-deep); text-decoration: underline; }
.prose strong { color: var(--ink); }
.prose .callout {
  background: var(--panel);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--ink);
  margin: 24px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 44px auto 0;
  padding: 0 24px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-card .label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-card .value { font-size: 16px; font-weight: 600; }
.contact-card a.value { text-decoration: none; color: var(--primary-deep); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.footer-brand img { width: 26px; height: 26px; }
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--ink); font-size: 14.5px; }
.footer-col a:hover { color: var(--primary); }
.footer-blurb { color: var(--muted); font-size: 14px; max-width: 300px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.footer-bottom a { text-decoration: none; color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .cta-band { padding: 40px 26px; }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-hidden] { color: var(--border); }

/* ---------- Comparison table ---------- */

.compare-table-wrap {
  overflow-x: auto;
  margin: 40px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14.5px;
  min-width: 560px;
}
table.compare-table th, table.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.compare-table th {
  font-family: var(--font-display);
  font-size: 14px;
  background: var(--panel);
}
table.compare-table th:first-child, table.compare-table td:first-child {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
table.compare-table td.yes { color: #0a8a5f; font-weight: 600; }
table.compare-table td.no { color: #a3a1c2; }
table.compare-table tbody tr:last-child td { border-bottom: none; }
table.compare-table td.hl, table.compare-table th.hl { background: #f4f3ff; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 12px;
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 16px; color: var(--muted); font-size: 14.5px; }

/* ---------- Blog ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,19,43,0.08); }
.blog-card .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-deep);
  margin-bottom: 10px;
}
.blog-card h3 { font-size: 16.5px; margin-bottom: 8px; line-height: 1.3; }
.blog-card p { color: var(--muted); font-size: 13.5px; flex: 1; }
.blog-card .read-more { font-size: 13px; font-weight: 600; color: var(--primary); margin-top: 14px; }

.post-header { padding: 40px 0 0; }
.post-meta { color: var(--muted); font-size: 13px; font-family: var(--font-mono); margin-top: 14px; }
.post-body { max-width: 720px; margin: 0 auto; padding: 40px 24px 90px; }
.post-body h2 { font-size: 22px; margin: 38px 0 14px; }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { font-size: 17.5px; margin: 26px 0 10px; }
.post-body p, .post-body li { color: #322f57; font-size: 16px; margin-bottom: 15px; line-height: 1.7; }
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 16px; }
.post-body a { color: var(--primary-deep); text-decoration: underline; }
.post-body strong { color: var(--ink); }
.post-cta {
  background: var(--panel);
  border-radius: 14px;
  padding: 26px 28px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.post-cta p { margin: 0; color: var(--ink); font-weight: 600; font-size: 15px; }
.post-cta .btn { flex-shrink: 0; padding: 10px 20px; font-size: 14px; }

.related-posts {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 70px;
}
.related-posts h2 { font-size: 19px; margin-bottom: 18px; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-list a {
  text-decoration: none;
  color: var(--primary-deep);
  font-size: 14.5px;
  font-weight: 500;
}
.related-list a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .blog-grid { grid-template-columns: 1fr; }
  .compare-table-wrap { -webkit-overflow-scrolling: touch; }
}
