/* ============================================================
   HARMOS site — shared styles (nav, subpages, chatbot)
   Design tokens follow the original about.html story page.
   ============================================================ */
:root {
  --bg: #050506;
  --panel: #0c0c0f;
  --text: #f5f4f8;
  --muted: #9e9aa7;
  --purple: #8b3dff;
  --purple-soft: #b786ff;
  --line: rgba(255, 255, 255, .12);
}

/* ---------- Top navigation (all pages) ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(5, 5, 6, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 720;
  font-size: 13px;
  letter-spacing: .30em;
  text-indent: .30em;
}
.site-nav .brand svg { width: 22px; height: 28px; flex-shrink: 0; }
.site-nav .links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
}
.site-nav .links a {
  color: #c9c5d2;
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .06em;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav .links a:hover { color: #fff; }
.site-nav .links a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--purple);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  width: 40px; height: 36px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav .links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8, 8, 10, .97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav .links.open { display: flex; }
  .site-nav .links a {
    padding: 14px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
  }
  .site-nav .links a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, .05); color: var(--purple-soft); }
}

/* ---------- Subpage layout ---------- */
.page body, body.subpage {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.subpage { overflow-x: hidden; }

.page-hero {
  position: relative;
  padding: clamp(120px, 18vh, 190px) 24px clamp(48px, 8vw, 84px);
  text-align: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 61, 255, .13), transparent 55%),
    var(--bg);
}
.page-hero .eyebrow {
  margin: 0 0 14px;
  color: var(--purple-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.page-hero h1 {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(34px, 5.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 560;
}
.page-hero .lede {
  margin: 20px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65;
}

.section {
  padding: clamp(40px, 6vw, 72px) 24px;
}
.section-inner { width: min(980px, 100%); margin: 0 auto; }
.section-inner.narrow { width: min(760px, 100%); }
.section h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -.04em;
  font-weight: 560;
}
.section .sub {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card .k {
  color: var(--purple-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.card h3 {
  margin: 0;
  font-size: clamp(19px, 2.2vw, 24px);
  letter-spacing: -.03em;
  font-weight: 560;
  line-height: 1.2;
}
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card .spacer { flex: 1; }
a.card {
  color: var(--text);
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease;
}
a.card:hover { border-color: rgba(139, 61, 255, .55); transform: translateY(-3px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #a967ff, #6f20ef);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn.ghost {
  background: none;
  border-color: var(--line);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--purple-soft); }
.btn.small { padding: 9px 18px; font-size: 13px; }

/* ---------- Steps (numbered process) ---------- */
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px 22px 74px;
}
ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 22px;
  color: var(--purple-soft);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: .06em;
}
ol.steps h3 { margin: 0 0 6px; font-size: 17px; font-weight: 620; letter-spacing: -.01em; }
ol.steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.kbd {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: #e8e4f2;
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- Notice box ---------- */
.notice {
  border: 1px solid rgba(139, 61, 255, .4);
  border-radius: 16px;
  background: rgba(139, 61, 255, .07);
  padding: 22px 24px;
}
.notice h3 { margin: 0 0 6px; font-size: 16px; font-weight: 620; }
.notice p { margin: 0; color: #cfcadb; font-size: 14.5px; line-height: 1.65; }

/* ---------- Contributors ---------- */
.people { display: grid; gap: 12px; }
.person {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.person .name { font-size: clamp(17px, 2vw, 21px); font-weight: 560; letter-spacing: -.02em; }
.person .role { color: var(--purple-soft); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

/* ---------- Video placeholders ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.video-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, rgba(139, 61, 255, .10), transparent 60%),
    var(--panel);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
}
.video-slot .play {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--purple-soft);
  font-size: 15px;
}
.video-slot h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; }
.video-slot p { margin: 0; color: var(--muted); font-size: 12.5px; }
.video-slot iframe, .video-slot video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; border-radius: 16px;
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .75, .25, 1);
}
.js [data-reveal].visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px 24px 44px;
  color: #706c77;
  background: #08080a;
  border-top: 1px solid rgba(255, 255, 255, .06);
  text-align: center;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.site-footer a { color: #a49fb0; text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Chatbot ---------- */
.chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(183, 134, 255, .5);
  background: linear-gradient(135deg, #a967ff, #6f20ef);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(111, 32, 239, .45);
  display: grid;
  place-items: center;
  transition: transform .2s ease;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 70;
  width: min(360px, calc(100vw - 40px));
  height: min(480px, 70vh);
  display: none;
  flex-direction: column;
  background: #0b0b0e;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.chat-panel.open { display: flex; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(139, 61, 255, .10);
  border-bottom: 1px solid var(--line);
}
.chat-head svg { width: 18px; height: 23px; }
.chat-head .t { font-size: 13.5px; font-weight: 640; letter-spacing: .04em; }
.chat-head .s { color: var(--muted); font-size: 11px; }
.chat-head .close {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line;
}
.msg.bot { background: #17161c; border: 1px solid rgba(255, 255, 255, .07); color: #e6e2ef; align-self: flex-start; border-bottom-left-radius: 5px; }
.msg.user { background: linear-gradient(135deg, #a967ff, #6f20ef); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.msg a { color: var(--purple-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips button {
  background: none;
  border: 1px solid rgba(183, 134, 255, .45);
  color: var(--purple-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.chips button:hover { background: rgba(139, 61, 255, .12); }
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.chat-input input {
  flex: 1;
  background: #141318;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 16px;
  outline: none;
}
.chat-input input:focus { border-color: rgba(139, 61, 255, .6); }
.chat-input button {
  background: linear-gradient(135deg, #a967ff, #6f20ef);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0 18px;
  cursor: pointer;
}

/* ---------- A11y & motion ---------- */
:focus-visible { outline: 2px solid var(--purple-soft); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, a.card, .chat-fab { transition: none; }
}

/* ============================================================
   Home v2 — family, pipeline, proof, showcase
   ============================================================ */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
}
.family-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  text-align: center;
  transition: border-color .25s ease, transform .25s ease;
}
.family-card:hover { border-color: rgba(139,61,255,.55); transform: translateY(-3px); }
.family-card img {
  width: 86px; height: auto;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.5);
}
.family-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.family-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.badge.live { background: rgba(64, 220, 130, .12); color: #6fe2a4; border: 1px solid rgba(64,220,130,.35); }
.badge.soon { background: rgba(139, 61, 255, .10); color: var(--purple-soft); border: 1px solid rgba(139,61,255,.35); }

/* Pipeline strip */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px clamp(8px, 2vw, 18px);
  padding: 26px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.pl-item { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 74px; }
.pl-item img { height: 40px; width: auto; }
.pl-item.hub svg { height: 46px; width: auto; }
.pl-item span { color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.pl-item .tag { color: #7f7a8a; font-size: 9px; letter-spacing: .06em; }
.pl-arrow { color: #5e5965; font-size: 18px; padding-bottom: 22px; }
.pl-item.corenet { background:#fff; border-radius:10px; padding:8px 10px 4px; }
.pl-item.corenet span { color:#333; }

/* Proof band */
.proof {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 10vw, 110px) 24px;
  background:
    linear-gradient(rgba(5,5,6,.78), rgba(5,5,6,.88)),
    url("project/shenton.jpg") center 30% / cover no-repeat;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.proof .section-inner { text-align: center; }
.proof .eyebrow {
  margin: 0 0 14px;
  color: var(--purple-soft);
  font-size: 10px; font-weight: 760;
  letter-spacing: .28em; text-transform: uppercase;
}
.proof h2 { margin: 0 auto 6px; max-width: 700px; font-size: clamp(28px, 4.4vw, 52px); letter-spacing: -.045em; font-weight: 560; line-height: 1.05; }
.proof .where { color: #b9b4c2; font-size: 14px; margin: 10px 0 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: clamp(34px, 5vw, 54px);
}
.stat {
  padding: 22px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(5,5,6,.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.stat .n { font-size: clamp(30px, 3.6vw, 44px); font-weight: 620; letter-spacing: -.04em; color: #fff; }
.stat .n em { font-style: normal; color: var(--purple-soft); }
.stat .l { margin-top: 6px; color: #b9b4c2; font-size: 12px; line-height: 1.45; }

/* Showcase gallery */
.gallery {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}
.gallery .col { display: grid; gap: 16px; align-content: start; }
.frame {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.frame .bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c2b31; }
.frame .bar b { margin-left: 8px; color: #8d8896; font-size: 10.5px; font-weight: 500; letter-spacing: .10em; text-transform: uppercase; }
.frame img { display: block; width: 100%; height: auto; }
.frame figcaption { padding: 12px 15px 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.frame figcaption strong { color: #e8e4f2; font-weight: 600; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* Checks strip */
.checks { text-align: center; }
.checks .quote {
  margin: 0 auto 26px;
  max-width: 720px;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -.03em;
  font-weight: 540;
  line-height: 1.25;
}
.checks .quote span { color: var(--purple-soft); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.pill {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #cfcadb;
  font-size: 12.5px;
}
.pill::before { content: "✓  "; color: #6fe2a4; }

/* ============================================================
   v3 — module pages, placeholders, platform reorganisation
   ============================================================ */
a.family-card { color: var(--text); text-decoration: none; display: block; }

.module-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.module-hero img.appicon {
  width: 104px; height: auto;
  border-radius: 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

.placeholder {
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(139,61,255,.06), transparent 70%),
    rgba(255,255,255,.015);
  padding: 34px 26px;
  text-align: center;
}
.placeholder .k {
  display: block;
  margin-bottom: 10px;
  color: var(--purple-soft);
  font-size: 10px; font-weight: 760;
  letter-spacing: .24em; text-transform: uppercase;
}
.placeholder p { margin: 0 auto; max-width: 52ch; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.btn.disabled {
  background: none;
  border: 1px solid var(--line);
  color: #7f7a8a;
  cursor: default;
  pointer-events: none;
}

.group-title {
  display: flex; align-items: center; gap: 12px;
  margin: 40px 0 16px;
}
.group-title img { width: 34px; height: auto; border-radius: 9px; }
.group-title h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.group-title:first-of-type { margin-top: 0; }

.module-nav-note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 26px; }
.module-nav-note a { color: var(--purple-soft); }

/* ============================================================
   v4 — contact dock, roadmap timeline, visit counter, 404
   ============================================================ */
/* Floating dock: chat above, contact below, both bottom-right */
.chat-fab { bottom: 86px; }
.chat-panel { bottom: 152px; }

.contact-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(183, 134, 255, .5);
  background: #0b0b0e;
  color: var(--purple-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  transition: transform .2s ease, background .2s ease;
}
.contact-fab:hover { transform: scale(1.06); background: #141319; }
.contact-fab svg { width: 24px; height: 24px; }

.contact-menu {
  position: fixed;
  right: 86px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
}
.contact-menu a {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateX(10px) scale(.6);
  transition: opacity .22s ease, transform .22s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none;
}
.contact-menu.open a { opacity: 1; transform: none; pointer-events: auto; }
.contact-menu.open a:nth-child(2) { transition-delay: .05s; }
.contact-menu.open a:nth-child(3) { transition-delay: .10s; }
.contact-menu a svg { width: 22px; height: 22px; }
.contact-menu a.wa { background: #22c55e; }
.contact-menu a.mail { background: linear-gradient(135deg, #a967ff, #6f20ef); }
.contact-menu a.page { background: #17161c; border: 1px solid var(--line); color: var(--purple-soft); }
.contact-menu a:hover { filter: brightness(1.1); }

/* Roadmap timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(#8b3dff, rgba(139, 61, 255, .12));
}
.timeline li { position: relative; padding: 0 0 26px 42px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 3px; top: 5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--purple);
}
.timeline li.done::before { background: var(--purple); }
.timeline li.faded::before { border-color: #4a4657; }
.timeline h3 { margin: 0 0 4px; font-size: 17px; font-weight: 620; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.timeline p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 62ch; }

/* Visit counter */
.visit-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 8px 24px 40px;
  background: #08080a;
}
.vstat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}
.vstat .v { font-size: 16px; font-weight: 640; color: #e8e4f2; letter-spacing: -.01em; min-width: 20px; text-align: right; }
.vstat .k2 { color: #7f7a8a; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.vstat .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; align-self: center; box-shadow: 0 0 8px rgba(34, 197, 94, .8); }

/* 404 */
.err-hero { min-height: 72vh; display: grid; place-items: center; text-align: center; padding: 120px 24px 60px; }
.err-hero .code { font-size: clamp(90px, 18vw, 180px); font-weight: 620; letter-spacing: -.06em; line-height: 1; background: linear-gradient(135deg, #b786ff, #6f20ef); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================================================
   v5 — real logo assets, live-demo slot, tabbed showcase,
        ideas grid, lightbox, footer brand
   ============================================================ */
.site-nav .brand img { width: 21px; height: 28px; flex-shrink: 0; object-fit: contain; }
.chat-head img { width: 18px; height: 23px; object-fit: contain; }
.pl-item.hub img.hubmark { height: 46px; width: auto; }

/* Live demo video slot */
.demo-video { position: relative; }
.demo-video .poster {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  background: #000;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.demo-video .poster img.bgp {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .38;
  z-index: -1;
}
.demo-video .playwrap { text-align: center; }
.demo-video .playbtn {
  width: 76px; height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(183, 134, 255, .65);
  background: rgba(12, 12, 15, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 25px;
  padding-left: 6px;
  box-shadow: 0 0 40px rgba(139, 61, 255, .35);
}
.demo-video .playwrap b { display: block; font-size: 15px; font-weight: 620; letter-spacing: .02em; }
.demo-video .playwrap span { color: #b9b4c2; font-size: 12.5px; }
.demo-video .poster iframe, .demo-video .poster video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Tabbed showcase */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.tabs button {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #cfcadb;
  font-family: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.tabs button[aria-selected="true"] {
  background: rgba(139, 61, 255, .14);
  border-color: rgba(139, 61, 255, .6);
  color: #fff;
}
.tabs button .tno { color: var(--purple-soft); font-weight: 720; margin-right: 7px; }
.tab-panels .frame { display: none; }
.tab-panels .frame.active { display: block; }
.tab-panels .shot {
  height: min(520px, 58vh);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(139, 61, 255, .07), transparent 60%),
    #0a0a0d;
  display: grid;
  place-items: center;
  padding: 18px;
}
.tab-panels .shot img {
  max-width: 100%;
  max-height: calc(min(520px, 58vh) - 36px);
  width: auto; height: auto;
  border-radius: 8px;
  cursor: zoom-in;
}

/* Ideas grid */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.idea-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.idea-card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 620; letter-spacing: -.01em; color: #ece9f4; }
.idea-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(4, 4, 6, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .8);
}

/* Footer brand */
.site-footer .foot-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}
.site-footer .foot-brand img.hm { height: 52px; width: auto; }
.site-footer .foot-brand img.ktp { height: 20px; width: auto; opacity: .8; }
.site-footer .foot-brand .x { color: #4a4657; font-size: 13px; }

/* ============================================================
   v6 — uniform tool pages: video frames, concept steps
   ============================================================ */
.frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.vid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.vid-grid .frame { margin: 0; }
.concept-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.concept-steps .cstep {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.concept-steps .cstep .no { color: var(--purple-soft); font-size: 11px; font-weight: 760; letter-spacing: .18em; }
.concept-steps .cstep h4 { margin: 6px 0 5px; font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.concept-steps .cstep p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
details.walkthrough {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 0;
}
details.walkthrough summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 620;
  font-size: 15px;
  color: var(--purple-soft);
  list-style: none;
}
details.walkthrough summary::before { content: "▸  "; }
details.walkthrough[open] summary::before { content: "▾  "; }
details.walkthrough .inner { padding: 4px 20px 20px; }
details.walkthrough .inner ol.steps li { background: #101014; }

/* ============================================================
   v7 — square project grid, compact UI frame, dock licence item
   ============================================================ */
.ui-frame { max-width: 520px; margin: 0 auto; }
.ui-frame .shot {
  height: auto;
  padding: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(139, 61, 255, .07), transparent 60%),
    #0a0a0d;
}
.ui-frame .shot img {
  max-width: 100%;
  max-height: 380px;
  width: auto; height: auto;
  border-radius: 8px;
  cursor: zoom-in;
}

.square-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.square-grid .frame { margin: 0; display: flex; flex-direction: column; }
.square-grid .frame .shot {
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 0;
  overflow: hidden;
}
.square-grid .frame .shot img {
  width: 100%; height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  cursor: zoom-in;
}
.square-grid .frame figcaption { flex: 1; }

.contact-menu a.lic { background: #17161c; border: 1px solid rgba(183, 134, 255, .45); color: var(--purple-soft); }
.contact-menu.open a:nth-child(4) { transition-delay: .15s; }

/* ============================================================
   v8 — motion & interaction polish (nav, cards, buttons, reveal)
   ============================================================ */

/* Nav gains depth once the page scrolls */
.site-nav { transition: background .3s ease, box-shadow .3s ease, border-color .3s ease; }
.site-nav.scrolled {
  background: rgba(5, 5, 6, .92);
  border-bottom-color: rgba(255, 255, 255, .1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.site-nav .links a { position: relative; }
.site-nav .links a::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 3px;
  height: 1px;
  background: var(--purple-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav .links a:hover::after { transform: scaleX(1); }
.site-nav .links a[aria-current="page"]::after { display: none; }

/* Buttons: soft light sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform .55s ease;
  pointer-events: none;
}
.btn:hover::before { transform: translateX(130%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost::before, .btn.disabled::before { display: none; }

/* Live badge: quiet pulsing dot */
.badge.live { display: inline-flex; align-items: center; gap: 6px; }
.badge.live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6fe2a4;
  box-shadow: 0 0 0 0 rgba(111, 226, 164, .55);
  animation: badge-pulse 2.2s ease-out infinite;
}
@keyframes badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 226, 164, .55); }
  70% { box-shadow: 0 0 0 7px rgba(111, 226, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 226, 164, 0); }
}

/* Consistent hover-lift for panel-style rows/cards that had none */
.idea-card, .concept-steps .cstep, ol.steps li, .person, .stat, .video-slot,
.timeline li h3, .pill {
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.idea-card:hover, .concept-steps .cstep:hover, ol.steps li:hover, .person:hover {
  border-color: rgba(139, 61, 255, .5);
  transform: translateY(-2px);
}
.stat, .stat * { transition: transform .3s ease; }
.stats:hover .stat { transform: none; }
.stat:hover { transform: translateY(-3px); border-color: rgba(139, 61, 255, .45); }

/* Screenshot / gallery images: gentle zoom on hover */
.tab-panels .shot img, .square-grid .frame .shot img {
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.tab-panels .frame:hover .shot img, .square-grid .frame:hover .shot img {
  transform: scale(1.045);
}
.frame { transition: border-color .3s ease, transform .3s ease; }
.square-grid .frame:hover { border-color: rgba(139, 61, 255, .4); transform: translateY(-3px); }

/* Pipeline: a quiet "sync" pulse travelling along the arrows */
.pl-arrow { display: inline-block; animation: pl-pulse 2.4s ease-in-out infinite; }
.pl-arrow:nth-of-type(2) { animation-delay: .3s; }
.pl-arrow:nth-of-type(4) { animation-delay: .6s; }
.pl-arrow:nth-of-type(6) { animation-delay: .9s; }
.pl-arrow:nth-of-type(8) { animation-delay: 1.2s; }
@keyframes pl-pulse {
  0%, 100% { opacity: .45; transform: translateX(0); }
  50% { opacity: 1; color: var(--purple-soft); transform: translateX(3px); }
}
.pl-item.hub img.hubmark { transition: transform .3s ease, filter .3s ease; }
.pipeline:hover .pl-item.hub img.hubmark { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(139, 61, 255, .55)); }

/* Staggered reveal for grids/lists once their wrapper enters view */
.js [data-reveal].family-grid > *,
.js [data-reveal].card-grid > *,
.js [data-reveal].ideas-grid > *,
.js [data-reveal].square-grid > *,
.js [data-reveal].vid-grid > *,
.js [data-reveal].video-grid > *,
.js [data-reveal].concept-steps > *,
.js [data-reveal].stats > *,
.js [data-reveal].pills > *,
.js [data-reveal].principles > *,
.js [data-reveal].people > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .75, .25, 1);
}
.js [data-reveal].visible > * { opacity: 1; transform: none; }
[data-reveal] > *:nth-child(1) { transition-delay: .02s; }
[data-reveal] > *:nth-child(2) { transition-delay: .08s; }
[data-reveal] > *:nth-child(3) { transition-delay: .14s; }
[data-reveal] > *:nth-child(4) { transition-delay: .20s; }
[data-reveal] > *:nth-child(5) { transition-delay: .26s; }
[data-reveal] > *:nth-child(6) { transition-delay: .32s; }
[data-reveal] > *:nth-child(7) { transition-delay: .38s; }
[data-reveal] > *:nth-child(8) { transition-delay: .44s; }

/* Quiet page-in fade so navigation between pages doesn't feel abrupt */
body.subpage { animation: page-fade .45s ease; }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .btn::before, .badge.live::before, .pl-arrow, body.subpage { animation: none; transition: none; }
  .js [data-reveal].family-grid > *, .js [data-reveal].card-grid > *, .js [data-reveal].ideas-grid > *,
  .js [data-reveal].square-grid > *, .js [data-reveal].vid-grid > *, .js [data-reveal].video-grid > *,
  .js [data-reveal].concept-steps > *, .js [data-reveal].stats > *, .js [data-reveal].pills > *,
  .js [data-reveal].principles > *, .js [data-reveal].people > * { opacity: 1; transform: none; transition: none; }
}

/* Download cards: keep installer names centred and inside the card */
.family-card p:has(> .kbd) { display: flex; justify-content: center; }
.family-card .kbd {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  padding: 3px 10px;
}

/* ============================================================
   RESPONSIVE — tablet (≤1000px) and mobile (≤820px / ≤560px)
   ============================================================ */

/* Grid items may shrink below their content width (prevents overflow) */
ol.steps li, .card, .family-card, .idea-card, .stat, .person { min-width: 0; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  /* 4-card rows become a clean 2 × 2 instead of 3 + 1 orphan */
  .family-grid,
  .card-grid:has(> :nth-child(4):last-child),
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ideas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-inner { width: min(980px, 100%); }
}

/* ---------- Mobile + small tablet ---------- */
@media (max-width: 820px) {
  /* long key-combos / menu paths wrap instead of pushing cards off-screen */
  .kbd { white-space: normal; overflow-wrap: anywhere; }

  /* pipeline: tidy 3 × 2 grid, arrows hidden */
  .pipeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 10px;
    justify-items: center;
    padding: 22px 14px;
  }
  .pipeline .pl-arrow { display: none; }

  /* showcase tabs: one swipeable row */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-inline: -24px;
    padding: 2px 24px 6px;
    scroll-snap-type: x proximity;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; scroll-snap-align: start; }

  /* floating buttons: smaller, tighter to the edge */
  .chat-fab, .contact-fab { width: 48px; height: 48px; right: 14px; }
  .contact-fab { bottom: 14px; }
  .chat-fab { bottom: 70px; font-size: 20px; }
  .contact-fab svg { width: 21px; height: 21px; }
  .chat-panel { right: 12px; bottom: 128px; width: calc(100vw - 24px); height: min(460px, 64vh); }
  .contact-menu { right: 72px; bottom: 18px; }
  .site-footer { padding-bottom: 96px; }

  /* comfortable tap targets */
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; }
}

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .family-grid,
  .card-grid,
  .card-grid:has(> :nth-child(4):last-child),
  .ideas-grid { grid-template-columns: 1fr !important; }
  .stats { gap: 10px; }
  .stat { padding: 18px 10px; }

  .section { padding-left: 18px; padding-right: 18px; }
  .tabs { margin-inline: -18px; padding-inline: 18px; }
  .page-hero { padding-left: 18px; padding-right: 18px; }
  .page-hero h1 { font-size: clamp(30px, 9vw, 40px); }

  /* numbered steps: less left padding so text gets the width */
  ol.steps li { padding: 18px 16px 18px 56px; }
  ol.steps li::before { left: 16px; }

  /* person rows stack name over role */
  .person { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* hero buttons full width, stacked */
  .page-hero .btn { width: 100%; max-width: 320px; margin-left: 0 !important; }
  .page-hero p:has(> .btn) { display: flex; flex-direction: column; align-items: center; gap: 10px; }
}
