/* ============================================
   MANOR SYSTEMS — Stylesheet
   ============================================ */

:root {
  --navy: #0A1F44;
  --navy-dark: #081735;
  --navy-darker: #050E25;
  --blue: #1E90FF;
  --blue-dark: #1565C0;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0F172A;
  --white: #FFFFFF;
  --display: 'Manrope', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

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

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.anim-fadeup { animation: fadeUp 0.8s ease-out both; }
.anim-fadein { animation: fadeIn 0.4s ease-out both; }
.circuit-line { stroke-dasharray: 1000; animation: drawLine 2.5s ease-out forwards; }
.pulse-dot { animation: pulseDot 2s ease-in-out infinite; }

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: all 0.3s ease;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 1024px) { .nav-container { padding: 1rem 3rem; } }

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.logo-img {
  height: 36px !important;
  width: auto !important;
  max-width: 180px;
  display: block;
  transition: opacity 0.2s ease;
  object-fit: contain;
}
.logo-link:hover .logo-img { opacity: 0.85; }
.logo-img-footer {
  height: 32px !important;
  max-width: 160px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
@media (min-width: 768px) {
  .logo-img { height: 40px !important; max-width: 200px; }
  .logo-img-footer { height: 36px !important; max-width: 180px; }
}

.nav-links {
  display: none;
  gap: 2rem;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  color: var(--slate-700);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { width: 100%; }

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

.lang-selector { position: relative; }
.lang-button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: transparent;
  border: none;
  padding: 0.375rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.lang-button:hover {
  color: var(--blue);
  background: var(--slate-100);
}
.lang-button svg {
  transition: transform 0.2s ease;
}
.lang-button.open svg { transform: rotate(180deg); }

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 96px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.lang-menu.open { display: block; animation: fadeIn 0.2s ease; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--slate-700);
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-menu button:hover { background: var(--slate-50); }
.lang-menu button.active {
  color: var(--blue);
  font-weight: 600;
  background: rgba(30, 144, 255, 0.05);
}

.menu-toggle {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--slate-700);
  display: flex;
  align-items: center;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  background: white;
  border-top: 1px solid var(--slate-200);
  padding: 1rem 1.5rem;
}
.mobile-menu.open { display: block; animation: fadeIn 0.2s ease; }
.mobile-menu a {
  display: block;
  padding: 0.875rem 0;
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--slate-100);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.btn svg { transition: transform 0.3s ease; }

.btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: 0 10px 25px rgba(10, 31, 68, 0.3);
}
.btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 20px 35px rgba(10, 31, 68, 0.45);
}
.btn-primary:hover svg:last-child { transform: translate(2px, -2px); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--slate-300);
}
.btn-secondary:hover {
  border-color: var(--navy);
  background: rgba(10, 31, 68, 0.03);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1rem;
  gap: 0.75rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.bg-blob-1 {
  top: 0; right: 0;
  width: 600px; height: 600px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.4), transparent);
}
.bg-blob-2 {
  bottom: 0; left: 0;
  width: 500px; height: 500px;
  background: linear-gradient(45deg, rgba(239, 246, 255, 0.6), transparent);
}
.bg-blob-3 {
  top: 50%; right: 0;
  width: 600px; height: 600px;
  background: rgba(30, 144, 255, 0.1);
  transform: translateY(-50%);
}
.circuit-decor {
  position: absolute;
  top: 25%;
  right: 5%;
  opacity: 0.08;
  display: none;
  pointer-events: none;
}
@media (min-width: 1024px) { .circuit-decor { display: block; } }

.hero-content { max-width: 56rem; position: relative; z-index: 10; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 246, 255, 0.8);
  border: 1px solid rgba(191, 219, 254, 0.6);
  border-radius: 999px;
  margin-bottom: 2rem;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}
.badge span:last-child {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}
.gradient-text {
  background: linear-gradient(90deg, var(--blue), var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--slate-600);
  max-width: 42rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: 6rem 0;
  background: white;
}
@media (min-width: 1024px) { .services { padding: 8rem 0; } }

.section-header {
  max-width: 48rem;
  margin-bottom: 4rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-label.light { color: var(--blue); }
.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.section-title.light { color: white; }
.section-subtitle {
  font-size: 1.125rem;
  color: var(--slate-600);
  line-height: 1.6;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--slate-200);
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  overflow: hidden;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative;
  background: white;
  padding: 2rem;
  transition: background 0.5s ease;
  overflow: hidden;
}
@media (min-width: 1024px) { .service-card { padding: 2.5rem; } }
.service-card:hover { background: var(--slate-50); }
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--navy));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--navy);
  transition: transform 0.5s ease;
}
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(3deg);
}
.service-title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.service-desc {
  color: var(--slate-600);
  font-size: 0.875rem;
  line-height: 1.6;
}
.service-num {
  margin-top: 1.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--slate-300);
  transition: color 0.3s ease;
}
.service-card:hover .service-num { color: var(--blue); }

/* ============================================
   ABOUT
   ============================================ */
.about {
  position: relative;
  padding: 6rem 0;
  background: var(--navy);
  color: white;
  overflow: hidden;
}
@media (min-width: 1024px) { .about { padding: 8rem 0; } }
.about-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(white 1px, transparent 1px),
    linear-gradient(90deg, white 1px, transparent 1px);
  background-size: 50px 50px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
}
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }

.about-text { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .about-text { padding-top: 3rem; } }
.about-text p {
  font-size: 1.125rem;
  color: var(--slate-300);
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }

.stat-value {
  font-family: var(--display);
  font-size: clamp(3.5rem, 6vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, white, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.75rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}
.stat:hover .stat-value { transform: scale(1.05); }
.stat-label {
  font-size: 0.875rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ============================================
   PROCESS
   ============================================ */
.process {
  padding: 6rem 0;
  background: var(--slate-50);
}
@media (min-width: 1024px) { .process { padding: 8rem 0; } }

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

.process-step {
  position: relative;
}
.process-step::after {
  display: none;
  content: '';
  position: absolute;
  top: 2rem;
  left: 60%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--slate-300), transparent);
}
@media (min-width: 1024px) {
  .process-step:not(:last-child)::after { display: block; }
}
.process-num {
  font-family: var(--display);
  font-size: clamp(4.5rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--slate-200);
  line-height: 1;
  margin-bottom: 1rem;
  transition: color 0.5s ease;
}
.process-step:hover .process-num { color: var(--blue); }
.process-title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.process-desc {
  color: var(--slate-600);
  font-size: 0.875rem;
  line-height: 1.6;
  padding-right: 1rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  position: relative;
  padding: 6rem 0;
  background: white;
  overflow: hidden;
}
@media (min-width: 1024px) { .contact { padding: 8rem 0; } }
.contact-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.5), transparent 50%);
  pointer-events: none;
}
.contact-container {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 56rem;
}
.contact-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1.5rem;
}
.contact .section-subtitle {
  margin: 0 auto 3rem;
  max-width: 36rem;
}
.contact-email {
  margin-top: 2.5rem;
  font-size: 0.875rem;
  color: var(--slate-500);
}
.contact-email a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s ease;
  margin-left: 0.25rem;
}
.contact-email a:hover { color: var(--blue); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--navy);
  color: white;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) { .footer-content { flex-direction: row; } }
.footer-rights {
  font-size: 0.75rem;
  color: var(--slate-400);
}
