/* ============================================================
   IT Enterprise Solutions — Design System
   Concept: the visual language of structured cabling & networks —
   nodes, connections, patch-panel labels — applied to a clean,
   confident business site. Signal-teal + copper accents on a
   cool slate surface, technical type pairing.
   ============================================================ */

:root {
  /* Color */
  --ink: #101826;
  --ink-soft: #4b5768;
  --ink-faint: #7c8798;
  --surface: #f2f4f6;
  --panel: #ffffff;
  --line: #d8dee4;
  --line-strong: #b9c2cb;
  --signal: #128f80;
  --signal-dark: #0b6e63;
  --signal-tint: #e3f2ef;
  --copper: #b5652f;
  --copper-tint: #f5e9df;
  --navy-deep: #0b1220;

  /* Type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --radius: 3px;
  --radius-lg: 6px;
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Port label (mono tag), grounded in patch-panel labeling ---------- */
.port-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-dark);
  background: var(--signal-tint);
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  padding: 0.3em 0.7em;
  margin-bottom: 1em;
}
.port-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-tint);
}
.port-label.copper { color: var(--copper); background: var(--copper-tint); border-color: var(--copper); }
.port-label.copper::before { background: var(--copper); box-shadow: 0 0 0 3px var(--copper-tint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-on-dark { background: var(--signal); color: #fff; }
.btn-on-dark:hover { background: var(--signal-dark); }

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 244, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo .jack {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--signal);
  flex-shrink: 0;
}
.logo .dim { color: var(--ink-faint); font-weight: 500; }

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); border-bottom-color: var(--signal); }
.nav-cta { display: none; }

.lang-switch {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch a {
  padding: 6px 10px;
  text-decoration: none;
  color: var(--ink-faint);
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.current {
  background: var(--ink);
  color: #fff;
  cursor: default;
}
.lang-switch a + a { border-left: 1px solid var(--line-strong); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--panel);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); }
  .nav-links a:hover, .nav-links a.active { border-left: 3px solid var(--signal); }
}

/* ---------- Hero (home) ---------- */
.hero {
  padding: clamp(48px, 9vw, 100px) 0 clamp(40px, 7vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: 1.15rem; max-width: 46ch; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Diagram (signature element) ---------- */
.diagram-wrap { width: 100%; }
.diagram-wrap svg { width: 100%; height: auto; }
.node-dot { animation: pulse 2.6s ease-in-out infinite; }
.node-dot.d2 { animation-delay: 0.5s; }
.node-dot.d3 { animation-delay: 1s; }
@keyframes pulse {
  0%, 100% { opacity: 0.55; r: 5; }
  50% { opacity: 1; r: 7; }
}
.trace { stroke-dasharray: 6 5; animation: travel 2.4s linear infinite; }
@keyframes travel { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) {
  .node-dot, .trace { animation: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.section-divider { border-top: 1px solid var(--line); }
.section-dark { background: var(--navy-deep); color: #fff; }
.section-dark p { color: #b7c2d1; }
.section-dark h2 { color: #fff; }
.section-alt { background: var(--panel); }

.section-head { max-width: 62ch; margin-bottom: 2.5em; }

/* ---------- Cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--signal); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.2em; }
.card p { flex-grow: 1; }
.card-link { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--signal-dark); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ---------- Feature list (service pages) ---------- */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.feature-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.feature-list li:first-child { border-top: none; }
.feature-list .tick {
  width: 8px; height: 8px; border-radius: 1px;
  background: var(--signal);
  margin-top: 8px;
}
.feature-list strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy-deep);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.25em; }
.cta-banner p { color: #b7c2d1; margin-bottom: 0; }

/* ---------- Page header (service/about/contact pages) ---------- */
.page-head { padding: clamp(40px, 7vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head .eyebrow { margin-bottom: 0.8em; }
.page-head h1 { max-width: 22ch; }
.page-head .lede { font-size: 1.1rem; max-width: 60ch; }

/* ---------- Two-col layout (service pages) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.who-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 24px;
}
.who-box .port-label { margin-bottom: 0.6em; }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-tint);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.88rem; color: var(--ink-faint); margin-top: 14px; }

.contact-info {
  display: grid;
  gap: 22px;
}
.contact-item .port-label { margin-bottom: 0.4em; }
.contact-item strong { display: block; font-size: 1.05rem; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #b7c2d1;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; color: #b7c2d1; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-logo { color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 0.5em; }
.footer-bottom {
  border-top: 1px solid #22304a;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #7c8ba3;
}
.wire-divider {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
  margin: 8px 0 40px;
}
