/* ============================================================
   bestformbuilders.net — design system
   Dark, premium aesthetic: deep space background, violet/cyan
   glow gradients, grotesque headings with serif-italic accents.
   ============================================================ */

:root {
  --bg: #08070f;
  --bg-raise: #0e0d1a;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #edecf7;
  --text-soft: #b6b4cc;
  --text-faint: #8a88a3;
  --accent: #8b7cff;
  --accent-soft: #b3a8ff;
  --accent-2: #4dc3ff;
  --gold: #f5c97b;
  --green: #6fe3a5;
  --red: #ff8f8f;
  --grad: linear-gradient(100deg, #8b7cff 0%, #4dc3ff 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-serif: "Instrument Serif", Georgia, serif;
  --max: 1120px;
  --max-prose: 760px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: #d4cdff; }
button { font: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* serif italic accent, the signature flourish */
.fancy {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  background: linear-gradient(100deg, #c3b8ff 0%, #7fd4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #0a0918;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 7, 15, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { height: 30px; width: auto; }
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card-hover); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-card-hover); }
.nav-cta {
  background: var(--grad);
  color: #0a0918 !important;
  font-weight: 600 !important;
}
.nav-cta:hover { filter: brightness(1.1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 4rem;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(42% 55% at 30% 28%, rgba(139, 124, 255, 0.22), transparent 70%),
    radial-gradient(38% 50% at 72% 18%, rgba(77, 195, 255, 0.16), transparent 70%),
    radial-gradient(30% 42% at 55% 70%, rgba(255, 122, 196, 0.07), transparent 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  max-width: 21ch;
  margin: 1.1rem auto 0;
}
.hero .lede {
  max-width: 58ch;
  margin: 1.4rem auto 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  background: rgba(139, 124, 255, 0.07);
}
.hero-meta {
  margin-top: 1.6rem;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.hero-meta strong { color: var(--text-soft); font-weight: 600; }

/* ---------- Generic sections ---------- */
.section { padding: 3.5rem 0; }
.section--raise {
  background: var(--bg-raise);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { max-width: var(--max-prose); margin: 0 auto 2.2rem; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--text-soft); margin-top: 0.8rem; }
.prose { max-width: var(--max-prose); margin: 0 auto; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); margin: 2.4rem 0 1rem; }
.prose h3 { font-size: 1.25rem; margin: 1.8rem 0 0.7rem; }
.prose p { margin: 0 0 1.1rem; color: var(--text-soft); }
.prose ul, .prose ol { color: var(--text-soft); padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose li { margin: 0.35rem 0; }
.prose strong { color: var(--text); }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 3rem;
}
.stat { background: var(--bg-raise); padding: 1.4rem 1rem; text-align: center; }
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Comparison table ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raise);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.94rem; }
caption {
  text-align: left;
  padding: 1.1rem 1.2rem 0.4rem;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.9rem;
}
th, td { padding: 0.85rem 1.2rem; text-align: left; border-top: 1px solid var(--border); }
thead th {
  border-top: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  font-weight: 600;
}
tbody th { font-weight: 600; white-space: nowrap; }
tbody tr:hover td, tbody tr:hover th { background: var(--bg-card-hover); }
td { color: var(--text-soft); }
.rating { color: var(--gold); font-weight: 600; white-space: nowrap; }

/* ---------- Tool review cards ---------- */
.tool-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  margin-top: 2rem;
  scroll-margin-top: 90px;
}
.tool-card--winner {
  border-color: rgba(139, 124, 255, 0.45);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(139, 124, 255, 0.12), transparent 55%),
    var(--bg-card);
}
.tool-head { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.tool-rank {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a0918;
  background: var(--grad);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
  white-space: nowrap;
}
.tool-head h3 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.tool-tag { color: var(--accent-soft); font-size: 0.9rem; font-weight: 500; }
.tool-ratings {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-faint);
}
.tool-ratings .rating { color: var(--gold); }
.tool-body { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-top: 1.2rem; }
@media (min-width: 880px) {
  .tool-body { grid-template-columns: 1.15fr 1fr; align-items: start; }
}
.tool-body p { color: var(--text-soft); margin-bottom: 1rem; }
.tool-shot {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #11101f;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
}
.tool-shot img { width: 100%; height: auto; }
.tool-shot figcaption { font-size: 0.8rem; color: var(--text-faint); padding: 0.55rem 0.9rem; border-top: 1px solid var(--border); }

/* pros & cons */
.pros-cons { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 680px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pc {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  background: var(--bg-raise);
}
.pc h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.5rem; }
.pc--pros h4 { color: var(--green); }
.pc--cons h4 { color: var(--red); }
.pc ul { list-style: none; padding: 0; font-size: 0.94rem; color: var(--text-soft); }
.pc li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; }
.pc--pros li::before { content: "+"; color: var(--green); position: absolute; left: 0.2rem; font-weight: 700; }
.pc--cons li::before { content: "−"; color: var(--red); position: absolute; left: 0.2rem; font-weight: 700; }

.tool-pricing { font-size: 0.92rem; color: var(--text-faint); margin: 0.4rem 0 1rem; }
.tool-pricing strong { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--grad);
  color: #0a0918;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  transition: filter 0.15s, transform 0.15s;
}
.btn:hover { filter: brightness(1.12); color: #0a0918; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { background: var(--bg-card-hover); color: var(--text); filter: none; }

/* ---------- Use-case grid ---------- */
.grid-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.grid-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.4rem 1.5rem;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.grid-card:hover {
  border-color: rgba(139, 124, 255, 0.5);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  color: var(--text);
}
.grid-card .gc-icon { font-size: 1.4rem; margin-bottom: 0.6rem; display: block; }
.grid-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.grid-card p { font-size: 0.88rem; color: var(--text-faint); line-height: 1.55; }
.grid-card .gc-pick { display: block; margin-top: 0.7rem; font-size: 0.82rem; color: var(--accent-soft); font-weight: 500; }

/* ---------- Verdict / callout ---------- */
.callout {
  border: 1px solid rgba(139, 124, 255, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  background:
    radial-gradient(140% 180% at 0% 0%, rgba(139, 124, 255, 0.13), transparent 60%),
    var(--bg-raise);
  margin: 1.8rem 0;
}
.callout h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.callout p { color: var(--text-soft); margin: 0; }

/* ---------- Methodology list ---------- */
.method-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.method {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.3rem 1.4rem;
}
.method strong { display: block; font-family: var(--font-display); margin-bottom: 0.35rem; }
.method p { font-size: 0.9rem; color: var(--text-faint); margin: 0; line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--max-prose); margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.3rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-soft);
  font-size: 1.3rem;
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-a { padding: 1rem 1.3rem; color: var(--text-soft); font-size: 0.97rem; }
.faq .faq-a p { margin: 0 0 0.8rem; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.85rem; color: var(--text-faint); padding: 1.2rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--text-faint); }
.crumbs a { color: var(--text-faint); }
.crumbs a:hover { color: var(--accent-soft); }
.crumbs [aria-current="page"] { color: var(--text-soft); }

/* ---------- TOC ---------- */
.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1.3rem 1.6rem;
  margin: 2rem auto;
  max-width: var(--max-prose);
}
.toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.7rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2.5rem; font-size: 0.95rem; }
.toc li { margin: 0.3rem 0; break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raise);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.footer-grid h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin: 0.45rem 0; }
.footer-grid a { color: var(--text-soft); }
.footer-grid a:hover { color: var(--accent-soft); }
.footer-about p { color: var(--text-faint); line-height: 1.65; margin-top: 0.8rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero { padding: 3rem 0 2.5rem; position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute;
  inset: -60% -20% auto;
  height: 150%;
  background:
    radial-gradient(40% 50% at 25% 30%, rgba(139, 124, 255, 0.16), transparent 70%),
    radial-gradient(35% 45% at 75% 20%, rgba(77, 195, 255, 0.1), transparent 70%);
  pointer-events: none;
}
.page-hero > .wrap { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 24ch; margin-top: 1rem; }
.page-hero .lede { max-width: 62ch; margin-top: 1.2rem; color: var(--text-soft); font-size: 1.12rem; }
.page-hero .hero-meta { margin-top: 1.2rem; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
