/* ============================================================
   Ruligent marketing site — shared stylesheet
   Brand: secure, modern, technical, minimal, enterprise-ready.
   ============================================================ */

:root {
  --bg: #0b0e14;
  --surface: #11161f;
  --surface-2: #171e2a;
  --border: #222b3a;
  --border-soft: #1a2230;
  --text: #e8ecf3;
  --text-dim: #9aa5b8;
  --muted: #66718a;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-text: #ffb52e;
  --green: #3fce7c;
  --red: #f0655f;
  --blue: #5aa2f7;
  --purple: #a78bfa;
  --radius: 10px;
  --radius-lg: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }
img, svg { max-width: 100%; }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5.2vw, 52px); font-weight: 800; margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 750; margin: 0 0 12px; }
h3 { font-size: 18px; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.dim { color: var(--text-dim); }
.small { font-size: 13.5px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex; align-items: center; gap: 26px; height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand .brand-gate { color: var(--accent-text); }

.site-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
.site-nav a { color: var(--text-dim); font-weight: 500; font-size: 14.5px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 10px; }

#nav-toggle { display: none; }
.nav-burger { display: none; }

@media (max-width: 860px) {
  .site-nav {
    display: none;
    position: absolute; top: 62px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 14px 24px 18px; gap: 14px;
  }
  #nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 4.5px;
    margin-left: auto; cursor: pointer; padding: 8px;
  }
  .nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
  .header-cta .btn.ghost { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font-weight: 600; font-size: 14.5px; line-height: 1.2;
  border: 1px solid var(--border); color: var(--text);
  background: var(--surface-2); cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14100a; }
.btn.primary:hover { background: var(--accent-text); border-color: var(--accent-text); }
.btn.ghost { background: transparent; }
.btn.lg { padding: 13px 24px; font-size: 16px; }

/* ---------- hero ---------- */

.hero { padding: 84px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;  height: 130%;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,158,11,0.09), transparent 62%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero .kicker {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 13px; font-weight: 550; margin-bottom: 22px;
}
.hero .sub { max-width: 640px; margin: 0 auto 30px; color: var(--text-dim); font-size: 18px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 13px; }

/* ---------- decision demo panel ---------- */

.decision-panel {
  margin: 54px auto 0; max-width: 780px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.decision-panel .panel-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-soft);
  color: var(--muted); font-size: 12.5px; font-family: var(--mono);
}
.decision-panel .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.decision-panel pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.65; color: var(--text-dim);
}
.decision-panel .tok-k { color: var(--blue); }
.decision-panel .tok-s { color: var(--green); }
.decision-panel .tok-c { color: var(--muted); }
.decision-panel .tok-a { color: var(--accent-text); }
.decision-panel .tok-r { color: var(--red); }

/* ---------- trust strip ---------- */

.trust-strip { border-block: 1px solid var(--border-soft); padding: 18px 0; }
.trust-strip .container {
  display: flex; flex-wrap: wrap; gap: 12px 34px; justify-content: center;
  color: var(--muted); font-size: 13.5px; font-weight: 550;
}
.trust-strip span::before { content: "✓ "; color: var(--green); }

/* ---------- sections ---------- */

.section { padding: 76px 0; }
.section.alt { background: #0d1119; border-block: 1px solid var(--border-soft); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head .eyebrow {
  color: var(--accent-text); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px;
}

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card .icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 18px; margin-bottom: 14px;
}
.card p { color: var(--text-dim); font-size: 14.5px; margin-bottom: 0; }

/* steps */
.step { position: relative; padding-left: 0; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: 14px; margin-bottom: 12px;
}

/* code blocks */
pre.code {
  background: #0d1119; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text-dim);
  margin: 0;
}
pre.code .tok-k { color: var(--blue); }
pre.code .tok-s { color: var(--green); }
pre.code .tok-c { color: var(--muted); }
pre.code .tok-a { color: var(--accent-text); }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.pill {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
}
.pill.allow { color: var(--green); }
.pill.block { color: var(--red); }
.pill.approve { color: var(--accent-text); }

/* ---------- pricing ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 1000px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plan-grid { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 22px;
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); position: relative; }
.plan.featured::before {
  content: "Most popular"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #14100a; font-size: 11.5px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.plan .plan-name { font-weight: 700; font-size: 16px; }
.plan .plan-price { font-size: 34px; font-weight: 800; margin: 8px 0 2px; }
.plan .plan-price small { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.plan .plan-for { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; color: var(--text-dim); font-size: 14px; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: "—"; color: var(--muted); }
.plan .btn { width: 100%; }

/* comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.compare th, table.compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); }
table.compare thead th { background: var(--surface-2); font-weight: 650; }
table.compare td { color: var(--text-dim); }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare .yes { color: var(--green); }
table.compare .no { color: var(--muted); }

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

.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 10px; padding: 0 18px;
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 15px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-dim); padding-bottom: 16px; margin: 0; font-size: 14.5px; }

/* ---------- prose pages (legal, docs, changelog) ---------- */

.prose { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.prose h1 { font-size: 34px; margin-bottom: 6px; }
.prose .updated { color: var(--muted); font-size: 13.5px; margin-bottom: 30px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 17px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-dim); font-size: 15px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 14px 0; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); }
.prose blockquote {
  margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.notice {
  border: 1px solid var(--accent); background: var(--accent-soft);
  border-radius: var(--radius); padding: 14px 18px; margin: 0 0 26px;
  color: var(--text); font-size: 14px;
}

/* ---------- final CTA ---------- */

.final-cta { text-align: center; padding: 90px 0; }
.final-cta h2 { margin-bottom: 12px; }
.final-cta p { color: var(--text-dim); max-width: 520px; margin: 0 auto 28px; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border-soft); padding: 48px 0 40px; background: #0d1119; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: var(--text-dim); font-size: 14px; }
.site-footer a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); font-size: 13.5px; max-width: 300px; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  color: var(--muted); font-size: 13px;
}

/* accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #14100a; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
