/* Layerbit long-form guide typography.
   Loaded only by pages under /guides/ - additive to css/base.css, so the
   look and feel of the tool pages and homepage is untouched. */

body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-base);
  background-image: var(--bg-gradient);
  min-height: 100dvh;
  padding: 20px 40px;
  position: relative;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-image:
    radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
  background-position: 0 0, 20px 20px;
  z-index: -1;
  pointer-events: none;
  animation: drift 60s linear infinite;
}

/* Scoped to the site nav header only - the article's own <header
   class="article-head"> must not inherit this flex row, or the headline
   gets squeezed into a narrow column beside the standfirst. */
body > header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  max-width: 820px;
  width: 100%;
  margin: 0 auto 40px auto;
}

/* ---- Breadcrumb ---- */
.crumbs {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 22px auto;
  font-size: 0.85em;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.crumbs a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.crumbs a:hover { color: var(--accent-main); }
.crumbs span[aria-current] { color: var(--text-main); }
.crumbs .sep { opacity: 0.4; }

/* ---- Article shell ---- */
.article {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 70px auto;
  flex-grow: 1;
  animation: fadeSlideUp 0.8s ease-out forwards;
}

.article-head { display: block; margin-bottom: 42px; }

.article-kicker {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-main);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.article h1 {
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 18px;
}

.article-standfirst {
  font-size: 1.15em;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 0.85em;
  color: var(--text-muted);
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
}
.article-meta .byline { color: var(--text-main); font-weight: 600; }
.article-meta i, .article-meta svg.lucide { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }

/* ---- Prose ---- */
.prose { font-size: 1.04em; line-height: 1.78; color: #c9d4e2; }

.prose h2 {
  font-size: 1.6em;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
  margin: 52px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  scroll-margin-top: 24px;
}

.prose h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: #fff;
  margin: 34px 0 12px;
  scroll-margin-top: 24px;
}

.prose p { margin-bottom: 20px; }
.prose strong { color: #fff; font-weight: 600; }
.prose em { color: #e2e8f0; }

.prose a {
  color: var(--accent-main);
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  transition: all 0.2s;
}
.prose a:hover { color: #fff; border-bottom-color: #fff; }

.prose ul, .prose ol { margin: 0 0 22px 0; padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose ul li::marker { color: var(--accent-main); }
.prose ol li::marker { color: var(--accent-main); font-weight: 600; }

.prose code {
  font-family: 'Fira Code', monospace;
  font-size: 0.87em;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  padding: 2px 6px;
  color: #a7f3d0;
  word-break: break-word;
}

.prose pre {
  background: rgba(0,0,0,0.42);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent-main);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 24px;
  overflow-x: auto;
  font-size: 0.86em;
  line-height: 1.6;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #d7e3f4;
  font-size: 1em;
  white-space: pre;
  word-break: normal;
}

.prose blockquote {
  margin: 0 0 24px;
  padding: 2px 0 2px 20px;
  border-left: 3px solid rgba(56, 189, 248, 0.5);
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Callout ---- */
.callout {
  background: rgba(56, 189, 248, 0.055);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 26px;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  font-size: 0.98em;
}
.callout-title i, .callout-title svg.lucide { color: var(--accent-main); width: 18px; height: 18px; }
.callout p:last-child { margin-bottom: 0; }

.callout.warn { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.26); }
.callout.warn .callout-title i, .callout.warn .callout-title svg.lucide { color: #ef4444; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin: 0 0 26px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
.prose th, .prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}
.prose th {
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose td code { font-size: 0.85em; }

/* ---- Key-takeaways box ---- */
.takeaways {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 26px 28px;
  margin: 0 0 40px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.takeaways h2 {
  font-size: 1.05em;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.takeaways h2 i, .takeaways h2 svg.lucide { color: var(--accent-main); width: 18px; height: 18px; }
.takeaways ul { margin-bottom: 0; }
.takeaways li { color: var(--text-muted); }

/* ---- Try-the-tool CTA ---- */
.tool-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 22px 26px;
  margin: 38px 0;
}
.tool-cta .cta-copy { flex: 1 1 260px; }
.tool-cta h3 { margin: 0 0 6px; font-size: 1.1em; color: #fff; font-weight: 600; }
.tool-cta p { margin: 0; font-size: 0.92em; color: var(--text-muted); line-height: 1.6; }
.tool-cta .cta-btn {
  flex: 0 0 auto;
  background: var(--neon-gradient);
  color: #041014;
  font-weight: 700;
  font-size: 0.9em;
  border-radius: 10px;
  padding: 12px 22px;
  text-decoration: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
  white-space: nowrap;
}
.tool-cta .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); color: #041014; }
.tool-cta .cta-btn i, .tool-cta .cta-btn svg.lucide { width: 16px; height: 16px; }

/* ---- Further reading ---- */
.further {
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--card-border);
}
.further h2 { font-size: 1.15em; margin: 0 0 16px; padding: 0; border: none; }
.further-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.further-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  display: block;
  transition: all 0.25s;
}
.further-card:hover { border-color: var(--card-hover-border); background: var(--card-hover-bg); transform: translateY(-3px); }
.further-card strong { display: block; color: #fff; font-size: 0.97em; font-weight: 600; margin-bottom: 5px; }
.further-card span { color: var(--text-muted); font-size: 0.85em; line-height: 1.5; }

/* ---- FAB + footer (match the rest of the site) ---- */
.fab {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  background: rgba(20, 22, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  transition: all 0.4s;
  text-decoration: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.fab:hover {
  transform: scale(1.1) translateZ(0);
  border-color: var(--accent-main);
  background: rgba(30, 34, 48, 0.9);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 25px rgba(56, 189, 248, 0.3);
}

footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.95em;
  margin-top: auto;
  width: 100%;
}

@media (max-width: 700px) {
  body { padding: 15px 18px; }
  .article h1 { font-size: 1.95em; }
  .article-standfirst { font-size: 1.02em; }
  .prose { font-size: 1em; }
  .prose h2 { font-size: 1.35em; margin-top: 40px; }
  .tool-cta { padding: 20px; }
  .tool-cta .cta-btn { width: 100%; justify-content: center; }
  .fab { bottom: 20px; left: 20px; width: 50px; height: 50px; }
}
