/* =========================================================
   Begloo — Minimal Tech Theme
   ========================================================= */

:root{
  --bg: #0b1220;
  --bg-soft: #0f1830;
  --surface: #10192f;
  --surface-2: #141f3b;
  --line: rgba(148,178,255,0.14);
  --text: #eef2ff;
  --text-dim: #9fb0d9;
  --accent: #34e0c9;
  --accent-2: #5b8cff;
  --accent-soft: rgba(52,224,201,0.12);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --font-fa: 'Vazirmatn', Tahoma, sans-serif;
  --font-en: 'Poppins', 'Segoe UI', sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: radial-gradient(1200px 800px at 80% -10%, #142248 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font-en);
  line-height: 1.75;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body.lang-fa{ font-family: var(--font-fa); }
body.lang-en{ font-family: var(--font-en); }

a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin:0; padding:0; }
img{ max-width:100%; display:block; }

.container{ max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section{ padding: 72px 0; }

h1,h2,h3,h4{ font-weight: 700; line-height: 1.35; margin: 0 0 16px; letter-spacing: -0.01em; }
h1{ font-size: clamp(28px, 4.2vw, 46px); }
h2{ font-size: clamp(22px, 3vw, 32px); }
p{ color: var(--text-dim); margin: 0 0 14px; }

.eyebrow{
  display:inline-block; font-size: 13px; font-weight:600; letter-spacing:.04em;
  color: var(--accent); background: var(--accent-soft); padding:6px 14px;
  border-radius: 999px; margin-bottom: 16px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 13px 26px; border-radius: 999px; font-weight:600; font-size:15px;
  border: 1px solid transparent; cursor:pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06121c;
  box-shadow: 0 10px 30px rgba(52,224,201,0.25);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px rgba(52,224,201,0.35); }

/* ---------- Animated network background ---------- */
.net-bg{
  position: fixed; inset:0; z-index:-1; opacity:.55; pointer-events:none;
}
.net-svg{ width:100%; height:100%; }
.net-lines line{
  stroke: var(--accent-2); stroke-width: 1; opacity:.25;
  stroke-dasharray: 6 6; animation: dash 18s linear infinite;
}
.net-nodes circle{
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(52,224,201,.8));
  animation: pulse 3.2s ease-in-out infinite;
}
.net-nodes circle:nth-child(2n){ animation-delay: .6s; fill: var(--accent-2); filter: drop-shadow(0 0 6px rgba(91,140,255,.8)); }
.net-nodes circle:nth-child(3n){ animation-delay: 1.2s; }
@keyframes dash{ to{ stroke-dashoffset: -240; } }
@keyframes pulse{ 0%,100%{ r:6; opacity:.9;} 50%{ r:9; opacity:.5;} }

/* ---------- Header ---------- */
.site-header{ position: sticky; top:0; z-index: 50; backdrop-filter: blur(14px); background: rgba(11,18,32,0.72); border-bottom: 1px solid var(--line); }
.header-inner{ display:flex; align-items:center; justify-content:space-between; height:76px; gap:20px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:19px; }
.brand-mark{ color: var(--accent); display:flex; }
.brand-logo{ height:38px; width:auto; }
.main-nav ul{ display:flex; gap:30px; }
.main-nav a{ font-size:15px; color: var(--text-dim); font-weight:500; transition: color .2s; position:relative; }
.main-nav a:hover{ color: var(--text); }
.header-actions{ display:flex; align-items:center; gap:16px; }
.lang-switch{
  font-size:13px; font-weight:600; padding: 8px 16px; border:1px solid var(--line); border-radius: 999px; color: var(--text-dim);
  transition: all .2s;
}
.lang-switch:hover{ color: var(--accent); border-color: var(--accent); }
.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:8px; }
.nav-toggle span{ width:22px; height:2px; background: var(--text); display:block; }

/* ---------- Hero ---------- */
.hero{ padding: 90px 0 40px; position:relative; }
.hero-inner{ display:grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items:center; }
.hero-sub{ font-size: 17px; max-width: 480px; }
.hero-copy .btn{ margin-top: 10px; }

.hero-visual{ position:relative; height: 360px; display:flex; align-items:center; justify-content:center; }
.orbit-ring{
  position:absolute; width: 300px; height:300px; border:1px dashed var(--line); border-radius:50%;
  animation: spin 22s linear infinite;
}
.orbit-ring::before, .orbit-ring::after{
  content:''; position:absolute; width:8px; height:8px; background: var(--accent); border-radius:50%;
  box-shadow: 0 0 12px var(--accent);
}
.orbit-ring::before{ top:-4px; left:50%; }
.orbit-ring::after{ bottom:-4px; left:50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
@keyframes spin{ to{ transform: rotate(360deg); } }

.device-card{
  position:absolute; background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border:1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.device-monitor{ width:220px; height:140px; padding:14px; animation: floatY 5s ease-in-out infinite; }
.device-screen{ position:relative; height:100%; border-radius:8px; background: rgba(52,224,201,.06); border:1px solid var(--line); padding:14px; }
.ping-dot{ position:absolute; top:10px; inset-inline-end:10px; width:10px; height:10px; border-radius:50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s ease-in-out infinite; }
.device-screen .line{ display:block; height:6px; border-radius:4px; background: var(--line); margin-top:12px; animation: grow 3s ease-in-out infinite; }
.device-screen .l1{ width:70%; } .device-screen .l2{ width:50%; animation-delay:.3s;} .device-screen .l3{ width:60%; animation-delay:.6s;}
@keyframes grow{ 0%,100%{ opacity:.5;} 50%{ opacity:1;} }
@keyframes floatY{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }

.device-router{
  width:140px; height:60px; inset-inline-end: 20px; bottom: 20px; display:flex; align-items:center; justify-content:center; gap:10px;
  animation: floatY 4.5s ease-in-out infinite; animation-delay: .4s;
}
.router-light{ width:8px; height:8px; border-radius:50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); animation: pulse 1.6s ease-in-out infinite; }
.router-light:nth-child(2){ animation-delay:.3s; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.router-light:nth-child(3){ animation-delay:.6s; }

/* ---------- Content sections ---------- */
.page-content{ max-width: 880px; }
.page-content h2{ margin-top: 40px; }
.page-content img{ border-radius: var(--radius); margin: 20px 0; }
.page-featured-img{ border-radius: var(--radius); margin-bottom: 30px; box-shadow: var(--shadow); }

.section-head{ margin-bottom: 40px; text-align:center; }
.section-head p{ max-width: 560px; margin: 0 auto; }

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

/* ---------- Contact ---------- */
.contact-grid{ display:grid; grid-template-columns: .8fr 1.2fr; gap: 40px; margin-top: 30px; }
.info-list li{ display:flex; gap:14px; align-items:flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child{ border-bottom:none; }
.icon{ width:20px; height:20px; margin-top:3px; flex-shrink:0; display:inline-block; position:relative; }
.icon::before{ content:''; position:absolute; inset:0; background: var(--accent); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center; }
.icon-phone::before{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.5.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.5.1.4 0 .8-.2 1L6.6 10.8z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.5.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.9 21 3 13.1 3 3c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.2.2 2.4.6 3.5.1.4 0 .8-.2 1L6.6 10.8z'/%3E%3C/svg%3E"); }
.icon-mobile::before{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm5 17a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm5 17a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E"); }
.icon-mail::before{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2V5zm2 2v.01L12 13l8-5.99V7l-8 6-8-6z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2V5zm2 2v.01L12 13l8-5.99V7l-8 6-8-6z'/%3E%3C/svg%3E"); }
.icon-pin::before{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }

.contact-form{ background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding: 28px; display:flex; flex-direction:column; gap:16px; }
.contact-form label{ font-size:14px; color: var(--text-dim); display:flex; flex-direction:column; gap:8px; }
.contact-form input, .contact-form textarea{
  background: var(--bg-soft); border:1px solid var(--line); color: var(--text); border-radius:10px; padding:12px 14px;
  font-family: inherit; font-size:14px; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus{ outline: none; border-color: var(--accent); }
.alert{ padding: 12px 16px; border-radius: 10px; font-size:14px; }
.alert-success{ background: rgba(52,224,201,.12); color: var(--accent); border:1px solid rgba(52,224,201,.3); }
.alert-error{ background: rgba(255,99,99,.12); color:#ff9d9d; border:1px solid rgba(255,99,99,.3); }

/* ---------- Footer ---------- */
.site-footer{ border-top: 1px solid var(--line); margin-top: 60px; background: var(--bg-soft); }
.footer-inner{ display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 56px 0 30px; }
.footer-brand{ margin-bottom: 12px; }
.footer-tagline{ font-size:14px; }
.site-footer h4{ font-size:15px; margin-bottom:16px; }
.footer-contact li{ display:flex; gap:10px; align-items:center; font-size:14px; color: var(--text-dim); margin-bottom:10px; }
.footer-links li{ margin-bottom:10px; }
.footer-links a{ font-size:14px; color: var(--text-dim); }
.footer-links a:hover{ color: var(--accent); }
.footer-bottom{ border-top: 1px solid var(--line); padding: 18px 0; font-size:13px; color: var(--text-dim); text-align:center; }

.not-found{ text-align:center; padding: 120px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-visual{ height: 260px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .main-nav{
    position: fixed; inset-inline-start:0; top:76px; width:100%; background: var(--bg);
    border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .25s ease; z-index:40;
  }
  .main-nav.open{ transform: translateY(0); }
  .main-nav ul{ flex-direction:column; padding: 20px 24px; gap:4px; }
  .main-nav ul li a{ display:block; padding: 12px 0; }
  .nav-toggle{ display:flex; }
}
