/* keybridge — shared stylesheet
   Aesthetic: Apple-like, spartan. Light theme, system SF typography,
   serif wordmark echoing the logo's K, hairline dividers, one accent. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;       /* Apple system gray */
  --ink: #1d1d1f;          /* primary text */
  --ink-2: #6e6e73;        /* secondary text */
  --hairline: #d2d2d7;     /* dividers / borders */
  --accent: #0071e3;       /* Apple button/link blue */
  --accent-press: #0058b9;
  --radius: 14px;
  --maxw: 980px;
  --pad: 22px;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --hairline: #38383a;
    --accent: #2997ff;
    --accent-press: #6cb6ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 720px; }

section { padding: 88px 0; }
@media (max-width: 700px) { section { padding: 60px 0; } }

.alt { background: var(--bg-alt); }

/* ---- Typography ---- */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--ink-2); }
.lead { font-size: clamp(19px, 2.4vw, 23px); color: var(--ink-2); max-width: 38ch; }
.eyebrow { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 600; }
small { color: var(--ink-2); }

kbd {
  font-family: var(--sans); font-size: 0.9em; font-weight: 600;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 6px;
  padding: 2px 7px; box-shadow: 0 1px 0 var(--hairline);
  white-space: nowrap;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; display: block; }
.brand .word { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink); font-size: 14px; }
.nav a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .nav { gap: 16px; } .nav a { font-size: 13px; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 500; line-height: 1;
  padding: 13px 22px; border-radius: 980px;
  background: var(--accent); color: #fff; border: 1px solid transparent;
  transition: background .18s ease;
}
.btn:hover { background: var(--accent-press); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--hairline); }
.btn.secondary:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.cols-3 { grid-template-columns: 1fr; } .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 28px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; }
.card .glyph { font-size: 26px; margin-bottom: 14px; display: block; }

/* ---- Steps / lists ---- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 26px 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--hairline);
  display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--ink);
}
.steps li:last-child { padding-bottom: 0; }
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { margin: 0; }

/* ---- Legal / long-form documents ---- */
.doc { padding: 64px 0 88px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 8px; }
.doc .updated { color: var(--ink-2); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 8px; }
.doc .toc { background: var(--bg-alt); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 40px; }
.doc .toc ul { list-style: none; padding: 0; margin: 0; columns: 2; }
@media (max-width: 600px) { .doc .toc ul { columns: 1; } }
.doc .toc li { margin-bottom: 6px; }
.callout { background: var(--bg-alt); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent); border-radius: 10px; padding: 16px 20px; margin: 0 0 1.4em; }
.callout p:last-child { margin-bottom: 0; }

/* ---- FAQ ---- */
.faq details {
  border-bottom: 1px solid var(--hairline); padding: 20px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; font-size: 19px; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 26px; color: var(--ink-2); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { margin-top: 14px; }
.faq p { margin: 0 0 0.8em; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 96px 0 72px; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 46ch; text-align: center; }
.hero img.mark { width: 84px; height: 84px; margin-bottom: 28px; }
.hero .btn-row { justify-content: center; margin-top: 12px; }
.hero .note { font-size: 13px; color: var(--ink-2); margin-top: 16px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0; font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.site-footer .copy { color: var(--ink-2); }

/* ---- Motion (single, subtle) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .reveal.d1 { animation-delay: .06s; }
  .reveal.d2 { animation-delay: .12s; }
  .reveal.d3 { animation-delay: .18s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
