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

:root,
[data-theme="dark"] {
  --bg: #060a10;
  --bg-card: #0d1219;
  --bg-card-hover: #111820;
  --teal: #26c485;
  --cyan: #00b4d8;
  --gradient: linear-gradient(135deg, var(--teal), var(--cyan));
  --text: #e8edf3;
  --text-muted: #8b9cb3;
  --border: rgba(38, 196, 133, 0.12);
  --border-hover: rgba(0, 180, 216, 0.3);
  --on-accent: #060a10;
  --header-bg: rgba(6, 10, 16, 0.8);
  --nav-mobile-bg: rgba(6, 10, 16, 0.97);
  --topology-line: rgba(148, 163, 184, 0.07);
  --topology-node: rgba(148, 163, 184, 0.14);
  --topology-hub: rgba(148, 163, 184, 0.18);
  --glow-opacity: 0.15;
  --badge-bg: rgba(38, 196, 133, 0.1);
  --accent-surface: rgba(38, 196, 133, 0.1);
  --accent-surface-cyan: rgba(0, 180, 216, 0.1);
  --flow-1: rgba(38, 196, 133, 0.15);
  --flow-2: rgba(38, 196, 133, 0.1);
  --flow-3: rgba(0, 180, 216, 0.1);
  --flow-4: rgba(0, 180, 216, 0.15);
  --logo-shadow: drop-shadow(0 0 40px rgba(38, 196, 133, 0.2));
  --ring-dashed: rgba(0, 180, 216, 0.15);
  --btn-shadow: 0 4px 24px rgba(38, 196, 133, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: "Vazirmatn", system-ui, sans-serif;
  --header-h: 72px;
}

[data-theme="light"] {
  --bg: #f2f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f7fafc;
  --teal: #1aab6f;
  --cyan: #0096b8;
  --text: #152030;
  --text-muted: #5c6f85;
  --border: rgba(26, 171, 111, 0.16);
  --border-hover: rgba(0, 150, 184, 0.35);
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --topology-line: rgba(100, 116, 139, 0.09);
  --topology-node: rgba(100, 116, 139, 0.16);
  --topology-hub: rgba(100, 116, 139, 0.2);
  --glow-opacity: 0.1;
  --badge-bg: rgba(26, 171, 111, 0.1);
  --accent-surface: rgba(26, 171, 111, 0.08);
  --accent-surface-cyan: rgba(0, 150, 184, 0.08);
  --flow-1: rgba(26, 171, 111, 0.14);
  --flow-2: rgba(26, 171, 111, 0.09);
  --flow-3: rgba(0, 150, 184, 0.09);
  --flow-4: rgba(0, 150, 184, 0.14);
  --logo-shadow: drop-shadow(0 12px 28px rgba(26, 171, 111, 0.18));
  --ring-dashed: rgba(0, 150, 184, 0.22);
  --btn-shadow: 0 4px 20px rgba(26, 171, 111, 0.22);
  --shadow: 0 8px 32px rgba(15, 40, 70, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* Background effects */
.bg-topology {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: var(--topology-line);
  overflow: hidden;
  opacity: 0.95;
}

.bg-topology__svg {
  width: 100%;
  height: 100%;
}

.topology-lines {
  stroke: var(--topology-line);
  stroke-width: 0.5;
  fill: none;
}

.topology-node {
  fill: var(--topology-node);
}

.topology-hub {
  fill: var(--topology-hub);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--glow-opacity);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

.bg-glow--teal {
  width: 500px;
  height: 500px;
  background: var(--teal);
  top: -100px;
  right: -100px;
}

.bg-glow--cyan {
  width: 400px;
  height: 400px;
  background: var(--cyan);
  bottom: 10%;
  left: -80px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition:
    background 0.3s,
    border-color 0.3s;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--teal);
  border-color: var(--border-hover);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
}

.theme-toggle__icon--sun {
  display: none;
}

.theme-toggle__icon--moon {
  display: block;
}

[data-theme="light"] .theme-toggle__icon--sun {
  display: block;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo img {
  border-radius: 8px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo__text strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.logo__text small {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--teal);
}

.nav__cta {
  padding: 8px 20px;
  background: var(--gradient);
  color: var(--on-accent) !important;
  border-radius: 8px;
  font-weight: 600 !important;
}

.nav__cta:hover {
  opacity: 0.9;
  color: var(--on-accent) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 60px) 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: var(--btn-shadow);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}

.btn--outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--full {
  width: 100%;
}

.hero__stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-size: 1.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Hero visual */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__logo-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: pulse-ring 4s ease-in-out infinite;
}

.hero__logo-ring::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed var(--ring-dashed);
  animation: spin 20s linear infinite;
}

.hero__logo {
  width: 70%;
  height: auto;
  position: relative;
  z-index: 2;
  filter: var(--logo-shadow);
}

.pixel-cluster {
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: 1;
}

.pixel-cluster--tl {
  top: 20px;
  left: 20px;
  background:
    linear-gradient(var(--teal), var(--teal)) 0 0 / 8px 8px,
    linear-gradient(var(--teal), var(--teal)) 12px 8px / 6px 6px,
    linear-gradient(var(--teal), var(--teal)) 20px 0 / 10px 10px,
    linear-gradient(var(--teal), var(--teal)) 8px 16px / 5px 5px;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.pixel-cluster--br {
  bottom: 20px;
  right: 20px;
  background:
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 10px 10px,
    linear-gradient(var(--cyan), var(--cyan)) 14px 6px / 7px 7px,
    linear-gradient(var(--cyan), var(--cyan)) 6px 14px / 5px 5px,
    linear-gradient(var(--cyan), var(--cyan)) 20px 16px / 8px 8px;
  background-repeat: no-repeat;
  opacity: 0.6;
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section__header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.section__header p {
  color: var(--text-muted);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

[data-theme="light"] .card:hover {
  box-shadow: var(--shadow);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-surface);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--teal);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* About */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.about__content > p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.about__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about__list li {
  position: relative;
  padding-right: 24px;
  font-size: 0.95rem;
}

.about__list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gradient);
}

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.flow-node {
  padding: 16px 40px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  width: 100%;
  max-width: 220px;
}

.flow-node--1 {
  background: var(--flow-1);
  color: var(--teal);
}
.flow-node--2 {
  background: var(--flow-2);
  color: var(--teal);
}
.flow-node--3 {
  background: var(--flow-3);
  color: var(--cyan);
}
.flow-node--4 {
  background: var(--flow-4);
  color: var(--cyan);
}

.flow-line {
  width: 2px;
  height: 24px;
  background: var(--gradient);
  opacity: 0.4;
}

/* Capabilities */
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.capability {
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s;
}

.capability:hover {
  border-color: var(--border-hover);
}

.capability__num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.5;
  margin-bottom: 12px;
}

.capability h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.capability p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact */
.contact__box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact__content h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.contact__content > p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contact__link svg {
  width: 20px;
  height: 20px;
  color: var(--teal);
  flex-shrink: 0;
}

.contact__link:hover {
  color: var(--cyan);
}

.form-group {
  margin-bottom: 18px;
}

.form-feedback {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.6;
}

.form-feedback--success {
  background: rgba(38, 196, 133, 0.12);
  border: 1px solid rgba(38, 196, 133, 0.3);
  color: var(--teal);
}

.form-feedback--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

[data-theme="light"] .form-feedback--error {
  color: #dc2626;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.local-captcha {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 14px 16px;
}

.local-captcha__challenge {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.local-captcha__image-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.local-captcha__image-wrap img {
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

.local-captcha__refresh {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
}

.local-captcha__refresh:hover {
  color: var(--teal);
  border-color: var(--border-hover);
}

.local-captcha__input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.local-captcha__input:focus {
  border-color: var(--cyan);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer__brand img {
  border-radius: 6px;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .header__actions {
    gap: 12px;
  }

  .hero__inner,
  .about__inner,
  .contact__box {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .capabilities__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .hero__logo-wrap {
    width: 240px;
    height: 240px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition:
      transform 0.3s,
      opacity 0.3s;
    pointer-events: none;
  }

  .nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__cta {
    text-align: center;
  }
}

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

  .contact__box {
    padding: 32px 24px;
  }

  .hero__stats {
    gap: 20px;
  }

  .logo__text small {
    display: none;
  }
}
