/* =========================================================
   TOPSYS — Design System
   Palette:  --ink (near-black navy bg) --deep (brand blue)
             --signal (electric blue accent) --gain (market-green accent)
             --paper (warm white) --slate (secondary text)
   Type:     Space Grotesk (display) / Inter (body) / IBM Plex Mono (data)
   Signature: the "signal line" — a self-drawing price line used in the
              hero and as a recurring section motif.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --ink:        #0B1220;
  --ink-2:      #101B33;
  --deep:       #142A56;
  --signal:     #2F6FED;
  --signal-2:   #6FA1FF;
  --gain:       #23C39E;
  --paper:      #F7F8FA;
  --paper-dim:  #ECEFF4;
  --slate:      #5B6472;
  --slate-dim:  #8892A0;
  --line:       rgba(20,42,86,0.12);
  --line-dark:  rgba(255,255,255,0.10);

  --display: 'Space Grotesk', sans-serif;
  --body:    'Inter', sans-serif;
  --mono:    'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --ease: cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body{
  margin:0;
  font-family: var(--body);
  color: var(--deep);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1,h2,h3,h4{
  font-family: var(--display);
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

p{ margin: 0 0 1em; color: var(--slate); }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display:block; }
ul{ margin:0; padding:0; list-style:none; }

.mono{ font-family: var(--mono); letter-spacing: 0.01em; }

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

.eyebrow{
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before{
  content:"";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gain);
  box-shadow: 0 0 0 3px rgba(35,195,158,0.18);
  flex: none;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------- Buttons -------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background .25s ease, border-color .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--signal);
  color: #fff;
}
.btn-primary:hover{ background: #2660D4; transform: translateY(-1px); }
.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--deep);
}
.btn-ghost:hover{ border-color: var(--signal); color: var(--signal); }
.btn-on-dark{
  border-color: var(--line-dark);
  color: #fff;
}
.btn-on-dark:hover{ border-color: var(--signal-2); color: var(--signal-2); }
.btn-lg{ padding: 16px 28px; font-size: 15.5px; }
.btn-block{ width: 100%; }

/* -------------------- Header / Nav -------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,248,250,0.82);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
.brand-mark{
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--deep), var(--signal));
  position: relative;
  flex: none;
  overflow: hidden;
}
.brand-mark svg{ position:absolute; inset:0; }
.nav-links{
  display:flex;
  align-items:center;
  gap: 34px;
}
.nav-links a{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--slate);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav-links a::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:0;
  height: 2px; background: var(--signal);
  transition: right .28s var(--ease);
}
.nav-links a:hover{ color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after{ right: 0; }
.nav-links a.active{ color: var(--ink); }
.nav-cta{ display:flex; align-items:center; gap: 12px; }
.nav-toggle{
  display:none;
  background:none; border:none; cursor:pointer;
  width: 40px; height: 40px; place-items:center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; display:block; width:20px; height:2px; background: var(--ink);
  position:relative; transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle span::before{ position:absolute; top:-7px; }
.nav-toggle span::after{ position:absolute; top:7px; }

@media (max-width: 880px){
  .nav-links, .nav-cta .btn-ghost{ display:none; }
  .nav-toggle{ display:grid; }
  .nav-cta .btn-primary{ padding: 10px 16px; font-size: 13.5px; }
}

.mobile-menu{
  display:none;
  position: fixed; inset: 76px 0 0 0;
  background: var(--paper);
  z-index: 99;
  padding: 24px 32px;
  overflow-y: auto;
}
.mobile-menu.open{ display:block; }
.mobile-menu a{
  display:block;
  font-family: var(--display);
  font-size: 26px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-menu .btn{ margin-top: 20px; }

/* -------------------- Hero -------------------- */
.hero{
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
  background: var(--paper);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items:center;
}
.hero h1{
  font-size: clamp(38px, 5vw, 60px);
  max-width: 12ch;
}
.hero-sub{
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 40px; }

.hero-panel{
  position: relative;
  border-radius: var(--radius-l);
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--deep) 100%);
  padding: 26px;
  color: #fff;
  box-shadow: 0 30px 80px -30px rgba(11,18,32,0.55);
}
.hero-panel-head{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate-dim);
  letter-spacing: .08em;
}
.hero-panel-head .live{
  display:flex; align-items:center; gap:7px; color: var(--gain);
}
.hero-panel-head .live::before{
  content:""; width:6px; height:6px; border-radius:50%; background: var(--gain);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(35,195,158,.5); }
  50%{ box-shadow: 0 0 0 6px rgba(35,195,158,0); }
}
.signal-svg{ width: 100%; height: auto; display:block; }
.signal-path{
  fill:none;
  stroke: var(--signal-2);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.2s var(--ease) forwards .3s;
}
.signal-fill{ opacity: 0; animation: fadeIn 1s ease forwards 1.6s; }
@keyframes draw{ to{ stroke-dashoffset: 0; } }
@keyframes fadeIn{ to{ opacity: 1; } }

.hero-stats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.hero-stats div{ border-top: 1px solid var(--line-dark); padding-top: 12px; }
.hero-stats .num{
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 600;
  color: #fff;
}
.hero-stats .lbl{
  font-size: 11.5px;
  color: var(--slate-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* -------------------- Ticker strip -------------------- */
.ticker-wrap{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-dim);
  overflow: hidden;
  padding: 14px 0;
}
.ticker{
  display:flex;
  gap: 48px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
  animation: ticker 26s linear infinite;
  width: max-content;
}
.ticker span b{ color: var(--ink); }
.ticker .up{ color: var(--gain); }
@keyframes ticker{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }

/* -------------------- Sections -------------------- */
section{ padding: 100px 0; }
.section-head{
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(28px, 3.4vw, 40px); }

.on-dark{ background: var(--ink); color: #fff; }
.on-dark h2, .on-dark h3, .on-dark h4{ color: #fff; }
.on-dark p{ color: var(--slate-dim); }
.on-dark .eyebrow{ color: var(--signal-2); }

/* Divider signal-line motif between sections */
.divider{
  height: 46px;
  margin: -1px 0;
  overflow: hidden;
}
.divider svg{ width:100%; height:100%; display:block; }
.divider path{
  fill:none; stroke: var(--line); stroke-width: 1.5;
}

/* -------------------- Route cards (homepage) -------------------- */
.route-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.route-card{
  background:#fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 26px;
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.route-card:hover{
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 20px 50px -24px rgba(20,42,86,0.28);
}
.route-card .idx{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate-dim);
  margin-bottom: 18px;
  display:block;
}
.route-card h3{ font-size: 18px; margin-bottom: 8px; }
.route-card p{ font-size: 14px; margin-bottom: 18px; }
.route-card .go{
  font-size: 13.5px; font-weight:600; color: var(--signal);
  display:inline-flex; align-items:center; gap:6px;
}
.route-card .go svg{ transition: transform .25s var(--ease); }
.route-card:hover .go svg{ transform: translateX(4px); }

/* -------------------- Feature / tool blocks -------------------- */
.tool-block{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items:center;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}
.tool-block:first-of-type{ border-top: none; }
.tool-block.reverse .tool-copy{ order: 2; }
.tool-tag{
  font-family: var(--mono); font-size: 12px; color: var(--signal);
  letter-spacing:.08em; text-transform:uppercase; margin-bottom: 14px; display:block;
}
.tool-copy h3{ font-size: clamp(24px,2.6vw,32px); margin-bottom: 14px; }
.tool-list{ margin-top: 18px; }
.tool-list li{
  display:flex; gap:10px; align-items:flex-start;
  font-size: 14.5px; color: var(--deep); padding: 8px 0;
  border-top: 1px solid var(--line);
}
.tool-list li:first-child{ border-top:none; }
.tool-list li svg{ flex:none; margin-top:2px; color: var(--gain); }

.tool-visual{
  background: linear-gradient(160deg,var(--ink),var(--ink-2));
  border-radius: var(--radius-l);
  padding: 24px;
  color: #fff;
  min-height: 300px;
  position: relative;
  overflow:hidden;
}

/* -------------------- Cards: proof / stats / logos -------------------- */
.logo-strip{
  display:flex; flex-wrap: wrap; gap: 40px; align-items:center; justify-content:space-between;
  opacity: .8;
}
.logo-strip .logo{
  font-family: var(--display); font-weight:600; font-size: 17px; color: var(--slate-dim);
  letter-spacing: .02em;
}

.stat-grid{
  display:grid; grid-template-columns: repeat(4,1fr); gap: 24px;
}
.stat-card{
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-m);
  padding: 26px 22px;
}
.stat-card .num{ font-family: var(--mono); font-size: 34px; font-weight:600; color:#fff; }
.stat-card .lbl{ font-size: 13px; color: var(--slate-dim); margin-top:6px; }

.quote-card{
  background:#fff; border:1px solid var(--line); border-radius: var(--radius-m);
  padding: 30px; max-width: 720px; margin: 0 auto;
}
.quote-card p{ font-size: 19px; color: var(--deep); font-family: var(--display); font-weight:500; line-height:1.4; }
.quote-attr{ display:flex; gap:12px; align-items:center; margin-top: 18px; }
.quote-attr .avatar{
  width:38px; height:38px; border-radius:50%;
  background: linear-gradient(135deg,var(--deep),var(--signal));
  flex:none;
}
.quote-attr .name{ font-weight:600; font-size:14px; color: var(--ink); }
.quote-attr .role{ font-size: 12.5px; color: var(--slate-dim); }

/* -------------------- Architecture / pipeline diagram -------------------- */
.pipeline{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 20px;
}
.pipeline-step{
  border: 1px solid var(--line-dark);
  padding: 22px 18px;
  position: relative;
  background: var(--ink-2);
  border-radius: var(--radius-s);
  margin-right: -1px;
}
.pipeline-step .n{ font-family: var(--mono); font-size: 12px; color: var(--signal-2); }
.pipeline-step h4{ font-size: 15px; margin: 10px 0 6px; }
.pipeline-step p{ font-size: 12.5px; margin: 0; }
.pipeline-arrow{
  display:flex; align-items:center; justify-content:center; color: var(--slate-dim);
}
@media (max-width: 980px){
  .pipeline{ grid-template-columns: 1fr; }
  .pipeline-arrow{ transform: rotate(90deg); padding: 4px 0; }
}

/* -------------------- Security grid -------------------- */
.security-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}
.security-card{
  border:1px solid var(--line); border-radius: var(--radius-m); padding: 28px; background:#fff;
}
.security-card .ic{
  width:44px; height:44px; border-radius: 10px;
  background: rgba(47,111,237,0.09); color: var(--signal);
  display:grid; place-items:center; margin-bottom:18px;
}
.security-card h3{ font-size:17px; margin-bottom:8px; }
.security-card p{ font-size:13.5px; }
.compliance-strip{
  display:flex; flex-wrap:wrap; gap:14px; margin-top: 32px;
}
.compliance-chip{
  font-family: var(--mono); font-size: 12px;
  border:1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  color: var(--slate);
}

/* -------------------- Pricing -------------------- */
.pricing-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items:stretch;
}
.price-card{
  border:1px solid var(--line); border-radius: var(--radius-l); padding: 32px;
  background:#fff; display:flex; flex-direction:column;
}
.price-card.featured{
  border-color: var(--signal);
  box-shadow: 0 24px 60px -30px rgba(47,111,237,0.35);
  position:relative;
}
.price-card.featured::before{
  content:"Most flexible";
  position:absolute; top:-13px; left:32px;
  background: var(--signal); color:#fff; font-size:11.5px; font-weight:600;
  padding: 5px 12px; border-radius:999px; letter-spacing:.03em;
}
.price-card.enterprise{ background: var(--ink); border-color: var(--ink); color:#fff; }
.price-card.enterprise h3, .price-card.enterprise .price{ color:#fff; }
.price-card.enterprise p, .price-card.enterprise li{ color: var(--slate-dim); }
.price-card h3{ font-size:19px; }
.price-card .price{
  font-family: var(--mono); font-size: 36px; font-weight:600; color: var(--ink);
  margin: 14px 0 4px;
}
.price-card .price span{ font-size:14px; color:var(--slate-dim); font-weight:400; }
.price-card .desc{ font-size:13.5px; margin-bottom: 22px; }
.price-card ul{ margin: 22px 0; flex:1; }
.price-card li{
  font-size: 14px; padding: 9px 0; border-top:1px solid var(--line);
  display:flex; gap:10px; align-items:flex-start;
}
.price-card.enterprise li{ border-top-color: var(--line-dark); }
.price-card li:first-child{ border-top:none; }
.price-card li svg{ color: var(--gain); flex:none; margin-top:2px; }

/* -------------------- Contact form -------------------- */
.contact-wrap{
  display:grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.field{ margin-bottom: 18px; }
.field label{
  display:block; font-size: 13px; font-weight:600; color: var(--deep); margin-bottom: 7px;
}
.field input, .field textarea, .field select{
  width: 100%; padding: 13px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line); font-family: var(--body); font-size: 14.5px;
  background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: var(--signal); box-shadow: 0 0 0 3px rgba(47,111,237,0.13); outline:none;
}
.field textarea{ resize: vertical; min-height: 110px; }
.field.error input, .field.error textarea{ border-color: #D64545; }
.field .err-msg{ font-size:12px; color:#D64545; margin-top:5px; display:none; }
.field.error .err-msg{ display:block; }
.form-status{
  display:none; padding: 14px 16px; border-radius: var(--radius-s);
  background: rgba(35,195,158,0.1); color: #0C8F6E; font-size: 14px; font-weight:500; margin-top: 12px;
}
.form-status.show{ display:block; }

/* -------------------- CTA band -------------------- */
.cta-band{
  background: linear-gradient(120deg, var(--deep), var(--ink) 70%);
  border-radius: var(--radius-l);
  padding: 64px;
  text-align:center;
  color:#fff;
  position: relative;
  overflow:hidden;
}
.cta-band h2{ color:#fff; font-size: clamp(26px,3vw,36px); }
.cta-band p{ color: var(--slate-dim); max-width: 46ch; margin: 0 auto 30px; }
.cta-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* -------------------- Footer -------------------- */
footer{ background: var(--ink); color: var(--slate-dim); padding: 70px 0 30px; }
.footer-grid{
  display:grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px;
  padding-bottom: 50px; border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand{ color:#fff; margin-bottom: 14px; }
.footer-brand p{ font-size: 13.5px; max-width: 30ch; }
.footer-col h4{
  font-family: var(--body); color:#fff; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 16px;
}
.footer-col a{
  display:block; font-size: 14px; color: var(--slate-dim); padding: 7px 0; transition: color .2s ease;
}
.footer-col a:hover{ color: #fff; }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; padding-top: 26px;
  font-size: 12.5px; flex-wrap: wrap; gap: 12px;
}

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

/* -------------------- Page hero (inner pages) -------------------- */
.page-hero{
  padding: 74px 0 64px;
  background: var(--paper-dim);
  border-bottom: 1px solid var(--line);
}
.page-hero h1{ font-size: clamp(32px,4vw,48px); max-width: 16ch; }
.page-hero p{ max-width: 56ch; font-size: 16px; }
.breadcrumb{
  font-family: var(--mono); font-size: 12px; color: var(--slate-dim); margin-bottom: 18px;
}
.breadcrumb a{ color: var(--signal); }

/* -------------------- Responsive -------------------- */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .route-grid{ grid-template-columns: repeat(2,1fr); }
  .stat-grid{ grid-template-columns: repeat(2,1fr); }
  .tool-block{ grid-template-columns: 1fr; gap: 30px; }
  .tool-block.reverse .tool-copy{ order: 0; }
  .security-grid{ grid-template-columns: 1fr; }
  .pricing-grid{ grid-template-columns: 1fr; }
  .contact-wrap{ grid-template-columns: 1fr; gap: 30px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  section{ padding: 70px 0; }
  .container{ padding: 0 20px; }
  .cta-band{ padding: 40px 24px; }
  .footer-grid{ grid-template-columns: 1fr; }
}
