/* ============================================================
   Wrkflux — Agentic OS landing page
   Design system: dark "operating system", violet→indigo accent,
   cyan signal highlights. Outfit / Inter / JetBrains Mono.
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #07090F;
  --bg-2:      #0A0D17;
  --surface:   #0E1220;
  --surface-2: #131829;
  --glass:     rgba(255, 255, 255, 0.04);
  --glass-hi:  rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.16);

  /* text */
  --text:  #F4F6FB;
  --muted: #A0A8BC;
  --faint: #6B7488;

  /* brand */
  --primary:   #8B5CF6;   /* violet */
  --primary-2: #6366F1;   /* indigo */
  --accent:    #22D3EE;   /* cyan signal */
  --green:     #34D399;   /* positive */
  --grad:      linear-gradient(135deg, #8B5CF6 0%, #6366F1 55%, #22D3EE 130%);

  --maxw: 1180px;
  --radius: 18px;
  --radius-sm: 12px;

  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow:   0 0 0 1px rgba(139, 92, 246, 0.4), 0 14px 40px -12px rgba(99, 102, 241, 0.55);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(50% 45% at 10% 5%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(45% 40% at 50% 110%, rgba(34, 211, 238, 0.08), transparent 70%);
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 820px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  --b: 0;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 12px 20px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn--lg { padding: 15px 26px; font-size: 1.02rem; }

.btn--primary {
  background: var(--grad);
  color: #0A0712;
  box-shadow: var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(139,92,246,0.55), 0 22px 50px -14px rgba(99,102,241,0.7); }
.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost {
  background: var(--glass);
  color: var(--text);
  border-color: var(--border-hi);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--glass-hi); border-color: var(--primary); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 16px 16px auto 16px; z-index: 50; display: flex; justify-content: center; }
.nav__inner {
  width: 100%; max-width: var(--maxw);
  display: flex; align-items: center; gap: 20px;
  padding: 11px 12px 11px 20px;
  background: rgba(10, 13, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,0.9);
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled .nav__inner { background: rgba(10, 13, 23, 0.92); border-color: var(--border-hi); }

.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--grad); color: #0A0712; box-shadow: var(--glow); }
.brand__name { color: var(--text); }

.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { font-size: 0.92rem; color: var(--muted); padding: 8px 13px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav__links a:hover { color: var(--text); background: var(--glass); }

.nav__cta { margin-left: 4px; }
.nav__toggle { display: none; background: var(--glass); border: 1px solid var(--border); color: var(--text); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }

.mobile-menu {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: rgba(10, 13, 23, 0.97); border: 1px solid var(--border);
  border-radius: 20px; padding: 14px; backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 13px 16px; border-radius: 12px; color: var(--muted); font-family: var(--font-head); font-weight: 500; }
.mobile-menu a:hover { background: var(--glass); color: var(--text); }
.mobile-menu .btn { justify-content: center; margin-top: 6px; }

/* ---------- hero ---------- */
.hero { padding: 150px 0 60px; position: relative; }
.hero__grid {
  max-width: var(--maxw); margin-inline: auto; padding-inline: 24px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--glass);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__title { font-size: clamp(2.5rem, 6vw, 4.1rem); font-weight: 800; margin: 22px 0 0; }
.brandline { font-family: var(--font-mono); color: var(--accent); font-size: 0.92rem; margin-top: 14px; letter-spacing: 0.01em; }
.hero__sub { color: var(--muted); font-size: 1.1rem; max-width: 33em; margin-top: 18px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* hero node canvas */
.hero__visual { position: relative; }
.canvas-wrap {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 520px; margin-inline: auto;
  border: 1px solid var(--border); border-radius: 28px;
  background:
    radial-gradient(80% 80% at 50% 40%, rgba(99,102,241,0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  overflow: hidden;
}
.canvas-wrap::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px; mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent 85%);
}
#nodeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.node {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  padding: 8px 12px; border-radius: 11px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(17, 21, 36, 0.92); border: 1px solid var(--border-hi);
  backdrop-filter: blur(6px); box-shadow: 0 8px 22px -10px rgba(0,0,0,0.8);
  animation: float 6s ease-in-out infinite;
}
.node__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px rgba(139,92,246,0.8); flex-shrink: 0; }
.node--hub { padding: 0; background: none; border: none; box-shadow: none; backdrop-filter: none; animation: none; }
.node__core {
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 22px;
  font-family: var(--font-head); font-size: 0.92rem; font-weight: 700; color: #0A0712;
  background: var(--grad); box-shadow: 0 0 0 1px rgba(139,92,246,0.5), 0 0 60px -8px rgba(99,102,241,0.8);
  line-height: 1; text-align: center; flex-direction: column;
}
.node__os { font-family: var(--font-mono); font-size: 0.6rem; opacity: 0.8; margin-top: 3px; }
.node:nth-child(3) { animation-delay: -1s; }
.node:nth-child(4) { animation-delay: -2s; }
.node:nth-child(5) { animation-delay: -3s; }
.node:nth-child(6) { animation-delay: -1.5s; }
.node:nth-child(7) { animation-delay: -2.5s; }
@keyframes float { 0%,100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 7px)); } }

/* pillars */
.pillars {
  list-style: none; padding: 0; margin: 70px auto 0; max-width: var(--maxw); padding-inline: 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.pillars li { background: var(--bg-2); padding: 22px 22px; display: flex; flex-direction: column; gap: 5px; }
.pillars strong { font-family: var(--font-head); font-size: 1.02rem; }
.pillars span { color: var(--muted); font-size: 0.9rem; }

/* ---------- sections ---------- */
.section { padding: 96px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--border); }

.kicker { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }
.section__head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section__head .kicker { display: inline-block; margin-bottom: 14px; }
.section__title { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section__sub { color: var(--muted); font-size: 1.08rem; margin-top: 18px; }
.section__cta { text-align: center; margin-top: 48px; }

/* problem */
.problem { text-align: center; }
.problem .kicker { display: inline-block; margin-bottom: 18px; }
.problem__lead { font-family: var(--font-head); font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.problem__lead em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.problem__body { color: var(--muted); font-size: 1.12rem; margin-top: 22px; max-width: 40em; margin-inline: auto; }

/* shift */
.shift { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; max-width: 960px; margin-inline: auto; }
.shift__col { padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.shift__col--new { background: linear-gradient(180deg, rgba(139,92,246,0.1), rgba(99,102,241,0.04)); border-color: rgba(139,92,246,0.35); box-shadow: var(--glow); }
.shift__label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.shift__col--new .shift__label { color: var(--primary); }
.shift__col ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.shift__col li { display: flex; align-items: flex-start; gap: 11px; font-size: 0.98rem; color: var(--text); }
.shift__col--old li { color: var(--muted); }
.ic { flex-shrink: 0; margin-top: 2px; }
.ic--x { color: var(--faint); }
.ic--c { color: var(--green); }
.shift__vs { align-self: center; font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--bg); }

/* agents grid */
.agents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.agent {
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.agent:hover { transform: translateY(-4px); border-color: var(--border-hi); background: var(--surface-2); }
.agent__top { display: flex; align-items: center; gap: 13px; }
.agent__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--primary); background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25); flex-shrink: 0; }
.agent:hover .agent__icon { color: var(--accent); background: rgba(34,211,238,0.12); border-color: rgba(34,211,238,0.3); }
.agent__job { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.agent__desc { color: var(--muted); font-size: 0.96rem; flex-grow: 1; }
.agent__replaces { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text); padding-top: 14px; border-top: 1px solid var(--border); }
.agent__replaces span { color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; margin-right: 6px; }

.agent--cta { background: linear-gradient(160deg, rgba(139,92,246,0.14), rgba(99,102,241,0.05)); border-color: rgba(139,92,246,0.3); justify-content: center; align-items: flex-start; gap: 12px; }
.agent--cta h3 { font-size: 1.25rem; }
.agent--cta p { color: var(--muted); font-size: 0.96rem; }
.agent--cta .btn { margin-top: 6px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: transform 0.3s var(--ease), border-color 0.3s; }
.step:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.step__num { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: #0A0712; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--grad); margin-bottom: 16px; }
.step h3 { font-size: 1.05rem; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* stack */
.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stack-card { padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color 0.3s, transform 0.3s var(--ease); }
.stack-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.stack-card__head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-bottom: 12px; }
.stack-card__name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.stack-card__name small { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.stack-card p { color: var(--muted); font-size: 0.98rem; }
.tag { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-hi); color: var(--muted); }
.tag--green { color: var(--green); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }

/* toolkit chip cloud */
.toolkit { margin-top: 28px; }
.toolkit__intro { color: var(--muted); font-size: 1rem; max-width: 56em; margin: 0 auto 8px; text-align: center; }
.toolkit__intro em { font-style: normal; color: var(--text); font-weight: 600; }
.toolkit__groups { margin-top: 14px; border-top: 1px solid var(--border); }
.tool-group { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; padding: 20px 4px; border-bottom: 1px solid var(--border); }
.tool-group__label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); flex: 0 0 168px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 9px; flex: 1; }
.chip {
  font-size: 0.86rem; color: var(--text); padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border-hi); background: var(--glass);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.chip:hover { color: #0A0712; background: var(--grad); border-color: transparent; transform: translateY(-2px); }

/* faq */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color 0.25s; }
.faq__item[open] { border-color: var(--border-hi); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 20px 22px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex-shrink: 0; width: 18px; height: 18px; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--primary); border-radius: 2px; transition: transform 0.25s var(--ease); }
.faq__icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq__icon::after { top: 0; left: 8px; width: 2px; height: 18px; }
.faq__item[open] .faq__icon::after { transform: rotate(90deg); opacity: 0; }
.faq__body { padding: 0 22px 20px; color: var(--muted); font-size: 0.98rem; }

/* final cta */
.final-cta { padding-bottom: 110px; }
.final-cta__panel {
  text-align: center; padding: clamp(40px, 6vw, 64px) 32px; border-radius: 28px;
  border: 1px solid rgba(139,92,246,0.3);
  background:
    radial-gradient(80% 120% at 50% -20%, rgba(99,102,241,0.25), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}
.final-cta .kicker { display: inline-block; margin-bottom: 16px; }
.final-cta__title { font-size: clamp(2rem, 4.5vw, 3rem); }
.final-cta__sub { color: var(--muted); font-size: 1.1rem; margin: 16px auto 30px; max-width: 36em; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 30px; background: var(--bg-2); }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 36px; }
.footer__brand p { color: var(--muted); margin-top: 12px; font-size: 0.95rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: flex-start; }
.footer__links a { color: var(--muted); font-size: 0.94rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.86rem; }
.footer__cta { color: var(--primary); font-family: var(--font-head); font-weight: 600; }
.footer__cta:hover { color: var(--accent); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; }
  .canvas-wrap { max-width: 440px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; margin-left: auto; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding-top: 120px; }
  .pillars { grid-template-columns: 1fr; }
  .shift { grid-template-columns: 1fr; }
  .shift__vs { justify-self: center; }
  .agents-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .tool-group { gap: 10px; }
  .tool-group__label { flex-basis: 100%; }
  .footer__base { flex-direction: column; }
  .canvas-wrap { max-width: 360px; }
  .node { font-size: 0.66rem; padding: 6px 9px; }
  .node__core { width: 76px; height: 76px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .node { animation: none; }
}
