:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #080808;
  --muted: #5f5f5f;
  --line: #e7e7e7;
  --soft: #f7f7f7;
  --soft-strong: #eeeeee;
  --accent: #ff4d4d;
  --accent-soft: #fff0f1;
  --max: 1120px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 77, 77, 0.08), transparent 22rem),
    linear-gradient(90deg, rgba(8, 8, 8, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 8, 8, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 56px 56px, 56px 56px, auto;
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  transform: translateY(-180%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.section,
.site-footer {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-logo {
  width: 156px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 770 / 88;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a {
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 4vw, 4.5rem);
  min-height: calc(100svh - 84px);
  padding-top: clamp(4.5rem, 10vh, 6.5rem);
  border-top: 0;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 3rem -4rem auto 44%;
  height: 25rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(123, 167, 255, 0.2), rgba(123, 167, 255, 0)),
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  pointer-events: none;
  filter: blur(10px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hero-graphic {
  position: relative;
  justify-self: stretch;
  align-self: center;
  width: min(100%, 620px);
  min-width: 0;
  margin-inline: auto;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 28px 44px rgba(109, 144, 204, 0.18));
}

.hero-graphic svg,
.circuit-board-hero svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}

.circuit-board-hero {
  position: relative;
}

.circuit-field {
  stroke: #d9e1e8;
}

.trace-run path,
.trace-run-vertical path {
  stroke: #d6dee7;
}

.trace-run-alt {
  stroke: #cfd9e4;
}

.trace-terminals circle {
  fill: #f5f9fc;
  stroke: #d0d9e3;
}

.trace-nodes rect {
  fill: #f5f8fc;
  stroke: #c8d3de;
}

.hero-ic path {
  stroke: #c0cad5;
}

.hero-ic-body {
  fill: #f6f9fc;
  stroke: #c8d1db;
}

.inspection-reveal,
.inspection-lens {
  transform-origin: 380px 218px;
  animation: lens-orbit 14s cubic-bezier(0.45, 0.05, 0.2, 1) infinite;
}

.lens-handle,
.lens-rim {
  stroke: #bcc6d3;
}

.lens-glass {
  fill: rgba(255, 255, 255, 0.84);
  stroke: #d9e3ee;
  filter: drop-shadow(0 18px 28px rgba(120, 151, 203, 0.22));
}

.lens-surface {
  fill: rgba(250, 252, 255, 0.96);
}

.lens-grid {
  stroke: #e1e6eb;
}

.lens-board-detail {
  stroke: #ced8e3;
}

.lens-board-detail circle {
  fill: #f2f7fd;
  stroke: #c9d4e0;
}

.trace-reveal path {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 180 220;
  stroke-dashoffset: 180;
  opacity: 0.16;
}

.trace-reveal-a path {
  stroke: #8abaff;
  animation: reveal-analog 14s ease-in-out infinite;
}

.trace-reveal-b path {
  stroke: #5e7cff;
  animation: reveal-digital 14s ease-in-out infinite;
}

.lens-analog-wave,
.lens-digital-wave {
  fill: none;
  opacity: 0;
}

.lens-analog-wave {
  stroke: #6fa8ff;
  filter: drop-shadow(0 0 10px rgba(111, 168, 255, 0.3));
  animation: reveal-analog 14s ease-in-out infinite;
}

.lens-digital-wave {
  stroke: #3f68ff;
  filter: drop-shadow(0 0 12px rgba(63, 104, 255, 0.28));
  animation: reveal-digital 14s ease-in-out infinite;
}

.binary-panel {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #d9e3ee;
  opacity: 0;
  animation: reveal-binary 14s ease-in-out infinite;
}

.binary-reveal text {
  fill: #4f6ecf;
  letter-spacing: 0.12em;
  opacity: 0;
  animation: reveal-binary 14s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 760;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.8vw, 4rem);
  font-weight: 720;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.hero-text,
.section-heading p,
.section-copy,
.contact-section p {
  color: var(--muted);
}

.hero-text {
  max-width: 660px;
  margin-bottom: 2rem;
  font-size: 1.15rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  background: var(--fg);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button-secondary:hover {
  background: var(--soft);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
}

.section-copy p:last-child,
.contact-section p:last-child {
  margin-bottom: 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  min-height: 270px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: auto 1.25rem 1.25rem auto;
  width: 52px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.service-card:hover {
  border-color: #bdbdbd;
  background: var(--bg);
  transform: translateY(-2px);
}

.service-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.service-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg), var(--soft));
}

.service-icon-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  opacity: 1;
  filter: invert(13%) sepia(93%) saturate(5168%) hue-rotate(349deg) brightness(92%) contrast(110%);
}

.turnkey-section {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  border-top: 2px solid var(--fg);
  padding-top: 1rem;
}

.process-list span {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.process-list strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.process-list p {
  margin: 0;
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-actions {
  display: grid;
  gap: 0.8rem;
}

.contact-link {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.contact-link:hover {
  border-color: #bdbdbd;
  background: var(--soft);
}

.contact-link span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-link strong {
  overflow-wrap: anywhere;
  font-size: 1.1rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0;
}

@keyframes lens-orbit {
  0%,
  18%,
  100% {
    transform: translate3d(-176px, -56px, 0) rotate(-4deg);
  }

  28%,
  52% {
    transform: translate3d(18px, -12px, 0) rotate(2deg);
  }

  64%,
  86% {
    transform: translate3d(-102px, -18px, 0) rotate(-1deg);
  }
}

@keyframes reveal-analog {
  0%,
  14% {
    opacity: 0;
    stroke-dashoffset: 180;
  }

  20%,
  48% {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  58%,
  100% {
    opacity: 0;
    stroke-dashoffset: -120;
  }
}

@keyframes reveal-digital {
  0%,
  34% {
    opacity: 0;
    stroke-dashoffset: 180;
  }

  40%,
  74% {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  84%,
  100% {
    opacity: 0;
    stroke-dashoffset: -120;
  }
}

@keyframes reveal-binary {
  0%,
  52% {
    opacity: 0;
    transform: translateY(8px);
  }

  58%,
  82% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0.25;
    transform: translateY(-2px);
  }
}

@media (max-width: 900px) {
  .hero,
  .section-grid,
  .contact-section,
  .turnkey-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 4rem;
    gap: 2rem;
  }

  .hero-graphic {
    width: min(100%, 540px);
    margin-top: 0.5rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
  }

  .site-header .brand {
    width: 100%;
    justify-content: center;
  }

  .brand-logo {
    width: min(280px, 82vw);
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-copy,
  .hero-graphic {
    max-width: 100%;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 230px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .inspection-lens {
    transform: none !important;
  }

  .inspection-reveal {
    transform: none !important;
  }

  .trace-reveal path,
  .lens-analog-wave,
  .lens-digital-wave,
  .binary-panel,
  .binary-reveal text {
    opacity: 1 !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
}
