/* Bitworld Technologies — Modern AI / Software company */

:root {
  --bg: #fafbfc;
  --bg-alt: #f0f2f5;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #e0e7ff;
  --gradient-start: #6366f1;
  --gradient-end: #8b5cf6;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --container: min(1100px, 92vw);
}

*,
*::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);
  background: var(--bg);
}

.container {
  width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Subtle noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.logo-img {
  height: 2rem;
  width: auto;
  display: block;
}

.logo .logo-fallback {
  display: none;
}

.logo-icon {
  color: var(--accent);
  font-size: 0.85em;
}

.nav {
  display: flex;
  gap: 2rem;
}

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

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

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.btn-nav:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
}

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Section label */
.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  top: -200px;
  right: -100px;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-light);
  bottom: -100px;
  left: -100px;
  opacity: 0.6;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-ebook {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1rem;
  padding: 0.4rem 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.hero-ebook:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.hero-ebook::before {
  content: '↓ ';
  font-size: 0.75em;
  opacity: 0.8;
}

.hero-ebook-hint {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin: -0.5rem 0 1rem;
}

.hero-pill {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.text-gradient {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--text-subtle);
}

/* Sections */
section {
  padding: 4.5rem 0;
}

section:nth-child(even) {
  background: var(--bg-alt);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  color: var(--text);
}

/* About */
.about-inner {
  max-width: 680px;
}

.about-content p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.about-lead {
  color: var(--text);
  font-size: 1.125rem;
}

.about-lead strong {
  color: var(--accent);
}

/* Services */
.services .section-label {
  margin-bottom: 0.35rem;
}

.services h2 {
  margin-bottom: 2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.2s;
}

.service-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-featured {
  border-color: var(--accent-light);
  background: linear-gradient(180deg, rgba(224, 231, 255, 0.3) 0%, var(--surface) 100%);
}

.service-card-featured::before {
  opacity: 1;
}

.service-icon {
  display: block;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.service-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.service-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-list li {
  margin-bottom: 0.25rem;
}

.pioneers-box {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.pioneers-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.pioneers-box p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pioneers-cta {
  margin-top: 0.5rem;
}

.services-cta-wrap {
  text-align: center;
  margin: 2rem 0 0;
}

/* Why us / About why */
.about-why {
  margin-top: 0.5rem;
}
.why-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem 2rem;
  max-width: 900px;
}

.why-grid li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.why-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* Industries */
.industries-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 560px;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.industry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.industry-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow);
}

.industry-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.industry-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.industries-cta {
  text-align: center;
  margin: 2rem 0 0;
}

/* Clients & Testimonials */
.clients-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 560px;
}

.clients-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.client-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.client-item strong {
  font-size: 1rem;
  color: var(--text);
}

.client-item span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.testimonials-heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.testimonial-card {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.testimonial-card p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
}

.testimonial-card cite {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-style: normal;
}

.clients-cta {
  text-align: center;
  margin: 0;
}

/* Careers */
.careers-intro {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 560px;
}

.careers-list {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-info .contact-lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text-muted);
}

/* Portfolio (kept for any legacy) */
.portfolio-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 520px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portfolio-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-lg);
}

.portfolio-img-wrap {
  position: relative;
  height: 200px;
  background: linear-gradient(145deg, var(--bg-alt) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-img-wrap img[style*="display: none"] + .portfolio-placeholder-text {
  display: flex;
}

.portfolio-placeholder-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
  background: linear-gradient(145deg, var(--bg-alt) 0%, var(--border) 100%);
}

.portfolio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1rem 1.25rem 0;
  color: var(--text);
}

.portfolio-card p {
  margin: 0.25rem 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Contact */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 1.25rem;
}

.contact-info p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

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

.contact-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

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

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

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

.contact-form button {
  margin-top: 0.25rem;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  background: var(--text);
  color: var(--bg);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.footer .logo {
  color: #fff;
}

.footer .logo-img {
  height: 1.75rem;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer .logo-img[style*="display: none"] + .logo-fallback .logo-icon {
  color: var(--accent-light);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--text-subtle);
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-subtle);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-social a:hover {
  color: #fff;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--text-subtle);
  margin: 0;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin: 0;
  opacity: 0.9;
}

/* Ebook modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal.is-open .modal-content {
  transform: scale(1);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.modal-title {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  padding-right: 2rem;
}

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

.ebook-form,
.ebook-success {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ebook-form label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.ebook-form input {
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.2s;
}

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

.ebook-success {
  text-align: center;
}

.ebook-success-msg {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.ebook-download-btn {
  margin-top: 0.25rem;
}

.ebook-error {
  padding: 1rem 0;
  text-align: center;
}

.ebook-error-msg {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ebook-error-msg a {
  color: var(--accent);
  font-weight: 600;
}

/* Mobile */
@media (max-width: 768px) {
  .btn-nav {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 0;
  }

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

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