/* ==========================================================================
   Base CSS & Layout - MSTechnologies (Modern 2026 Light Mode)
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmospheric Canvas & Glow for Light Mode */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 132, 255, 0.09), transparent),
    radial-gradient(ellipse 60% 40% at 90% 50%, rgba(0, 163, 255, 0.05), transparent),
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(56, 189, 248, 0.05), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Subtle Light Tech Grid Overlay */
.bg-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Sections */
.section {
  position: relative;
  padding: var(--space-4xl) 0;
  z-index: 1;
}

.section-hero {
  padding-top: calc(var(--nav-height) + 2.5rem);
  padding-bottom: 5rem;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-3xl) auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: rgba(0, 132, 255, 0.08);
  border: 1px solid rgba(0, 132, 255, 0.22);
  border-radius: var(--radius-full);
  color: var(--brand-blue);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.section-pill-dot {
  width: 7px;
  height: 7px;
  background-color: var(--brand-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand-orange-glow);
  animation: pulse 2s infinite ease-in-out;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.2rem;
  color: var(--text-heading);
}

.section-title .text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Modern Gradient Text */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================================================
   Navigation Bar (Light Mode, One-Line Simple Brand Name)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  height: 70px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Single-Line, Simple One-Word Brand Name */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-wrap {
  transform: translateY(-1px);
}

.brand-logo-symbol {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 120, 231, 0.25));
  transition: transform var(--transition-fast);
}

.brand-logo-full {
  height: 46px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-symbol,
.brand-logo:hover .brand-logo-full {
  transform: scale(1.03);
}

.brand-name-single {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.brand-name-single .brand-name-accent {
  color: var(--brand-blue);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

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

/* ==========================================================================
   Button System (Light Mode)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0084ff 0%, #00a3ff 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 132, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 132, 255, 0.45);
  background: linear-gradient(135deg, #006dd4 0%, #0084ff 100%);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border-medium);
  color: var(--text-heading);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(0, 132, 255, 0.4);
  color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.btn-outline-cyan {
  background: rgba(0, 132, 255, 0.06);
  border-color: rgba(0, 132, 255, 0.3);
  color: var(--brand-blue);
}

.btn-outline-cyan:hover {
  background: rgba(0, 132, 255, 0.12);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-heading);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  overflow-y: auto;
  z-index: 999;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.mobile-drawer.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  display: block;
}

/* Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .nav-menu {
    gap: 1.25rem;
  }
}

@media (max-width: 900px) {
  .nav-menu, .nav-actions .btn {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }
  .brand-logo-full {
    height: 40px;
    max-width: 205px;
  }
  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  .brand-logo-full {
    height: 34px;
    max-width: 175px;
  }
  .brand-logo-symbol {
    height: 34px;
  }
  .brand-name-single {
    font-size: 1.2rem;
  }
}

@media (max-width: 360px) {
  .brand-logo-full {
    height: 30px;
    max-width: 155px;
  }
  .brand-name-single {
    font-size: 1.05rem;
  }
}
