:root {
  --ink: #0b0d10;
  --paper: #ffffff;
  --paper-alt: #f7f8f9;
  --muted: #565c64;
  --line: #e4e6e9;
  --circuit: #d9dce0;
  --amber: #c1752e;
  --amber-dark: #9c5c22;
  --radius: 2px;
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark-main {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}

.wordmark-main {
  font-size: 1.6rem;
  letter-spacing: 0.03em;
}

.wordmark-tag {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

.primary-nav {
  display: flex;
  gap: 2.25rem;
}

.primary-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-color: var(--amber);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(88vh, 720px);
  padding: 3rem 1.5rem;
}

.hero-circuit {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--circuit);
  mask-image: linear-gradient(to left, black 45%, transparent 92%);
  -webkit-mask-image: linear-gradient(to left, black 45%, transparent 92%);
}
.hero-circuit svg { width: 100%; height: 100%; }
.circuit-lines path { opacity: 0.9; }
.circuit-nodes circle { opacity: 0.85; }

.circuit-nodes .pulse {
  animation: pulse 3.2s ease-in-out infinite;
  color: var(--amber);
  fill: var(--amber);
}
.circuit-nodes .pulse:nth-of-type(2) { animation-delay: 0.9s; }
.circuit-nodes .pulse:nth-of-type(3) { animation-delay: 1.8s; }

@keyframes pulse {
  0%, 100% { opacity: 0.35; r: 5; }
  50% { opacity: 1; r: 8; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  padding-left: clamp(0.5rem, 4vw, 3rem);
}

@media (min-width: 900px) {
  .hero-content { margin: 0; }
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--amber-dark);
  margin: 0 0 1rem;
}
.eyebrow.center { text-align: center; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.02;
  margin-bottom: 1.25rem;
}

.hero-lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 2.25rem;
}

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

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover, .btn-solid:focus-visible {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--amber);
  color: var(--amber-dark);
}

.btn svg { width: 16px; height: 16px; }

/* ---------- Sections ---------- */
.section {
  padding: 6rem 1.5rem;
}
.section-alt {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-inner.narrow {
  max-width: 680px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 3rem;
}
.section-title.center { text-align: center; }

.section-inner .eyebrow.center { margin-bottom: 0.75rem; }

/* ---------- Service cards ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.service-card {
  text-align: center;
  padding: 2rem 1.25rem;
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  color: var(--ink);
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.9rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- About ---------- */
.about-copy {
  text-align: center;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 52ch;
  margin: 0 auto 2rem;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.about-list li {
  text-align: center;
  font-size: 1.05rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.about-list li:last-child { border-bottom: none; }

/* ---------- Contact ---------- */
.contact-form {
  margin-top: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  border: none;
  border-bottom: 1.5px solid var(--line);
  padding: 0.6rem 0.1rem;
  background: transparent;
  color: var(--ink);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--amber);
}

.form-submit {
  text-align: center;
  margin-top: 1rem;
}

.form-submit .btn { border: 1.5px solid var(--ink); }

.direct-contact {
  text-align: center;
  color: var(--muted);
  margin-top: 2.5rem;
  font-size: 0.95rem;
}
.direct-contact a {
  color: var(--amber-dark);
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

/* ---------- Mobile nav ---------- */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .primary-nav.open { max-height: 320px; }
  .primary-nav a {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .hero-circuit { mask-image: linear-gradient(to bottom, transparent, black 30%, black 60%, transparent); opacity: 0.6; }
  .hero { min-height: auto; padding: 3rem 1.25rem 4rem; }
}
