/* ============================================================
   UNSLOP — marketing site
   Aesthetic: dark terminal / hacker, monospace, neon accents.
   Companion styling to cognitive-industries.org.
   ============================================================ */

:root {
  --bg:        #05070a;
  --bg-2:      #080b10;
  --panel:     #0b0f16;
  --panel-2:   #0e131c;
  --line:      #1a2330;
  --line-2:    #263243;
  --ink:       #e7edf4;
  --ink-dim:   #8b97a8;
  --ink-mute:  #5a6678;
  --acc:       #4dffa3;   /* terminal green */
  --acc-2:     #35e0ff;   /* electric cyan  */
  --acc-3:     #b78bff;   /* violet         */
  --warn:      #ffd34d;
  --danger:    #ff5c6a;
  --glow:      0 0 24px rgba(77, 255, 163, .35);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- skip to content (visually hidden until focused) ---------- */
.skip {
  position: fixed; top: 0; left: 0; z-index: 100;
  transform: translateY(-120%); transition: transform .2s var(--ease);
  background: var(--acc); color: #04140c; font-family: var(--mono); font-weight: 700;
  font-size: 14px; padding: 10px 18px; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip:focus { transform: translateY(0); outline: 2px solid var(--acc-2); }

/* ---------- ambient layers ---------- */
#scan-bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: .55; pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: .04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain { 0%,100%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-2%)} 60%{transform:translate(-2%,4%)} 80%{transform:translate(4%,-3%)} }
.scanline {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(77,255,163,.6), transparent);
  filter: blur(1px); pointer-events: none;
  animation: scan 7s linear infinite;
}
@keyframes scan { 0%{transform:translateY(-10vh)} 100%{transform:translateY(110vh)} }
.cursor-glow {
  position: fixed; width: 480px; height: 480px; z-index: 1; pointer-events: none;
  border-radius: 50%; left: 0; top: 0; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(53,224,255,.10), transparent 65%);
  transition: opacity .4s; opacity: 0; will-change: transform;
}
@media (hover:hover){ .cursor-glow{opacity:1} }
@media (prefers-reduced-motion: reduce){ .scanline,.grain{animation:none} }

/* ---------- content sits above ambient ---------- */
main, .footer { position: relative; z-index: 3; }
/* fixed header must stack ABOVE main/footer (same z-index + later DOM order
   would otherwise let the hero paint over it and swallow nav clicks) */
.nav { z-index: 20; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(5,7,10,.85), rgba(5,7,10,.3));
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 2px; text-decoration: none; color: var(--ink);
  font-family: var(--mono); font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.brand-mark { color: var(--acc); margin-right: 6px; text-shadow: var(--glow); }
.brand-caret { color: var(--acc); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a { color: var(--ink-dim); text-decoration: none; font-family: var(--mono);
  font-size: 14px; letter-spacing: .3px; transition: color .2s; }
.nav-links a:hover { color: var(--acc); }
.nav-cta { color: var(--acc) !important; }
.nav-auth { border: 1px solid var(--line); padding: 6px 12px; border-radius: 7px; }
.nav-auth.is-authed { color: var(--acc); border-color: var(--acc); max-width: 22ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink);
  font-size: 26px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-family: var(--mono); font-size: 15px; font-weight: 600;
  padding: 13px 24px; border-radius: 8px; text-decoration: none; letter-spacing: .3px;
  transition: transform .18s var(--ease), box-shadow .25s, background .25s, color .2s;
  cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--acc); color: #04140c; box-shadow: 0 0 0 rgba(77,255,163,0); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(77,255,163,.28), var(--glow); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: rgba(255,255,255,.02); }
.btn-ghost:hover { color: var(--acc); border-color: var(--acc); transform: translateY(-2px); }
.btn.full { width: 100%; text-align: center; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1;transform:none;transition:none} }

/* ---------- hero ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px clamp(18px, 4vw, 48px) 60px; max-width: var(--maxw); margin: 0 auto; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; }
.eyebrow { font-family: var(--mono); color: var(--acc); font-size: 13px; letter-spacing: 3px;
  margin-bottom: 22px; }
.hero-title { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; font-weight: 700;
  letter-spacing: -1.5px; margin-bottom: 26px; }
.hero-title .accent { background: linear-gradient(120deg, var(--acc), var(--acc-2) 60%, var(--acc-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--ink-dim); font-size: clamp(16px, 1.5vw, 19px); max-width: 32em; margin-bottom: 32px; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 44px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: clamp(18px, 3vw, 40px);
  border-top: 1px solid var(--line); padding-top: 26px; }
.stat b { display: block; font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--ink);
  letter-spacing: -1px; }
.stat span { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); letter-spacing: .4px; }
.mobonly { display: none; }

/* ---------- terminal ---------- */
.terminal { background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .5s var(--ease); }
.terminal:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(1.5deg) translateY(-4px); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(255,255,255,.02); border-bottom: 1px solid var(--line); }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.r{background:#ff5f57} .dot.y{background:#febc2e} .dot.g{background:#28c840}
.term-title { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); margin-left: 8px; }
.term-badge { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  color: var(--acc); border: 1px solid rgba(77,255,163,.35); padding: 2px 8px; border-radius: 4px; }
.term-body { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; padding: 20px 20px 26px;
  color: var(--ink-dim); min-height: 340px; white-space: pre-wrap; }
.term-body .p { color: var(--acc); }
.term-body .cmd { color: var(--ink); }
.term-body .ok { color: var(--acc); }
.term-body .hit { color: var(--warn); }
.term-body .crit { color: var(--danger); }
.term-body .dim { color: var(--ink-mute); }
.term-cursor { background: var(--acc); color: var(--acc); animation: blink 1s steps(1) infinite; }

.scroll-hint { align-self: center; margin-top: 54px; color: var(--ink-mute); text-decoration: none;
  font-size: 18px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }

/* ---------- generic section ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(18px, 4vw, 48px); }
.sec-head { max-width: 40em; margin-bottom: 54px; }
.sec-tag { font-family: var(--mono); color: var(--acc-2); font-size: 13px; letter-spacing: 3px; margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -1px; font-weight: 700; }
.sec-lead { color: var(--ink-dim); font-size: 17px; margin-top: 18px; }

/* ---------- capabilities grid ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cap { position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.cap::before { content: ""; position: absolute; inset: 0; border-radius: 12px; padding: 1px;
  background: linear-gradient(130deg, transparent, var(--cap-acc, var(--acc)), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; }
.cap:hover { transform: translateY(-6px); border-color: transparent;
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.9); }
.cap:hover::before { opacity: .9; }
.cap-cmd { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--cap-acc, var(--acc));
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cap-cmd .dollar { color: var(--ink-mute); }
.cap-kind { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--ink-mute);
  text-transform: uppercase; margin-bottom: 14px; }
/* the command line is an <h3.cap-cmd>; keep the terminal-command look, so the
   .cap-cmd rule above is the single source of truth (no separate .cap h3 style) */
.cap p { color: var(--ink-dim); font-size: 14.5px; }
.cap-tier { position: absolute; top: 18px; right: 18px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 1px; color: var(--ink-mute); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 20px; }

/* ---------- moats ---------- */
.why { background: linear-gradient(180deg, transparent, rgba(53,224,255,.03), transparent); }
.moat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.moat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px;
  position: relative; transition: border-color .3s, transform .3s; }
.moat:hover { border-color: var(--line-2); transform: translateY(-4px); }
.moat-num { font-family: var(--mono); font-size: 13px; color: var(--acc); letter-spacing: 2px; margin-bottom: 18px; }
.moat h3 { font-size: 21px; margin-bottom: 12px; letter-spacing: -.4px; }
.moat p { color: var(--ink-dim); font-size: 15px; margin-bottom: 20px; }
.moat p em { color: var(--acc-2); font-style: normal; }
.moat-code { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.moat-code .muted, .muted { color: var(--ink-mute); }

/* ---------- pricing ---------- */
.price-toggle { display: flex; justify-content: center; gap: 4px; margin: -20px auto 44px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: 5px; width: max-content; }
.pt-btn { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); background: none;
  border: 0; padding: 9px 20px; border-radius: 24px; cursor: pointer; transition: all .25s; }
.pt-btn.active { background: var(--acc); color: #04140c; }
.pt-btn .save { color: var(--acc-2); font-size: 11px; }
.pt-btn.active .save { color: #04140c; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.price { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 24px; position: relative; transition: transform .3s, border-color .3s; }
.price:hover { transform: translateY(-6px); border-color: var(--line-2); }
.price.featured { border-color: var(--acc); box-shadow: 0 30px 70px -34px rgba(77,255,163,.4); }
.price-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--acc); color: #04140c; font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; padding: 4px 12px; border-radius: 20px; }
.price-name { font-family: var(--mono); font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 16px; }
.price-amt { display: flex; align-items: baseline; gap: 3px; margin-bottom: 14px; }
.price-amt .cur { color: var(--ink-dim); font-size: 20px; font-family: var(--mono); }
.price-amt b { font-size: 46px; font-family: var(--mono); font-weight: 800; letter-spacing: -2px; }
.price-amt .amt-txt { font-size: 30px; font-family: var(--mono); font-weight: 800; color: var(--acc); }
.price-amt .per { color: var(--ink-mute); font-family: var(--mono); font-size: 13px; margin-left: 4px; }
.price-desc { color: var(--ink-dim); font-size: 14px; min-height: 42px; margin-bottom: 20px; }
.price-feat { list-style: none; margin-bottom: 26px; flex: 1; }
.price-feat li { font-size: 14px; color: var(--ink); padding: 8px 0 8px 24px; position: relative;
  border-top: 1px solid var(--line); }
.price-feat li::before { content: "▹"; position: absolute; left: 0; color: var(--acc); }
.price-feat code { font-family: var(--mono); font-size: 12px; color: var(--acc-2);
  background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.checkout-soon { font-family: var(--mono); font-size: 11.5px; color: var(--acc-2);
  margin-top: 10px; letter-spacing: .2px; text-align: center; }

/* ---------- on-prem ---------- */
.onprem { background: radial-gradient(1200px 500px at 80% 0%, rgba(183,139,255,.06), transparent); }
.onprem-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.onprem-copy h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -1px; margin: 16px 0 20px; line-height: 1.12; }
.onprem-copy > p { color: var(--ink-dim); font-size: 16px; margin-bottom: 26px; max-width: 34em; }
.onprem-list { list-style: none; margin-bottom: 32px; }
.onprem-list li { font-size: 15px; color: var(--ink); padding: 10px 0; display: flex; gap: 12px; align-items: flex-start; }
.chk { color: var(--acc); font-weight: 700; }
.lic-file { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.lic-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono);
  font-size: 12px; color: var(--ink-dim); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lic-verified { color: var(--acc); font-size: 11px; }
.lic-body { font-family: var(--mono); font-size: 13px; line-height: 1.9; padding: 18px 20px; color: var(--ink); }
.lic-body .k { color: var(--acc-2); } .lic-body .s { color: var(--acc); } .lic-body .n { color: var(--warn); }

/* ---------- install ---------- */
.install { text-align: center; }
.install .sec-head { margin: 0 auto 44px; }
.install-grid { max-width: 720px; margin: 0 auto; }
.install-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.it-tab { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); background: var(--panel);
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: all .2s; }
.it-tab.active { color: var(--acc); border-color: var(--acc); }
.install-cmd { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 16px 18px; font-family: var(--mono); text-align: left; }
.install-cmd code { color: var(--ink); font-size: 15px; }
.install-cmd code::before { content: "$ "; color: var(--acc); }
.copy-btn { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); background: var(--bg);
  border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all .2s; }
.copy-btn:hover { color: var(--acc); border-color: var(--acc); }
.copy-btn.done { color: var(--acc); border-color: var(--acc); }
.install-next { font-family: var(--mono); font-size: 13.5px; line-height: 2; text-align: left; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-top: 16px;
  overflow-x: auto; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 60px clamp(18px,4vw,48px) 30px;
  max-width: var(--maxw); margin: 60px auto 0; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 46px; }
.footer-brand { font-family: var(--mono); font-weight: 800; font-size: 20px; }
.footer-brand .brand-mark { color: var(--acc); }
.footer-tag { font-family: var(--sans); font-weight: 400; font-size: 14px; color: var(--ink-mute); margin-top: 14px; }
.footer-cols { display: flex; gap: clamp(30px, 6vw, 70px); }
.footer-cols h4 { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--ink-dim);
  text-transform: uppercase; margin-bottom: 14px; }
.footer-cols a { display: block; color: var(--ink-mute); text-decoration: none; font-size: 14px;
  padding: 5px 0; transition: color .2s; }
.footer-cols a:hover { color: var(--acc); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px;
  border-top: 1px solid var(--line); padding-top: 24px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); }
.footer-bottom .prompt { color: var(--ink-dim); }
.footer-bottom .type-caret { color: var(--acc); }
.blink { animation: blink 1.1s steps(1) infinite; color: var(--acc); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .terminal { order: -1; }
  .moat-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .onprem-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .mobonly { display: inline; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; gap: 4px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 16px clamp(18px,4vw,48px) 22px; }
  .nav-toggle { display: block; }
  .price-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(32px, 9vw, 46px); }
}
