/* QalqanGroup — Premium dark theme */

:root {
  --bg-main: #0d1117;
  --bg-section: #161b22;
  --bg-card: #21262d;
  --bg-header: rgba(13, 17, 23, 0.92);
  --text-primary: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border-subtle: #30363d;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
  --space: 1.5rem;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* Header / Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: 1rem var(--space);
  min-height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: var(--text-primary);
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.lang-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 64px;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-section) 100%);
}

.hero-inner {
  text-align: center;
  max-width: 720px;
}

.hero-brand {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hero-slogan {
  margin: 0 0 2rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  line-height: 1.5;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  margin: 0 0 2.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
}

/* Services cards */
.services {
  background: var(--bg-section);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space);
}

.card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

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

.card-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* About */
.about {
  background: var(--bg-main);
}

.about-text {
  margin: 0 0 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: var(--text-muted);
}

.about-text:last-of-type {
  margin-bottom: 0;
}

/* Contacts */
.contacts {
  background: var(--bg-section);
}

.contacts-intro {
  margin: 0 0 2rem;
  text-align: center;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contacts-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.contacts-info {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.contacts-info p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.contacts-info p:last-child {
  margin-bottom: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

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

.form-notice {
  margin: 1rem 0 0;
  padding: 1rem;
  text-align: center;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: var(--radius);
}

.form-notice[hidden] {
  display: none;
}

/* Footer */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-main);
}

.footer-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Active nav link */
.nav-link.active {
  color: var(--accent);
}

/* Products page */
.products-hero {
  padding-top: calc(64px + 3rem);
  padding-bottom: 2rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-section) 100%);
}

.products-intro {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.product-detail {
  background: transparent;
}

.product-detail + .product-detail {
  border-top: 1px solid var(--border-subtle);
}

.product-card-full {
  max-width: 960px;
  margin: 0 auto;
}

/* Collapsible product toggle */
.product-toggle {
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.product-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.product-chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.product-chevron::before {
  content: '';
  display: block;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-20%);
  transition: border-color 0.2s;
}

.product-toggle:hover .product-chevron::before {
  border-color: var(--accent);
}

.product-toggle[aria-expanded="true"] .product-chevron {
  transform: rotate(180deg);
}

.product-body {
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.product-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.product-name {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
}

.product-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

.product-tagline {
  margin: 0 0 2.5rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.5;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space);
  margin-bottom: 2.5rem;
}

.feature {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

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

.feature-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.product-tech {
  margin-bottom: 2.5rem;
}

.product-tech-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.product-cta {
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

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

  .product-features {
    grid-template-columns: 1fr;
  }

  .product-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-chevron {
    position: absolute;
    right: 0;
    top: 0;
  }

  .product-toggle {
    position: relative;
    padding-right: 2rem;
  }

  .contacts-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --space: 1rem;
  }

  .hero {
    padding-top: 80px;
  }

  .section {
    padding: 3.5rem 0;
  }
}
