/* ThreadClarity — shared styles for policy, pricing and contact pages.
   Tokens and chrome mirror the inline styles in index.html. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --white: #fafafa;
  --gray-50: #f4f4f5;
  --gray-100: #e4e4e7;
  --gray-200: #d4d4d8;
  --gray-300: #a1a1aa;
  --gray-400: #71717a;
  --gray-500: #52525b;
  --gray-600: #3f3f46;
  --gray-700: #27272a;
  --gray-800: #1c1c1f;
  --gray-850: #151518;
  --gray-900: #0e0e10;
  --black: #09090b;

  --accent: #2DD4A8;
  --accent-secondary: #1B6B8A;
  --accent-dim: rgba(45, 212, 168, 0.08);
  --accent-border: rgba(45, 212, 168, 0.15);
  --brand-green: #2DD4A8;
  --brand-blue: #3BA4C8;
  --success: #34d399;
  --warn: #fbbf24;
  --surface: rgba(255,255,255,0.025);
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.1);

  --max-w: 1120px;
  --r: 12px;
  --r-lg: 20px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

::selection { background: rgba(45, 212, 168, 0.3); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ─── NAV ─────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0 24px; }
.nav-bar {
  max-width: var(--max-w); margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: rgba(14, 14, 16, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border); border-radius: 14px;
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.nav-logo { height: 32px; display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 100%; width: auto; }
.nav-name { font-size: 1.0rem; font-weight: 700; letter-spacing: -0.03em; }
.brand-thread { color: #2DD4A8; }
.brand-clarity { color: #3BA4C8; }
.nav-center { display: flex; gap: 6px; }
.nav-center a {
  font-size: 0.85rem; font-weight: 600; color: var(--white);
  padding: 6px 14px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-center a:hover { color: var(--white); background: var(--surface); }
.cta-sm {
  font-size: 0.85rem; font-weight: 700; color: var(--black);
  background: var(--white); padding: 7px 18px; border-radius: 8px;
  border: none; cursor: pointer; transition: opacity 0.15s; display: inline-block;
}
.cta-sm:hover { opacity: 0.85; }

/* ─── DOC PAGE SHELL ──────────────────── */
.doc-hero {
  padding: 160px 24px 48px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.doc-hero::before {
  content: ''; position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 460px;
  background: radial-gradient(ellipse, rgba(45,212,168,0.10) 0%, rgba(27,107,138,0.04) 40%, transparent 70%);
  pointer-events: none;
}
.doc-hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.kicker {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 18px;
}
.doc-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 14px;
}
.doc-hero p { font-size: 1.0rem; color: var(--gray-300); line-height: 1.7; }
.doc-meta {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 0.74rem; color: var(--gray-400);
}
.doc-meta span {
  background: var(--surface); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 100px;
}

.doc { padding: 56px 24px 100px; }
.doc-inner { max-width: 780px; margin: 0 auto; }

.doc-toc {
  background: var(--gray-900); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 48px;
}
.doc-toc h2 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 14px;
}
.doc-toc ol { list-style: none; counter-reset: toc; columns: 2; column-gap: 32px; }
.doc-toc li { counter-increment: toc; padding: 4px 0; break-inside: avoid; }
.doc-toc li::before {
  content: counter(toc) '.'; color: var(--gray-600);
  font-variant-numeric: tabular-nums; margin-right: 8px;
}
.doc-toc a { font-size: 0.88rem; color: var(--gray-300); transition: color 0.15s; }
.doc-toc a:hover { color: var(--accent); }
@media (max-width: 640px) { .doc-toc ol { columns: 1; } }

.doc section { margin-bottom: 44px; scroll-margin-top: 100px; }
.doc h2 {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.doc h3 {
  font-size: 1.0rem; font-weight: 700; letter-spacing: -0.02em;
  margin: 24px 0 8px; color: var(--gray-50);
}
.doc p { font-size: 0.95rem; color: var(--gray-300); line-height: 1.8; margin-bottom: 14px; }
.doc ul, .doc ol { margin: 0 0 16px 20px; }
.doc li { font-size: 0.95rem; color: var(--gray-300); line-height: 1.8; margin-bottom: 6px; }
.doc strong { color: var(--white); font-weight: 650; }
.doc a:not(.cta-sm):not(.p-btn) { color: var(--accent); border-bottom: 1px solid var(--accent-border); }
.doc a:not(.cta-sm):not(.p-btn):hover { border-bottom-color: var(--accent); }
.doc em { font-style: italic; color: var(--gray-200); }

/* Callouts */
.callout {
  border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--r);
  padding: 18px 22px; margin: 20px 0;
}
.callout.warn { border-left-color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }
.callout-title {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.callout.warn .callout-title { color: var(--warn); }

/* Definition-style info card (grievance officer, contact blocks) */
.info-card {
  background: var(--gray-850); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 28px; margin: 20px 0;
}
.info-card dl { display: grid; grid-template-columns: 190px 1fr; gap: 10px 20px; }
.info-card dt {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--gray-500); padding-top: 3px;
}
.info-card dd { font-size: 0.92rem; color: var(--gray-200); line-height: 1.6; }
@media (max-width: 560px) {
  .info-card dl { grid-template-columns: 1fr; gap: 2px 0; }
  .info-card dd { margin-bottom: 12px; }
}

/* Tables */
.doc-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 0.88rem; }
.doc-table th, .doc-table td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.doc-table th {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gray-400);
  border-bottom-color: var(--border-strong);
}
.doc-table td { color: var(--gray-300); line-height: 1.65; }
.doc-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

/* Unfilled legal placeholder — deliberately loud so it can't ship unnoticed */
.ph {
  font-family: var(--mono); font-size: 0.85em; font-weight: 600;
  color: #fbbf24; background: rgba(251, 191, 36, 0.10);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}

/* ─── PRICING ─────────────────────────── */
.price-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; max-width: var(--max-w); margin: 0 auto;
}
.price-card {
  background: var(--gray-850); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px 28px;
  display: flex; flex-direction: column;
}
.price-card.pop {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, rgba(45,212,168,0.05) 0%, var(--gray-850) 50%);
  position: relative;
}
.price-card.pop::before {
  content: 'Best value';
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: white; background: var(--accent);
  padding: 3px 14px; border-radius: 100px;
}
.price-card.payg {
  border: 2px dashed rgba(59, 164, 200, 0.4);
  background: linear-gradient(180deg, rgba(59,164,200,0.06) 0%, var(--gray-850) 50%);
  position: relative;
}
.price-card.payg::before {
  content: 'Recurring';
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: white; background: var(--brand-blue);
  padding: 3px 14px; border-radius: 100px;
}
.p-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-400); margin-bottom: 8px; }
.p-price { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 4px; }
.p-price .cur { font-size: 1.2rem; color: var(--gray-500); vertical-align: super; }
.p-price .per { font-size: 0.85rem; color: var(--gray-500); font-weight: 500; }
.p-price-sub { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 4px; font-weight: 500; }
.p-desc { font-size: 0.95rem; color: var(--gray-400); margin-bottom: 28px; line-height: 1.5; }
.p-features { list-style: none; margin-bottom: 28px; flex: 1; }
.p-features li {
  font-size: 0.95rem; color: var(--gray-200); padding: 5px 0;
  display: flex; gap: 8px;
}
.p-features li::before { content: '✓'; color: var(--success); font-weight: 700; font-size: 0.78rem; }
.price-card .p-btn {
  display: block; text-align: center; font-family: var(--font);
  font-size: 0.85rem; font-weight: 600; padding: 12px 0;
  border-radius: var(--r); border: 1px solid var(--border-strong);
  color: var(--gray-300); background: transparent; cursor: pointer;
  transition: all 0.15s;
}
.price-card .p-btn:hover { border-color: var(--gray-500); color: var(--white); }
.price-card.pop .p-btn { background: var(--white); color: var(--black); border-color: var(--white); }
.price-card.pop .p-btn:hover { opacity: 0.85; }
.price-card.payg .p-btn { border-color: rgba(59,164,200,0.4); color: var(--brand-blue); }
.price-card.payg .p-btn:hover { border-color: var(--brand-blue); color: var(--white); }

/* ─── FOOTER ──────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-dot { height: 20px; display: flex; align-items: center; flex-shrink: 0; }
.footer-dot img { height: 100%; width: auto; }
.footer-left span { font-size: 0.82rem; font-weight: 600; }
.footer-copy { font-size: 0.72rem; color: var(--gray-600); }
.footer-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 0.78rem; color: var(--gray-500); transition: color 0.15s; }
.footer-links a:hover { color: var(--white); }

@media (max-width: 720px) {
  .nav-center { display: none; }
  .doc-hero { padding-top: 130px; }
}
