/* ============================================================
   KELPARO — premium layer (Oct 2026)
   Loaded after style.css on every page. Replaces the look, keeps the
   structure: white and warm neutrals, one blue accent, one type family
   at medium weight, two-tone headings, hairline cards, calm motion.
   Benchmarked against Clay, Attio, Sanas and Amplemarket.
   ============================================================ */

:root, html[data-theme="dark"], html[data-theme="light"] {
  --font-display: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --ink: #111110;
  --ink-2: #4f4d48;
  --ink-3: #8b8880;
  --ink-4: #b9b6ae;
  --paper: #ffffff;
  --paper-2: #fbfaf8;
  --paper-3: #f4f3ef;
  --line: #ebe9e4;
  --line-2: #dedbd4;
  --accent: #2f5bff;
  --accent-2: #8ea4ff;
  --accent-soft: #eef2ff;
  --ok: #17924f;

  /* old tokens, remapped so every existing component follows */
  --bg: var(--paper);
  --bg-2: #ffffff;
  --bg-3: var(--paper-3);
  --surface: var(--paper-2);
  --surface-2: var(--paper-3);
  --border: var(--line);
  --border-bright: var(--line-2);
  --text: var(--ink);
  --text-dim: var(--ink-2);
  --text-faint: var(--ink-3);
  --violet: var(--accent);
  --cyan: var(--accent-2);
  --magenta: var(--ink);
  --amber: #c8c3b8;
  --lime: var(--ok);
  --lime-bright: var(--ink);
  --grad: linear-gradient(90deg, var(--accent), var(--accent));
  --grad-warm: linear-gradient(90deg, var(--ink), var(--ink));
  --nav-bg: rgba(255, 255, 255, 0.86);
  --nav-bg-solid: rgba(255, 255, 255, 0.94);
  --menu-bg: #ffffff;
  --grid-line: transparent;
  --noise-op: 0;
  --orb-op: 0;
  --shadow-deep: 0 1px 2px rgba(17, 17, 16, 0.04), 0 24px 60px -24px rgba(17, 17, 16, 0.16);
  --shadow-soft: 0 1px 2px rgba(17, 17, 16, 0.04), 0 8px 24px -12px rgba(17, 17, 16, 0.10);
  --wordmark-top: rgba(17, 17, 16, 0.10);
  --wordmark-bot: rgba(17, 17, 16, 0.01);
  --stroke-text: rgba(17, 17, 16, 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

html { background: var(--paper); }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  letter-spacing: -0.006em;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ambient decoration from the old system: off */
.noise, .bg-grid, .orb, .preloader, .card__glow, .hero__canvas, .hero__scroll-hint, .theme-toggle, .float-chip { display: none !important; }
.scroll-progress { background: var(--ink); height: 1px; opacity: .5; }

/* ---------- type ---------- */
.h-display, .h1, .h2, .h3, h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
.h-display { font-weight: 500; font-size: clamp(44px, 7vw, 92px); line-height: 0.98; letter-spacing: -0.045em; }
.h1 { font-weight: 500; font-size: clamp(40px, 6vw, 80px); line-height: 1.0; letter-spacing: -0.042em; }
.h2 { font-weight: 500; font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.038em; }
.h3 { font-weight: 500; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.22; letter-spacing: -0.02em; }
.lead { font-size: clamp(17px, 1.45vw, 20px); color: var(--ink-2); line-height: 1.55; max-width: 60ch; text-wrap: pretty; }
p { text-wrap: pretty; }

/* two-tone instead of gradient: the second half of a heading is grey ink */
.grad-text, .grad-text .word > span {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; color: var(--ink-3) !important;
}
.grad-text { padding-bottom: 0; }
.lime-text { color: var(--accent) !important; }
.outline-text { -webkit-text-stroke: 0; -webkit-text-fill-color: var(--ink-3); color: var(--ink-3); }
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }

/* label: Attio-style quiet tag, not a glowing pill */
.eyebrow {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em;
  text-transform: none; color: var(--accent);
  padding: 0; border: 0; background: none; gap: 8px;
}
.eyebrow i { width: 6px; height: 6px; background: var(--accent); box-shadow: none; }

/* ---------- nav: a plain white bar ---------- */
.nav {
  top: 0; left: 0; transform: none; width: 100%;
  border-radius: 0; border: 0; border-bottom: 1px solid transparent;
  padding: 0 max(24px, calc((100% - 1240px) / 2)); height: 68px;
  background: var(--nav-bg); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: none;
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: none; background: var(--nav-bg-solid); }
.nav__logo { font-weight: 600; font-size: 18px; letter-spacing: 0.08em; }
.nav__mark { width: 24px; height: 24px; }
.nav__links { gap: 2px; }
.nav__links a { font-size: 14.5px; font-weight: 500; color: var(--ink-2); padding: 8px 13px; border-radius: 8px; }
.nav__links a:hover { background: var(--paper-3); color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { display: none; }
.mobile-menu { background: #fff; }
.mobile-menu a { font-weight: 500; color: var(--ink-2); letter-spacing: -0.035em; }

/* ---------- buttons: pills, ink or light ---------- */
.btn {
  border-radius: 999px; font-family: var(--font-body); font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  padding: 12px 22px; transform: none !important; box-shadow: none;
  transition: background .2s var(--ease-out), color .2s, border-color .2s, box-shadow .2s;
}
.btn--primary, .btn--lime { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--primary:hover, .btn--lime:hover { background: #2a2926; box-shadow: 0 6px 20px -8px rgba(17,17,16,.5); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-2); backdrop-filter: none; }
.btn--ghost:hover { background: var(--paper-3); border-color: var(--line-2); }
.btn--sm { padding: 9px 16px; font-size: 14px; border-radius: 999px; }
.btn--lg { padding: 15px 26px; font-size: 16px; border-radius: 999px; }
.btn:active { transform: translateY(1px) !important; }

/* ---------- surfaces ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  backdrop-filter: none; box-shadow: var(--shadow-soft);
}
.card:hover { transform: translateY(-2px); background: #fff; border-color: var(--line-2); box-shadow: var(--shadow-deep); }
.card__num { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-3); }
.card .h3 { font-weight: 500; }
.tilt { transform: none !important; }
.frame { border-radius: 16px; border-color: var(--line); box-shadow: var(--shadow-deep); }
.frame__bar { background: var(--paper-2); }
.frame__badge { color: var(--ink-2); background: #fff; }
.frame__badge--live { color: var(--accent); border-color: #cfd8ff; }
.stat { background: #fff; border-color: var(--line); backdrop-filter: none; box-shadow: var(--shadow-soft); }
.stat__value { font-weight: 500; letter-spacing: -0.045em; background: none !important; -webkit-text-fill-color: var(--ink) !important; color: var(--ink); }
.chip { background: #fff; border-color: var(--line); color: var(--ink-2); font-family: var(--font-body); font-size: 13.5px; }
.chip:hover { border-color: var(--ink); color: var(--ink); transform: none; }
.marquee { background: #fff; border-color: var(--line); padding: 18px 0; }
.marquee__track span { font-family: var(--font-display); font-weight: 500; color: var(--ink-3); font-size: clamp(16px, 1.8vw, 22px); letter-spacing: -0.02em; }
.marquee__track span::after { content: '·'; color: var(--ink-4); font-size: 1em; }
.cta-band, html:not([data-theme="dark"]) .cta-band { background: var(--paper-3); border: 0; border-radius: 28px; }
.divider-glow { background: var(--line); }
.live-dot { background: var(--ok); }
.live-dot::after { border-color: var(--ok); }
.row-item:hover .row-item__arrow { background: var(--ink); color: #fff; }
.field label { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea, .field select { background: #fff; border-color: var(--line-2); border-radius: 12px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- layout rhythm ---------- */
.container { width: min(1240px, calc(100% - 48px)); }
.section { padding: clamp(88px, 11vw, 156px) 0; }
.section-head .eyebrow { margin-bottom: 16px; }
.hero { min-height: auto; padding: 150px 0 90px; }
.page-hero { padding: 170px 0 64px; }
.reveal { transform: translateY(18px); transition-duration: .8s; }
.reveal--left, .reveal--right { transform: translateY(18px); }

/* ---------- footer: quiet ---------- */
.footer { background: var(--paper-2); border-top: 1px solid var(--line); }
.footer h5 { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 500; }
.footer li a { color: var(--ink-2); }
.footer li a:hover { color: var(--ink); padding-left: 0; }
.footer__bottom { font-family: var(--font-body); color: var(--ink-3); }
.footer__wordmark { font-weight: 600; letter-spacing: -0.05em; }

/* ---------- product tiles: same motion, calmer ink ---------- */
.sys-card .h3 { font-size: clamp(18px, 1.6vw, 21px); margin-bottom: 16px; }
.mini-chat__msg--agent { background: var(--accent-soft); }
.donut__ring { filter: saturate(.9); }
.fliptile span { color: #fff; }
.sms__b--out { background: var(--ink); }
.hub__core { background: var(--ink); box-shadow: 0 10px 30px -10px rgba(17,17,16,.5); }
.journey__steps span.on { border-color: var(--ink); background: var(--paper-3); }
.desk__btn, .desk__btn::after { background: var(--ok); border-color: var(--ok); }
.tl__head, .tl__head::before { background: var(--accent); box-shadow: none; }

/* flip tiles: ink front, paper back */
.fliptile span { background: var(--ink); color: #fff; }
.fliptile:nth-child(2) span:first-child { background: var(--accent); }
.fliptile:nth-child(3) span:first-child { background: #3d3b37; }
.fliptile span:last-child { background: var(--paper-3); color: var(--ink); border-color: var(--line); }

/* ---------- Products mega menu (Clay-style, 3D icons) ---------- */
.has-mega { position: static; }
.nav__mega-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px; border: 0; background: none;
  font: 500 14.5px var(--font-body); color: var(--ink-2); letter-spacing: -0.006em; }
.nav__mega-btn:hover, .has-mega.is-open .nav__mega-btn, .nav__mega-btn.is-active { background: var(--paper-3); color: var(--ink); }
.nav__mega-btn svg { transition: transform .25s var(--ease-out); }
.has-mega.is-open .nav__mega-btn svg { transform: rotate(180deg); }
.mega { position: absolute; left: 50%; top: calc(100% + 6px); width: min(1180px, calc(100vw - 32px)); transform: translate(-50%, 8px);
  display: grid; grid-template-columns: 1fr 270px; gap: 10px; padding: 10px; border-radius: 22px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(17,17,16,.35), 0 2px 6px rgba(17,17,16,.05);
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease-out), transform .3s var(--ease-out), visibility .22s; z-index: 9000; }
.has-mega.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 14px 10px 10px; }
.mega__col h6 { font: 500 11.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 10px 10px; }
.mega__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; transition: background .2s; }
.mega__item:hover { background: var(--paper-3); }
.mega__item img { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--paper-2); padding: 3px; transition: transform .35s var(--ease-out); }
.mega__item:hover img { transform: translateY(-2px) rotate(-6deg) scale(1.06); }
.mega__item b { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.mega__item small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.3; margin-top: 1px; }
.mega__feature { border-radius: 16px; background: linear-gradient(180deg, #eef2ff, #fbfaf8); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; position: relative; overflow: hidden; }
.mega__art { position: absolute; inset: 18px 18px auto; height: 170px; display: grid; place-items: center; }
.mega__art img:first-child { width: 150px; height: 150px; animation: megaFloat 5s ease-in-out infinite; }
.mega__art img:last-child { position: absolute; right: 22px; top: 6px; width: 64px; height: 64px; animation: megaFloat 5s ease-in-out -2s infinite; }
@keyframes megaFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(3deg); } }
.mega__feature small { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--accent); }
.mega__feature b { font-size: 17px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; margin-top: 6px; color: var(--ink); }
@media (max-width: 1100px) { .mega { grid-template-columns: 1fr; } .mega__feature { display: none; } }
@media (max-width: 900px) { .has-mega { display: none; } }
.nav__links { align-items: center; } .nav__links > li { display: flex; align-items: center; }

/* services: a 3D icon floats beside each system's title */
.svc-ico { display: block; width: 96px; height: 96px; margin: 18px 0 -6px; filter: drop-shadow(0 16px 20px rgba(17,17,16,.18)); animation: megaFloat 6s ease-in-out infinite; }
.bento--products .sys-card { position: relative; }
.bento--products .sys-ico { position: absolute; top: 14px; right: 16px; width: 72px; height: 72px; filter: drop-shadow(0 12px 14px rgba(17,17,16,.16)); }
.bento--products .sys-card .h3 { padding-right: 70px; }

/* ---------- brand marks (js/logos.js): a white app tile with the brand's own glyph ---------- */
.lg { font-style: normal; display: inline-grid; place-items: center; flex: none; width: 1.6em; height: 1.6em; margin-right: .5em; border-radius: .45em;
  background: #fff; box-shadow: 0 0 0 1px rgba(17,17,30,.08), 0 3px 8px -3px rgba(17,17,30,.25); vertical-align: -.45em; }
.lg svg { width: 62%; height: 62%; fill: var(--lc); }
.lg--m { background: var(--lc); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 3px 8px -3px rgba(17,17,30,.3); }
.lg--m b { font-size: .62em; font-weight: 700; font-style: normal; line-height: 1; letter-spacing: -.03em; }
.has-lg { display: inline-flex !important; align-items: center; }
.v3-logos__row .lg { width: 1.45em; height: 1.45em; }
.v3-logos__row span.has-lg { color: #6f6b63; }
.hub__orbit span.has-lg { font-family: inherit; font-size: 11px; font-weight: 500; color: var(--ink, #111); background: #fff; padding: 4px 10px 4px 4px; box-shadow: 0 6px 16px -8px rgba(17,17,30,.35); }
.eqbars__row > span.has-lg { font-family: inherit; }

/* one rhythm everywhere: sections breathe without leaving dead screens */
.section { padding: clamp(52px, 5.5vw, 84px) 0; }
.section.section--tight { padding: clamp(24px, 2.6vw, 40px) 0; }

/* technology band: every technology we run, drifting past; links to the full list */
.techband { padding: clamp(36px, 4vw, 56px) 0; background: linear-gradient(180deg, #fff, #f6f3ff 50%, #fff); overflow: hidden; }
.techband__head { text-align: center; margin-bottom: 22px; padding: 0 16px; }
.techband__head b { display: block; font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.025em; color: var(--ink); }
.techband__head small { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.techband__marq { display: block; color: inherit; text-decoration: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.techband__track { display: flex; gap: 10px; width: max-content; animation: tbMarq 100s linear infinite; }
.techband__track + .techband__track { margin-top: 10px; animation-direction: reverse; animation-duration: 120s; }
.techband__marq:hover .techband__track { animation-play-state: paused; }
.techband__track span { flex: none; padding: 6px 13px 6px 6px; border-radius: 100px; background: #fff; border: 1px solid #ebe6fa; font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; box-shadow: 0 8px 18px -14px rgba(60,40,140,.4); }
.techband__track .lg { font-size: 15px; }
@keyframes tbMarq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .techband__track { animation: none; } }

/* tiles that show a real screen instead of a drawn miniature */
.tile-shot { position: relative; margin-top: 14px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line, #ebe8e1); background: #f6f6f7; }
.tile-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transform: scale(1.02); transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.sys-card:hover .tile-shot img { transform: scale(1.07) translate(-1%, -1%); }
.tile-shot em { position: absolute; left: 10px; bottom: 10px; font: 500 11px/1 var(--font-body, system-ui); font-style: normal; color: #15803d; background: #effaf3; border: 1px solid #bfe5cc; padding: 4px 8px; border-radius: 7px; }
.footer__legal { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; }
.footer__legal a { color: inherit; text-decoration: none; opacity: .8; }
.footer__legal a:hover { opacity: 1; text-decoration: underline; }
