/* ============================================================
   Client Onboarding Workflow - showcase page (Givata)
   Dark slate with an electric cyan signal. A third register,
   distinct from /lattice (light violet), /pdf-forge (dark amber)
   and /real-estate (light green) - this one is a systems diagram,
   so it reads like a control surface.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

:root {
  --bg:        oklch(0.175 0.018 245);
  --surface:   oklch(0.215 0.022 245);
  --surface-2: oklch(0.255 0.026 245);
  --ink:       oklch(0.965 0.006 240);
  --muted:     oklch(0.780 0.016 240);
  --faint:     oklch(0.630 0.018 240);
  --line:      oklch(0.320 0.026 245);
  --line-2:    oklch(0.400 0.030 245);

  --primary:      oklch(0.800 0.140 205);
  --primary-hi:   oklch(0.880 0.120 205);
  --primary-tint: oklch(0.320 0.070 210);
  --ok:           oklch(0.820 0.150 155);
  --warn:         oklch(0.840 0.140 85);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --shell: 1180px;
  --pad: clamp(1.15rem, 4vw, 2.25rem);
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.06rem); line-height: 1.62;
  letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 500; background: var(--primary); color: oklch(0.18 0.02 245); padding: 0.6rem 1rem; border-radius: var(--r-sm); font-weight: 600; transition: top 0.2s; }
.skip-link:focus { top: 12px; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.3rem, 1.45rem + 3.7vw, 3.9rem); }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.55rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); }
h4 { font-size: 1.05rem; letter-spacing: -0.015em; }
.eyebrow { font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--primary); margin-bottom: 1.1rem; }
.lede { color: var(--muted); font-size: clamp(1.04rem, 1rem + 0.34vw, 1.2rem); max-width: 62ch; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.62rem 1.05rem; border-radius: 999px; font-weight: 600; font-size: 0.94rem; border: 1px solid transparent; transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease); }
.btn--primary { background: var(--primary); color: oklch(0.18 0.02 245); }
.btn--primary:hover { background: var(--primary-hi); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.nav { position: sticky; top: 0; z-index: 100; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.25s var(--ease); }
.nav--scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; font-size: 0.93rem; color: var(--muted); }
.nav__links a:hover { color: var(--primary); }
.nav__menu { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__menu span { width: 16px; height: 1.5px; background: var(--ink); display: block; }
@media (max-width: 940px) {
  .nav__links { position: absolute; inset: 66px 0 auto 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.5rem var(--pad) 1rem; display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-left: auto; }
  .nav__menu { display: flex; }
}

.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 66ch; margin-bottom: clamp(2.2rem, 4.5vw, 3.2rem); }
.section__head h2 { margin-bottom: 1rem; }

.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); position: relative; }
.hero h1 { margin-bottom: 1.4rem; max-width: 19ch; }
.hero__lede { margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.5rem; }
.hero__note { color: var(--faint); font-size: 0.92rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(2.2rem, 4.5vw, 3.2rem); }
.stat { background: var(--bg); padding: 1.25rem 1.35rem; }
.stat b { display: block; font-family: var(--mono); font-size: 1.45rem; color: var(--primary); letter-spacing: -0.02em; }
.stat span { display: block; color: var(--faint); font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Interactive workflow map ---------- */
.flow { border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.flow__bar { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.flow__title { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-right: auto; }
.flow__body { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0; min-height: 520px; }
@media (max-width: 900px) { .flow__body { grid-template-columns: 1fr; } }

.track { padding: 1.4rem 1.2rem; border-right: 1px solid var(--line); display: grid; gap: 0.5rem; align-content: start; }
@media (max-width: 900px) { .track { border-right: 0; border-bottom: 1px solid var(--line); } }

.node {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); text-align: left; width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.node:hover { border-color: var(--line-2); transform: translateX(2px); }
.node.is-active { border-color: var(--primary); background: color-mix(in oklab, var(--primary-tint) 45%, var(--bg)); }
.node.is-done .node__num { background: var(--ok); color: oklch(0.18 0.02 245); border-color: transparent; }
.node.is-running { border-color: var(--primary); }
.node.is-running .node__num { background: var(--primary); color: oklch(0.18 0.02 245); border-color: transparent; animation: pulse 1s var(--ease) infinite; }
.node.is-waiting .node__num { background: var(--warn); color: oklch(0.2 0.02 60); border-color: transparent; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--primary) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .node.is-running .node__num { animation: none; } }

.node__num { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.node__label { font-weight: 600; font-size: 0.97rem; }
.node__sub { display: block; color: var(--faint); font-size: 0.82rem; font-weight: 400; margin-top: 0.1rem; }
.node__apps { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); text-align: right; letter-spacing: 0.02em; }
.node--gate { border-style: dashed; }

.detail { padding: 1.4rem 1.4rem; display: grid; align-content: start; gap: 0.9rem; }
.detail__k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.detail h3 { font-size: 1.35rem; }
.detail p { color: var(--muted); font-size: 0.96rem; }
.detail__list { display: grid; gap: 0.5rem; margin-top: 0.2rem; }
.detail__list li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); font-size: 0.92rem; }
.detail__list svg { flex: none; margin-top: 0.3rem; color: var(--primary); }
.detail__apps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.tag { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.22rem 0.6rem; }
.tag--out { border-color: var(--primary-tint); color: var(--primary); }

.log { border-top: 1px solid var(--line); background: oklch(0.145 0.016 245); padding: 0.9rem 1.2rem; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); min-height: 128px; max-height: 200px; overflow-y: auto; }
.log__line { padding: 0.16rem 0; opacity: 0; animation: fadein 0.3s var(--ease) forwards; }
.log__line b { color: var(--primary); font-weight: 500; }
.log__line.is-ok b { color: var(--ok); }
.log__line.is-wait b { color: var(--warn); }
@keyframes fadein { to { opacity: 1; } }
.log__hint { color: var(--faint); }

/* ---------- Stack grid ---------- */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.tool { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem 1.35rem; }
.tool h4 { margin-bottom: 0.35rem; }
.tool p { color: var(--muted); font-size: 0.9rem; }
.tool__role { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.55rem; }

.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1rem; }
.fcard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.35rem 1.45rem; }
.fcard h4 { margin-bottom: 0.5rem; }
.fcard p { color: var(--muted); font-size: 0.92rem; }
.section--tint .fcard, .section--tint .tool { background: var(--surface-2); border-color: var(--line-2); }

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ba__col { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; background: var(--bg); }
.ba__col--after { border-color: var(--primary-tint); background: var(--surface-2); }
.ba__k { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.9rem; }
.ba__col--after .ba__k { color: var(--primary); }
.ba__col li { color: var(--muted); font-size: 0.94rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.ba__col li:last-child { border-bottom: 0; }
@media (max-width: 720px) { .ba { grid-template-columns: 1fr; } }

.cta-band { padding: clamp(3.2rem, 6vw, 5.5rem) 0; }
.cta-panel { border: 1px solid var(--line-2); border-radius: var(--r-xl); background: linear-gradient(150deg, var(--primary-tint), var(--surface)); padding: clamp(2.1rem, 5vw, 3.4rem); text-align: center; }
.cta-panel h2 { margin-bottom: 0.9rem; }
.cta-panel p { color: var(--muted); margin-bottom: 1.7rem; max-width: 54ch; margin-inline: auto; }

.footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer__tag { color: var(--faint); font-size: 0.9rem; }
.footer__links { display: flex; gap: 1.2rem; margin-left: auto; font-size: 0.9rem; color: var(--muted); }
.footer__links a:hover { color: var(--primary); }
.footer__legal { width: 100%; color: var(--faint); font-size: 0.85rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer__legal a { color: var(--primary); }

.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* Givata home link (back to givata.com root) */
.nav__lead { display: inline-flex; align-items: center; gap: 0.7rem; min-width: 0; }
.nav__home { display: inline-flex; align-items: center; gap: 0.4em; color: var(--muted); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; transition: color 0.2s var(--ease); }
.nav__home:hover { color: var(--ink); }
.nav__home img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.nav__sep { width: 1px; height: 20px; background: var(--line-2); flex-shrink: 0; }
@media (max-width: 560px) { .nav__home span { display: none; } .nav__lead { gap: 0.5rem; } }
