/* ==========================================================================
   ESMS — stylesheet
   Design tokens: night-sky purple, signal/mountain motif
   ========================================================================== */

:root{
  --bg-deep:      #0a0912;
  --bg-mid:       #130f24;
  --surface:      #1b1533;
  --surface-2:    #241c47;
  --border:       rgba(167,139,250,0.16);
  --border-strong:rgba(167,139,250,0.32);

  --accent:       #a78bfa;
  --accent-strong:#8b5cf6;
  --accent-deep:  #5b3ebd;
  --accent-soft:  rgba(167,139,250,0.12);

  --text-hi:      #f6f4fc;
  --text:         #d8d4e8;
  --text-muted:   #8f88ac;

  --success:      #7ee0a8;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 999px;

  --container: 1180px;
}

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

html{ scroll-behavior:smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}

body{
  font-family:var(--font-body);
  background:var(--bg-deep);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }

a{ color:inherit; text-decoration:none; }

ul{ list-style:none; }

::selection{ background:var(--accent-deep); color:#fff; }

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

.wrap{
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
}

.eyebrow{
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--accent);
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:7px; height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}

h1,h2,h3,h4{
  font-family:var(--font-display);
  color:var(--text-hi);
  font-weight:600;
  letter-spacing:-0.01em;
  line-height:1.12;
}

h2{ font-size:clamp(28px,4vw,42px); }
h3{ font-size:20px; }

p{ color:var(--text); }

.lede{
  font-size:18px;
  color:var(--text-muted);
  max-width:56ch;
}

/* ---------- background texture (shared) ---------- */
.stars{
  position:absolute; inset:0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 45% 30%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 92% 40%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 25% 55%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 60% 8%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 8% 42%, rgba(255,255,255,.3), transparent);
  opacity:.8;
  pointer-events:none;
}

/* ---------- nav ---------- */
.nav{
  position:sticky; top:0; z-index:100;
  backdrop-filter:blur(14px);
  background:rgba(10,9,18,0.72);
  border-bottom:1px solid var(--border);
}
.nav .wrap{
  display:flex; align-items:center; justify-content:space-between;
  height:72px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:700; font-size:19px; color:var(--text-hi);
}
.brand img{ width:32px; height:32px; border-radius:9px; }
.nav-links{
  display:flex; align-items:center; gap:34px;
  font-size:14.5px;
}
.nav-links a{ color:var(--text-muted); transition:color .15s; }
.nav-links a:hover{ color:var(--text-hi); }
.nav-cta{
  padding:10px 20px;
  border-radius:var(--radius-pill);
  background:var(--accent);
  color:#1a1030 !important;
  font-weight:600;
  font-size:14px;
}
.nav-cta:hover{ background:#bda6fb; }
.nav-toggle{ display:none; background:none; border:0; color:var(--text-hi); font-size:26px; cursor:pointer; }

@media (max-width:820px){
  .nav-links{
    position:absolute; top:72px; left:0; right:0;
    background:var(--bg-mid);
    border-bottom:1px solid var(--border);
    flex-direction:column; align-items:flex-start;
    padding:20px 28px 26px;
    gap:18px;
    display:none;
  }
  .nav-links.open{ display:flex; }
  .nav-toggle{ display:block; }
}

/* ---------- hero ---------- */
.hero{
  position:relative;
  padding:88px 0 40px;
  overflow:hidden;
  background:
    radial-gradient(760px 420px at 78% 8%, rgba(139,92,246,0.24), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}
.hero .wrap{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:48px;
  align-items:center;
  position:relative; z-index:2;
}
.hero h1{
  font-size:clamp(34px,4.6vw,54px);
  margin:18px 0 20px;
}
.hero h1 .hl{ color:var(--accent); }
.hero-actions{
  display:flex; gap:14px; margin-top:30px; flex-wrap:wrap;
}
.btn{
  display:inline-flex; align-items:center; gap:9px;
  padding:14px 24px;
  border-radius:var(--radius-pill);
  font-weight:600; font-size:15px;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn-primary{ background:var(--accent); color:#1a1030; }
.btn-primary:hover{ background:#bda6fb; }
.btn-ghost{ background:transparent; border-color:var(--border-strong); color:var(--text-hi); }
.btn-ghost:hover{ border-color:var(--accent); }
.btn-block{ width:100%; justify-content:center; }

.trust-line{
  margin-top:26px;
  display:flex; gap:22px; flex-wrap:wrap;
  font-family:var(--font-mono);
  font-size:12.5px;
  color:var(--text-muted);
}
.trust-line span{ display:flex; align-items:center; gap:7px; }
.trust-line span::before{ content:"✓"; color:var(--success); }

/* ---------- signature: signal visual ---------- */
.signal-card{
  position:relative;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-l);
  padding:44px 30px 0;
  overflow:hidden;
  min-height:420px;
}
.signal-stage{
  position:relative;
  height:230px;
  display:flex; align-items:flex-end; justify-content:center;
  gap:14px;
}
.bar{
  width:30px;
  border-radius:8px 8px 0 0;
  background:var(--surface-2);
  border:1px solid var(--border-strong);
  position:relative;
}
.bar span{ position:absolute; inset:0; border-radius:8px 8px 0 0; background:var(--accent); transform:scaleY(0); transform-origin:bottom; }
.bar:nth-child(1){ height:40px; }
.bar:nth-child(2){ height:80px; }
.bar:nth-child(3){ height:120px; }
.bar:nth-child(4){ height:160px; }
.bar:nth-child(5){ height:200px; }

.bar:nth-child(1) span{ animation:fillBar 6s infinite; animation-delay:0s; }
.bar:nth-child(2) span{ animation:fillBar 6s infinite; animation-delay:.15s; }
.bar:nth-child(3) span{ animation:fillBar 6s infinite; animation-delay:.3s; }
.bar:nth-child(4) span{ animation:fillBar 6s infinite; animation-delay:.45s; }
.bar:nth-child(5) span{ animation:fillBar 6s infinite; animation-delay:.6s; }

@keyframes fillBar{
  0%, 55%{ transform:scaleY(0); }
  70%, 100%{ transform:scaleY(1); }
}

.signal-status{
  font-family:var(--font-mono);
  font-size:12.5px;
  text-align:center;
  color:var(--text-muted);
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-top:14px;
}
.signal-status b{ color:var(--accent); font-weight:600; }

.signal-toast{
  position:absolute;
  left:50%; bottom:76px;
  transform:translate(-50%,14px);
  background:var(--bg-deep);
  border:1px solid var(--border-strong);
  border-radius:14px;
  padding:12px 16px;
  display:flex; align-items:center; gap:10px;
  font-size:13.5px;
  color:var(--text-hi);
  opacity:0;
  animation:toastPop 6s infinite;
  white-space:nowrap;
}
.signal-toast .dot{
  width:18px; height:18px; border-radius:50%;
  background:var(--success); color:#0a0912;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:800; flex-shrink:0;
}
@keyframes toastPop{
  0%, 68%{ opacity:0; transform:translate(-50%,14px); }
  78%, 92%{ opacity:1; transform:translate(-50%,0); }
  100%{ opacity:0; transform:translate(-50%,-6px); }
}

.signal-ridge{
  position:absolute; left:0; right:0; bottom:0; height:110px;
}

/* ---------- process strip ---------- */
.process{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background:var(--bg-mid);
}
.process .wrap{
  display:flex; align-items:center; justify-content:center;
  flex-wrap:wrap; gap:10px;
  padding:18px 28px;
  font-family:var(--font-mono);
  font-size:12.5px;
  letter-spacing:.05em;
  color:var(--text-muted);
  text-transform:uppercase;
}
.process .step{ color:var(--text-hi); }
.process .arrow{ color:var(--accent); }

/* ---------- section shell ---------- */
.section{ padding:100px 0; position:relative; }
.section-head{ max-width:640px; margin-bottom:56px; }
.section-head h2{ margin-top:14px; }

/* ---------- features ---------- */
.feature-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
  border-radius:var(--radius-m);
  overflow:hidden;
}
.feature{
  background:var(--surface);
  padding:34px 26px;
  transition:background .2s;
}
.feature:hover{ background:var(--surface-2); }
.feature .icon{
  width:44px; height:44px;
  margin-bottom:22px;
  color:var(--accent);
}
.feature h3{ margin-bottom:10px; }
.feature p{ font-size:14.5px; color:var(--text-muted); }

@media (max-width:900px){
  .feature-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:560px){
  .feature-grid{ grid-template-columns:1fr; }
}

/* ---------- how it works ---------- */
.steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:36px;
}
.step-card{
  position:relative;
  padding-top:26px;
  border-top:1px solid var(--border-strong);
}
.step-card .num{
  font-family:var(--font-mono);
  color:var(--accent);
  font-size:13px;
  letter-spacing:.08em;
}
.step-card h3{ margin:14px 0 10px; }
.step-card p{ font-size:14.5px; color:var(--text-muted); }

@media (max-width:820px){
  .steps{ grid-template-columns:1fr; }
}

/* ---------- download ---------- */
.download-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:28px;
  background:linear-gradient(135deg, var(--surface), var(--surface-2));
  border:1px solid var(--border-strong);
  border-radius:var(--radius-l);
  padding:40px;
}
.download-card img{ width:76px; height:76px; border-radius:18px; }
.download-meta{ display:flex; gap:22px; margin-top:10px; flex-wrap:wrap; }
.download-meta span{
  font-family:var(--font-mono); font-size:12px; color:var(--text-muted);
  text-transform:uppercase; letter-spacing:.05em;
}
.download-note{
  font-size:13px; color:var(--text-muted); margin-top:22px;
}

@media (max-width:760px){
  .download-card{ grid-template-columns:1fr; text-align:center; }
  .download-card .btn{ width:100%; justify-content:center; }
}

/* ---------- enterprise / contact ---------- */
.enterprise{
  background:var(--bg-mid);
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
}
.enterprise-grid{
  display:grid;
  grid-template-columns:0.9fr 1.1fr;
  gap:60px;
  align-items:start;
}
.plan-list{ margin-top:30px; display:flex; flex-direction:column; gap:18px; }
.plan-list li{
  display:flex; gap:12px; font-size:14.5px; color:var(--text);
}
.plan-list li::before{ content:"—"; color:var(--accent); flex-shrink:0; }

.form-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-l);
  padding:36px;
}
.field{ margin-bottom:20px; }
.field label{
  display:block; font-size:13px; color:var(--text-muted);
  margin-bottom:8px; font-family:var(--font-mono); letter-spacing:.03em;
}
.field input, .field select, .field textarea{
  width:100%;
  background:var(--bg-deep);
  border:1px solid var(--border-strong);
  border-radius:10px;
  padding:13px 14px;
  color:var(--text-hi);
  font-family:var(--font-body);
  font-size:14.5px;
}
.field textarea{ resize:vertical; min-height:110px; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color:var(--accent);
}
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:520px){ .field-row{ grid-template-columns:1fr; } }

.form-note{ font-size:12.5px; color:var(--text-muted); margin-top:14px; }
.form-status{
  margin-top:16px; font-size:14px; display:none;
  padding:12px 14px; border-radius:10px;
}
.form-status.ok{ display:block; background:rgba(126,224,168,0.12); color:var(--success); }
.form-status.err{ display:block; background:rgba(240,110,110,0.12); color:#f08a8a; }

@media (max-width:900px){
  .enterprise-grid{ grid-template-columns:1fr; }
}

/* ---------- footer ---------- */
.footer{ padding:60px 0 34px; }
.footer .wrap{
  display:flex; justify-content:space-between; align-items:flex-start;
  flex-wrap:wrap; gap:30px;
}
.footer-brand{ max-width:320px; }
.footer-brand .brand{ margin-bottom:12px; }
.footer-brand p{ font-size:13.5px; color:var(--text-muted); }
.footer-cols{ display:flex; gap:56px; flex-wrap:wrap; }
.footer-col h4{ font-size:13px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:14px; font-family:var(--font-mono); font-weight:500;}
.footer-col a{ display:block; font-size:14px; color:var(--text); margin-bottom:10px; }
.footer-col a:hover{ color:var(--accent); }
.footer-bottom{
  border-top:1px solid var(--border);
  margin-top:50px; padding-top:22px;
  font-size:12.5px; color:var(--text-muted);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

/* ---------- simple page (legal pages) ---------- */
.legal{ padding:70px 0 100px; }
.legal .wrap{ max-width:820px; }
.legal h1{ font-size:clamp(28px,4vw,40px); margin-bottom:8px; }
.legal .updated{ font-family:var(--font-mono); font-size:12.5px; color:var(--text-muted); margin-bottom:44px; display:block; }
.legal h2{ font-size:21px; margin:40px 0 14px; }
.legal p, .legal li{ color:var(--text-muted); font-size:15px; margin-bottom:12px; }
.legal ul{ padding-left:2px; margin-bottom:16px; }
.legal li{ padding-left:20px; position:relative; }
.legal li::before{ content:"—"; position:absolute; left:0; color:var(--accent); }
.legal strong{ color:var(--text); }
.legal a{ color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.callout{
  background:var(--surface);
  border:1px solid var(--border-strong);
  border-left:3px solid var(--accent);
  border-radius:12px;
  padding:18px 20px;
  margin:24px 0;
  font-size:14px;
  color:var(--text);
}
