/* Kynex website — shared stylesheet
   Used by index.html, docs.html, privacy.html, terms.html */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --ink: #0f172a;
  --muted: #5b6b82;
  --line: #e6eaf1;
  --brand: #2563eb;
  --brand-2: #3b82f6;
  --brand-soft: #eff5ff;
  --ok: #16a34a;
  --radius: 16px;
  --max: 1120px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border-radius: 11px; padding: 12px 20px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .06s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--bg-soft); border-color: #d7deea; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---------- Header / navigation ---------- */
header.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 18.5px; color: var(--ink); }
.logo img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.logo .brand-name { font-weight: 800; }
.nav-spacer { flex: 1; }

/* ---------- Menu button (shown on every viewport) ---------- */
.hamburger {
  display: inline-flex; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.hamburger:hover { background: var(--bg-soft); }
.hamburger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.hamburger span::before, .hamburger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }


.mobile-menu {
  position: fixed; top: 66px; right: 0; bottom: 0; width: min(86vw, 380px);
  background: #fff; border-left: 1px solid var(--line); z-index: 55;
  padding: 18px; overflow-y: auto;
  transform: translateX(102%); transition: transform .22s ease;
  box-shadow: -10px 0 30px rgba(16,24,40,.08);
}
body.nav-open .mobile-menu { transform: translateX(0); }
.mobile-menu .m-group { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .m-group:last-child { border-bottom: 0; }
.mobile-menu .m-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 6px 4px; }
.mobile-menu a { display: block; padding: 11px 6px; font-size: 16px; border-radius: 9px; }
.mobile-menu a:hover { background: var(--bg-soft); }
.mobile-menu .btn { width: 100%; margin-top: 10px; }
.scrim { position: fixed; inset: 66px 0 0 0; background: rgba(15,23,42,.32); z-index: 50; opacity: 0; visibility: hidden; transition: .2s; }
body.nav-open .scrim { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 34px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; box-shadow: var(--shadow-sm);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(22,163,74,0.14); }
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; margin: 22px auto 0; max-width: 900px;
  letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 .grad { color: var(--brand); }
.hero p.lead { color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.25rem); max-width: 620px; margin: 20px auto 0; }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 10px; letter-spacing: -0.02em; font-weight: 800; }
.section-sub { color: var(--muted); margin: 0 0 36px; max-width: 620px; }

.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.os-card {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 30px 26px;
  text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.os-card:hover { box-shadow: var(--shadow); border-color: #dbe3ef; }
.os-card svg { width: 56px; height: 56px; margin: 0 auto; }
.os-card .os-icon { display: block; width: 56px; height: 56px; margin: 0 auto; object-fit: contain; }
.os-card h3 { margin: 16px 0 4px; font-size: 19px; }
.os-card .meta { color: var(--muted); font-size: 13.5px; min-height: 22px; }
.os-card .btn { margin-top: auto; }
.os-card .spacer { height: 16px; }
.os-card .btn.os-soon { background: var(--bg-soft); color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; }
.note { color: var(--muted); font-size: 13.5px; text-align: center; margin-top: 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 20px; }
.feature h3 { margin: 16px 0 6px; font-size: 17px; }
.feature p { color: var(--muted); margin: 0; font-size: 14.5px; }

.docs-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: start; }
details.faq { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 700; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 10px 0 0; font-size: 14.5px; }
pre.code { background: #0f172a; border-radius: 12px; padding: 18px; overflow: auto; font: 13.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #e2e8f0; }
pre.code .k { color: #7dd3fc; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.plan .tag { position: absolute; top: -12px; left: 28px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); font-size: 14.5px; }
.plan li { padding: 6px 0; }

.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact a.card { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 24px; display: block; box-shadow: var(--shadow-sm); }
.contact a.card:hover { border-color: #bfd4ff; }
.contact h3 { margin: 0 0 6px; font-size: 16px; }
.contact p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Inner pages (docs / legal) ---------- */
.page-head { padding: 60px 0 10px; border-bottom: 1px solid var(--line); }
.page-head .eyebrow { color: var(--brand); font-weight: 700; font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); letter-spacing: -0.03em; margin: 12px 0 8px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 720px; margin: 0 0 26px; }
.page-head .meta { color: var(--muted); font-size: 13.5px; }

.docs-layout { display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; padding: 46px 0 90px; }
.toc { position: sticky; top: 86px; font-size: 14.5px; }
.toc .toc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); padding: 6px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); background: var(--bg-soft); }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.55rem; margin: 44px 0 12px; letter-spacing: -0.02em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 28px 0 8px; scroll-margin-top: 90px; }
.prose p { color: #334155; margin: 12px 0; }
.prose ul, .prose ol { color: #334155; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.prose code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font: 13.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose pre.code { margin: 16px 0; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; margin: 18px 0; color: #1e3a8a; font-size: 14.5px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: 0 0 22px 52px; margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.steps li h3 { margin: 4px 0 4px; }
.steps li p { margin: 0; }

table.spec { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
table.spec th, table.spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.spec th { color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 46px 0 34px; color: var(--muted); font-size: 14px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand .logo { margin-bottom: 12px; }
.foot-brand p { margin: 0; max-width: 280px; }
.foot-col h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink); margin: 0 0 12px; }
.foot-col a { display: block; padding: 5px 0; color: var(--muted); }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features, .contact, .pricing { grid-template-columns: 1fr 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 60px 0; }
  .hero { padding: 68px 0 26px; }
}
@media (max-width: 680px) {
  .platforms, .features, .contact, .pricing { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
