/* ============================================
   Sogdiana Tech Solutions — Shared Styles
   ============================================ */

:root {
  --bg-dark: #0F172A;
  --primary: #2563EB;
  --primary-2: #3B82F6;
  --ink: #1E293B;
  --line: #E2E8F0;
  --bg-soft: #F8FAFC;
  --white: #FFFFFF;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --primary-soft: #eff6ff;
  --error: #dc2626;
  --success: #16a34a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ NAV ============ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--bg-dark);
}
.logo-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 15px;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--bg-dark); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  justify-content: center;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-2); }
.btn-outline {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--bg-dark);
  padding: 4px 8px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-menu a {
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 500;
}

/* ============ HERO ============ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: var(--bg-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 880px;
  margin: 0 auto 24px;
  color: var(--white);
}
.hero h1 span { color: var(--primary-2); }
.hero-sub {
  font-size: 18px;
  color: var(--line);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(226, 232, 240, 0.3);
}
.hero .btn-outline:hover {
  background: var(--white);
  color: var(--bg-dark);
  border-color: var(--white);
}

/* Smaller hero for inner pages */
.hero-sm {
  padding: 80px 0 60px;
}
.hero-sm h1 {
  font-size: clamp(32px, 4.5vw, 48px);
}

/* ============ STATS ============ */
.stats {
  padding: 60px 0;
  background: var(--white);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
}
.stat { text-align: center; }
.stat-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============ SECTIONS ============ */
section { padding: 80px 0; }
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}
.section-header-left {
  text-align: left;
  max-width: 720px;
  margin: 0 0 60px 0;
}
h2 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--bg-dark);
}
h3 {
  color: var(--bg-dark);
  font-weight: 600;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 17px;
}

/* ============ SERVICES ============ */
.services-bg { background: var(--bg-soft); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.2s;
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
.service-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* Detailed service blocks (services.html) */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
  border-bottom: 1px solid var(--line);
}
.service-detail:last-child { border-bottom: none; }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }
.service-detail h3 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.service-detail .lead {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 24px;
}
.service-detail ul {
  list-style: none;
}
.service-detail ul li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--ink-soft);
  font-size: 15px;
}
.service-detail ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 10px;
  width: 20px; height: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.service-visual {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-visual-icon {
  width: 100px; height: 100px;
  border-radius: 20px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ WHY US ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
}
.why-list { list-style: none; }
.why-list li {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.why-list li:last-child { border-bottom: none; }
.why-check {
  width: 24px; height: 24px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}
.why-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: var(--bg-dark);
}
.why-list span {
  color: var(--ink-soft);
  font-size: 15px;
}
.why-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.why-stat-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
}
.why-stat-box .num {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.why-stat-box .lbl {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ INDUSTRIES ============ */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.industry {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s;
}
.industry:hover { border-color: var(--primary); }
.industry h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--bg-dark);
}
.industry p {
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============ PROCESS ============ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin: 0 auto 20px;
}
.step h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--bg-dark);
}
.step p {
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============ CTA ============ */
.cta {
  background: var(--bg-dark);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.cta .container { position: relative; z-index: 1; }
.cta h2 { color: var(--white); }
.cta p {
  color: var(--line);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 32px;
}
.cta .btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(226, 232, 240, 0.3);
}
.cta .btn-outline:hover {
  background: var(--white);
  color: var(--bg-dark);
  border-color: var(--white);
}

/* ============ CONTACT FORM ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 20px; }
.contact-info p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 32px;
}
.contact-details {
  list-style: none;
  margin-bottom: 32px;
}
.contact-details li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.contact-details li:last-child { border-bottom: none; }
.contact-details .icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-details strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--bg-dark);
}
.contact-details a, .contact-details span {
  color: var(--ink-soft);
  font-size: 15px;
}
.contact-details a:hover { color: var(--primary); }

.contact-form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.field label .req { color: var(--error); }
.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.field input:invalid:not(:placeholder-shown),
.field select:invalid:not(:focus) {
  border-color: var(--error);
}
.field .error-msg {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field.has-error .error-msg { display: block; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}

/* Honeypot — must stay hidden from real users but visible to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  margin-top: 8px;
}
.form-submit:hover:not(:disabled) { background: var(--primary-2); }
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}
.form-msg.error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.form-note {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 16px;
  text-align: center;
}

/* ============ FAQ ============ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 17px;
  font-weight: 600;
  color: var(--bg-dark);
  font-family: inherit;
}
.faq-q .plus {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.2s;
  color: var(--ink-soft);
}
.faq-item.open .plus {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--ink-soft);
  font-size: 15px;
}
.faq-a-inner { padding-bottom: 24px; }
.faq-item.open .faq-a { max-height: 600px; }

/* ============ FOOTER ============ */
footer {
  background: var(--bg-dark);
  color: var(--line);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: var(--white); }
.footer-brand p {
  color: var(--ink-mute);
  font-size: 14px;
  margin-top: 16px;
  max-width: 320px;
}
.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--ink-mute);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary-2); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.1);
  color: var(--ink-mute);
  font-size: 13px;
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; padding: 28px; }
  .services-grid, .industries-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  section { padding: 60px 0; }
  .service-detail { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
  .service-detail.reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 24px; }
}
