/* ============================================================
   CyberNate Consulting — Design System
   Register: Obsidian + Signal-Cyan "security-ops" / systems-integrator
   Fresh visual language; deliberately distinct from sibling demo sites.
   ============================================================ */

:root {
  /* Core palette */
  --obsidian: #0B0F14;
  --slate: #1B2733;
  --slate-2: #16202B;
  --signal: #22D3EE;
  --trust: #2563EB;
  --mist: #F4F7FA;
  --white: #FFFFFF;
  --ink: #0B0F14;
  --light: #E6EDF3;
  --muted: #8B9AA8;
  --muted-dk: #5C6B78;
  --line: rgba(230, 237, 243, 0.10);
  --line-strong: rgba(230, 237, 243, 0.18);

  /* Accent gradient */
  --grad: linear-gradient(120deg, #22D3EE 0%, #2563EB 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,211,238,0.14), rgba(37,99,235,0.10));

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Rhythm */
  --maxw: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,0.65);
  --shadow-cyan: 0 0 0 1px rgba(34,211,238,0.25), 0 14px 40px -16px rgba(34,211,238,0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--obsidian);
  color: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--signal); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { color: var(--white); }

h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; color: var(--white); }
p { color: var(--muted); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }

/* Eyebrow / kicker */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--signal);
  display: inline-block;
}

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.section-head p { font-size: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad); color: #04121a; box-shadow: var(--shadow-cyan); }
.btn--primary:hover { color: #04121a; box-shadow: 0 0 0 1px rgba(34,211,238,0.5), 0 18px 44px -14px rgba(34,211,238,0.55); }
.btn--ghost { background: transparent; color: var(--light); border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--white); border-color: var(--signal); background: rgba(34,211,238,0.06); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  background: var(--grad);
  color: #04121a;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 30px;
  display: flex; align-items: center;
}
.demo-ribbon__track {
  display: inline-flex;
  gap: 48px;
  padding-left: 100%;
  animation: ribbon 26s linear infinite;
  will-change: transform;
}
.demo-ribbon__track span { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.demo-ribbon__track span::before { content: "●"; font-size: 8px; opacity: 0.6; }
@keyframes ribbon { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .demo-ribbon__track { animation: none; padding-left: 0; justify-content: center; width: 100%; }
}

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,20,0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand svg { width: 34px; height: 34px; display: block; }
.brand__name { font-weight: 700; color: var(--white); font-size: 18px; letter-spacing: -0.01em; }
.brand__name b { font-weight: 700; }
.brand__name span { color: var(--muted); font-weight: 500; }
.nav__links { display: flex; gap: 30px; align-items: center; }
.nav__links a { color: var(--light); font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: var(--signal); }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; background: none; border: 0; color: var(--light); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 84px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 480px at 78% 18%, rgba(37,99,235,0.18), transparent 60%),
    radial-gradient(640px 420px at 12% 88%, rgba(34,211,238,0.10), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); margin-bottom: 22px; }
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: 19px; color: var(--muted); max-width: 540px; margin-bottom: 30px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero__stats { display: flex; gap: 26px; flex-wrap: wrap; }
.stat { }
.stat__num { font-size: 26px; font-weight: 700; color: var(--white); font-family: var(--mono); letter-spacing: -0.02em; }
.stat__num .unit { color: var(--signal); }
.stat__label { font-size: 13px; color: var(--muted-dk); text-transform: uppercase; letter-spacing: 0.08em; }

/* Hero visual: live ZT mesh panel */
.hero__visual {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--slate) 0%, var(--slate-2) 100%);
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero__visual::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(34,211,238,0.06), transparent 40%);
  pointer-events: none;
}
.panel__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel__title { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.panel__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(34,211,238,0.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.mesh { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); background: rgba(0,0,0,0.25); }
.mesh .edge { stroke: rgba(34,211,238,0.45); stroke-width: 1.4; }
.mesh .edge.dim { stroke: rgba(230,237,243,0.10); }
.mesh .node { fill: var(--slate); stroke: var(--signal); stroke-width: 1.6; }
.mesh .node.core { fill: var(--signal); }
.mesh .label { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.mesh .ping { fill: var(--signal); }

.panel__legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.panel__legend span { font-family: var(--mono); font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.panel__legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------- Trust bar (the universe as clients) ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; background: var(--slate-2); }
.trust__label { text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dk); margin-bottom: 20px; }
.trust__row { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust__logo { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 17px; opacity: 0.78; text-decoration: none; transition: opacity .2s ease, color .2s ease; }
.trust__logo:hover { opacity: 1; color: var(--light); }
.trust__logo .mk { width: 18px; height: 18px; border-radius: 5px; background: var(--grad-soft); border: 1px solid var(--line-strong); display: inline-block; }

/* ---------- Cards / capabilities ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.cap-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: linear-gradient(160deg, var(--slate) 0%, var(--slate-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card__icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad-soft); border: 1px solid rgba(34,211,238,0.22);
}
.card__icon svg { width: 23px; height: 23px; stroke: var(--signal); fill: none; stroke-width: 1.7; }
.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { font-size: 15px; }
.card__tag { font-family: var(--mono); font-size: 11px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 14px; display: inline-block; }

/* ---------- Process band: Assess -> Deploy -> Manage ---------- */
.process { background: var(--slate-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.step { padding: 8px 28px; position: relative; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; right: -1px; width: 1px; height: calc(100% - 26px);
  background: var(--line);
}
.step__num { font-family: var(--mono); font-size: 13px; color: var(--signal); border: 1px solid rgba(34,211,238,0.3); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { font-size: 15px; }

/* ---------- Industries ---------- */
.ind-grid { grid-template-columns: repeat(4, 1fr); }
.ind {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--slate-2);
  transition: border-color .2s ease, transform .2s ease;
}
.ind:hover { border-color: rgba(34,211,238,0.3); transform: translateY(-3px); }
.ind h3 { font-size: 17px; margin-bottom: 8px; }
.ind p { font-size: 14px; }
.ind__client { margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted-dk); }
.ind__client b { color: var(--signal); font-weight: 600; }
.ind__client a { color: var(--signal); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.ind__client a:hover { border-bottom-color: var(--signal); }

/* ---------- Case studies ---------- */
.case {
  background: linear-gradient(160deg, var(--slate) 0%, var(--slate-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  display: flex; flex-direction: column; gap: 14px;
}
.case__metric { font-size: 40px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case h3 { font-size: 18px; }
.case p { font-size: 15px; }
.case__sector { font-family: var(--mono); font-size: 11px; color: var(--muted-dk); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Insights ---------- */
.insight { display: flex; flex-direction: column; }
.insight__img { height: 150px; border-radius: var(--radius-sm); background: var(--grad-soft); border: 1px solid var(--line); margin-bottom: 16px; position: relative; overflow: hidden; }
.insight__img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.insight__cat { font-family: var(--mono); font-size: 11px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.insight h3 { font-size: 18px; margin-bottom: 8px; }
.insight p { font-size: 14px; margin-bottom: 12px; }

/* ---------- Partner band ---------- */
.partner { position: relative; overflow: hidden; }
.partner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 80% 50%, rgba(37,99,235,0.16), transparent 60%); }
.partner__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.partner__badge { display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(34,211,238,0.3); background: var(--grad-soft); padding: 8px 14px; border-radius: 999px; font-family: var(--mono); font-size: 12px; color: var(--signal); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.counters { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.counter__num { font-size: 38px; font-weight: 700; font-family: var(--mono); color: var(--white); letter-spacing: -0.02em; }
.counter__num .unit { color: var(--signal); }
.counter__label { font-size: 14px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background: linear-gradient(160deg, var(--slate) 0%, var(--obsidian) 100%); border-top: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }
.cta-band p { font-size: 18px; max-width: 600px; margin: 0 auto 30px; }
.cta-band .hero__cta { justify-content: center; }

/* ---------- Footer ---------- */
.footer { background: #070A0E; border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; margin-bottom: 44px; }
.footer__brand p { font-size: 14px; margin-top: 16px; max-width: 280px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-dk); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a { color: var(--muted); font-size: 14px; }
.footer li a:hover { color: var(--signal); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.footer__bottom p { font-size: 13px; color: var(--muted-dk); }
.footer__social { display: flex; gap: 16px; }
.footer__social a { color: var(--muted); }

/* ---------- Chat widget ---------- */
.cn-chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad); border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 14px 36px -10px rgba(34,211,238,0.55);
  transition: transform .18s ease;
}
.cn-chat-fab:hover { transform: scale(1.06); }
.cn-chat-fab svg { width: 26px; height: 26px; stroke: #04121a; fill: none; stroke-width: 2; }
.cn-chat-fab__pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--signal); animation: fabpulse 2.6s ease-out infinite; }
@keyframes fabpulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }

.cn-chat {
  position: fixed; bottom: 24px; right: 24px; z-index: 81;
  width: 384px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 48px);
  background: var(--slate); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: var(--shadow);
  display: none; flex-direction: column; overflow: hidden;
}
.cn-chat.open { display: flex; }
.cn-chat__head { background: linear-gradient(120deg, var(--slate) 0%, var(--slate-2) 100%); padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.cn-chat__avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--grad-soft); border: 1px solid rgba(34,211,238,0.25); display: grid; place-items: center; }
.cn-chat__avatar svg { width: 20px; height: 20px; }
.cn-chat__meta { flex: 1; }
.cn-chat__title { font-size: 15px; font-weight: 700; color: var(--white); }
.cn-chat__status { font-size: 12px; color: var(--signal); display: flex; align-items: center; gap: 6px; }
.cn-chat__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.cn-chat__close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; padding: 4px; }
.cn-chat__close:hover { color: var(--white); }

.cn-chat__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cn-msg { display: flex; gap: 10px; max-width: 88%; }
.cn-msg__bubble { padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.cn-msg--bot { align-self: flex-start; }
.cn-msg--bot .cn-msg__bubble { background: var(--slate-2); border: 1px solid var(--line); color: var(--light); border-top-left-radius: 4px; }
.cn-msg--user { align-self: flex-end; }
.cn-msg--user .cn-msg__bubble { background: var(--grad); color: #04121a; font-weight: 500; border-top-right-radius: 4px; }
.cn-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.cn-chip { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--light); cursor: pointer; transition: border-color .18s, background .18s; }
.cn-chip:hover { border-color: var(--signal); background: rgba(34,211,238,0.07); }
.cn-chat__foot { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.cn-chat__input { flex: 1; background: var(--slate-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; color: var(--light); font-family: var(--sans); font-size: 14px; resize: none; outline: none; }
.cn-chat__input:focus { border-color: var(--signal); }
.cn-chat__send { background: var(--grad); border: 0; border-radius: 10px; width: 44px; cursor: pointer; display: grid; place-items: center; }
.cn-chat__send svg { width: 18px; height: 18px; stroke: #04121a; fill: none; stroke-width: 2; }
.cn-chat__send:disabled { opacity: .5; cursor: not-allowed; }
.cn-chat__disclaimer { font-size: 11px; color: var(--muted-dk); text-align: center; padding: 0 16px 12px; }

.cn-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.cn-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); opacity: .4; animation: typing 1.2s infinite; }
.cn-typing span:nth-child(2) { animation-delay: .2s; }
.cn-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: 2; }
  .cap-grid, .grid--3 { grid-template-columns: 1fr 1fr; }
  .ind-grid { grid-template-columns: 1fr 1fr; }
  .process__grid { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .step { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
  .partner__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.show { display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--obsidian); border-bottom: 1px solid var(--line); padding: 20px 28px; gap: 18px; }
  .cap-grid, .grid--3, .grid--2, .ind-grid, .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero__cta .btn { flex: 1; justify-content: center; }
}
