/* =============================================
   RəqəmLab — Main Stylesheet
   Colors:
     Green:     #24852C
     Dark Navy: #0F2443
     Light:     #E7E7E7
   Font: Montserrat
============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:     #24852C;
  --green-light: #2ea038;
  --navy:      #0F2443;
  --navy-mid:  #162d52;
  --navy-light:#1a3560;
  --light:     #E7E7E7;
  --white:     #ffffff;
  --text:      #c8d4e6;
  --text-dim:  #7a90b0;
  --font:      'Montserrat', sans-serif;
  --radius:    12px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--light);
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

.white { color: var(--white); }
.green { color: var(--green); }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }

/* =============================================
   NAVBAR
============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  background: rgba(15,36,67,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36,133,44,0.12);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(15,36,67,0.98);
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
  border-bottom-color: rgba(36,133,44,0.2);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.nav-logo img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text .white { color: var(--white); }
.logo-text .green { color: var(--green); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--green);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.lang-btn:hover { color: var(--white); }
.lang-btn.active { color: var(--green); background: rgba(36,133,44,0.12); }
.lang-sep { color: var(--text-dim); font-size: 0.75rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
  padding-top: 72px;
}

/* Animated bg lines */
.hero-bg-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.line {
  position: absolute;
  bottom: -10%;
  width: 2px;
  background: linear-gradient(to top, var(--green), transparent);
  opacity: 0.18;
  animation: rise 4s ease-in-out infinite;
}

.l1 { left: 15%; height: 60%; animation-delay: 0s; }
.l2 { left: 50%; height: 80%; animation-delay: 1.5s; }
.l3 { left: 80%; height: 50%; animation-delay: 0.8s; }

@keyframes rise {
  0%, 100% { transform: scaleY(0.6); opacity: 0.1; }
  50%       { transform: scaleY(1); opacity: 0.25; }
}

/* Grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36,133,44,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36,133,44,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 5rem 0;
}

.hero-badge {
  display: inline-block;
  background: rgba(36,133,44,0.15);
  border: 1px solid rgba(36,133,44,0.4);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  animation: fadeDown 0.8s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  animation: fadeUp 0.9s 0.15s ease both;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.9s 0.3s ease both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.9s 0.45s ease both;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(12px); opacity: 0.4; }
}

/* =============================================
   BUTTONS
============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 28px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(36,133,44,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(231,231,231,0.3);
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

.btn-arrow { width: 18px; height: 18px; flex-shrink: 0; }

/* =============================================
   SECTIONS — common
============================================= */
.section { padding: 6rem 0; }

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 28px;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 2px;
  background: var(--text-dim);
}

.section-label.green { color: var(--green); }
.section-label.green::before { background: var(--green); }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-sub {
  font-size: 1rem;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* =============================================
   REVEAL ANIMATION
============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =============================================
   ABOUT
============================================= */
.about { background: var(--navy-mid); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1.2rem;
}

.about-text p {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(36,133,44,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--green);
  background: rgba(36,133,44,0.08);
  transform: translateY(-4px);
}

.stat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-num::after { content: '+'; font-size: 1.4rem; }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* =============================================
   SERVICES
============================================= */
.services { background: var(--navy); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(231,231,231,0.08);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--green);
  transition: height var(--transition);
}

.service-card:hover {
  border-color: rgba(36,133,44,0.35);
  background: rgba(36,133,44,0.06);
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}

.service-card:hover::before { height: 100%; }

.service-icon {
  width: 52px; height: 52px;
  background: rgba(36,133,44,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  padding: 10px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: rgba(36,133,44,0.2);
}

.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
}

/* reveal stagger */
.services-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.services-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

/* =============================================
   WHY US
============================================= */
.why-us {
  background: var(--navy-mid);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.why-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(231,231,231,0.08);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  transition: var(--transition);
}

.why-card:hover {
  border-color: rgba(36,133,44,0.3);
  transform: translateY(-4px);
}

.why-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(36,133,44,0.25);
  line-height: 1;
  margin-bottom: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.why-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.7rem;
}

.why-card p {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
}

.why-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.why-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.why-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.why-grid .reveal:nth-child(4) { transition-delay: 0.26s; }

/* =============================================
   CONTACT
============================================= */
.contact { background: var(--navy); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
  margin-top: 2.5rem;
}

.contact-info { display: flex; flex-direction: column; gap: 2rem; }

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 44px; height: 44px;
  background: rgba(36,133,44,0.12);
  border: 1px solid rgba(36,133,44,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px;
}

.contact-icon svg { width: 100%; height: 100%; }

.ci-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.ci-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  transition: color var(--transition);
}

a.ci-value:hover { color: var(--green); }

/* Contact Form */
.contact-form-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(231,231,231,0.08);
  border-radius: 16px;
  padding: 2.5rem;
}

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

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(231,231,231,0.12);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 12px 14px;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  resize: vertical;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  background: rgba(36,133,44,0.06);
}

.form-group input.invalid,
.form-group textarea.invalid { border-color: #e05555; }

.field-error {
  font-size: 0.78rem;
  color: #e05555;
  min-height: 1rem;
  font-weight: 500;
}

/* Honeypot */
.hp-field {
  position: absolute;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.form-success {
  display: none;
  background: rgba(36,133,44,0.15);
  border: 1px solid rgba(36,133,44,0.4);
  color: var(--green);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-success.show { display: block; }

/* =============================================
   FOOTER
============================================= */
.footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(231,231,231,0.07);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
}

.footer-logo img {
  width: 36px; height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--green);
  font-weight: 600;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* =============================================
   KEYFRAMES
============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

/* =============================================
   RESPONSIVE
============================================= */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 2.5rem; }
}

/* Tablet: 768px */
@media (max-width: 768px) {
  /* iPhone notch / Dynamic Island safe area */
  .navbar {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-inner { height: 64px; }

  .nav-links {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    background: rgba(15,36,67,0.99);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem 2rem 2.5rem;
    gap: 1.5rem;
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform var(--transition), visibility var(--transition);
    border-bottom: 1px solid rgba(36,133,44,0.25);
    z-index: 999;
  }

  .nav-links.open {
    transform: none;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.1rem;
    color: var(--white);
  }

  .hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }

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

  .hero-content { padding: 1.5rem 0 2rem; }
  .hero-title { color: var(--white); }
}

/* Mobile: 600px */
@media (max-width: 600px) {
  .section { padding: 4rem 0; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .contact-form-wrap { padding: 1.5rem; }
}

/* Mobile: 400px */
@media (max-width: 400px) {
  .why-grid { grid-template-columns: 1fr; }
  .stat-num { font-size: 1.8rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =============================================
   HERO MOBILE FIX — fit content on screen
============================================= */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh; /* small viewport height - excludes browser UI */
    align-items: flex-start;
    padding-top: 80px;
  }

  .hero-content {
    padding: 2rem 0 2.5rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    margin-bottom: 0.9rem;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
  }

  .hero-badge {
    margin-bottom: 1rem;
  }

  .hero-cta {
    gap: 0.75rem;
  }

  .btn {
    padding: 13px 24px;
    font-size: 0.88rem;
    width: 100%;
    justify-content: center;
  }

  .hero-bg-lines { display: none; } /* cleaner on mobile */
}
