/* ============================================================
   Lancis AI — landing page
   Design system + layout
   ============================================================ */

:root {
  /* palette */
  --bg:        #08090d;
  --bg-2:      #0d0f16;
  --panel:     #12141d;
  --panel-2:   #161925;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);
  --text:      #eef0f6;
  --muted:     #a4a9bd;
  --faint:     #6c7288;

  /* accent */
  --a1:  #6d5efc;   /* indigo  */
  --a2:  #a06bff;   /* violet  */
  --a3:  #38d3ff;   /* cyan    */
  --accent-soft: rgba(109, 94, 252, 0.14);

  --grad: linear-gradient(105deg, var(--a3) 0%, var(--a1) 45%, var(--a2) 100%);
  /* calmer two-stop gradient for buttons (no cyan) */
  --grad-btn: linear-gradient(120deg, #6d5efc 0%, #8b6cf6 100%);

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1140px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display:   'Space Grotesk', var(--font);

  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.center { text-align: center; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--primary {
  background: var(--grad-btn); color: #fff; font-weight: 600;
  box-shadow: 0 8px 24px -10px rgba(109, 94, 252, 0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(109, 94, 252, 0.6); }
.btn--ghost { background: rgba(255,255,255,0.02); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; }
.brand__mark {
  width: 44px; height: 44px; display: block;
  filter: drop-shadow(0 0 11px rgba(109, 94, 252, 0.35));
}
.brand__ai { color: var(--a2); margin-left: 2px; }
.nav__links { display: flex; gap: 26px; margin-left: 10px; margin-right: auto; }
.nav__links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 10px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 168px 0 96px; overflow: hidden; }
.hero__glow {
  position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(109,94,252,0.35), rgba(56,211,255,0.10) 55%, transparent 72%);
  filter: blur(20px);
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 25%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 25%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; text-align: center; max-width: 880px; }
.eyebrow {
  display: inline-block; font-family: var(--display); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--a3);
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--accent-soft);
}
.hero__title { font-size: clamp(1.5rem, 5.2vw, 3.7rem); margin: 26px auto 0; max-width: none; }
.hero__title .grad { display: inline; }
.grad--nowrap { white-space: nowrap; }
.hero__sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); margin: 24px auto 0; max-width: 60ch; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero__pipeline { display: inline-flex; align-items: center; gap: 12px; margin-top: 52px; }
.chip {
  font-family: var(--display); font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--panel);
}
.hero__pipeline .arrow { color: var(--a2); font-weight: 700; }

/* ---------- section base ---------- */
.section { padding: 96px 0; position: relative; }
.section--tint { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 40%, var(--bg) 100%); }
.section--dark { background: #05060a; }
.kicker {
  font-family: var(--display); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--a2); margin-bottom: 14px;
}
.section h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
.muted-title { color: var(--muted); }
.lede { color: var(--muted); font-size: 1.12rem; margin-top: 18px; max-width: 62ch; }
.lede--center { margin-inline: auto; }

/* ---------- problem ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.split__lead h2 { margin-top: 6px; }
.flow-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; text-align: center; box-shadow: var(--shadow);
}
.flow-node {
  font-family: var(--display); font-weight: 600; font-size: 16px;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
}
.flow-node--accent {
  background: var(--accent-soft); border-color: rgba(109,94,252,0.4); color: #d7d2ff;
}
.flow-line { width: 2px; height: 26px; margin: 6px auto; background: linear-gradient(var(--a1), transparent); }
.flow-card__note { color: var(--faint); font-size: 14px; margin-top: 18px; }
.miss-grid {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 52px;
}
.miss-grid li {
  display: flex; align-items: center; gap: 10px; font-weight: 500;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); font-size: 15px;
}
.miss-x { color: #ff6b8a; font-weight: 700; }

/* ---------- feature cards ---------- */
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px; text-align: left; }
.fcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .25s ease, border-color .25s ease;
}
.fcard:hover { transform: translateY(-4px); border-color: var(--line-2); }
.fcard__icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; background: var(--accent-soft); color: var(--a3);
  font-size: 18px; margin-bottom: 16px; border: 1px solid rgba(56,211,255,0.25);
}
.fcard h3 { font-size: 1.05rem; }
.fcard p { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; align-items: start; }
.step {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; height: 100%;
}
.step__num {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; margin-bottom: 12px;
}
.step h3 { font-size: 1.35rem; }
.step > p { color: var(--muted); margin-top: 10px; font-size: .98rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pills span {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.pills--models span { color: #d7d2ff; border-color: rgba(109,94,252,0.3); background: var(--accent-soft); }
.step__label { font-size: 13px; color: var(--faint); margin-top: 20px; text-transform: uppercase; letter-spacing: .08em; }
.eval-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.eval-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.eval-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); flex: none; }
.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.agent { padding: 16px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.agent h4 { font-size: .95rem; color: var(--text); }
.agent p { font-size: .82rem; color: var(--faint); margin-top: 6px; line-height: 1.45; }

/* ---------- shift / compare ---------- */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; margin-top: 48px; }
.compare__col {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px;
}
.compare__col--accent { border-color: rgba(109,94,252,0.35); background: linear-gradient(180deg, var(--accent-soft), var(--panel)); }
.compare__tag { font-family: var(--display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.compare__col--accent .compare__tag { color: var(--a3); }
.compare__flow { margin-top: 20px; display: grid; gap: 4px; justify-items: center; }
.cnode {
  width: 100%; text-align: center; font-family: var(--display); font-weight: 500; font-size: 15px;
  padding: 13px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line);
}
.cnode--accent { background: var(--accent-soft); border-color: rgba(109,94,252,0.35); color: #e5e1ff; }
.cline { width: 2px; height: 20px; background: var(--line-2); }
.cline--accent { background: linear-gradient(var(--a1), var(--a3)); }
.compare__vs { font-family: var(--display); color: var(--faint); font-weight: 600; }
.shift__punch {
  font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600;
  margin: 52px auto 0; max-width: 26ch; line-height: 1.35;
}

/* ---------- ecosystem ---------- */
.eco-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.eco-tag {
  font-family: var(--display); font-weight: 500;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text);
}

/* ---------- audiences ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.audience {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 34px; position: relative; overflow: hidden;
}
.audience::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: .8;
}
.audience h3 { font-size: 1.5rem; margin-top: 8px; }
.audience > p { color: var(--muted); margin-top: 12px; }
.check-list { list-style: none; margin-top: 20px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; color: var(--text); font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px;
  border-radius: 6px; background: var(--accent-soft); color: var(--a3); border: 1px solid rgba(56,211,255,0.3);
}

/* ---------- CTA ---------- */
.cta { position: relative; padding: 110px 0 96px; background: var(--bg-2); }
.cta__inner { position: relative; max-width: 760px; }
.badge {
  display: inline-block; font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--a3);
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(56,211,255,0.3); background: var(--accent-soft);
}
.cta h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 20px; }
.cta__body { color: var(--muted); font-size: 1.15rem; margin: 20px auto 0; max-width: 56ch; }

/* ---------- footer ---------- */
.footer {
  position: relative; overflow: hidden;
  padding: 104px 0 40px; background: var(--bg-2);
}
/* purple glow anchored to the very bottom of the page */
.footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 150% at 50% 130%, rgba(109,94,252,0.34), transparent 68%);
}
.footer__inner {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.footer__inner .brand { justify-self: start; }
.footer__tag { justify-self: center; text-align: center; color: var(--muted); font-size: 14px; }
.footer__copy { justify-self: end; text-align: right; color: var(--faint); font-size: 13px; }
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .footer__inner .brand,
  .footer__tag,
  .footer__copy { justify-self: center; text-align: center; }
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .miss-grid { grid-template-columns: 1fr 1fr; }
  .feature-cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare__vs { justify-self: center; }
  .duo { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0;
    background: rgba(8,9,13,0.96); backdrop-filter: blur(16px);
    padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__cta {
    display: flex; position: absolute; top: 210px; left: 0; right: 0;
    background: rgba(8,9,13,0.96); padding: 0 24px 22px; gap: 10px;
  }
  .nav.is-open .nav__cta .btn { flex: 1; }
  .hero { padding-top: 130px; }
}
@media (max-width: 460px) {
  .miss-grid, .feature-cards, .agent-grid { grid-template-columns: 1fr; }
  .hero__pipeline { flex-wrap: wrap; }
}

/* ===== Hilbert connect-the-dots background (preview) ===== */
.hero__curve, .cta__curve { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.hero__curve {
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 42%, transparent 14%, #000 46%);
          mask-image: radial-gradient(ellipse 72% 68% at 50% 42%, transparent 14%, #000 46%);
}
.cta__curve {
  -webkit-mask-image: radial-gradient(ellipse 80% 86% at 50% 62%, transparent 20%, #000 56%);
          mask-image: radial-gradient(ellipse 80% 86% at 50% 62%, transparent 20%, #000 56%);
}
.cta__inner { position: relative; z-index: 1; }

.curve-base { fill:none; stroke-linecap:round; stroke-linejoin:round;
  stroke-width:0.9; opacity:.055;
  animation: curveFade 1.2s ease-out both;   /* present almost immediately */
}
@keyframes curveFade { from { opacity:0; } to { opacity:.07; } }
@media (prefers-reduced-motion: reduce) {
  .curve-base { animation:none; opacity:.07; }
  .curve-dot { display:none; }
}

/* ===== Demo request modal + form ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(4,5,9,0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
.modal__card {
  position: relative; z-index: 1; width: min(480px, calc(100vw - 32px));
  margin: 8vh auto 0; max-height: 84vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px 32px;
  animation: popIn .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: rgba(255,255,255,0.04); color: var(--muted);
  border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .2s;
}
.modal__close:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.modal__card h2 { font-size: 1.6rem; margin-top: 4px; }
.modal__sub { color: var(--muted); font-size: .98rem; margin-top: 10px; }

.form { display: grid; gap: 16px; margin-top: 22px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field em { color: var(--a2); font-style: normal; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--a1);
  box-shadow: 0 0 0 3px rgba(109,94,252,0.22);
}
.field input.invalid, .field textarea.invalid { border-color: #ff6b8a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__submit { width: 100%; margin-top: 4px; }
.form__submit[disabled] { opacity: .6; cursor: default; transform: none; }
.form__status { min-height: 18px; font-size: 13px; margin: 0; text-align: center; }
.form__status.error { color: #ff8aa0; }

.modal__success { text-align: center; padding: 14px 0 6px; }
.success__mark {
  width: 60px; height: 60px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 28px; color: #0a0a12; font-weight: 700;
  background: var(--grad-btn); border-radius: 50%;
  box-shadow: 0 10px 30px -8px rgba(109,94,252,0.6);
}
.modal__success .btn { margin-top: 22px; }
