:root {
  --primary: #2e55df;
  --secondary: #6174b6;
  --deep-blue: #2848b9;
  --accent: #5972c5;
  --soft-blue: #748ad9;
  --action-blue: #2c4fca;
  --muted-blue: #6b81c9;

  --heading: #172653;
  --body-text: #52617d;
  --background: #ffffff;
  --surface: #f4f6ff;
  --border: #e4e9f6;

  --footer-bg: #172b68;
  --footer-text: #cfd9ff;

  --container-width: 1200px;
  --header-height: 84px;

  --radius-md: 12px;
  --radius-lg: 18px;

  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--body-text);
  background: var(--background);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(100% - 40px, var(--container-width));
  margin-inline: auto;
}

:focus-visible {
  outline: 3px solid var(--soft-blue);
  outline-offset: 4px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 7px 20px rgba(46, 85, 223, 0.15);
}

.btn-primary:hover {
  background: var(--deep-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(46, 85, 223, 0.23);
}

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

.btn-outline:hover {
  background: var(--surface);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 8px 28px rgba(30, 55, 120, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: 170px;
  object-fit: contain;
}

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

.nav-link {
  position: relative;
  color: var(--heading);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.nav-cta {
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 1002;
}

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

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 85px 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 50px;
  padding-bottom: 65px;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 20px;
}

.footer-logo img {
  display: block;
  max-width: 170px;
  max-height: 54px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.9;
  max-width: 310px;
}

.footer-tagline {
  margin-top: 16px;
  color: #ffffff;
  font-weight: 600;
}

.footer-column h3 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 24px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 13px;
}

.footer-column a {
  color: var(--footer-text);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-column p {
  font-size: 14px;
  line-height: 1.85;
}

.footer-downloads {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  margin-top: 20px;
}

.footer-downloads a {
  font-weight: 600;
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--footer-text);
}

/* Tablet */

@media (max-width: 1024px) {
  .main-nav {
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }
}

/* Mobile navigation */

@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .container {
    width: min(100% - 32px, var(--container-width));
  }

  .brand-logo {
    height: 40px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 30px rgba(30, 55, 120, 0.08);
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity var(--transition),
      transform var(--transition),
      visibility var(--transition);
  }

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

  .nav-link {
    padding: 15px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-cta {
    margin-top: 20px;
    width: 100%;
  }

  .site-footer {
    padding-top: 60px;
  }

  .footer-grid {
    gap: 35px;
    padding-bottom: 45px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* BITBIZ Developer Credit */

.footer-developer-credit {
  font-size: 13px;
  color: #aebbd5;
  text-align: center;
}

.footer-developer-credit a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-developer-credit a:hover {
  color: #91aaff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
}
