
:root {
  --bg: #0f172a;
  --bg-2: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel-strong: rgba(255,255,255,0.10);
  --stroke: rgba(255,255,255,0.14);
  --muted-stroke: rgba(255,255,255,0.10);
  --text: #e6eef8;
  --muted: #a6b2c3;
  --accent-a: #62c053;
  --accent-b: #16a3e1;
  --shadow: 0 24px 80px rgba(2,6,23,0.45);
  --radius: 16px;
}

*{box-sizing:border-box}
html, body {margin:0; padding:0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: radial-gradient(1200px 500px at 70% -200px, rgba(22,163,225,0.22), transparent 60%), radial-gradient(1200px 500px at -10% -200px, rgba(98,192,83,0.20), transparent 60%), linear-gradient(180deg, var(--bg-2), var(--bg));}
a {color: var(--accent-b); text-decoration: none;}
a:hover {opacity:.9}
img {max-width: 100%; display: block;}
.container {max-width: 1200px; margin: 0 auto; padding: 0 20px;}

.grid-2 {display:grid; grid-template-columns: repeat(2, 1fr); gap: 28px;}
.grid-3 {display:grid; grid-template-columns: repeat(3, 1fr); gap: 28px;}
.grid-4 {display:grid; grid-template-columns: repeat(4, 1fr); gap: 28px;}
@media (max-width: 1100px){ .grid-4{grid-template-columns:1fr 1fr} .grid-3{grid-template-columns:1fr 1fr} }
@media (max-width: 780px){ .grid-3,.grid-2{grid-template-columns:1fr} }

/* Header glass */
.site-header{position:sticky; top:0; z-index:70; background: rgba(8,13,25,0.55); backdrop-filter: blur(10px); border-bottom: 1px solid var(--muted-stroke)}
.site-header .container{display:grid; grid-template-columns: auto 1fr auto auto; align-items:center; gap:14px}
.logo img{height:36px}
.nav{display:flex; gap:10px; align-items:center; white-space:nowrap; overflow-x:auto; scrollbar-width:none; min-width:0; justify-content:center}
.nav::-webkit-scrollbar{display:none}
.nav a{padding:12px 10px; border-radius:12px; color:#e6eef8}
.nav a:hover{background: rgba(255,255,255,0.06)}
.cta-header{white-space:nowrap}
.burger{display:none; background:none; border:1px solid var(--muted-stroke); border-radius:10px; font-size:20px; padding:8px 10px; color:#e6eef8}
@media (max-width: 1200px){
  .nav{display:none}
  .nav.open{display:flex; flex-direction:column; align-items:flex-start; width:100%}
  .burger{display:block}
}

/* Hero */
.hero {padding: 72px 0 56px; border-bottom:1px solid var(--muted-stroke);}
.hero h1{font-size: 52px; line-height:1.05; margin:0 0 14px; letter-spacing:-0.02em}
.hero p{font-size: 18px; color: var(--muted); margin:0 0 22px}
@media (max-width: 780px){ .hero h1{font-size:36px} }

/* Sections */
.section{padding:56px 0}
.content h1{margin-top:0}

/* Glass cards */
.card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  backdrop-filter: blur(6px);
}
.card:hover{transform: translateY(-4px); box-shadow: 0 36px 100px rgba(2,6,23,0.6); border-color: rgba(255,255,255,0.24); background: var(--panel-strong)}
.card .icon{
  width: 42px; height: 42px; display:grid; place-items:center;
  border-radius:12px; background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color:white; margin-bottom:12px; box-shadow: 0 8px 20px rgba(22,163,225,.35);
}
.card .icon img, .card .icon svg{width:24px; height:24px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); color:white;}

/* Buttons */
.btn{display:inline-block; padding:12px 18px; border-radius:12px; border:1px solid var(--stroke); font-weight:700; text-align:center; min-height:44px; line-height:20px; color:#e6eef8}
.btn-primary{background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); border-color: transparent; color:#0b1220}
.btn-primary:hover{filter:brightness(.96)}
.btn-secondary{background: rgba(255,255,255,0.04); border-color: var(--stroke); color:#e6eef8}
.btn-secondary:hover{background: rgba(255,255,255,0.08)}

.cta{padding:48px 0; background: rgba(255,255,255,0.03); border-top:1px solid var(--muted-stroke); border-bottom:1px solid var(--muted-stroke)}

/* Tables & forms dark */
.table{width:100%; border-collapse: collapse; background: var(--panel); border:1px solid var(--stroke); border-radius:14px; overflow:hidden}
.table th, .table td{padding:14px 16px; border-bottom:1px solid var(--muted-stroke); text-align:left; color:#e6eef8}
.table thead th{background: rgba(255,255,255,0.06)}

.form {display:grid; gap:14px}
.form label{display:grid; gap:6px; font-weight:600}
.form input, .form textarea {background: rgba(255,255,255,0.04); color:#e6eef8; border:1px solid var(--muted-stroke); border-radius:12px; padding:12px 12px; font:inherit}
.form input::placeholder, .form textarea::placeholder{color:#9aa7b9}

/* FAQ */
.faq details{border:1px solid var(--stroke); border-radius:14px; padding:16px 18px; margin:16px 0; background: rgba(255,255,255,0.04)}
.faq summary{cursor:pointer; font-weight:700}
.faq p{color:#c3cedc}

/* Footer */
.site-footer {background: rgba(255,255,255,0.03); padding: 64px 0; border-top:1px solid var(--muted-stroke)}
.site-footer h4{margin:0 0 12px 0}
.contact-list{list-style:none; padding:0; margin:0}
.contact-list li{margin:6px 0; color:#cbd5e1}
.site-footer a{color:#9ad6ff}


/* Wider gaps */
.grid-3 {gap: 36px;}
.grid-4 {gap: 36px;}

/* Mosaic grid for features with breathing space */
.mosaic {display:grid; grid-template-columns: repeat(12, 1fr); gap: 36px;}
@media (max-width: 1100px){ .mosaic{grid-template-columns: repeat(6, 1fr);} }
@media (max-width: 780px){ .mosaic{grid-template-columns: repeat(1, 1fr);} }

.span-3{grid-column: span 3;}
.span-4{grid-column: span 4;}
.span-5{grid-column: span 5;}
.span-6{grid-column: span 6;}

@media (max-width: 1100px){
  .span-5, .span-6 {grid-column: span 6;}
  .span-3, .span-4 {grid-column: span 3;}
}
@media (max-width: 780px){
  .span-3, .span-4, .span-5, .span-6 {grid-column: span 1;}
}

/* Footer link cards */
.footer-cards{display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 18px;}
.footer-card{background: var(--panel); border:1px solid var(--stroke); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow)}
.footer-card h4{margin-top:0}
.footer-card a{color:#9ad6ff}
.footer-requisites{border-top:1px solid var(--muted-stroke); padding-top:12px; text-align:center; color:#cbd5e1; font-size:14px}



/* Steps & diagram */
.steps .card{min-height: 180px}
.flow-diagram{padding: 16px; margin-top: 24px}
.flow-diagram svg{width:100%; height:auto; display:block}

.footer-requisites .line{display:block; margin:4px 0}


/* Floating CTA */
.floating-cta { position: fixed !important; z-index: 9999 !important; right: 16px !important; bottom: 10px !important; display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.floating-cta-btn.btn.btn-primary{
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
}
.cta-menu{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  padding: 8px;
  min-width: 260px;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.floating-cta.open .cta-menu{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cta-menu a{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #e6eef8;
}
.cta-menu a:hover{ background: rgba(255,255,255,0.06); }
.cta-menu img{ width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }



/* === Mobile optimizations === */
@media (max-width: 640px){
  .container{padding:0 14px}
  .hero{padding:48px 0 32px}
  .hero h1{font-size:28px; line-height:1.12; letter-spacing:-0.01em}
  .hero p{font-size:15px}
  .section{padding:40px 0}
  .grid-2, .grid-3, .mosaic{grid-template-columns:1fr; gap:16px}
  .footer-cards{grid-template-columns:1fr; gap:12px; margin-bottom:10px}
  .footer-card{padding:14px}
  .footer-requisites{font-size:13px; padding-top:10px}
  .footer-requisites .line{display:block; margin:4px 0}
  .cta-row{flex-direction:column; align-items:stretch; gap:10px}
  .btn.full, .cta-row .btn, .form button{width:100%}
  .site-header .container{grid-template-columns:auto 1fr auto}
  .cta-header{display:none}
  .nav.open{width:100%}
  .floating-cta{right:12px !important; bottom:calc(12px + env(safe-area-inset-bottom)) !important}
  .contact-list li{word-break:break-word; overflow-wrap:anywhere}
  .table{min-width:600px}
  .table-responsive{overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--muted-stroke); border-radius:12px}
}



/* === Mobile footer hard fix === */
@media (max-width: 820px){
  html, body{overflow-x:hidden}
  .footer-cards{
    display:grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
  }
  .footer-card{min-width:0 !important; width:100% !important; padding:14px !important}
  .footer-card *{min-width:0}
  .contact-list{word-break: break-word}
  .contact-list li, .contact-list a{
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}


/* Section divider for rhythm */
.section-divider{height:1px; background: linear-gradient(90deg, rgba(98,192,83,.35), rgba(22,163,225,.35)); opacity:.7; margin: 18px 0}

/* A11y focus on dark */
:focus-visible{outline:2px solid var(--accent-b); outline-offset:2px}

/* Prevent horizontal scrolls everywhere */
html, body{overflow-x:hidden}

/* Inline ROI form */
.form-inline-cta{display:grid; grid-template-columns: 1fr auto; gap:10px; margin-top:14px}
.form-inline-cta input[type="email"]{min-width:0}
@media (max-width: 640px){ .form-inline-cta{grid-template-columns:1fr} }

/* Hide floating CTA when overlapping footer */
.floating-cta.hide{opacity:0; pointer-events:none; transform: translateY(12px)}
