/*
 * Co-Help — shared stylesheet for the standalone content pages
 * (/compare, /compare/*, platform + interview-type guides, /blog/*, /privacy, 404).
 *
 * Mirrors the homepage design tokens (colors, type, radii) so the pages feel
 * like the same site, but deliberately ships none of the homepage's WebGL /
 * GSAP weight: these pages exist to be read and crawled, so they stay static.
 * Linked with a ?v= query because nginx serves .css as immutable for 7 days —
 * bump the version in the <link> when this file changes.
 */

:root {
  --ink: #06080d;
  --ink-2: #0a0e16;
  --panel: rgba(13, 18, 28, 0.62);
  --panel-2: rgba(18, 24, 36, 0.78);
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --txt: #eef1f8;
  --body-txt: #c4ccdc;
  --dim: #9aa3b8;
  --faint: #6b7488;
  --accent: #5b8cff;
  --accent-2: #3ce6c4;
  --signal: #ff7a5c;
  --grad: linear-gradient(115deg, var(--accent) 0%, #7c6bff 45%, var(--accent-2) 100%);
  --maxw: 1200px;
  --r: 18px;
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--txt);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Static version of the homepage's glow field — no canvas, no JS. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 82% -10%, rgba(91, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 800px at 4% 8%, rgba(60, 230, 196, 0.08), transparent 55%),
    radial-gradient(900px 900px at 92% 110%, rgba(124, 107, 255, 0.10), transparent 60%),
    var(--ink);
}
::selection { background: rgba(91, 140, 255, 0.32); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 860px; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--txt); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { left: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; color: var(--txt); }

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 9, 15, 0.74);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: var(--ink); font-size: 17px; font-weight: 800;
  box-shadow: 0 6px 22px rgba(91, 140, 255, 0.4);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--dim); font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--txt); }
.nav-links a.btn-nav {
  color: var(--ink); background: var(--txt); padding: 9px 16px; border-radius: 11px; font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-links a.btn-nav:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 255, 255, 0.16); }
@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn-nav):not(.keep) { display: none; }
}

/* ── Breadcrumbs ── */
.crumbs { padding-top: 34px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--accent-2); }
.crumbs [aria-current="page"] { color: var(--txt); }

/* ── Page hero ── */
main { flex: 1; }
.page-hero { padding: 28px 0 12px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent-2); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--accent-2), transparent); }
.page-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); margin: 16px 0 18px; text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5); }
.page-hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--body-txt); max-width: 760px; }
.meta { font-family: var(--mono); font-size: 0.76rem; color: var(--faint); letter-spacing: 0.04em; margin-top: 18px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Buttons ── */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.btn-primary, .btn-ghost {
  font-family: var(--body); font-weight: 600; font-size: 1rem; padding: 13px 24px; border-radius: 13px;
  display: inline-flex; align-items: center; gap: 10px; transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s, background 0.22s;
}
.btn-primary { color: var(--ink); background: var(--grad); box-shadow: 0 14px 40px rgba(91, 140, 255, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(91, 140, 255, 0.45); }
.btn-ghost { color: var(--txt); background: var(--panel); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--accent); transform: translateY(-3px); }

/* ── Long-form content ── */
.prose { padding-bottom: 12px; }
.prose > section { margin-top: 56px; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 0 0 14px; }
.prose h3 { font-size: 1.18rem; margin: 28px 0 8px; letter-spacing: -0.01em; }
.prose p { color: var(--body-txt); margin: 0 0 16px; }
.prose ul, .prose ol { color: var(--body-txt); margin: 0 0 18px 1.3em; }
.prose li { margin: 7px 0; padding-left: 4px; }
.prose li::marker { color: var(--accent-2); }
.prose strong { color: var(--txt); font-weight: 600; }
.prose a:not(.card):not(.btn-primary):not(.btn-ghost) {
  color: var(--accent-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.prose a:not(.card):not(.btn-primary):not(.btn-ghost):hover { color: #7ff3dc; }
.prose kbd, .prose code {
  font-family: var(--mono); font-size: 0.82em; color: var(--txt); background: var(--panel-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; white-space: nowrap;
}

.note {
  font-size: 0.9rem; color: var(--dim); background: rgba(255, 122, 92, 0.06);
  border: 1px solid rgba(255, 122, 92, 0.22); border-left: 3px solid var(--signal);
  border-radius: 10px; padding: 12px 16px; margin: 16px 0;
}
.note strong { color: #ffb9a6; }
.callout {
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.10), var(--panel));
  border: 1px solid rgba(91, 140, 255, 0.35); border-radius: var(--r); padding: 20px 22px; margin: 18px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── Numbered steps ── */
.prose ol.steps { list-style: none; margin-left: 0; counter-reset: step; }
.prose ol.steps li {
  counter-increment: step; position: relative; margin: 10px 0; padding: 14px 18px 14px 60px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.prose ol.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad); color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: 0.85rem;
  display: grid; place-items: center;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
}
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 0.92rem; line-height: 1.55; }
.table-wrap.two table { min-width: 580px; }
.table-wrap caption { text-align: left; padding: 14px 16px 0; color: var(--faint); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table-wrap thead th {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(10, 14, 22, 0.7); white-space: nowrap;
}
.table-wrap tbody th { font-family: var(--display); font-weight: 700; color: var(--txt); white-space: nowrap; }
.table-wrap td { color: var(--body-txt); }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tr.is-us { background: rgba(91, 140, 255, 0.08); }

/* ── Cards (related links) ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 18px 0; }
.card {
  display: block; padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 20px 50px rgba(91, 140, 255, 0.16); }
.prose .card h3 { margin: 0 0 6px; font-size: 1.04rem; }
.prose .card p { color: var(--dim); font-size: 0.9rem; margin: 0; }

/* ── FAQ (native <details>: content is in the DOM without JS) ── */
.faq { display: grid; gap: 12px; margin: 18px 0; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; transition: border-color 0.25s; }
.faq details:hover, .faq details[open] { border-color: var(--line-2); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--txt);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent-2); font-family: var(--mono); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-a { padding: 0 22px 18px; }
.faq .faq-a p { margin: 0; }

/* ── CTA ── */
.cta-box {
  position: relative; overflow: hidden; text-align: center; margin: 72px 0 0; padding: clamp(40px, 7vw, 70px) 26px;
  border-radius: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.18), rgba(60, 230, 196, 0.10));
}
.cta-box h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 12px; }
.cta-box p { color: var(--body-txt); max-width: 600px; margin: 0 auto; }
.cta-box .btn-row { justify-content: center; }
.cta-box .cta-foot { margin-top: 18px; font-size: 0.9rem; color: var(--dim); }
.cta-box .cta-foot a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer ── */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 56px 0 44px; background: rgba(6, 8, 13, 0.6); color: var(--faint); }
.f-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 30px; }
.f-about p { font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.f-head { font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 12px; }
.f-col ul { list-style: none; }
.f-col li { margin: 7px 0; line-height: 1.4; }
.f-col a { color: var(--dim); font-size: 0.9rem; transition: color 0.2s; }
.f-col a:hover { color: var(--accent-2); }
.f-legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.84rem; }
@media (max-width: 980px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .f-grid { grid-template-columns: 1fr; } }

/* ── 404 ── */
.not-found { padding: 60px 0 0; }
.not-found .code { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--signal); }

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .prose ol.steps li { padding-left: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn-primary, .btn-ghost, .nav-links a.btn-nav { transition: none; }
}
