/* ===== ASCIIFORGE — терминальный техно-минимализм, дуотон зелёный/янтарь ===== */
:root{
  --brand:#00e08a;      /* терминальный зелёный */
  --brand-2:#0aa968;
  --accent:#ffb020;     /* янтарь */
  --bg:#080b0c;
  --surface:#0e1416;
  --surface-2:#121a1c;
  --text:#d8f5e6;
  --muted:#7f9c92;
  --border:#1d2a2a;
  --grad:linear-gradient(135deg,#00e08a 0%,#0aa968 55%,#ffb020 130%);
  --font-mono:"JetBrains Mono","SF Mono","Cascadia Code","Courier New",monospace;
  --font-sans:"Segoe UI",system-ui,-apple-system,"Inter",Roboto,"Helvetica Neue",Arial,sans-serif;
  --radius-1:12px; --radius-2:20px; --radius-3:28px;
  --container:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:var(--font-sans);line-height:1.6;
  -webkit-font-smoothing:antialiased;
  background-image:
    radial-gradient(600px 400px at 12% -5%, rgba(0,224,138,.10), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(255,176,32,.07), transparent 55%);
}
.container{width:100%;max-width:var(--container);margin:0 auto;padding:0 22px}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
h1,h2,h3,h4{font-family:var(--font-sans);line-height:1.02;letter-spacing:-.02em;margin:0}
.muted{color:var(--muted)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  font-weight:700;font-size:.98rem;padding:.85rem 1.5rem;border-radius:999px;
  border:1px solid transparent;cursor:pointer;transition:transform .15s var(--ease-out,ease),filter .15s;
  font-family:var(--font-sans)}
.btn-hero{background:var(--grad);color:#04160e;border:none}
.btn-hero:hover{filter:brightness(1.08);transform:translateY(-2px)}
.btn-line{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn-line:hover{border-color:var(--brand);color:var(--brand)}
.btn-block{width:100%}

/* ===== NAV ===== */
.nav{position:sticky;top:0;z-index:50;
  background:rgba(8,11,12,.72);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border)}
.nav-in{display:flex;align-items:center;gap:20px;height:66px}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--font-mono);font-weight:700}
.brand-mark{color:var(--brand);font-size:1.15rem;background:var(--surface-2);
  border:1px solid var(--border);border-radius:8px;padding:2px 8px}
.brand-name{font-size:1.05rem;letter-spacing:-.5px}
.brand-name b{color:var(--brand)}
.nav-links{display:flex;gap:26px;margin-left:auto;font-size:.94rem;font-family:var(--font-mono)}
.nav-links a{color:var(--muted);transition:color .15s}
.nav-links a:hover{color:var(--brand)}
.nav .btn-hero{padding:.6rem 1.2rem;font-size:.9rem}
.burger{display:none;flex-direction:column;gap:5px;background:none;border:0;cursor:pointer;padding:6px}
.burger span{width:24px;height:2px;background:var(--text);border-radius:2px}
.mobile-menu{display:none;flex-direction:column;padding:10px 22px 18px;gap:4px;
  border-bottom:1px solid var(--border);background:var(--surface);font-family:var(--font-mono)}
.mobile-menu a{padding:10px 0;color:var(--muted);border-bottom:1px solid var(--border)}
.mobile-menu.open{display:flex}

/* ===== HERO ===== */
.hero{position:relative;overflow:hidden;padding:clamp(48px,8vw,100px) 0}
.mesh{position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(500px 380px at 78% 20%, rgba(0,224,138,.16), transparent 65%),
    radial-gradient(420px 320px at 20% 80%, rgba(255,176,32,.12), transparent 60%);}
.hero-in{position:relative;z-index:1;display:grid;grid-template-columns:1.05fr .95fr;
  gap:48px;align-items:center}
.pill{display:inline-block;font-family:var(--font-mono);font-size:.8rem;
  color:var(--brand);border:1px solid var(--border);background:var(--surface);
  padding:.4rem .9rem;border-radius:999px;margin-bottom:22px}
.hero h1{font-size:clamp(2.6rem,6.2vw,5rem);font-weight:800;letter-spacing:-.035em}
.lead{font-size:clamp(1rem,1.6vw,1.18rem);color:var(--muted);max-width:46ch;margin:22px 0 30px}
.hero-cta{display:flex;gap:14px;flex-wrap:wrap}
.hero-stats{display:flex;gap:30px;margin-top:40px;flex-wrap:wrap}
.hero-stats>div{display:flex;flex-direction:column}
.hero-stats b{font-family:var(--font-mono);font-size:1.6rem;color:var(--brand)}
.hero-stats span{font-size:.82rem;color:var(--muted)}

.hero-term{border:1px solid var(--border);border-radius:var(--radius-3);
  background:var(--surface);overflow:hidden;box-shadow:0 30px 80px -40px rgba(0,224,138,.3)}
.term-bar{display:flex;align-items:center;gap:8px;padding:12px 16px;
  border-bottom:1px solid var(--border);background:var(--surface-2);
  font-family:var(--font-mono);font-size:.8rem;color:var(--muted)}
.term-bar i{width:11px;height:11px;border-radius:50%;background:#2a3838}
.term-bar i:nth-child(1){background:#ff5f57}
.term-bar i:nth-child(2){background:var(--accent)}
.term-bar i:nth-child(3){background:var(--brand)}
.term-bar span{margin-left:auto}
.term-body{margin:0;padding:18px;font-family:var(--font-mono);
  font-size:clamp(6px,1.15vw,11px);line-height:1.02;color:var(--brand);
  white-space:pre;overflow:auto;min-height:280px}

/* ===== SECTIONS ===== */
.section{padding:clamp(56px,9vw,110px) 0}
.sec-head{max-width:640px;margin-bottom:44px}
.sec-kicker{font-family:var(--font-mono);font-size:.82rem;color:var(--accent);display:block;margin-bottom:12px}
.sec-head h2{font-size:clamp(1.9rem,4vw,3rem);font-weight:800}
.sec-head p{margin:14px 0 0}
.field-label{font-family:var(--font-mono);font-size:.82rem;color:var(--muted);
  display:block;margin-bottom:8px}
.field-label b{color:var(--brand)}

/* ===== TOOL ===== */
.tool-grid{display:grid;grid-template-columns:340px 1fr;gap:24px;align-items:start}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-2)}
.settings{padding:22px;display:flex;flex-direction:column;gap:20px}
.drop{border:1.5px dashed var(--border);border-radius:var(--radius-1);
  padding:26px 16px;text-align:center;transition:border-color .15s,background .15s;cursor:pointer}
.drop.drag{border-color:var(--brand);background:rgba(0,224,138,.06)}
.drop-inner{display:flex;flex-direction:column;gap:6px;align-items:center}
.drop-ico{font-family:var(--font-mono);font-size:1.5rem;color:var(--brand)}
.drop-inner b{font-size:.95rem}
.drop-inner span,.drop-inner small{font-size:.82rem;color:var(--muted)}
.linkbtn{background:none;border:0;color:var(--accent);cursor:pointer;
  text-decoration:underline;font:inherit;padding:0}
.preview-wrap{border:1px solid var(--border);border-radius:var(--radius-1);padding:12px;background:var(--surface-2)}
.preview-img{border-radius:8px;max-height:180px;width:auto;margin:0 auto}
.ctrl{display:flex;flex-direction:column}
input[type=range]{width:100%;accent-color:var(--brand);cursor:pointer}
select,input[type=text],input[type=email],textarea{
  width:100%;background:var(--surface-2);border:1px solid var(--border);
  border-radius:10px;color:var(--text);padding:.7rem .8rem;font:inherit;font-size:.92rem}
select:focus,input:focus,textarea:focus{outline:none;border-color:var(--brand)}
textarea{resize:vertical;font-family:var(--font-sans)}
.toggles{gap:12px}
.switch{display:flex;align-items:center;gap:10px;font-family:var(--font-mono);
  font-size:.85rem;color:var(--text);cursor:pointer}
.switch input{display:none}
.sw{width:40px;height:22px;border-radius:999px;background:var(--surface-2);
  border:1px solid var(--border);position:relative;transition:background .2s;flex-shrink:0}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;
  border-radius:50%;background:var(--muted);transition:transform .2s,background .2s}
.switch input:checked + .sw{background:rgba(0,224,138,.25);border-color:var(--brand)}
.switch input:checked + .sw::after{transform:translateX(18px);background:var(--brand)}

/* OUTPUT */
.output{display:flex;flex-direction:column;min-height:520px;overflow:hidden}
.out-bar{display:flex;align-items:center;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--border);background:var(--surface-2);flex-wrap:wrap}
.out-tabs{display:flex;align-items:center;gap:7px;font-family:var(--font-mono);
  font-size:.82rem;color:var(--muted)}
.out-tabs i{width:10px;height:10px;border-radius:50%;background:#2a3838}
.out-title{margin-left:6px}
.out-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.chip{font-family:var(--font-mono);font-size:.82rem;background:var(--surface);
  border:1px solid var(--border);color:var(--text);padding:.4rem .8rem;
  border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s}
.chip:hover{border-color:var(--brand);color:var(--brand)}
.out-body{flex:1;overflow:auto;background:#050807;padding:14px}
.ascii{margin:0;font-family:var(--font-mono);font-size:6px;line-height:1;
  white-space:pre;color:var(--brand);letter-spacing:0}
.out-foot{display:flex;justify-content:space-between;gap:14px;padding:12px 16px;
  border-top:1px solid var(--border);font-family:var(--font-mono);font-size:.78rem;flex-wrap:wrap}

/* ===== STEPS ===== */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.step{border:1px solid var(--border);border-radius:var(--radius-2);padding:28px;background:var(--surface)}
.step-n{font-family:var(--font-mono);font-size:1.6rem;color:var(--accent);display:block;margin-bottom:14px}
.step h3{font-size:1.2rem;margin-bottom:10px}
.step p{color:var(--muted);font-size:.95rem;margin:0}

/* ===== GALLERY ===== */
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.gal-card{margin:0;border:1px solid var(--border);border-radius:var(--radius-2);
  background:#050807;overflow:hidden;transition:border-color .15s}
.gal-card:hover{border-color:var(--brand)}
.gal-art{margin:0;padding:24px;font-family:var(--font-mono);font-size:11px;
  line-height:1.05;color:var(--brand);white-space:pre;min-height:190px;
  display:flex;align-items:center;justify-content:center;overflow:auto}
.gal-card figcaption{padding:12px 18px;border-top:1px solid var(--border);
  font-family:var(--font-mono);font-size:.85rem;color:var(--accent);background:var(--surface)}

/* ===== FAQ ===== */
.faq{display:flex;flex-direction:column;gap:12px;max-width:820px}
.faq details{border:1px solid var(--border);border-radius:var(--radius-1);
  background:var(--surface);padding:0 20px}
.faq summary{list-style:none;cursor:pointer;padding:18px 0;font-weight:600;
  font-family:var(--font-mono);font-size:.98rem;display:flex;justify-content:space-between}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--brand);font-size:1.3rem;line-height:1}
.faq details[open] summary::after{content:"–"}
.faq p{margin:0 0 18px;color:var(--muted);font-size:.95rem}

/* ===== CONTACT ===== */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:start}
.contact-copy h2{font-size:clamp(1.8rem,3.5vw,2.6rem);margin:12px 0 16px}
.contact-list{list-style:none;padding:0;margin:24px 0 0;font-family:var(--font-mono);
  display:flex;flex-direction:column;gap:10px}
.contact-list li{color:var(--text);font-size:.95rem}
.contact-list span{display:inline-block;width:90px;color:var(--muted)}
.contact-form{padding:26px;display:flex;flex-direction:column;gap:16px}
.contact-form .field-label{color:var(--text);font-family:var(--font-sans)}
.contact-form input,.contact-form textarea{margin-top:8px}
.alert{padding:.7rem 1rem;border-radius:10px;font-size:.9rem}
.alert.ok{background:rgba(0,224,138,.12);color:var(--brand);border:1px solid var(--brand-2)}
.alert.err{background:rgba(255,95,87,.12);color:#ff8a82;border:1px solid #ff5f57}

/* ===== FOOTER ===== */
.site-footer{border-top:1px solid var(--border);padding:56px 0 28px;background:var(--surface)}
.footer-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:34px}
.footer-col h4{font-family:var(--font-mono);font-size:.82rem;color:var(--accent);
  text-transform:uppercase;letter-spacing:.08em;margin-bottom:14px}
.footer-col a{display:block;color:var(--muted);font-size:.92rem;padding:5px 0;transition:color .15s}
.footer-col a:hover{color:var(--brand)}
.footer-col .brand{margin-bottom:12px}
.footer-col p{font-size:.9rem;margin:0}
.footer-bottom{margin-top:36px;padding-top:22px;border-top:1px solid var(--border);
  font-family:var(--font-mono);font-size:.8rem;color:var(--muted)}

/* ===== RESPONSIVE ===== */
@media(max-width:960px){
  .hero-in{grid-template-columns:1fr}
  .hero-term{order:-1}
  .tool-grid{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr}
  .gallery{grid-template-columns:1fr 1fr}
  .contact-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .nav-links,.nav .btn-hero{display:none}
  .burger{display:flex;margin-left:auto}
  .gallery{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .hero-stats{gap:20px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}