/* ============================================================
   SERVOMATRIX — style.css
   Design: Dark industrial-technical, slate & electric cyan
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #080c10;
  --bg-2:        #0d1219;
  --bg-3:        #111820;
  --border:      rgba(255,255,255,0.07);
  --border-lit:  rgba(0,212,180,0.3);

  --cyan:        #00d4b4;
  --cyan-dim:    #00a88e;
  --cyan-glow:   rgba(0,212,180,0.15);
  --amber:       #f5a623;

  --text-primary:   #e8edf2;
  --text-secondary: #7a8a98;
  --text-muted:     #4a5a68;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:  6px;
  --radius-lg: 12px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --section-pad: 100px;
  --container:   1200px;
}

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

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }

/* ── CONTAINER ────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-pad) 0; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--cyan);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.section-header-centered {
  text-align: center;
  margin-bottom: 64px;
}
.section-header-centered .section-tag {
  justify-content: center;
}
.section-header-centered .section-tag::before { display: none; }
.section-header-centered .section-intro {
  margin: 0 auto;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cyan);
  color: #060a0d;
  font-weight: 700;
}
.btn-primary:hover {
  background: #fff;
  color: #060a0d;
  box-shadow: 0 0 30px rgba(0,212,180,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-large { padding: 16px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── NAV ──────────────────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(8,12,16,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.nav-wrapper.scrolled {
  background: rgba(8,12,16,0.96);
  border-color: var(--border-lit);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-svg {
  height: 36px;
  width: auto;
  display: block;
}
.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--cyan);
  color: #060a0d;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-links .nav-cta {
  background: var(--cyan);
  color: #060a0d;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-weight: 700;
}
.nav-links .nav-cta:hover {
  background: #fff;
  color: #060a0d;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

/* Grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,180,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,180,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 40% 50%, black 30%, transparent 80%);
}

/* Scan line animation */
.hero-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
  animation: scan 6s linear infinite;
}
@keyframes scan {
  0%   { top: 0; }
  100% { top: 100%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  max-width: 660px;
  padding-left: 24px;
  margin-left: max(24px, calc((100vw - 1200px)/2));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,180,0.08);
  border: 1px solid var(--border-lit);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  display: block;
}
.hero-heading-line {
  display: block;
}
.hero-heading-line.accent {
  color: var(--cyan);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* BMS Diagram */
.hero-visual {
  position: absolute;
  right: max(24px, calc((100vw - 1200px)/2));
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  z-index: 1;
  opacity: 0.85;
}

.bms-diagram {
  position: relative;
  width: 100%;
  height: 100%;
}

.bms-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: var(--bg-3);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 30px rgba(0,212,180,0.25);
  animation: centerPulse 3s ease-in-out infinite;
}
@keyframes centerPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0,212,180,0.25); }
  50%       { box-shadow: 0 0 50px rgba(0,212,180,0.5); }
}

.bms-core-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-align: center;
  font-weight: 500;
}

.bms-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bms-lines line {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-dasharray: 6 4;
  opacity: 0.4;
  animation: dashMove 3s linear infinite;
}
@keyframes dashMove {
  to { stroke-dashoffset: -40; }
}

.bms-nodes {
  position: absolute;
  inset: 0;
}
.bms-node {
  position: absolute;
  width: 64px;
  height: 64px;
  background: var(--bg-2);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.bms-node:hover {
  background: var(--bg-3);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}
.bms-node span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* positions: top, top-right, bottom-right, bottom, bottom-left, top-left */
.n1 { top:    6%; left: 50%; transform: translateX(-50%); }
.n2 { top:   22%; right: 4%; }
.n3 { bottom: 22%; right: 4%; }
.n4 { bottom:  6%; left: 50%; transform: translateX(-50%); }
.n5 { bottom: 22%; left: 4%; }
.n6 { top:   22%; left: 4%; }

/* ── TICKER ───────────────────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.ticker-track {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.ticker-track .sep {
  color: var(--cyan);
  opacity: 0.5;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── ABOUT ────────────────────────────────────────────────── */
.about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-left p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.02rem;
}
.about-left .btn { margin-top: 8px; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}
.about-card:hover { border-color: var(--border-lit); }

.about-card-icon {
  font-size: 1.4rem;
  color: var(--cyan);
  margin-bottom: 12px;
}
.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.about-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── SERVICES ─────────────────────────────────────────────── */
.services { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-2);
  padding: 32px 28px;
  position: relative;
  transition: background var(--transition);
}
.service-card:hover {
  background: var(--bg-3);
}
.service-card:hover .service-num {
  color: var(--cyan);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: color var(--transition);
}

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--cyan);
  margin-bottom: 16px;
  opacity: 0.8;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── SECTORS ──────────────────────────────────────────────── */
.sectors { background: var(--bg-2); }

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sector-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
}
.sector-card:hover {
  border-color: var(--border-lit);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.sector-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.sector-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.sector-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── PROCESS ──────────────────────────────────────────────── */
.process { background: var(--bg); }

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.process-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
}

.process-step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--cyan);
  line-height: 1;
  padding-top: 4px;
}

.process-step-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.process-step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.process-connector {
  height: 1px;
  background: linear-gradient(90deg, var(--cyan-dim) 0%, transparent 100%);
  opacity: 0.3;
  margin-left: 88px;
}

/* ── CTA BAND ─────────────────────────────────────────────── */
.cta-band {
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-band-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 10px;
}
.cta-band-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
}

/* ── CONTACT ──────────────────────────────────────────────── */
.contact { background: var(--bg-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-left p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 1.02rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-detail-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}
.contact-detail-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a8a98' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.form-group select option {
  background: var(--bg-3);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(0,212,180,0.08);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-notice {
  font-size: 0.875rem;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: none;
}
.form-notice.success {
  display: block;
  background: rgba(0,212,180,0.1);
  border: 1px solid var(--border-lit);
  color: var(--cyan);
}
.form-notice.error {
  display: block;
  background: rgba(245,90,90,0.1);
  border: 1px solid rgba(245,90,90,0.3);
  color: #f5807a;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 260px;
  line-height: 1.65;
}

.footer-links-group h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links-group a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links-group a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-mono {
  font-family: var(--font-mono);
  color: var(--cyan) !important;
  opacity: 0.6;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .hero-visual { display: none; }
  .hero-inner { max-width: 100%; margin-left: auto; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  /* NAV */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { align-self: flex-start; }

  /* HERO */
  .hero { padding: 100px 0 60px; }
  .hero-heading { font-size: clamp(3rem, 12vw, 5rem); }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .stat-divider { display: none; }

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

  /* SECTORS */
  .sectors-grid { grid-template-columns: 1fr; }

  /* PROCESS */
  .process-steps { max-width: 100%; }

  /* CTA */
  .cta-band-inner { flex-direction: column; align-items: flex-start; }

  /* CONTACT */
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }

  /* FOOTER */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
